From 364e41b9106c248cc9565a72d5f6bd4423fdc102 Mon Sep 17 00:00:00 2001 From: Igor Yalovoy Date: Mon, 17 May 2021 13:55:23 +0300 Subject: [PATCH] Add mainnet artifacts --- .../mainnet/AaveLendIntegration.json | 34 +- .../mainnet/AddLiquidityOperation.json | 32 +- deployments/artifacts/mainnet/BABLToken.json | 206 ++-- .../artifacts/mainnet/BabController.json | 496 ++++++-- .../artifacts/mainnet/BabControllerProxy.json | 40 +- .../mainnet/BalancerIntegration.json | 42 +- .../artifacts/mainnet/BuyOperation.json | 32 +- .../mainnet/CompoundLendIntegration.json | 36 +- .../mainnet/DepositVaultOperation.json | 32 +- .../artifacts/mainnet/GardenFactory.json | 58 +- deployments/artifacts/mainnet/GardenNFT.json | 988 ++++++++++++++++ .../artifacts/mainnet/GardenValuer.json | 35 +- deployments/artifacts/mainnet/IshtarGate.json | 136 +-- .../mainnet/KyberTradeIntegration.json | 38 +- .../artifacts/mainnet/LendOperation.json | 32 +- .../mainnet/OneInchPoolIntegration.json | 42 +- .../mainnet/OneInchTradeIntegration.json | 38 +- .../artifacts/mainnet/PriceOracle.json | 95 +- deployments/artifacts/mainnet/ProxyAdmin.json | 40 +- .../artifacts/mainnet/RewardsDistributor.json | 256 ++-- .../artifacts/mainnet/SafeDecimalMath.json | 20 +- .../artifacts/mainnet/StrategyFactory.json | 48 +- .../artifacts/mainnet/StrategyNFT.json | 1040 +++++++++++++++++ .../mainnet/SushiswapPoolIntegration.json | 40 +- .../artifacts/mainnet/TimeLockRegistry.json | 209 +++- deployments/artifacts/mainnet/Treasury.json | 69 +- .../mainnet/UniswapPoolIntegration.json | 42 +- .../artifacts/mainnet/UniswapTWAPV3.json | 373 ++++++ .../mainnet/YearnVaultIntegration.json | 42 +- .../bd873b418320faeabd457a4fe7c7c19d.json | 427 +++++++ deployments/migrations/027-transfer-tokens.js | 2 +- deployments/migrations/028-ownership.js | 4 + lib/plugins/gasnow.js | 3 +- 33 files changed, 4171 insertions(+), 856 deletions(-) create mode 100644 deployments/artifacts/mainnet/GardenNFT.json create mode 100644 deployments/artifacts/mainnet/StrategyNFT.json create mode 100644 deployments/artifacts/mainnet/UniswapTWAPV3.json create mode 100644 deployments/artifacts/mainnet/solcInputs/bd873b418320faeabd457a4fe7c7c19d.json diff --git a/deployments/artifacts/mainnet/AaveLendIntegration.json b/deployments/artifacts/mainnet/AaveLendIntegration.json index 8dab5ed95..f8036acf3 100644 --- a/deployments/artifacts/mainnet/AaveLendIntegration.json +++ b/deployments/artifacts/mainnet/AaveLendIntegration.json @@ -1,5 +1,5 @@ { - "address": "0xC6EC77668C96189850e973553D3ACDA3040f5c2e", + "address": "0x4C78ab1FF38fb42C96d331F466bD0958E0CAd652", "abi": [ { "inputs": [ @@ -294,30 +294,30 @@ "type": "function" } ], - "transactionHash": "0xfc4b033e247a27975304f81c255dfb89b0dd0f68f5aae8db65903fb1946cad6e", + "transactionHash": "0x550486739d82081fd6e820f7e37c1a8fd3d98cf5db1b8623ec459d61b3180356", "receipt": { "to": null, "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", - "contractAddress": "0xC6EC77668C96189850e973553D3ACDA3040f5c2e", - "transactionIndex": 43, + "contractAddress": "0x4C78ab1FF38fb42C96d331F466bD0958E0CAd652", + "transactionIndex": 29, "gasUsed": "1105409", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x95adbab11d3382eae8befa9f2e9bb30e78777a438fc570388fc76c6cba1ab209", - "transactionHash": "0xfc4b033e247a27975304f81c255dfb89b0dd0f68f5aae8db65903fb1946cad6e", + "blockHash": "0x12d9c20220c08276162383b088f45b3e0ba6a449f1a02575093abf1bfcab0651", + "transactionHash": "0x550486739d82081fd6e820f7e37c1a8fd3d98cf5db1b8623ec459d61b3180356", "logs": [], - "blockNumber": 12361018, - "cumulativeGasUsed": "4592291", + "blockNumber": 12451325, + "cumulativeGasUsed": "3199712", "status": 1, "byzantium": true }, "args": [ - "0xffe7c30daDb1B132b86aB7bbede496615d54c8Ac", + "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F", "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" ], - "solcInputHash": "a02a2075cf667a20c416d2d0a5e8f337", - "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"garden\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assetToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"numTokensToRedeem\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"protocolFee\",\"type\":\"uint256\"}],\"name\":\"TokensRedeemed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"garden\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assetToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"numTokensToSupply\",\"type\":\"uint256\"}],\"name\":\"TokensSupplied\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_assetToken\",\"type\":\"address\"}],\"name\":\"getExchangeRatePerToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_assetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_numTokensToSupply\",\"type\":\"uint256\"}],\"name\":\"getExpectedShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_assetToken\",\"type\":\"address\"}],\"name\":\"getInvestmentToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"initializedByGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_investmentAddress\",\"type\":\"address\"}],\"name\":\"isInvestment\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_assetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_numTokensToRedeem\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minAmountExpected\",\"type\":\"uint256\"}],\"name\":\"redeemTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_assetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_numTokensToSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minAmountExpected\",\"type\":\"uint256\"}],\"name\":\"supplyTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Protocol Aave lend integration.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of the controller\",\"_weth\":\"Address of the WETH ERC20\"}},\"getExpectedShares(address,uint256)\":{\"params\":{\"_numTokensToSupply\":\"Amount of ERC20 tokens to supply\"},\"returns\":{\"_0\":\"uint256 Amount of supply tokens to receive\"}},\"isInvestment(address)\":{\"params\":{\"_investmentAddress\":\"Investment address to check\"},\"returns\":{\"_0\":\"bool True if the address is a investment\"}}},\"title\":\"AaveLendIntegration\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates the integration\"},\"getExpectedShares(address,uint256)\":{\"notice\":\"Gets the amount of cTokens expected to get after depositing ERC20 asset.\"},\"getName()\":{\"notice\":\"Returns the name of the integration\"},\"isInvestment(address)\":{\"notice\":\"Checks whether an investment address is valid\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/integrations/lend/AaveLendIntegration.sol\":\"AaveLendIntegration\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\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 /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\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, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x7b2b8baa20fd60ab4a328c8e34c64a353651b80ba4b5b157cbb61813f6f85d55\",\"license\":\"MIT\"},\"contracts/integrations/BaseIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IIntegration} from '../interfaces/IIntegration.sol';\\nimport {IWETH} from '../interfaces/external/weth/IWETH.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\n\\n/**\\n * @title BaseIntegration\\n * @author Babylon Finance\\n *\\n * Abstract class that houses common Integration-related state and functions.\\n */\\nabstract contract BaseIntegration {\\n using SafeCast for int256;\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlySystemContract() {\\n require(IBabController(controller).isSystemContract(msg.sender), 'Only system can call this');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the controller\\n address public controller;\\n // Wrapped ETH address\\n address public immutable weth;\\n // Name of the integration\\n string public name;\\n mapping(address => bool) public initializedByGarden;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) {\\n require(_controller != address(0), 'Controller must be defined');\\n name = _name;\\n controller = _controller;\\n weth = _weth;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the name of the integration\\n */\\n function getName() external view returns (string memory) {\\n return name;\\n }\\n}\\n\",\"keccak256\":\"0xf15da8b024a5a4f205b363420cb5851fd1c4225970999aed5f00d829bbd4f638\",\"license\":\"Apache License\"},\"contracts/integrations/lend/AaveLendIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\n\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\n\\nimport {AaveToken} from '../../interfaces/external/aave/AaveToken.sol';\\nimport {ILendingPool} from '../../interfaces/external/aave/ILendingPool.sol';\\nimport {ILendingPoolAddressesProvider} from '../../interfaces/external/aave/ILendingPoolAddressesProvider.sol';\\nimport {IProtocolDataProvider} from '../../interfaces/external/aave/IProtocolDataProvider.sol';\\n\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\nimport {LendIntegration} from './LendIntegration.sol';\\n\\n/**\\n * @title AaveLendIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Aave lend integration.\\n */\\ncontract AaveLendIntegration is LendIntegration {\\n using SafeMath for uint256;\\n using SafeCast for uint256;\\n\\n /* ============ Constant ============ */\\n\\n ILendingPool constant lendingPool = ILendingPool(address(0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9)); // Mainnet\\n IProtocolDataProvider constant dataProvider =\\n IProtocolDataProvider(address(0x057835Ad21a177dbdd3090bB1CAE03EaCF78Fc6d)); // Mainnet\\n\\n /* ============ Struct ============ */\\n\\n /* ============ Events ============ */\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n constructor(address _controller, address _weth) LendIntegration('aavelend', _weth, _controller) {}\\n\\n /* ============ External Functions ============ */\\n\\n /* ============ Internal Functions ============ */\\n\\n function _isInvestment(address _assetToken) internal view override returns (bool) {\\n (address aTokenAddress, , ) = dataProvider.getReserveTokensAddresses(_assetToken);\\n return aTokenAddress != address(0);\\n }\\n\\n function _getExpectedShares(\\n address, /* _assetToken */\\n uint256 _numTokensToSupply\\n ) internal pure override returns (uint256) {\\n // love it \\ud83d\\ude0d\\n return _numTokensToSupply;\\n }\\n\\n function _getExchangeRatePerToken(\\n address /* _assetToken */\\n ) internal pure override returns (uint256) {\\n // love it \\ud83d\\ude0d\\n return 1;\\n }\\n\\n /**\\n * Returns calldata for supplying tokens.\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getSupplyCalldata(\\n address _strategy,\\n address _assetToken,\\n uint256 _numTokensToSupply\\n )\\n internal\\n pure\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n // Encode method data for Garden to invoke\\n bytes memory methodData =\\n abi.encodeWithSignature(\\n 'deposit(address,uint256,address,uint16)',\\n _assetToken,\\n _numTokensToSupply,\\n _strategy,\\n 0\\n );\\n return (address(lendingPool), 0, methodData);\\n }\\n\\n /**\\n * Returns calldata for redeeming the collateral\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getRedeemCalldata(\\n address _strategy,\\n address _assetToken,\\n uint256 _numTokensToSupply\\n )\\n internal\\n pure\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n // Encode method data for Garden to invoke\\n bytes memory methodData =\\n abi.encodeWithSignature('withdraw(address,uint256,address)', _assetToken, _numTokensToSupply, _strategy);\\n return (address(lendingPool), 0, methodData);\\n }\\n\\n function _getSpender(\\n address /* _investmentAddress */\\n ) internal pure override returns (address) {\\n return address(lendingPool);\\n }\\n\\n function _getInvestmentToken(address _assetToken) internal view override returns (address) {\\n (address aTokenAddress, , ) = dataProvider.getReserveTokensAddresses(_assetToken);\\n return aTokenAddress;\\n }\\n}\\n\",\"keccak256\":\"0xf0693c4bfbc7f741b5b95ffba369663e619de93a717158171433d47e86b14650\",\"license\":\"Apache License\"},\"contracts/integrations/lend/LendIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\n\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\nimport {ILendIntegration} from '../../interfaces/ILendIntegration.sol';\\n\\nimport {BaseIntegration} from '../BaseIntegration.sol';\\n\\n/**\\n * @title LendIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Base class for integration with passive investments like Yearn, Indexed\\n */\\nabstract contract LendIntegration is BaseIntegration, ReentrancyGuard, ILendIntegration {\\n using SafeMath for uint256;\\n using SafeCast for uint256;\\n\\n /* ============ Struct ============ */\\n struct InvestmentInfo {\\n IStrategy strategy; // Strategy address\\n IGarden garden; // Garden address\\n address assetToken;\\n address investment; // Investment address\\n uint256 investmentTokensInTransaction; // Investment tokens affected by this transaction\\n uint256 investmentTokensInGarden; // Investment tokens garden balance\\n uint256 limitDepositTokenQuantity; // Limit deposit/withdrawal token amount\\n }\\n\\n /* ============ Events ============ */\\n\\n event TokensSupplied(\\n address indexed garden,\\n address indexed strategy,\\n address indexed assetToken,\\n uint256 numTokensToSupply\\n );\\n\\n event TokensRedeemed(\\n address indexed garden,\\n address indexed strategy,\\n address indexed assetToken,\\n uint256 numTokensToRedeem,\\n uint256 protocolFee\\n );\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) BaseIntegration(_name, _weth, _controller) {}\\n\\n /* ============ External Functions ============ */\\n function getInvestmentToken(address _assetToken) external view override returns (address) {\\n return _getInvestmentToken(_assetToken);\\n }\\n\\n /**\\n * Checks whether an investment address is valid\\n *\\n * @param _investmentAddress Investment address to check\\n * @return bool True if the address is a investment\\n */\\n function isInvestment(address _investmentAddress) external view returns (bool) {\\n return _isInvestment(_investmentAddress);\\n }\\n\\n function supplyTokens(\\n address _strategy,\\n address _assetToken,\\n uint256 _numTokensToSupply,\\n uint256 _minAmountExpected\\n ) external override {\\n InvestmentInfo memory investmentInfo =\\n _createInvestmentInfo(\\n _strategy,\\n _assetToken,\\n _getInvestmentToken(_assetToken),\\n _numTokensToSupply,\\n _minAmountExpected\\n );\\n\\n _validatePreJoinInvestmentData(investmentInfo);\\n\\n investmentInfo.strategy.invokeApprove(_getSpender(_assetToken), _assetToken, _numTokensToSupply);\\n\\n (address targetInvestment, uint256 callValue, bytes memory methodData) =\\n _getSupplyCalldata(_strategy, _assetToken, _numTokensToSupply);\\n\\n investmentInfo.strategy.invokeFromIntegration(targetInvestment, callValue, methodData);\\n _validatePostEnterInvestmentData(investmentInfo);\\n\\n emit TokensSupplied(\\n address(investmentInfo.garden),\\n address(investmentInfo.strategy),\\n _assetToken,\\n _numTokensToSupply\\n );\\n }\\n\\n function redeemTokens(\\n address _strategy,\\n address _assetToken,\\n uint256 _numTokensToRedeem,\\n uint256 _minAmountExpected\\n ) external override {\\n InvestmentInfo memory investmentInfo =\\n _createInvestmentInfo(\\n _strategy,\\n _assetToken,\\n _getInvestmentToken(_assetToken),\\n _numTokensToRedeem,\\n _minAmountExpected\\n );\\n\\n _validatePreExitInvestmentData(investmentInfo);\\n\\n (address targetInvestment, uint256 callValue, bytes memory methodData) =\\n _getRedeemCalldata(_strategy, _assetToken, _numTokensToRedeem);\\n\\n investmentInfo.strategy.invokeFromIntegration(targetInvestment, callValue, methodData);\\n\\n _validatePostExitInvestmentData(investmentInfo);\\n\\n emit TokensSupplied(\\n address(investmentInfo.garden),\\n address(investmentInfo.strategy),\\n _assetToken,\\n _numTokensToRedeem\\n );\\n }\\n\\n function getExchangeRatePerToken(address _assetToken) external view override returns (uint256) {\\n return _getExchangeRatePerToken(_assetToken);\\n }\\n\\n /**\\n * Gets the amount of cTokens expected to get after depositing ERC20 asset.\\n *\\n * @param _numTokensToSupply Amount of ERC20 tokens to supply\\n * @return uint256 Amount of supply tokens to receive\\n */\\n function getExpectedShares(address _assetToken, uint256 _numTokensToSupply)\\n external\\n view\\n override\\n returns (uint256)\\n {\\n return _getExpectedShares(_assetToken, _numTokensToSupply);\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Validate pre investment join data. Check investment is valid, token quantity is valid.\\n *\\n * @param _investmentInfo Struct containing investment information used in internal functions\\n */\\n function _validatePreJoinInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\\n require(_isInvestment(_investmentInfo.assetToken), 'The investment address is not valid');\\n require(\\n _investmentInfo.investmentTokensInTransaction > 0,\\n 'Min investment tokens to receive must be greater than 0'\\n );\\n }\\n\\n /**\\n * Validate post enter investment data. Check investment is valid, token quantity is valid.\\n *\\n * @param _investmentInfo Struct containing investment information used in internal functions\\n */\\n function _validatePostEnterInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\\n require(\\n (IERC20(_investmentInfo.investment).balanceOf(address(_investmentInfo.strategy)) >\\n _investmentInfo.investmentTokensInGarden),\\n 'The garden did not receive the investment tokens'\\n );\\n }\\n\\n /**\\n * Validate post exit investment data. Check investment is valid, token quantity is valid.\\n *\\n * @param _investmentInfo Struct containing investment information used in internal functions\\n */\\n function _validatePostExitInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\\n require(\\n IERC20(_investmentInfo.investment).balanceOf(address(_investmentInfo.strategy)) ==\\n _investmentInfo.investmentTokensInGarden - _investmentInfo.investmentTokensInTransaction,\\n 'The garden did not return the investment tokens'\\n );\\n }\\n\\n /**\\n * Validate pre investment data. Check investment is valid, token quantity is valid.\\n *\\n * @param _investmentInfo Struct containing investment information used in internal functions\\n */\\n function _validatePreExitInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\\n require(_isInvestment(_investmentInfo.assetToken), 'The investment address is not valid');\\n require(\\n _investmentInfo.investmentTokensInTransaction > 0,\\n 'Investment tokens to exchange must be greater than 0'\\n );\\n require(\\n _investmentInfo.investmentTokensInGarden >= _investmentInfo.investmentTokensInTransaction,\\n 'The garden does not have enough investment tokens'\\n );\\n }\\n\\n function _isInvestment(\\n address //_investmentAddress\\n ) internal view virtual returns (bool);\\n\\n /**\\n * Create and return InvestmentInfo struct\\n *\\n * return InvestmentInfo Struct containing data for the investment\\n */\\n function _createInvestmentInfo(\\n address _strategy,\\n address _assetToken,\\n address _investmentToken,\\n uint256 _investmentTokensInTransaction,\\n uint256 _limitDepositToken\\n ) internal view returns (InvestmentInfo memory) {\\n InvestmentInfo memory investmentInfo;\\n investmentInfo.strategy = IStrategy(_strategy);\\n investmentInfo.garden = IGarden(investmentInfo.strategy.garden());\\n investmentInfo.assetToken = _assetToken;\\n investmentInfo.investment = _investmentToken;\\n investmentInfo.investmentTokensInGarden = IERC20(_investmentToken).balanceOf(_strategy);\\n investmentInfo.investmentTokensInTransaction = _investmentTokensInTransaction;\\n investmentInfo.limitDepositTokenQuantity = _limitDepositToken;\\n\\n return investmentInfo;\\n }\\n\\n function _getExpectedShares(address, uint256) internal view virtual returns (uint256);\\n\\n function _getExchangeRatePerToken(address) internal view virtual returns (uint256);\\n\\n function _getRedeemCalldata(\\n address, /* _strategy */\\n address, /* _assetToken */\\n uint256 /* _numTokensToSupply */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n /**\\n * Returns calldata for supplying tokens.\\n *\\n * hparam _strategy Address of the strat\\n * hparam _assetToken Address of the token\\n * hparam _numTokensToSupply Number of tokens\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getSupplyCalldata(\\n address, /* _strategy */\\n address, /* _assetToken */\\n uint256 /* _numTokensToSupply */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n function _getSpender(\\n address //_investmentAddress\\n ) internal view virtual returns (address);\\n\\n function _getInvestmentToken(\\n address //_investmentAddress\\n ) internal view virtual returns (address);\\n}\\n\",\"keccak256\":\"0xa4585ca96be145b71adcce3e6cb5814407d9ebb8bf8c14698a5c95d52d07cc2c\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityMinimum(uint256 _minRiskyPairLiquidityEth) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minRiskyPairLiquidityEth() external view returns (uint256);\\n\\n function getUniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0x57cf4ece98219f805a416e8c24728d30d9b37c4126d66785d2617b97e35ffae6\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function nftAddress() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategy(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function reenableEthForStrategies() external;\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x5e460136e0b45024ea1c1f32cde607f3ce75dd5b14cee34007d6bbd08beabc82\",\"license\":\"Apache License\"},\"contracts/interfaces/IIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIntegration\\n * @author Babylon Finance\\n *\\n * Interface for protocol integrations\\n */\\ninterface IIntegration {\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xee03c9274ddf3257e3bfd2bb229fea3412c9105f178e64174f59efeafd53182c\",\"license\":\"Apache License\"},\"contracts/interfaces/ILendIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title ILendIntegration\\n * @author Babylon Finance\\n *\\n * Interface for lending integrations such as Compound, Aave.\\n */\\ninterface ILendIntegration {\\n function supplyTokens(\\n address _strategy,\\n address _assetToken,\\n uint256 _numTokensToSupply,\\n uint256 _minAmountExpected\\n ) external;\\n\\n function redeemTokens(\\n address _strategy,\\n address _assetToken,\\n uint256 _numTokensToRedeem,\\n uint256 _minAmountExpected\\n ) external;\\n\\n function getExpectedShares(address _assetToken, uint256 _numTokensToSupply) external view returns (uint256);\\n\\n function getExchangeRatePerToken(address _assetToken) external view returns (uint256);\\n\\n function getInvestmentToken(address _assetToken) external view returns (address);\\n}\\n\",\"keccak256\":\"0x28ca8cb40b050139b7416224c43de2c14fa7991e0b3769f7bab349e3422fc34f\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital,\\n address _strategyNft\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function strategyNft() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x4396906e436eb68c96715e0a53ae1656ac5d7934ebdaeb58ec3c33953465bc39\",\"license\":\"Apache License\"},\"contracts/interfaces/external/aave/AaveToken.sol\":{\"content\":\"pragma solidity >=0.7.0 <0.9.0;\\n\\ninterface AaveToken {\\n function underlyingAssetAddress() external view returns (address);\\n}\\n\",\"keccak256\":\"0x0d9bc0e573b7b6c34a13af495325c5763e68880061dc7cceb4df7bd689bb7699\"},\"contracts/interfaces/external/aave/DataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: agpl-3.0\\npragma solidity >=0.7.0 <0.9.0;\\n\\nlibrary DataTypes {\\n // refer to the whitepaper, section 1.1 basic concepts for a formal description of these properties.\\n struct ReserveData {\\n //stores the reserve configuration\\n ReserveConfigurationMap configuration;\\n //the liquidity index. Expressed in ray\\n uint128 liquidityIndex;\\n //variable borrow index. Expressed in ray\\n uint128 variableBorrowIndex;\\n //the current supply rate. Expressed in ray\\n uint128 currentLiquidityRate;\\n //the current variable borrow rate. Expressed in ray\\n uint128 currentVariableBorrowRate;\\n //the current stable borrow rate. Expressed in ray\\n uint128 currentStableBorrowRate;\\n uint40 lastUpdateTimestamp;\\n //tokens addresses\\n address aTokenAddress;\\n address stableDebtTokenAddress;\\n address variableDebtTokenAddress;\\n //address of the interest rate strategy\\n address interestRateStrategyAddress;\\n //the id of the reserve. Represents the position in the list of the active reserves\\n uint8 id;\\n }\\n\\n struct ReserveConfigurationMap {\\n //bit 0-15: LTV\\n //bit 16-31: Liq. threshold\\n //bit 32-47: Liq. bonus\\n //bit 48-55: Decimals\\n //bit 56: Reserve is active\\n //bit 57: reserve is frozen\\n //bit 58: borrowing is enabled\\n //bit 59: stable rate borrowing enabled\\n //bit 60-63: reserved\\n //bit 64-79: reserve factor\\n uint256 data;\\n }\\n\\n struct UserConfigurationMap {\\n uint256 data;\\n }\\n\\n enum InterestRateMode {NONE, STABLE, VARIABLE}\\n}\\n\",\"keccak256\":\"0x12425e60a70608813114a27aaf876758fbe2034b6a8fe1f33d03a044defec56a\",\"license\":\"agpl-3.0\"},\"contracts/interfaces/external/aave/ILendingPool.sol\":{\"content\":\"// SPDX-License-Identifier: agpl-3.0\\npragma solidity >=0.7.0 <0.9.0;\\npragma experimental ABIEncoderV2;\\n\\nimport {ILendingPoolAddressesProvider} from './ILendingPoolAddressesProvider.sol';\\nimport {DataTypes} from './DataTypes.sol';\\n\\ninterface ILendingPool {\\n /**\\n * @dev Emitted on deposit()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address initiating the deposit\\n * @param onBehalfOf The beneficiary of the deposit, receiving the aTokens\\n * @param amount The amount deposited\\n * @param referral The referral code used\\n **/\\n event Deposit(\\n address indexed reserve,\\n address user,\\n address indexed onBehalfOf,\\n uint256 amount,\\n uint16 indexed referral\\n );\\n\\n /**\\n * @dev Emitted on withdraw()\\n * @param reserve The address of the underlyng asset being withdrawn\\n * @param user The address initiating the withdrawal, owner of aTokens\\n * @param to Address that will receive the underlying\\n * @param amount The amount to be withdrawn\\n **/\\n event Withdraw(address indexed reserve, address indexed user, address indexed to, uint256 amount);\\n\\n /**\\n * @dev Emitted on borrow() and flashLoan() when debt needs to be opened\\n * @param reserve The address of the underlying asset being borrowed\\n * @param user The address of the user initiating the borrow(), receiving the gardens on borrow() or just\\n * initiator of the transaction on flashLoan()\\n * @param onBehalfOf The address that will be getting the debt\\n * @param amount The amount borrowed out\\n * @param borrowRateMode The rate mode: 1 for Stable, 2 for Variable\\n * @param borrowRate The numeric rate at which the user has borrowed\\n * @param referral The referral code used\\n **/\\n event Borrow(\\n address indexed reserve,\\n address user,\\n address indexed onBehalfOf,\\n uint256 amount,\\n uint256 borrowRateMode,\\n uint256 borrowRate,\\n uint16 indexed referral\\n );\\n\\n /**\\n * @dev Emitted on repay()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The beneficiary of the repayment, getting his debt reduced\\n * @param repayer The address of the user initiating the repay(), providing the gardens\\n * @param amount The amount repaid\\n **/\\n event Repay(address indexed reserve, address indexed user, address indexed repayer, uint256 amount);\\n\\n /**\\n * @dev Emitted on swapBorrowRateMode()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address of the user swapping his rate mode\\n * @param rateMode The rate mode that the user wants to swap to\\n **/\\n event Swap(address indexed reserve, address indexed user, uint256 rateMode);\\n\\n /**\\n * @dev Emitted on setUserUseReserveAsCollateral()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address of the user enabling the usage as collateral\\n **/\\n event ReserveUsedAsCollateralEnabled(address indexed reserve, address indexed user);\\n\\n /**\\n * @dev Emitted on setUserUseReserveAsCollateral()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address of the user enabling the usage as collateral\\n **/\\n event ReserveUsedAsCollateralDisabled(address indexed reserve, address indexed user);\\n\\n /**\\n * @dev Emitted on rebalanceStableBorrowRate()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address of the user for which the rebalance has been executed\\n **/\\n event RebalanceStableBorrowRate(address indexed reserve, address indexed user);\\n\\n /**\\n * @dev Emitted on flashLoan()\\n * @param target The address of the flash loan receiver contract\\n * @param initiator The address initiating the flash loan\\n * @param asset The address of the asset being flash borrowed\\n * @param amount The amount flash borrowed\\n * @param premium The fee flash borrowed\\n * @param referralCode The referral code used\\n **/\\n event FlashLoan(\\n address indexed target,\\n address indexed initiator,\\n address indexed asset,\\n uint256 amount,\\n uint256 premium,\\n uint16 referralCode\\n );\\n\\n /**\\n * @dev Emitted when the pause is triggered.\\n */\\n event Paused();\\n\\n /**\\n * @dev Emitted when the pause is lifted.\\n */\\n event Unpaused();\\n\\n /**\\n * @dev Emitted when a borrower is liquidated. This event is emitted by the LendingPool via\\n * LendingPoolCollateral manager using a DELEGATECALL\\n * This allows to have the events in the generated ABI for LendingPool.\\n * @param collateralAsset The address of the underlying asset used as collateral, to receive as result of the liquidation\\n * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation\\n * @param user The address of the borrower getting liquidated\\n * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover\\n * @param liquidatedCollateralAmount The amount of collateral received by the liiquidator\\n * @param liquidator The address of the liquidator\\n * @param receiveAToken `true` if the liquidators wants to receive the collateral aTokens, `false` if he wants\\n * to receive the underlying collateral asset directly\\n **/\\n event LiquidationCall(\\n address indexed collateralAsset,\\n address indexed debtAsset,\\n address indexed user,\\n uint256 debtToCover,\\n uint256 liquidatedCollateralAmount,\\n address liquidator,\\n bool receiveAToken\\n );\\n\\n /**\\n * @dev Emitted when the state of a reserve is updated. NOTE: This event is actually declared\\n * in the ReserveLogic library and emitted in the updateInterestRates() function. Since the function is internal,\\n * the event will actually be fired by the LendingPool contract. The event is therefore replicated here so it\\n * gets added to the LendingPool ABI\\n * @param reserve The address of the underlying asset of the reserve\\n * @param liquidityRate The new liquidity rate\\n * @param stableBorrowRate The new stable borrow rate\\n * @param variableBorrowRate The new variable borrow rate\\n * @param liquidityIndex The new liquidity index\\n * @param variableBorrowIndex The new variable borrow index\\n **/\\n event ReserveDataUpdated(\\n address indexed reserve,\\n uint256 liquidityRate,\\n uint256 stableBorrowRate,\\n uint256 variableBorrowRate,\\n uint256 liquidityIndex,\\n uint256 variableBorrowIndex\\n );\\n\\n /**\\n * @dev Deposits an `amount` of underlying asset into the reserve, receiving in return overlying aTokens.\\n * - E.g. User deposits 100 USDC and gets in return 100 aUSDC\\n * @param asset The address of the underlying asset to deposit\\n * @param amount The amount to be deposited\\n * @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user\\n * wants to receive them on his own wallet, or a different address if the beneficiary of aTokens\\n * is a different wallet\\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\\n * 0 if the action is executed directly by the user, without any middle-man\\n **/\\n function deposit(\\n address asset,\\n uint256 amount,\\n address onBehalfOf,\\n uint16 referralCode\\n ) external;\\n\\n /**\\n * @dev Withdraws an `amount` of underlying asset from the reserve, burning the equivalent aTokens owned\\n * E.g. User has 100 aUSDC, calls withdraw() and receives 100 USDC, burning the 100 aUSDC\\n * @param asset The address of the underlying asset to withdraw\\n * @param amount The underlying amount to be withdrawn\\n * - Send the value type(uint256).max in order to withdraw the whole aToken balance\\n * @param to Address that will receive the underlying, same as msg.sender if the user\\n * wants to receive it on his own wallet, or a different address if the beneficiary is a\\n * different wallet\\n * @return The final amount withdrawn\\n **/\\n function withdraw(\\n address asset,\\n uint256 amount,\\n address to\\n ) external returns (uint256);\\n\\n /**\\n * @dev Allows users to borrow a specific `amount` of the reserve underlying asset, provided that the borrower\\n * already deposited enough collateral, or he was given enough allowance by a credit delegator on the\\n * corresponding debt token (StableDebtToken or VariableDebtToken)\\n * - E.g. User borrows 100 USDC passing as `onBehalfOf` his own address, receiving the 100 USDC in his wallet\\n * and 100 stable/variable debt tokens, depending on the `interestRateMode`\\n * @param asset The address of the underlying asset to borrow\\n * @param amount The amount to be borrowed\\n * @param interestRateMode The interest rate mode at which the user wants to borrow: 1 for Stable, 2 for Variable\\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\\n * 0 if the action is executed directly by the user, without any middle-man\\n * @param onBehalfOf Address of the user who will receive the debt. Should be the address of the borrower itself\\n * calling the function if he wants to borrow against his own collateral, or the address of the credit delegator\\n * if he has been given credit delegation allowance\\n **/\\n function borrow(\\n address asset,\\n uint256 amount,\\n uint256 interestRateMode,\\n uint16 referralCode,\\n address onBehalfOf\\n ) external;\\n\\n /**\\n * @notice Repays a borrowed `amount` on a specific reserve, burning the equivalent debt tokens owned\\n * - E.g. User repays 100 USDC, burning 100 variable/stable debt tokens of the `onBehalfOf` address\\n * @param asset The address of the borrowed underlying asset previously borrowed\\n * @param amount The amount to repay\\n * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode`\\n * @param rateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable\\n * @param onBehalfOf Address of the user who will get his debt reduced/removed. Should be the address of the\\n * user calling the function if he wants to reduce/remove his own debt, or the address of any other\\n * other borrower whose debt should be removed\\n * @return The final amount repaid\\n **/\\n function repay(\\n address asset,\\n uint256 amount,\\n uint256 rateMode,\\n address onBehalfOf\\n ) external returns (uint256);\\n\\n /**\\n * @dev Allows a borrower to swap his debt between stable and variable mode, or viceversa\\n * @param asset The address of the underlying asset borrowed\\n * @param rateMode The rate mode that the user wants to swap to\\n **/\\n function swapBorrowRateMode(address asset, uint256 rateMode) external;\\n\\n /**\\n * @dev Rebalances the stable interest rate of a user to the current stable rate defined on the reserve.\\n * - Users can be rebalanced if the following conditions are satisfied:\\n * 1. Usage ratio is above 95%\\n * 2. the current deposit APY is below REBALANCE_UP_THRESHOLD * maxVariableBorrowRate, which means that too much has been\\n * borrowed at a stable rate and depositors are not earning enough\\n * @param asset The address of the underlying asset borrowed\\n * @param user The address of the user to be rebalanced\\n **/\\n function rebalanceStableBorrowRate(address asset, address user) external;\\n\\n /**\\n * @dev Allows depositors to enable/disable a specific deposited asset as collateral\\n * @param asset The address of the underlying asset deposited\\n * @param useAsCollateral `true` if the user wants to use the deposit as collateral, `false` otherwise\\n **/\\n function setUserUseReserveAsCollateral(address asset, bool useAsCollateral) external;\\n\\n /**\\n * @dev Function to liquidate a non-healthy position collateral-wise, with Health Factor below 1\\n * - The caller (liquidator) covers `debtToCover` amount of debt of the user getting liquidated, and receives\\n * a proportionally amount of the `collateralAsset` plus a bonus to cover market risk\\n * @param collateralAsset The address of the underlying asset used as collateral, to receive as result of the liquidation\\n * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation\\n * @param user The address of the borrower getting liquidated\\n * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover\\n * @param receiveAToken `true` if the liquidators wants to receive the collateral aTokens, `false` if he wants\\n * to receive the underlying collateral asset directly\\n **/\\n function liquidationCall(\\n address collateralAsset,\\n address debtAsset,\\n address user,\\n uint256 debtToCover,\\n bool receiveAToken\\n ) external;\\n\\n /**\\n * @dev Allows smartcontracts to access the liquidity of the pool within one transaction,\\n * as long as the amount taken plus a fee is returned.\\n * IMPORTANT There are security concerns for developers of flashloan receiver contracts that must be kept into consideration.\\n * For further details please visit https://developers.aave.com\\n * @param receiverAddress The address of the contract receiving the gardens, implementing the IFlashLoanReceiver interface\\n * @param assets The addresses of the assets being flash-borrowed\\n * @param amounts The amounts amounts being flash-borrowed\\n * @param modes Types of the debt to open if the flash loan is not returned:\\n * 0 -> Don't open any debt, just revert if gardens can't be transferred from the receiver\\n * 1 -> Open debt at stable rate for the value of the amount flash-borrowed to the `onBehalfOf` address\\n * 2 -> Open debt at variable rate for the value of the amount flash-borrowed to the `onBehalfOf` address\\n * @param onBehalfOf The address that will receive the debt in the case of using on `modes` 1 or 2\\n * @param params Variadic packed params to pass to the receiver as extra information\\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\\n * 0 if the action is executed directly by the user, without any middle-man\\n **/\\n function flashLoan(\\n address receiverAddress,\\n address[] calldata assets,\\n uint256[] calldata amounts,\\n uint256[] calldata modes,\\n address onBehalfOf,\\n bytes calldata params,\\n uint16 referralCode\\n ) external;\\n\\n /**\\n * @dev Returns the user account data across all the reserves\\n * @param user The address of the user\\n * @return totalCollateralETH the total collateral in ETH of the user\\n * @return totalDebtETH the total debt in ETH of the user\\n * @return availableBorrowsETH the borrowing power left of the user\\n * @return currentLiquidationThreshold the liquidation threshold of the user\\n * @return ltv the loan to value of the user\\n * @return healthFactor the current health factor of the user\\n **/\\n function getUserAccountData(address user)\\n external\\n view\\n returns (\\n uint256 totalCollateralETH,\\n uint256 totalDebtETH,\\n uint256 availableBorrowsETH,\\n uint256 currentLiquidationThreshold,\\n uint256 ltv,\\n uint256 healthFactor\\n );\\n\\n function initReserve(\\n address reserve,\\n address aTokenAddress,\\n address stableDebtAddress,\\n address variableDebtAddress,\\n address interestRateStrategyAddress\\n ) external;\\n\\n function setReserveInterestRateStrategyAddress(address reserve, address rateStrategyAddress) external;\\n\\n function setConfiguration(address reserve, uint256 configuration) external;\\n\\n /**\\n * @dev Returns the configuration of the reserve\\n * @param asset The address of the underlying asset of the reserve\\n * @return The configuration of the reserve\\n **/\\n function getConfiguration(address asset) external view returns (DataTypes.ReserveConfigurationMap memory);\\n\\n /**\\n * @dev Returns the configuration of the user across all the reserves\\n * @param user The user address\\n * @return The configuration of the user\\n **/\\n function getUserConfiguration(address user) external view returns (DataTypes.UserConfigurationMap memory);\\n\\n /**\\n * @dev Returns the normalized income normalized income of the reserve\\n * @param asset The address of the underlying asset of the reserve\\n * @return The reserve's normalized income\\n */\\n function getReserveNormalizedIncome(address asset) external view returns (uint256);\\n\\n /**\\n * @dev Returns the normalized variable debt per unit of asset\\n * @param asset The address of the underlying asset of the reserve\\n * @return The reserve normalized variable debt\\n */\\n function getReserveNormalizedVariableDebt(address asset) external view returns (uint256);\\n\\n /**\\n * @dev Returns the state and configuration of the reserve\\n * @param asset The address of the underlying asset of the reserve\\n * @return The state of the reserve\\n **/\\n function getReserveData(address asset) external view returns (DataTypes.ReserveData memory);\\n\\n function finalizeTransfer(\\n address asset,\\n address from,\\n address to,\\n uint256 amount,\\n uint256 balanceFromAfter,\\n uint256 balanceToBefore\\n ) external;\\n\\n function getReservesList() external view returns (address[] memory);\\n\\n function getAddressesProvider() external view returns (ILendingPoolAddressesProvider);\\n\\n function setPause(bool val) external;\\n\\n function paused() external view returns (bool);\\n}\\n\",\"keccak256\":\"0x89c83a951e484c6a00fba5f70879c0bea4c6fc5d52fcd08b4b0f7eab1e9d8626\",\"license\":\"agpl-3.0\"},\"contracts/interfaces/external/aave/ILendingPoolAddressesProvider.sol\":{\"content\":\"// SPDX-License-Identifier: agpl-3.0\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/**\\n * @title LendingPoolAddressesProvider contract\\n * @dev Main registry of addresses part of or connected to the protocol, including permissioned roles\\n * - Acting also as factory of proxies and admin of those, so with right to change its implementations\\n * - Owned by the Aave Governance\\n * @author Aave\\n **/\\ninterface ILendingPoolAddressesProvider {\\n event MarketIdSet(string newMarketId);\\n event LendingPoolUpdated(address indexed newAddress);\\n event ConfigurationAdminUpdated(address indexed newAddress);\\n event EmergencyAdminUpdated(address indexed newAddress);\\n event LendingPoolConfiguratorUpdated(address indexed newAddress);\\n event LendingPoolCollateralManagerUpdated(address indexed newAddress);\\n event PriceOracleUpdated(address indexed newAddress);\\n event LendingRateOracleUpdated(address indexed newAddress);\\n event ProxyCreated(bytes32 id, address indexed newAddress);\\n event AddressSet(bytes32 id, address indexed newAddress, bool hasProxy);\\n\\n function getMarketId() external view returns (string memory);\\n\\n function setMarketId(string calldata marketId) external;\\n\\n function setAddress(bytes32 id, address newAddress) external;\\n\\n function setAddressAsProxy(bytes32 id, address impl) external;\\n\\n function getAddress(bytes32 id) external view returns (address);\\n\\n function getLendingPool() external view returns (address);\\n\\n function setLendingPoolImpl(address pool) external;\\n\\n function getLendingPoolConfigurator() external view returns (address);\\n\\n function setLendingPoolConfiguratorImpl(address configurator) external;\\n\\n function getLendingPoolCollateralManager() external view returns (address);\\n\\n function setLendingPoolCollateralManager(address manager) external;\\n\\n function getPoolAdmin() external view returns (address);\\n\\n function setPoolAdmin(address admin) external;\\n\\n function getEmergencyAdmin() external view returns (address);\\n\\n function setEmergencyAdmin(address admin) external;\\n\\n function getPriceOracle() external view returns (address);\\n\\n function setPriceOracle(address priceOracle) external;\\n\\n function getLendingRateOracle() external view returns (address);\\n\\n function setLendingRateOracle(address lendingRateOracle) external;\\n}\\n\",\"keccak256\":\"0xff67e6d985c0674791ddee8ff693498afa654a76a23eaca236678620cbf8ec87\",\"license\":\"agpl-3.0\"},\"contracts/interfaces/external/aave/IProtocolDataProvider.sol\":{\"content\":\"// SPDX-License-Identifier: agpl-3.0\\npragma solidity >=0.7.0 <0.9.0;\\npragma experimental ABIEncoderV2;\\n\\nimport {ILendingPoolAddressesProvider} from './ILendingPoolAddressesProvider.sol';\\n\\ninterface IProtocolDataProvider {\\n struct TokenData {\\n string symbol;\\n address tokenAddress;\\n }\\n\\n function ADDRESSES_PROVIDER() external view returns (ILendingPoolAddressesProvider);\\n\\n function getAllReservesTokens() external view returns (TokenData[] memory);\\n\\n function getAllATokens() external view returns (TokenData[] memory);\\n\\n function getReserveConfigurationData(address asset)\\n external\\n view\\n returns (\\n uint256 decimals,\\n uint256 ltv,\\n uint256 liquidationThreshold,\\n uint256 liquidationBonus,\\n uint256 reserveFactor,\\n bool usageAsCollateralEnabled,\\n bool borrowingEnabled,\\n bool stableBorrowRateEnabled,\\n bool isActive,\\n bool isFrozen\\n );\\n\\n function getReserveData(address asset)\\n external\\n view\\n returns (\\n uint256 availableLiquidity,\\n uint256 totalStableDebt,\\n uint256 totalVariableDebt,\\n uint256 liquidityRate,\\n uint256 variableBorrowRate,\\n uint256 stableBorrowRate,\\n uint256 averageStableBorrowRate,\\n uint256 liquidityIndex,\\n uint256 variableBorrowIndex,\\n uint40 lastUpdateTimestamp\\n );\\n\\n function getUserReserveData(address asset, address user)\\n external\\n view\\n returns (\\n uint256 currentATokenBalance,\\n uint256 currentStableDebt,\\n uint256 currentVariableDebt,\\n uint256 principalStableDebt,\\n uint256 scaledVariableDebt,\\n uint256 stableBorrowRate,\\n uint256 liquidityRate,\\n uint40 stableRateLastUpdated,\\n bool usageAsCollateralEnabled\\n );\\n\\n function getReserveTokensAddresses(address asset)\\n external\\n view\\n returns (\\n address aTokenAddress,\\n address stableDebtTokenAddress,\\n address variableDebtTokenAddress\\n );\\n}\\n\",\"keccak256\":\"0xb356063607b02191d83c4f2faf10c703a0fa18f8cd8088338825fe12a30c797c\",\"license\":\"agpl-3.0\"},\"contracts/interfaces/external/weth/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface IWETH is IERC20 {\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n}\\n\",\"keccak256\":\"0xacc7980a650b7a753ee51f1bbc0ae4f641e84261bcc02cfdaf87ee8136483684\",\"license\":\"MIT\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523480156200001157600080fd5b506040516200139e3803806200139e833981810160405260408110156200003757600080fd5b50805160209182015160408051808201909152600881526718585d995b195b9960c21b93810193909352909181838282826001600160a01b038116620000c4576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c6572206d75737420626520646566696e6564000000000000604482015290519081900360640190fd5b8251620000d99060019060208601906200011c565b50600080546001600160a01b0319166001600160a01b039290921691909117905560601b6001600160601b0319166080525050600160035550620001c892505050565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826200015457600085556200019f565b82601f106200016f57805160ff19168380011785556200019f565b828001600101855582156200019f579182015b828111156200019f57825182559160200191906001019062000182565b50620001ad929150620001b1565b5090565b5b80821115620001ad5760008155600101620001b2565b60805160601c6111b8620001e66000398061041852506111b86000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80639e12fef211610081578063eb40e6001161005b578063eb40e60014610279578063f14b57881461029f578063f77c4791146102db576100c9565b80639e12fef2146101db578063b10198fb14610215578063d0d2d3a21461023b576100c9565b806317d7de7c116100b257806317d7de7c146101835780633fc8cef31461018b5780634deef649146101af576100c9565b806306fdde03146100ce57806307b54c6f1461014b575b600080fd5b6100d66102e3565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101105781810151838201526020016100f8565b50505050905090810190601f16801561013d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101716004803603602081101561016157600080fd5b50356001600160a01b0316610370565b60408051918252519081900360200190f35b6100d6610381565b610193610416565b604080516001600160a01b039092168252519081900360200190f35b610171600480360360408110156101c557600080fd5b506001600160a01b03813516906020013561043a565b610201600480360360208110156101f157600080fd5b50356001600160a01b031661044d565b604080519115158252519081900360200190f35b6102016004803603602081101561022b57600080fd5b50356001600160a01b0316610458565b6102776004803603608081101561025157600080fd5b506001600160a01b0381358116916020810135909116906040810135906060013561046d565b005b6101936004803603602081101561028f57600080fd5b50356001600160a01b03166106b6565b610277600480360360808110156102b557600080fd5b506001600160a01b038135811691602081013590911690604081013590606001356106c1565b610193610937565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103685780601f1061033d57610100808354040283529160200191610368565b820191906000526020600020905b81548152906001019060200180831161034b57829003601f168201915b505050505081565b600061037b82610946565b92915050565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526060939092909183018282801561040c5780601f106103e15761010080835404028352916020019161040c565b820191906000526020600020905b8154815290600101906020018083116103ef57829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000610446838361094c565b9392505050565b600061037b82610951565b60026020526000908152604090205460ff1681565b6000610484858561047d876109f3565b8686610a8a565b905061048f81610be5565b600080600061049f888888610cba565b92509250925083600001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561051c578181015183820152602001610504565b50505050905090810190601f1680156105495780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561056a57600080fd5b505af115801561057e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156105a757600080fd5b81019080805160405193929190846401000000008211156105c757600080fd5b9083019060208201858111156105dc57600080fd5b82516401000000008111828201881017156105f657600080fd5b82525081516020918201929091019080838360005b8381101561062357818101518382015260200161060b565b50505050905090810190601f1680156106505780820380516001836020036101000a031916815260200191505b506040525050505061066184610d59565b8351602080860151604080518a815290516001600160a01b03808d16958116949316927fd17d95895382b096bb1f89ed05a71c3e014d5ecf25944c8f1f27f07b2b9d3194928290030190a45050505050505050565b600061037b826109f3565b60006106d1858561047d876109f3565b90506106dc81610e21565b80516001600160a01b03166397ccdc606106f586610eac565b86866040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561074d57600080fd5b505af1158015610761573d6000803e3d6000fd5b505050506000806000610775888888610ec5565b92509250925083600001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156107f25781810151838201526020016107da565b50505050905090810190601f16801561081f5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561084057600080fd5b505af1158015610854573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561087d57600080fd5b810190808051604051939291908464010000000082111561089d57600080fd5b9083019060208201858111156108b257600080fd5b82516401000000008111828201881017156108cc57600080fd5b82525081516020918201929091019080838360005b838110156108f95781810151838201526020016108e1565b50505050905090810190601f1680156109265780820380516001836020036101000a031916815260200191505b506040525050505061066184610f66565b6000546001600160a01b031681565b50600190565b919050565b60008073057835ad21a177dbdd3090bb1cae03eacf78fc6d6001600160a01b031663d2493b6c846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060606040518083038186803b1580156109b557600080fd5b505afa1580156109c9573d6000803e3d6000fd5b505050506040513d60608110156109df57600080fd5b50516001600160a01b031615159392505050565b60008073057835ad21a177dbdd3090bb1cae03eacf78fc6d6001600160a01b031663d2493b6c846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060606040518083038186803b158015610a5757600080fd5b505afa158015610a6b573d6000803e3d6000fd5b505050506040513d6060811015610a8157600080fd5b50519392505050565b610a92611028565b610a9a611028565b6001600160a01b038716808252604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b891600480820192602092909190829003018186803b158015610af657600080fd5b505afa158015610b0a573d6000803e3d6000fd5b505050506040513d6020811015610b2057600080fd5b50516001600160a01b039081166020838101919091528782166040808501919091528783166060850181905281517f70a08231000000000000000000000000000000000000000000000000000000008152938b166004850152905190926370a08231926024808301939192829003018186803b158015610b9f57600080fd5b505afa158015610bb3573d6000803e3d6000fd5b505050506040513d6020811015610bc957600080fd5b505160a082015260808101939093525060c08201529392505050565b610bf28160400151610951565b610c2d5760405162461bcd60e51b81526004018080602001828103825260238152602001806111606023913960400191505060405180910390fd5b6000816080015111610c705760405162461bcd60e51b815260040180806020018281038252603481526020018061112c6034913960400191505060405180910390fd5b80608001518160a001511015610cb75760405162461bcd60e51b81526004018080602001828103825260318152602001806110656031913960400191505060405180910390fd5b50565b604080516001600160a01b0393841660248201526044810192909252929091166064808301919091528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f69328dec00000000000000000000000000000000000000000000000000000000179052737d2768de32b0b80b7a3454c06bdac94a69ddc7a99160009190565b80608001518160a001510381606001516001600160a01b03166370a0823183600001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610db957600080fd5b505afa158015610dcd573d6000803e3d6000fd5b505050506040513d6020811015610de357600080fd5b505114610cb75760405162461bcd60e51b815260040180806020018281038252602f8152602001806110c6602f913960400191505060405180910390fd5b610e2e8160400151610951565b610e695760405162461bcd60e51b81526004018080602001828103825260238152602001806111606023913960400191505060405180910390fd5b6000816080015111610cb75760405162461bcd60e51b81526004018080602001828103825260378152602001806110f56037913960400191505060405180910390fd5b50737d2768de32b0b80b7a3454c06bdac94a69ddc7a990565b604080516001600160a01b0393841660248201526044810192909252929091166064820152600060848083018290528351808403909101815260a49092019092526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fe8eda9df00000000000000000000000000000000000000000000000000000000179052737d2768de32b0b80b7a3454c06bdac94a69ddc7a992565b8060a0015181606001516001600160a01b03166370a0823183600001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610fc057600080fd5b505afa158015610fd4573d6000803e3d6000fd5b505050506040513d6020811015610fea57600080fd5b505111610cb75760405162461bcd60e51b81526004018080602001828103825260308152602001806110966030913960400191505060405180910390fd5b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c08101919091529056fe5468652067617264656e20646f6573206e6f74206861766520656e6f75676820696e766573746d656e7420746f6b656e735468652067617264656e20646964206e6f7420726563656976652074686520696e766573746d656e7420746f6b656e735468652067617264656e20646964206e6f742072657475726e2074686520696e766573746d656e7420746f6b656e734d696e20696e766573746d656e7420746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030496e766573746d656e7420746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520696e766573746d656e742061646472657373206973206e6f742076616c6964a2646970667358221220eccc62a47c4334dcf28fac867c11c1b5242ff61ba8f70fee99d98bad0147a36a64736f6c63430007060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100c95760003560e01c80639e12fef211610081578063eb40e6001161005b578063eb40e60014610279578063f14b57881461029f578063f77c4791146102db576100c9565b80639e12fef2146101db578063b10198fb14610215578063d0d2d3a21461023b576100c9565b806317d7de7c116100b257806317d7de7c146101835780633fc8cef31461018b5780634deef649146101af576100c9565b806306fdde03146100ce57806307b54c6f1461014b575b600080fd5b6100d66102e3565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101105781810151838201526020016100f8565b50505050905090810190601f16801561013d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101716004803603602081101561016157600080fd5b50356001600160a01b0316610370565b60408051918252519081900360200190f35b6100d6610381565b610193610416565b604080516001600160a01b039092168252519081900360200190f35b610171600480360360408110156101c557600080fd5b506001600160a01b03813516906020013561043a565b610201600480360360208110156101f157600080fd5b50356001600160a01b031661044d565b604080519115158252519081900360200190f35b6102016004803603602081101561022b57600080fd5b50356001600160a01b0316610458565b6102776004803603608081101561025157600080fd5b506001600160a01b0381358116916020810135909116906040810135906060013561046d565b005b6101936004803603602081101561028f57600080fd5b50356001600160a01b03166106b6565b610277600480360360808110156102b557600080fd5b506001600160a01b038135811691602081013590911690604081013590606001356106c1565b610193610937565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103685780601f1061033d57610100808354040283529160200191610368565b820191906000526020600020905b81548152906001019060200180831161034b57829003601f168201915b505050505081565b600061037b82610946565b92915050565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526060939092909183018282801561040c5780601f106103e15761010080835404028352916020019161040c565b820191906000526020600020905b8154815290600101906020018083116103ef57829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000610446838361094c565b9392505050565b600061037b82610951565b60026020526000908152604090205460ff1681565b6000610484858561047d876109f3565b8686610a8a565b905061048f81610be5565b600080600061049f888888610cba565b92509250925083600001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561051c578181015183820152602001610504565b50505050905090810190601f1680156105495780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561056a57600080fd5b505af115801561057e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156105a757600080fd5b81019080805160405193929190846401000000008211156105c757600080fd5b9083019060208201858111156105dc57600080fd5b82516401000000008111828201881017156105f657600080fd5b82525081516020918201929091019080838360005b8381101561062357818101518382015260200161060b565b50505050905090810190601f1680156106505780820380516001836020036101000a031916815260200191505b506040525050505061066184610d59565b8351602080860151604080518a815290516001600160a01b03808d16958116949316927fd17d95895382b096bb1f89ed05a71c3e014d5ecf25944c8f1f27f07b2b9d3194928290030190a45050505050505050565b600061037b826109f3565b60006106d1858561047d876109f3565b90506106dc81610e21565b80516001600160a01b03166397ccdc606106f586610eac565b86866040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561074d57600080fd5b505af1158015610761573d6000803e3d6000fd5b505050506000806000610775888888610ec5565b92509250925083600001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156107f25781810151838201526020016107da565b50505050905090810190601f16801561081f5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561084057600080fd5b505af1158015610854573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561087d57600080fd5b810190808051604051939291908464010000000082111561089d57600080fd5b9083019060208201858111156108b257600080fd5b82516401000000008111828201881017156108cc57600080fd5b82525081516020918201929091019080838360005b838110156108f95781810151838201526020016108e1565b50505050905090810190601f1680156109265780820380516001836020036101000a031916815260200191505b506040525050505061066184610f66565b6000546001600160a01b031681565b50600190565b919050565b60008073057835ad21a177dbdd3090bb1cae03eacf78fc6d6001600160a01b031663d2493b6c846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060606040518083038186803b1580156109b557600080fd5b505afa1580156109c9573d6000803e3d6000fd5b505050506040513d60608110156109df57600080fd5b50516001600160a01b031615159392505050565b60008073057835ad21a177dbdd3090bb1cae03eacf78fc6d6001600160a01b031663d2493b6c846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060606040518083038186803b158015610a5757600080fd5b505afa158015610a6b573d6000803e3d6000fd5b505050506040513d6060811015610a8157600080fd5b50519392505050565b610a92611028565b610a9a611028565b6001600160a01b038716808252604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b891600480820192602092909190829003018186803b158015610af657600080fd5b505afa158015610b0a573d6000803e3d6000fd5b505050506040513d6020811015610b2057600080fd5b50516001600160a01b039081166020838101919091528782166040808501919091528783166060850181905281517f70a08231000000000000000000000000000000000000000000000000000000008152938b166004850152905190926370a08231926024808301939192829003018186803b158015610b9f57600080fd5b505afa158015610bb3573d6000803e3d6000fd5b505050506040513d6020811015610bc957600080fd5b505160a082015260808101939093525060c08201529392505050565b610bf28160400151610951565b610c2d5760405162461bcd60e51b81526004018080602001828103825260238152602001806111606023913960400191505060405180910390fd5b6000816080015111610c705760405162461bcd60e51b815260040180806020018281038252603481526020018061112c6034913960400191505060405180910390fd5b80608001518160a001511015610cb75760405162461bcd60e51b81526004018080602001828103825260318152602001806110656031913960400191505060405180910390fd5b50565b604080516001600160a01b0393841660248201526044810192909252929091166064808301919091528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f69328dec00000000000000000000000000000000000000000000000000000000179052737d2768de32b0b80b7a3454c06bdac94a69ddc7a99160009190565b80608001518160a001510381606001516001600160a01b03166370a0823183600001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610db957600080fd5b505afa158015610dcd573d6000803e3d6000fd5b505050506040513d6020811015610de357600080fd5b505114610cb75760405162461bcd60e51b815260040180806020018281038252602f8152602001806110c6602f913960400191505060405180910390fd5b610e2e8160400151610951565b610e695760405162461bcd60e51b81526004018080602001828103825260238152602001806111606023913960400191505060405180910390fd5b6000816080015111610cb75760405162461bcd60e51b81526004018080602001828103825260378152602001806110f56037913960400191505060405180910390fd5b50737d2768de32b0b80b7a3454c06bdac94a69ddc7a990565b604080516001600160a01b0393841660248201526044810192909252929091166064820152600060848083018290528351808403909101815260a49092019092526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fe8eda9df00000000000000000000000000000000000000000000000000000000179052737d2768de32b0b80b7a3454c06bdac94a69ddc7a992565b8060a0015181606001516001600160a01b03166370a0823183600001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610fc057600080fd5b505afa158015610fd4573d6000803e3d6000fd5b505050506040513d6020811015610fea57600080fd5b505111610cb75760405162461bcd60e51b81526004018080602001828103825260308152602001806110966030913960400191505060405180910390fd5b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c08101919091529056fe5468652067617264656e20646f6573206e6f74206861766520656e6f75676820696e766573746d656e7420746f6b656e735468652067617264656e20646964206e6f7420726563656976652074686520696e766573746d656e7420746f6b656e735468652067617264656e20646964206e6f742072657475726e2074686520696e766573746d656e7420746f6b656e734d696e20696e766573746d656e7420746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030496e766573746d656e7420746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520696e766573746d656e742061646472657373206973206e6f742076616c6964a2646970667358221220eccc62a47c4334dcf28fac867c11c1b5242ff61ba8f70fee99d98bad0147a36a64736f6c63430007060033", + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"garden\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assetToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"numTokensToRedeem\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"protocolFee\",\"type\":\"uint256\"}],\"name\":\"TokensRedeemed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"garden\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assetToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"numTokensToSupply\",\"type\":\"uint256\"}],\"name\":\"TokensSupplied\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_assetToken\",\"type\":\"address\"}],\"name\":\"getExchangeRatePerToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_assetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_numTokensToSupply\",\"type\":\"uint256\"}],\"name\":\"getExpectedShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_assetToken\",\"type\":\"address\"}],\"name\":\"getInvestmentToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"initializedByGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_investmentAddress\",\"type\":\"address\"}],\"name\":\"isInvestment\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_assetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_numTokensToRedeem\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minAmountExpected\",\"type\":\"uint256\"}],\"name\":\"redeemTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_assetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_numTokensToSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minAmountExpected\",\"type\":\"uint256\"}],\"name\":\"supplyTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Protocol Aave lend integration.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of the controller\",\"_weth\":\"Address of the WETH ERC20\"}},\"getExpectedShares(address,uint256)\":{\"params\":{\"_numTokensToSupply\":\"Amount of ERC20 tokens to supply\"},\"returns\":{\"_0\":\"uint256 Amount of supply tokens to receive\"}},\"isInvestment(address)\":{\"params\":{\"_investmentAddress\":\"Investment address to check\"},\"returns\":{\"_0\":\"bool True if the address is a investment\"}}},\"title\":\"AaveLendIntegration\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates the integration\"},\"getExpectedShares(address,uint256)\":{\"notice\":\"Gets the amount of cTokens expected to get after depositing ERC20 asset.\"},\"getName()\":{\"notice\":\"Returns the name of the integration\"},\"isInvestment(address)\":{\"notice\":\"Checks whether an investment address is valid\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/integrations/lend/AaveLendIntegration.sol\":\"AaveLendIntegration\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\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 /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\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, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x7b2b8baa20fd60ab4a328c8e34c64a353651b80ba4b5b157cbb61813f6f85d55\",\"license\":\"MIT\"},\"contracts/integrations/BaseIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IIntegration} from '../interfaces/IIntegration.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\n\\n/**\\n * @title BaseIntegration\\n * @author Babylon Finance\\n *\\n * Abstract class that houses common Integration-related state and functions.\\n */\\nabstract contract BaseIntegration {\\n using SafeCast for int256;\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlySystemContract() {\\n require(IBabController(controller).isSystemContract(msg.sender), 'Only system can call this');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the controller\\n address public controller;\\n // Wrapped ETH address\\n address public immutable weth;\\n // Name of the integration\\n string public name;\\n mapping(address => bool) public initializedByGarden;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) {\\n require(_controller != address(0), 'Controller must be defined');\\n name = _name;\\n controller = _controller;\\n weth = _weth;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the name of the integration\\n */\\n function getName() external view returns (string memory) {\\n return name;\\n }\\n}\\n\",\"keccak256\":\"0x2834e38218ae7abce3038140002a433c22ea9303d65b2d929cd88f6d5f712812\",\"license\":\"Apache License\"},\"contracts/integrations/lend/AaveLendIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\n\\nimport {AaveToken} from '../../interfaces/external/aave/AaveToken.sol';\\nimport {ILendingPool} from '../../interfaces/external/aave/ILendingPool.sol';\\nimport {ILendingPoolAddressesProvider} from '../../interfaces/external/aave/ILendingPoolAddressesProvider.sol';\\nimport {IProtocolDataProvider} from '../../interfaces/external/aave/IProtocolDataProvider.sol';\\n\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\nimport {LendIntegration} from './LendIntegration.sol';\\n\\n/**\\n * @title AaveLendIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Aave lend integration.\\n */\\ncontract AaveLendIntegration is LendIntegration {\\n using SafeMath for uint256;\\n using SafeCast for uint256;\\n\\n /* ============ Constant ============ */\\n\\n ILendingPool constant lendingPool = ILendingPool(address(0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9)); // Mainnet\\n IProtocolDataProvider constant dataProvider =\\n IProtocolDataProvider(address(0x057835Ad21a177dbdd3090bB1CAE03EaCF78Fc6d)); // Mainnet\\n\\n /* ============ Struct ============ */\\n\\n /* ============ Events ============ */\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n constructor(address _controller, address _weth) LendIntegration('aavelend', _weth, _controller) {}\\n\\n /* ============ External Functions ============ */\\n\\n /* ============ Internal Functions ============ */\\n\\n function _isInvestment(address _assetToken) internal view override returns (bool) {\\n (address aTokenAddress, , ) = dataProvider.getReserveTokensAddresses(_assetToken);\\n return aTokenAddress != address(0);\\n }\\n\\n function _getExpectedShares(\\n address, /* _assetToken */\\n uint256 _numTokensToSupply\\n ) internal pure override returns (uint256) {\\n // love it \\ud83d\\ude0d\\n return _numTokensToSupply;\\n }\\n\\n function _getExchangeRatePerToken(\\n address /* _assetToken */\\n ) internal pure override returns (uint256) {\\n // love it \\ud83d\\ude0d\\n return 1;\\n }\\n\\n /**\\n * Returns calldata for supplying tokens.\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getSupplyCalldata(\\n address _strategy,\\n address _assetToken,\\n uint256 _numTokensToSupply\\n )\\n internal\\n pure\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n // Encode method data for Garden to invoke\\n bytes memory methodData =\\n abi.encodeWithSignature(\\n 'deposit(address,uint256,address,uint16)',\\n _assetToken,\\n _numTokensToSupply,\\n _strategy,\\n 0\\n );\\n return (address(lendingPool), 0, methodData);\\n }\\n\\n /**\\n * Returns calldata for redeeming the collateral\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getRedeemCalldata(\\n address _strategy,\\n address _assetToken,\\n uint256 _numTokensToSupply\\n )\\n internal\\n pure\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n // Encode method data for Garden to invoke\\n bytes memory methodData =\\n abi.encodeWithSignature('withdraw(address,uint256,address)', _assetToken, _numTokensToSupply, _strategy);\\n return (address(lendingPool), 0, methodData);\\n }\\n\\n function _getSpender(\\n address /* _investmentAddress */\\n ) internal pure override returns (address) {\\n return address(lendingPool);\\n }\\n\\n function _getInvestmentToken(address _assetToken) internal view override returns (address) {\\n (address aTokenAddress, , ) = dataProvider.getReserveTokensAddresses(_assetToken);\\n return aTokenAddress;\\n }\\n}\\n\",\"keccak256\":\"0xae70aaf78eb6810f3f4db1f1b9acca20b09a240de91bb3601c2ac38535ba4254\",\"license\":\"Apache License\"},\"contracts/integrations/lend/LendIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\n\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\nimport {ILendIntegration} from '../../interfaces/ILendIntegration.sol';\\n\\nimport {BaseIntegration} from '../BaseIntegration.sol';\\n\\n/**\\n * @title LendIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Base class for integration with passive investments like Yearn, Indexed\\n */\\nabstract contract LendIntegration is BaseIntegration, ReentrancyGuard, ILendIntegration {\\n using SafeMath for uint256;\\n using SafeCast for uint256;\\n\\n /* ============ Struct ============ */\\n struct InvestmentInfo {\\n IStrategy strategy; // Strategy address\\n IGarden garden; // Garden address\\n address assetToken;\\n address investment; // Investment address\\n uint256 investmentTokensInTransaction; // Investment tokens affected by this transaction\\n uint256 investmentTokensInGarden; // Investment tokens garden balance\\n uint256 limitDepositTokenQuantity; // Limit deposit/withdrawal token amount\\n }\\n\\n /* ============ Events ============ */\\n\\n event TokensSupplied(\\n address indexed garden,\\n address indexed strategy,\\n address indexed assetToken,\\n uint256 numTokensToSupply\\n );\\n\\n event TokensRedeemed(\\n address indexed garden,\\n address indexed strategy,\\n address indexed assetToken,\\n uint256 numTokensToRedeem,\\n uint256 protocolFee\\n );\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) BaseIntegration(_name, _weth, _controller) {}\\n\\n /* ============ External Functions ============ */\\n function getInvestmentToken(address _assetToken) external view override returns (address) {\\n return _getInvestmentToken(_assetToken);\\n }\\n\\n /**\\n * Checks whether an investment address is valid\\n *\\n * @param _investmentAddress Investment address to check\\n * @return bool True if the address is a investment\\n */\\n function isInvestment(address _investmentAddress) external view returns (bool) {\\n return _isInvestment(_investmentAddress);\\n }\\n\\n function supplyTokens(\\n address _strategy,\\n address _assetToken,\\n uint256 _numTokensToSupply,\\n uint256 _minAmountExpected\\n ) external override {\\n InvestmentInfo memory investmentInfo =\\n _createInvestmentInfo(\\n _strategy,\\n _assetToken,\\n _getInvestmentToken(_assetToken),\\n _numTokensToSupply,\\n _minAmountExpected\\n );\\n\\n _validatePreJoinInvestmentData(investmentInfo);\\n\\n investmentInfo.strategy.invokeApprove(_getSpender(_assetToken), _assetToken, _numTokensToSupply);\\n\\n (address targetInvestment, uint256 callValue, bytes memory methodData) =\\n _getSupplyCalldata(_strategy, _assetToken, _numTokensToSupply);\\n\\n investmentInfo.strategy.invokeFromIntegration(targetInvestment, callValue, methodData);\\n _validatePostEnterInvestmentData(investmentInfo);\\n\\n emit TokensSupplied(\\n address(investmentInfo.garden),\\n address(investmentInfo.strategy),\\n _assetToken,\\n _numTokensToSupply\\n );\\n }\\n\\n function redeemTokens(\\n address _strategy,\\n address _assetToken,\\n uint256 _numTokensToRedeem,\\n uint256 _minAmountExpected\\n ) external override {\\n InvestmentInfo memory investmentInfo =\\n _createInvestmentInfo(\\n _strategy,\\n _assetToken,\\n _getInvestmentToken(_assetToken),\\n _numTokensToRedeem,\\n _minAmountExpected\\n );\\n\\n _validatePreExitInvestmentData(investmentInfo);\\n\\n (address targetInvestment, uint256 callValue, bytes memory methodData) =\\n _getRedeemCalldata(_strategy, _assetToken, _numTokensToRedeem);\\n\\n investmentInfo.strategy.invokeFromIntegration(targetInvestment, callValue, methodData);\\n\\n _validatePostExitInvestmentData(investmentInfo);\\n\\n emit TokensSupplied(\\n address(investmentInfo.garden),\\n address(investmentInfo.strategy),\\n _assetToken,\\n _numTokensToRedeem\\n );\\n }\\n\\n function getExchangeRatePerToken(address _assetToken) external view override returns (uint256) {\\n return _getExchangeRatePerToken(_assetToken);\\n }\\n\\n /**\\n * Gets the amount of cTokens expected to get after depositing ERC20 asset.\\n *\\n * @param _numTokensToSupply Amount of ERC20 tokens to supply\\n * @return uint256 Amount of supply tokens to receive\\n */\\n function getExpectedShares(address _assetToken, uint256 _numTokensToSupply)\\n external\\n view\\n override\\n returns (uint256)\\n {\\n return _getExpectedShares(_assetToken, _numTokensToSupply);\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Validate pre investment join data. Check investment is valid, token quantity is valid.\\n *\\n * @param _investmentInfo Struct containing investment information used in internal functions\\n */\\n function _validatePreJoinInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\\n require(_isInvestment(_investmentInfo.assetToken), 'The investment address is not valid');\\n require(\\n _investmentInfo.investmentTokensInTransaction > 0,\\n 'Min investment tokens to receive must be greater than 0'\\n );\\n }\\n\\n /**\\n * Validate post enter investment data. Check investment is valid, token quantity is valid.\\n *\\n * @param _investmentInfo Struct containing investment information used in internal functions\\n */\\n function _validatePostEnterInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\\n require(\\n (IERC20(_investmentInfo.investment).balanceOf(address(_investmentInfo.strategy)) >\\n _investmentInfo.investmentTokensInGarden),\\n 'The garden did not receive the investment tokens'\\n );\\n }\\n\\n /**\\n * Validate post exit investment data. Check investment is valid, token quantity is valid.\\n *\\n * @param _investmentInfo Struct containing investment information used in internal functions\\n */\\n function _validatePostExitInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\\n require(\\n IERC20(_investmentInfo.investment).balanceOf(address(_investmentInfo.strategy)) ==\\n _investmentInfo.investmentTokensInGarden - _investmentInfo.investmentTokensInTransaction,\\n 'The garden did not return the investment tokens'\\n );\\n }\\n\\n /**\\n * Validate pre investment data. Check investment is valid, token quantity is valid.\\n *\\n * @param _investmentInfo Struct containing investment information used in internal functions\\n */\\n function _validatePreExitInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\\n require(_isInvestment(_investmentInfo.assetToken), 'The investment address is not valid');\\n require(\\n _investmentInfo.investmentTokensInTransaction > 0,\\n 'Investment tokens to exchange must be greater than 0'\\n );\\n require(\\n _investmentInfo.investmentTokensInGarden >= _investmentInfo.investmentTokensInTransaction,\\n 'The garden does not have enough investment tokens'\\n );\\n }\\n\\n function _isInvestment(\\n address //_investmentAddress\\n ) internal view virtual returns (bool);\\n\\n /**\\n * Create and return InvestmentInfo struct\\n *\\n * return InvestmentInfo Struct containing data for the investment\\n */\\n function _createInvestmentInfo(\\n address _strategy,\\n address _assetToken,\\n address _investmentToken,\\n uint256 _investmentTokensInTransaction,\\n uint256 _limitDepositToken\\n ) internal view returns (InvestmentInfo memory) {\\n InvestmentInfo memory investmentInfo;\\n investmentInfo.strategy = IStrategy(_strategy);\\n investmentInfo.garden = IGarden(investmentInfo.strategy.garden());\\n investmentInfo.assetToken = _assetToken;\\n investmentInfo.investment = _investmentToken;\\n investmentInfo.investmentTokensInGarden = IERC20(_investmentToken).balanceOf(_strategy);\\n investmentInfo.investmentTokensInTransaction = _investmentTokensInTransaction;\\n investmentInfo.limitDepositTokenQuantity = _limitDepositToken;\\n\\n return investmentInfo;\\n }\\n\\n function _getExpectedShares(address, uint256) internal view virtual returns (uint256);\\n\\n function _getExchangeRatePerToken(address) internal view virtual returns (uint256);\\n\\n function _getRedeemCalldata(\\n address, /* _strategy */\\n address, /* _assetToken */\\n uint256 /* _numTokensToSupply */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n /**\\n * Returns calldata for supplying tokens.\\n *\\n * hparam _strategy Address of the strat\\n * hparam _assetToken Address of the token\\n * hparam _numTokensToSupply Number of tokens\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getSupplyCalldata(\\n address, /* _strategy */\\n address, /* _assetToken */\\n uint256 /* _numTokensToSupply */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n function _getSpender(\\n address //_investmentAddress\\n ) internal view virtual returns (address);\\n\\n function _getInvestmentToken(\\n address //_investmentAddress\\n ) internal view virtual returns (address);\\n}\\n\",\"keccak256\":\"0xffe594fd5e659943607ec107a6692780bed30fbc371430fba17f1d504ba433f3\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editGardenNFT(address _newGardenNFT) external;\\n\\n function editStrategyNFT(address _newStrategyNFT) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function editUniswapFactory(address _newUniswapFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\\n\\n function maxContributorsPerGarden() external view returns (uint256);\\n\\n function gardenCreationIsOpen() external view returns (bool);\\n\\n function openPublicGardenCreation() external;\\n\\n function setMaxContributorsPerGarden(uint256 _newMax) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function gardenNFT() external view returns (address);\\n\\n function strategyNFT() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\\n\\n function uniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0xdee5a27301c24f507d312f32249487fa9b0a756062a7e479405a1d1ee9ee7bb8\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function isGardenStrategy(address _strategy) external view returns (bool);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategyActiveInGarden(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to,\\n bool _withPenalty\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x88f1786ffee23e386aaa1735177912e1b5a7cdd440dafe52fb139fe50fd621b4\",\"license\":\"Apache License\"},\"contracts/interfaces/IIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIntegration\\n * @author Babylon Finance\\n *\\n * Interface for protocol integrations\\n */\\ninterface IIntegration {\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xee03c9274ddf3257e3bfd2bb229fea3412c9105f178e64174f59efeafd53182c\",\"license\":\"Apache License\"},\"contracts/interfaces/ILendIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title ILendIntegration\\n * @author Babylon Finance\\n *\\n * Interface for lending integrations such as Compound, Aave.\\n */\\ninterface ILendIntegration {\\n function supplyTokens(\\n address _strategy,\\n address _assetToken,\\n uint256 _numTokensToSupply,\\n uint256 _minAmountExpected\\n ) external;\\n\\n function redeemTokens(\\n address _strategy,\\n address _assetToken,\\n uint256 _numTokensToRedeem,\\n uint256 _minAmountExpected\\n ) external;\\n\\n function getExpectedShares(address _assetToken, uint256 _numTokensToSupply) external view returns (uint256);\\n\\n function getExchangeRatePerToken(address _assetToken) external view returns (uint256);\\n\\n function getInvestmentToken(address _assetToken) external view returns (address);\\n}\\n\",\"keccak256\":\"0x28ca8cb40b050139b7416224c43de2c14fa7991e0b3769f7bab349e3422fc34f\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n address,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x850597ec9a68eb86f31f13b6b77d3b31350b4ed3d0019dedfbd3550ad1a1d9e2\",\"license\":\"Apache License\"},\"contracts/interfaces/external/aave/AaveToken.sol\":{\"content\":\"pragma solidity >=0.7.0 <0.9.0;\\n\\ninterface AaveToken {\\n function underlyingAssetAddress() external view returns (address);\\n}\\n\",\"keccak256\":\"0x0d9bc0e573b7b6c34a13af495325c5763e68880061dc7cceb4df7bd689bb7699\"},\"contracts/interfaces/external/aave/DataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: agpl-3.0\\npragma solidity >=0.7.0 <0.9.0;\\n\\nlibrary DataTypes {\\n // refer to the whitepaper, section 1.1 basic concepts for a formal description of these properties.\\n struct ReserveData {\\n //stores the reserve configuration\\n ReserveConfigurationMap configuration;\\n //the liquidity index. Expressed in ray\\n uint128 liquidityIndex;\\n //variable borrow index. Expressed in ray\\n uint128 variableBorrowIndex;\\n //the current supply rate. Expressed in ray\\n uint128 currentLiquidityRate;\\n //the current variable borrow rate. Expressed in ray\\n uint128 currentVariableBorrowRate;\\n //the current stable borrow rate. Expressed in ray\\n uint128 currentStableBorrowRate;\\n uint40 lastUpdateTimestamp;\\n //tokens addresses\\n address aTokenAddress;\\n address stableDebtTokenAddress;\\n address variableDebtTokenAddress;\\n //address of the interest rate strategy\\n address interestRateStrategyAddress;\\n //the id of the reserve. Represents the position in the list of the active reserves\\n uint8 id;\\n }\\n\\n struct ReserveConfigurationMap {\\n //bit 0-15: LTV\\n //bit 16-31: Liq. threshold\\n //bit 32-47: Liq. bonus\\n //bit 48-55: Decimals\\n //bit 56: Reserve is active\\n //bit 57: reserve is frozen\\n //bit 58: borrowing is enabled\\n //bit 59: stable rate borrowing enabled\\n //bit 60-63: reserved\\n //bit 64-79: reserve factor\\n uint256 data;\\n }\\n\\n struct UserConfigurationMap {\\n uint256 data;\\n }\\n\\n enum InterestRateMode {NONE, STABLE, VARIABLE}\\n}\\n\",\"keccak256\":\"0x12425e60a70608813114a27aaf876758fbe2034b6a8fe1f33d03a044defec56a\",\"license\":\"agpl-3.0\"},\"contracts/interfaces/external/aave/ILendingPool.sol\":{\"content\":\"// SPDX-License-Identifier: agpl-3.0\\npragma solidity >=0.7.0 <0.9.0;\\npragma experimental ABIEncoderV2;\\n\\nimport {ILendingPoolAddressesProvider} from './ILendingPoolAddressesProvider.sol';\\nimport {DataTypes} from './DataTypes.sol';\\n\\ninterface ILendingPool {\\n /**\\n * @dev Emitted on deposit()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address initiating the deposit\\n * @param onBehalfOf The beneficiary of the deposit, receiving the aTokens\\n * @param amount The amount deposited\\n * @param referral The referral code used\\n **/\\n event Deposit(\\n address indexed reserve,\\n address user,\\n address indexed onBehalfOf,\\n uint256 amount,\\n uint16 indexed referral\\n );\\n\\n /**\\n * @dev Emitted on withdraw()\\n * @param reserve The address of the underlyng asset being withdrawn\\n * @param user The address initiating the withdrawal, owner of aTokens\\n * @param to Address that will receive the underlying\\n * @param amount The amount to be withdrawn\\n **/\\n event Withdraw(address indexed reserve, address indexed user, address indexed to, uint256 amount);\\n\\n /**\\n * @dev Emitted on borrow() and flashLoan() when debt needs to be opened\\n * @param reserve The address of the underlying asset being borrowed\\n * @param user The address of the user initiating the borrow(), receiving the gardens on borrow() or just\\n * initiator of the transaction on flashLoan()\\n * @param onBehalfOf The address that will be getting the debt\\n * @param amount The amount borrowed out\\n * @param borrowRateMode The rate mode: 1 for Stable, 2 for Variable\\n * @param borrowRate The numeric rate at which the user has borrowed\\n * @param referral The referral code used\\n **/\\n event Borrow(\\n address indexed reserve,\\n address user,\\n address indexed onBehalfOf,\\n uint256 amount,\\n uint256 borrowRateMode,\\n uint256 borrowRate,\\n uint16 indexed referral\\n );\\n\\n /**\\n * @dev Emitted on repay()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The beneficiary of the repayment, getting his debt reduced\\n * @param repayer The address of the user initiating the repay(), providing the gardens\\n * @param amount The amount repaid\\n **/\\n event Repay(address indexed reserve, address indexed user, address indexed repayer, uint256 amount);\\n\\n /**\\n * @dev Emitted on swapBorrowRateMode()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address of the user swapping his rate mode\\n * @param rateMode The rate mode that the user wants to swap to\\n **/\\n event Swap(address indexed reserve, address indexed user, uint256 rateMode);\\n\\n /**\\n * @dev Emitted on setUserUseReserveAsCollateral()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address of the user enabling the usage as collateral\\n **/\\n event ReserveUsedAsCollateralEnabled(address indexed reserve, address indexed user);\\n\\n /**\\n * @dev Emitted on setUserUseReserveAsCollateral()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address of the user enabling the usage as collateral\\n **/\\n event ReserveUsedAsCollateralDisabled(address indexed reserve, address indexed user);\\n\\n /**\\n * @dev Emitted on rebalanceStableBorrowRate()\\n * @param reserve The address of the underlying asset of the reserve\\n * @param user The address of the user for which the rebalance has been executed\\n **/\\n event RebalanceStableBorrowRate(address indexed reserve, address indexed user);\\n\\n /**\\n * @dev Emitted on flashLoan()\\n * @param target The address of the flash loan receiver contract\\n * @param initiator The address initiating the flash loan\\n * @param asset The address of the asset being flash borrowed\\n * @param amount The amount flash borrowed\\n * @param premium The fee flash borrowed\\n * @param referralCode The referral code used\\n **/\\n event FlashLoan(\\n address indexed target,\\n address indexed initiator,\\n address indexed asset,\\n uint256 amount,\\n uint256 premium,\\n uint16 referralCode\\n );\\n\\n /**\\n * @dev Emitted when the pause is triggered.\\n */\\n event Paused();\\n\\n /**\\n * @dev Emitted when the pause is lifted.\\n */\\n event Unpaused();\\n\\n /**\\n * @dev Emitted when a borrower is liquidated. This event is emitted by the LendingPool via\\n * LendingPoolCollateral manager using a DELEGATECALL\\n * This allows to have the events in the generated ABI for LendingPool.\\n * @param collateralAsset The address of the underlying asset used as collateral, to receive as result of the liquidation\\n * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation\\n * @param user The address of the borrower getting liquidated\\n * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover\\n * @param liquidatedCollateralAmount The amount of collateral received by the liiquidator\\n * @param liquidator The address of the liquidator\\n * @param receiveAToken `true` if the liquidators wants to receive the collateral aTokens, `false` if he wants\\n * to receive the underlying collateral asset directly\\n **/\\n event LiquidationCall(\\n address indexed collateralAsset,\\n address indexed debtAsset,\\n address indexed user,\\n uint256 debtToCover,\\n uint256 liquidatedCollateralAmount,\\n address liquidator,\\n bool receiveAToken\\n );\\n\\n /**\\n * @dev Emitted when the state of a reserve is updated. NOTE: This event is actually declared\\n * in the ReserveLogic library and emitted in the updateInterestRates() function. Since the function is internal,\\n * the event will actually be fired by the LendingPool contract. The event is therefore replicated here so it\\n * gets added to the LendingPool ABI\\n * @param reserve The address of the underlying asset of the reserve\\n * @param liquidityRate The new liquidity rate\\n * @param stableBorrowRate The new stable borrow rate\\n * @param variableBorrowRate The new variable borrow rate\\n * @param liquidityIndex The new liquidity index\\n * @param variableBorrowIndex The new variable borrow index\\n **/\\n event ReserveDataUpdated(\\n address indexed reserve,\\n uint256 liquidityRate,\\n uint256 stableBorrowRate,\\n uint256 variableBorrowRate,\\n uint256 liquidityIndex,\\n uint256 variableBorrowIndex\\n );\\n\\n /**\\n * @dev Deposits an `amount` of underlying asset into the reserve, receiving in return overlying aTokens.\\n * - E.g. User deposits 100 USDC and gets in return 100 aUSDC\\n * @param asset The address of the underlying asset to deposit\\n * @param amount The amount to be deposited\\n * @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user\\n * wants to receive them on his own wallet, or a different address if the beneficiary of aTokens\\n * is a different wallet\\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\\n * 0 if the action is executed directly by the user, without any middle-man\\n **/\\n function deposit(\\n address asset,\\n uint256 amount,\\n address onBehalfOf,\\n uint16 referralCode\\n ) external;\\n\\n /**\\n * @dev Withdraws an `amount` of underlying asset from the reserve, burning the equivalent aTokens owned\\n * E.g. User has 100 aUSDC, calls withdraw() and receives 100 USDC, burning the 100 aUSDC\\n * @param asset The address of the underlying asset to withdraw\\n * @param amount The underlying amount to be withdrawn\\n * - Send the value type(uint256).max in order to withdraw the whole aToken balance\\n * @param to Address that will receive the underlying, same as msg.sender if the user\\n * wants to receive it on his own wallet, or a different address if the beneficiary is a\\n * different wallet\\n * @return The final amount withdrawn\\n **/\\n function withdraw(\\n address asset,\\n uint256 amount,\\n address to\\n ) external returns (uint256);\\n\\n /**\\n * @dev Allows users to borrow a specific `amount` of the reserve underlying asset, provided that the borrower\\n * already deposited enough collateral, or he was given enough allowance by a credit delegator on the\\n * corresponding debt token (StableDebtToken or VariableDebtToken)\\n * - E.g. User borrows 100 USDC passing as `onBehalfOf` his own address, receiving the 100 USDC in his wallet\\n * and 100 stable/variable debt tokens, depending on the `interestRateMode`\\n * @param asset The address of the underlying asset to borrow\\n * @param amount The amount to be borrowed\\n * @param interestRateMode The interest rate mode at which the user wants to borrow: 1 for Stable, 2 for Variable\\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\\n * 0 if the action is executed directly by the user, without any middle-man\\n * @param onBehalfOf Address of the user who will receive the debt. Should be the address of the borrower itself\\n * calling the function if he wants to borrow against his own collateral, or the address of the credit delegator\\n * if he has been given credit delegation allowance\\n **/\\n function borrow(\\n address asset,\\n uint256 amount,\\n uint256 interestRateMode,\\n uint16 referralCode,\\n address onBehalfOf\\n ) external;\\n\\n /**\\n * @notice Repays a borrowed `amount` on a specific reserve, burning the equivalent debt tokens owned\\n * - E.g. User repays 100 USDC, burning 100 variable/stable debt tokens of the `onBehalfOf` address\\n * @param asset The address of the borrowed underlying asset previously borrowed\\n * @param amount The amount to repay\\n * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode`\\n * @param rateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable\\n * @param onBehalfOf Address of the user who will get his debt reduced/removed. Should be the address of the\\n * user calling the function if he wants to reduce/remove his own debt, or the address of any other\\n * other borrower whose debt should be removed\\n * @return The final amount repaid\\n **/\\n function repay(\\n address asset,\\n uint256 amount,\\n uint256 rateMode,\\n address onBehalfOf\\n ) external returns (uint256);\\n\\n /**\\n * @dev Allows a borrower to swap his debt between stable and variable mode, or viceversa\\n * @param asset The address of the underlying asset borrowed\\n * @param rateMode The rate mode that the user wants to swap to\\n **/\\n function swapBorrowRateMode(address asset, uint256 rateMode) external;\\n\\n /**\\n * @dev Rebalances the stable interest rate of a user to the current stable rate defined on the reserve.\\n * - Users can be rebalanced if the following conditions are satisfied:\\n * 1. Usage ratio is above 95%\\n * 2. the current deposit APY is below REBALANCE_UP_THRESHOLD * maxVariableBorrowRate, which means that too much has been\\n * borrowed at a stable rate and depositors are not earning enough\\n * @param asset The address of the underlying asset borrowed\\n * @param user The address of the user to be rebalanced\\n **/\\n function rebalanceStableBorrowRate(address asset, address user) external;\\n\\n /**\\n * @dev Allows depositors to enable/disable a specific deposited asset as collateral\\n * @param asset The address of the underlying asset deposited\\n * @param useAsCollateral `true` if the user wants to use the deposit as collateral, `false` otherwise\\n **/\\n function setUserUseReserveAsCollateral(address asset, bool useAsCollateral) external;\\n\\n /**\\n * @dev Function to liquidate a non-healthy position collateral-wise, with Health Factor below 1\\n * - The caller (liquidator) covers `debtToCover` amount of debt of the user getting liquidated, and receives\\n * a proportionally amount of the `collateralAsset` plus a bonus to cover market risk\\n * @param collateralAsset The address of the underlying asset used as collateral, to receive as result of the liquidation\\n * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation\\n * @param user The address of the borrower getting liquidated\\n * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover\\n * @param receiveAToken `true` if the liquidators wants to receive the collateral aTokens, `false` if he wants\\n * to receive the underlying collateral asset directly\\n **/\\n function liquidationCall(\\n address collateralAsset,\\n address debtAsset,\\n address user,\\n uint256 debtToCover,\\n bool receiveAToken\\n ) external;\\n\\n /**\\n * @dev Allows smartcontracts to access the liquidity of the pool within one transaction,\\n * as long as the amount taken plus a fee is returned.\\n * IMPORTANT There are security concerns for developers of flashloan receiver contracts that must be kept into consideration.\\n * For further details please visit https://developers.aave.com\\n * @param receiverAddress The address of the contract receiving the gardens, implementing the IFlashLoanReceiver interface\\n * @param assets The addresses of the assets being flash-borrowed\\n * @param amounts The amounts amounts being flash-borrowed\\n * @param modes Types of the debt to open if the flash loan is not returned:\\n * 0 -> Don't open any debt, just revert if gardens can't be transferred from the receiver\\n * 1 -> Open debt at stable rate for the value of the amount flash-borrowed to the `onBehalfOf` address\\n * 2 -> Open debt at variable rate for the value of the amount flash-borrowed to the `onBehalfOf` address\\n * @param onBehalfOf The address that will receive the debt in the case of using on `modes` 1 or 2\\n * @param params Variadic packed params to pass to the receiver as extra information\\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\\n * 0 if the action is executed directly by the user, without any middle-man\\n **/\\n function flashLoan(\\n address receiverAddress,\\n address[] calldata assets,\\n uint256[] calldata amounts,\\n uint256[] calldata modes,\\n address onBehalfOf,\\n bytes calldata params,\\n uint16 referralCode\\n ) external;\\n\\n /**\\n * @dev Returns the user account data across all the reserves\\n * @param user The address of the user\\n * @return totalCollateralETH the total collateral in ETH of the user\\n * @return totalDebtETH the total debt in ETH of the user\\n * @return availableBorrowsETH the borrowing power left of the user\\n * @return currentLiquidationThreshold the liquidation threshold of the user\\n * @return ltv the loan to value of the user\\n * @return healthFactor the current health factor of the user\\n **/\\n function getUserAccountData(address user)\\n external\\n view\\n returns (\\n uint256 totalCollateralETH,\\n uint256 totalDebtETH,\\n uint256 availableBorrowsETH,\\n uint256 currentLiquidationThreshold,\\n uint256 ltv,\\n uint256 healthFactor\\n );\\n\\n function initReserve(\\n address reserve,\\n address aTokenAddress,\\n address stableDebtAddress,\\n address variableDebtAddress,\\n address interestRateStrategyAddress\\n ) external;\\n\\n function setReserveInterestRateStrategyAddress(address reserve, address rateStrategyAddress) external;\\n\\n function setConfiguration(address reserve, uint256 configuration) external;\\n\\n /**\\n * @dev Returns the configuration of the reserve\\n * @param asset The address of the underlying asset of the reserve\\n * @return The configuration of the reserve\\n **/\\n function getConfiguration(address asset) external view returns (DataTypes.ReserveConfigurationMap memory);\\n\\n /**\\n * @dev Returns the configuration of the user across all the reserves\\n * @param user The user address\\n * @return The configuration of the user\\n **/\\n function getUserConfiguration(address user) external view returns (DataTypes.UserConfigurationMap memory);\\n\\n /**\\n * @dev Returns the normalized income normalized income of the reserve\\n * @param asset The address of the underlying asset of the reserve\\n * @return The reserve's normalized income\\n */\\n function getReserveNormalizedIncome(address asset) external view returns (uint256);\\n\\n /**\\n * @dev Returns the normalized variable debt per unit of asset\\n * @param asset The address of the underlying asset of the reserve\\n * @return The reserve normalized variable debt\\n */\\n function getReserveNormalizedVariableDebt(address asset) external view returns (uint256);\\n\\n /**\\n * @dev Returns the state and configuration of the reserve\\n * @param asset The address of the underlying asset of the reserve\\n * @return The state of the reserve\\n **/\\n function getReserveData(address asset) external view returns (DataTypes.ReserveData memory);\\n\\n function finalizeTransfer(\\n address asset,\\n address from,\\n address to,\\n uint256 amount,\\n uint256 balanceFromAfter,\\n uint256 balanceToBefore\\n ) external;\\n\\n function getReservesList() external view returns (address[] memory);\\n\\n function getAddressesProvider() external view returns (ILendingPoolAddressesProvider);\\n\\n function setPause(bool val) external;\\n\\n function paused() external view returns (bool);\\n}\\n\",\"keccak256\":\"0x89c83a951e484c6a00fba5f70879c0bea4c6fc5d52fcd08b4b0f7eab1e9d8626\",\"license\":\"agpl-3.0\"},\"contracts/interfaces/external/aave/ILendingPoolAddressesProvider.sol\":{\"content\":\"// SPDX-License-Identifier: agpl-3.0\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/**\\n * @title LendingPoolAddressesProvider contract\\n * @dev Main registry of addresses part of or connected to the protocol, including permissioned roles\\n * - Acting also as factory of proxies and admin of those, so with right to change its implementations\\n * - Owned by the Aave Governance\\n * @author Aave\\n **/\\ninterface ILendingPoolAddressesProvider {\\n event MarketIdSet(string newMarketId);\\n event LendingPoolUpdated(address indexed newAddress);\\n event ConfigurationAdminUpdated(address indexed newAddress);\\n event EmergencyAdminUpdated(address indexed newAddress);\\n event LendingPoolConfiguratorUpdated(address indexed newAddress);\\n event LendingPoolCollateralManagerUpdated(address indexed newAddress);\\n event PriceOracleUpdated(address indexed newAddress);\\n event LendingRateOracleUpdated(address indexed newAddress);\\n event ProxyCreated(bytes32 id, address indexed newAddress);\\n event AddressSet(bytes32 id, address indexed newAddress, bool hasProxy);\\n\\n function getMarketId() external view returns (string memory);\\n\\n function setMarketId(string calldata marketId) external;\\n\\n function setAddress(bytes32 id, address newAddress) external;\\n\\n function setAddressAsProxy(bytes32 id, address impl) external;\\n\\n function getAddress(bytes32 id) external view returns (address);\\n\\n function getLendingPool() external view returns (address);\\n\\n function setLendingPoolImpl(address pool) external;\\n\\n function getLendingPoolConfigurator() external view returns (address);\\n\\n function setLendingPoolConfiguratorImpl(address configurator) external;\\n\\n function getLendingPoolCollateralManager() external view returns (address);\\n\\n function setLendingPoolCollateralManager(address manager) external;\\n\\n function getPoolAdmin() external view returns (address);\\n\\n function setPoolAdmin(address admin) external;\\n\\n function getEmergencyAdmin() external view returns (address);\\n\\n function setEmergencyAdmin(address admin) external;\\n\\n function getPriceOracle() external view returns (address);\\n\\n function setPriceOracle(address priceOracle) external;\\n\\n function getLendingRateOracle() external view returns (address);\\n\\n function setLendingRateOracle(address lendingRateOracle) external;\\n}\\n\",\"keccak256\":\"0xff67e6d985c0674791ddee8ff693498afa654a76a23eaca236678620cbf8ec87\",\"license\":\"agpl-3.0\"},\"contracts/interfaces/external/aave/IProtocolDataProvider.sol\":{\"content\":\"// SPDX-License-Identifier: agpl-3.0\\npragma solidity >=0.7.0 <0.9.0;\\npragma experimental ABIEncoderV2;\\n\\nimport {ILendingPoolAddressesProvider} from './ILendingPoolAddressesProvider.sol';\\n\\ninterface IProtocolDataProvider {\\n struct TokenData {\\n string symbol;\\n address tokenAddress;\\n }\\n\\n function ADDRESSES_PROVIDER() external view returns (ILendingPoolAddressesProvider);\\n\\n function getAllReservesTokens() external view returns (TokenData[] memory);\\n\\n function getAllATokens() external view returns (TokenData[] memory);\\n\\n function getReserveConfigurationData(address asset)\\n external\\n view\\n returns (\\n uint256 decimals,\\n uint256 ltv,\\n uint256 liquidationThreshold,\\n uint256 liquidationBonus,\\n uint256 reserveFactor,\\n bool usageAsCollateralEnabled,\\n bool borrowingEnabled,\\n bool stableBorrowRateEnabled,\\n bool isActive,\\n bool isFrozen\\n );\\n\\n function getReserveData(address asset)\\n external\\n view\\n returns (\\n uint256 availableLiquidity,\\n uint256 totalStableDebt,\\n uint256 totalVariableDebt,\\n uint256 liquidityRate,\\n uint256 variableBorrowRate,\\n uint256 stableBorrowRate,\\n uint256 averageStableBorrowRate,\\n uint256 liquidityIndex,\\n uint256 variableBorrowIndex,\\n uint40 lastUpdateTimestamp\\n );\\n\\n function getUserReserveData(address asset, address user)\\n external\\n view\\n returns (\\n uint256 currentATokenBalance,\\n uint256 currentStableDebt,\\n uint256 currentVariableDebt,\\n uint256 principalStableDebt,\\n uint256 scaledVariableDebt,\\n uint256 stableBorrowRate,\\n uint256 liquidityRate,\\n uint40 stableRateLastUpdated,\\n bool usageAsCollateralEnabled\\n );\\n\\n function getReserveTokensAddresses(address asset)\\n external\\n view\\n returns (\\n address aTokenAddress,\\n address stableDebtTokenAddress,\\n address variableDebtTokenAddress\\n );\\n}\\n\",\"keccak256\":\"0xb356063607b02191d83c4f2faf10c703a0fa18f8cd8088338825fe12a30c797c\",\"license\":\"agpl-3.0\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b506040516200139e3803806200139e833981810160405260408110156200003757600080fd5b50805160209182015160408051808201909152600881526718585d995b195b9960c21b93810193909352909181838282826001600160a01b038116620000c4576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c6572206d75737420626520646566696e6564000000000000604482015290519081900360640190fd5b8251620000d99060019060208601906200011c565b50600080546001600160a01b0319166001600160a01b039290921691909117905560601b6001600160601b0319166080525050600160035550620001c892505050565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826200015457600085556200019f565b82601f106200016f57805160ff19168380011785556200019f565b828001600101855582156200019f579182015b828111156200019f57825182559160200191906001019062000182565b50620001ad929150620001b1565b5090565b5b80821115620001ad5760008155600101620001b2565b60805160601c6111b8620001e66000398061041852506111b86000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80639e12fef211610081578063eb40e6001161005b578063eb40e60014610279578063f14b57881461029f578063f77c4791146102db576100c9565b80639e12fef2146101db578063b10198fb14610215578063d0d2d3a21461023b576100c9565b806317d7de7c116100b257806317d7de7c146101835780633fc8cef31461018b5780634deef649146101af576100c9565b806306fdde03146100ce57806307b54c6f1461014b575b600080fd5b6100d66102e3565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101105781810151838201526020016100f8565b50505050905090810190601f16801561013d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101716004803603602081101561016157600080fd5b50356001600160a01b0316610370565b60408051918252519081900360200190f35b6100d6610381565b610193610416565b604080516001600160a01b039092168252519081900360200190f35b610171600480360360408110156101c557600080fd5b506001600160a01b03813516906020013561043a565b610201600480360360208110156101f157600080fd5b50356001600160a01b031661044d565b604080519115158252519081900360200190f35b6102016004803603602081101561022b57600080fd5b50356001600160a01b0316610458565b6102776004803603608081101561025157600080fd5b506001600160a01b0381358116916020810135909116906040810135906060013561046d565b005b6101936004803603602081101561028f57600080fd5b50356001600160a01b03166106b6565b610277600480360360808110156102b557600080fd5b506001600160a01b038135811691602081013590911690604081013590606001356106c1565b610193610937565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103685780601f1061033d57610100808354040283529160200191610368565b820191906000526020600020905b81548152906001019060200180831161034b57829003601f168201915b505050505081565b600061037b82610946565b92915050565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526060939092909183018282801561040c5780601f106103e15761010080835404028352916020019161040c565b820191906000526020600020905b8154815290600101906020018083116103ef57829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000610446838361094c565b9392505050565b600061037b82610951565b60026020526000908152604090205460ff1681565b6000610484858561047d876109f3565b8686610a8a565b905061048f81610be5565b600080600061049f888888610cba565b92509250925083600001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561051c578181015183820152602001610504565b50505050905090810190601f1680156105495780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561056a57600080fd5b505af115801561057e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156105a757600080fd5b81019080805160405193929190846401000000008211156105c757600080fd5b9083019060208201858111156105dc57600080fd5b82516401000000008111828201881017156105f657600080fd5b82525081516020918201929091019080838360005b8381101561062357818101518382015260200161060b565b50505050905090810190601f1680156106505780820380516001836020036101000a031916815260200191505b506040525050505061066184610d59565b8351602080860151604080518a815290516001600160a01b03808d16958116949316927fd17d95895382b096bb1f89ed05a71c3e014d5ecf25944c8f1f27f07b2b9d3194928290030190a45050505050505050565b600061037b826109f3565b60006106d1858561047d876109f3565b90506106dc81610e21565b80516001600160a01b03166397ccdc606106f586610eac565b86866040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561074d57600080fd5b505af1158015610761573d6000803e3d6000fd5b505050506000806000610775888888610ec5565b92509250925083600001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156107f25781810151838201526020016107da565b50505050905090810190601f16801561081f5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561084057600080fd5b505af1158015610854573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561087d57600080fd5b810190808051604051939291908464010000000082111561089d57600080fd5b9083019060208201858111156108b257600080fd5b82516401000000008111828201881017156108cc57600080fd5b82525081516020918201929091019080838360005b838110156108f95781810151838201526020016108e1565b50505050905090810190601f1680156109265780820380516001836020036101000a031916815260200191505b506040525050505061066184610f66565b6000546001600160a01b031681565b50600190565b919050565b60008073057835ad21a177dbdd3090bb1cae03eacf78fc6d6001600160a01b031663d2493b6c846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060606040518083038186803b1580156109b557600080fd5b505afa1580156109c9573d6000803e3d6000fd5b505050506040513d60608110156109df57600080fd5b50516001600160a01b031615159392505050565b60008073057835ad21a177dbdd3090bb1cae03eacf78fc6d6001600160a01b031663d2493b6c846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060606040518083038186803b158015610a5757600080fd5b505afa158015610a6b573d6000803e3d6000fd5b505050506040513d6060811015610a8157600080fd5b50519392505050565b610a92611028565b610a9a611028565b6001600160a01b038716808252604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b891600480820192602092909190829003018186803b158015610af657600080fd5b505afa158015610b0a573d6000803e3d6000fd5b505050506040513d6020811015610b2057600080fd5b50516001600160a01b039081166020838101919091528782166040808501919091528783166060850181905281517f70a08231000000000000000000000000000000000000000000000000000000008152938b166004850152905190926370a08231926024808301939192829003018186803b158015610b9f57600080fd5b505afa158015610bb3573d6000803e3d6000fd5b505050506040513d6020811015610bc957600080fd5b505160a082015260808101939093525060c08201529392505050565b610bf28160400151610951565b610c2d5760405162461bcd60e51b81526004018080602001828103825260238152602001806111606023913960400191505060405180910390fd5b6000816080015111610c705760405162461bcd60e51b815260040180806020018281038252603481526020018061112c6034913960400191505060405180910390fd5b80608001518160a001511015610cb75760405162461bcd60e51b81526004018080602001828103825260318152602001806110656031913960400191505060405180910390fd5b50565b604080516001600160a01b0393841660248201526044810192909252929091166064808301919091528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f69328dec00000000000000000000000000000000000000000000000000000000179052737d2768de32b0b80b7a3454c06bdac94a69ddc7a99160009190565b80608001518160a001510381606001516001600160a01b03166370a0823183600001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610db957600080fd5b505afa158015610dcd573d6000803e3d6000fd5b505050506040513d6020811015610de357600080fd5b505114610cb75760405162461bcd60e51b815260040180806020018281038252602f8152602001806110c6602f913960400191505060405180910390fd5b610e2e8160400151610951565b610e695760405162461bcd60e51b81526004018080602001828103825260238152602001806111606023913960400191505060405180910390fd5b6000816080015111610cb75760405162461bcd60e51b81526004018080602001828103825260378152602001806110f56037913960400191505060405180910390fd5b50737d2768de32b0b80b7a3454c06bdac94a69ddc7a990565b604080516001600160a01b0393841660248201526044810192909252929091166064820152600060848083018290528351808403909101815260a49092019092526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fe8eda9df00000000000000000000000000000000000000000000000000000000179052737d2768de32b0b80b7a3454c06bdac94a69ddc7a992565b8060a0015181606001516001600160a01b03166370a0823183600001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610fc057600080fd5b505afa158015610fd4573d6000803e3d6000fd5b505050506040513d6020811015610fea57600080fd5b505111610cb75760405162461bcd60e51b81526004018080602001828103825260308152602001806110966030913960400191505060405180910390fd5b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c08101919091529056fe5468652067617264656e20646f6573206e6f74206861766520656e6f75676820696e766573746d656e7420746f6b656e735468652067617264656e20646964206e6f7420726563656976652074686520696e766573746d656e7420746f6b656e735468652067617264656e20646964206e6f742072657475726e2074686520696e766573746d656e7420746f6b656e734d696e20696e766573746d656e7420746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030496e766573746d656e7420746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520696e766573746d656e742061646472657373206973206e6f742076616c6964a264697066735822122062d543a7b36fd346f38186b4c6256d64bf59d23b699d1d2337e03e7b79ac891164736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100c95760003560e01c80639e12fef211610081578063eb40e6001161005b578063eb40e60014610279578063f14b57881461029f578063f77c4791146102db576100c9565b80639e12fef2146101db578063b10198fb14610215578063d0d2d3a21461023b576100c9565b806317d7de7c116100b257806317d7de7c146101835780633fc8cef31461018b5780634deef649146101af576100c9565b806306fdde03146100ce57806307b54c6f1461014b575b600080fd5b6100d66102e3565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101105781810151838201526020016100f8565b50505050905090810190601f16801561013d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101716004803603602081101561016157600080fd5b50356001600160a01b0316610370565b60408051918252519081900360200190f35b6100d6610381565b610193610416565b604080516001600160a01b039092168252519081900360200190f35b610171600480360360408110156101c557600080fd5b506001600160a01b03813516906020013561043a565b610201600480360360208110156101f157600080fd5b50356001600160a01b031661044d565b604080519115158252519081900360200190f35b6102016004803603602081101561022b57600080fd5b50356001600160a01b0316610458565b6102776004803603608081101561025157600080fd5b506001600160a01b0381358116916020810135909116906040810135906060013561046d565b005b6101936004803603602081101561028f57600080fd5b50356001600160a01b03166106b6565b610277600480360360808110156102b557600080fd5b506001600160a01b038135811691602081013590911690604081013590606001356106c1565b610193610937565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103685780601f1061033d57610100808354040283529160200191610368565b820191906000526020600020905b81548152906001019060200180831161034b57829003601f168201915b505050505081565b600061037b82610946565b92915050565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526060939092909183018282801561040c5780601f106103e15761010080835404028352916020019161040c565b820191906000526020600020905b8154815290600101906020018083116103ef57829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000610446838361094c565b9392505050565b600061037b82610951565b60026020526000908152604090205460ff1681565b6000610484858561047d876109f3565b8686610a8a565b905061048f81610be5565b600080600061049f888888610cba565b92509250925083600001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561051c578181015183820152602001610504565b50505050905090810190601f1680156105495780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561056a57600080fd5b505af115801561057e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156105a757600080fd5b81019080805160405193929190846401000000008211156105c757600080fd5b9083019060208201858111156105dc57600080fd5b82516401000000008111828201881017156105f657600080fd5b82525081516020918201929091019080838360005b8381101561062357818101518382015260200161060b565b50505050905090810190601f1680156106505780820380516001836020036101000a031916815260200191505b506040525050505061066184610d59565b8351602080860151604080518a815290516001600160a01b03808d16958116949316927fd17d95895382b096bb1f89ed05a71c3e014d5ecf25944c8f1f27f07b2b9d3194928290030190a45050505050505050565b600061037b826109f3565b60006106d1858561047d876109f3565b90506106dc81610e21565b80516001600160a01b03166397ccdc606106f586610eac565b86866040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561074d57600080fd5b505af1158015610761573d6000803e3d6000fd5b505050506000806000610775888888610ec5565b92509250925083600001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156107f25781810151838201526020016107da565b50505050905090810190601f16801561081f5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561084057600080fd5b505af1158015610854573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561087d57600080fd5b810190808051604051939291908464010000000082111561089d57600080fd5b9083019060208201858111156108b257600080fd5b82516401000000008111828201881017156108cc57600080fd5b82525081516020918201929091019080838360005b838110156108f95781810151838201526020016108e1565b50505050905090810190601f1680156109265780820380516001836020036101000a031916815260200191505b506040525050505061066184610f66565b6000546001600160a01b031681565b50600190565b919050565b60008073057835ad21a177dbdd3090bb1cae03eacf78fc6d6001600160a01b031663d2493b6c846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060606040518083038186803b1580156109b557600080fd5b505afa1580156109c9573d6000803e3d6000fd5b505050506040513d60608110156109df57600080fd5b50516001600160a01b031615159392505050565b60008073057835ad21a177dbdd3090bb1cae03eacf78fc6d6001600160a01b031663d2493b6c846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060606040518083038186803b158015610a5757600080fd5b505afa158015610a6b573d6000803e3d6000fd5b505050506040513d6060811015610a8157600080fd5b50519392505050565b610a92611028565b610a9a611028565b6001600160a01b038716808252604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b891600480820192602092909190829003018186803b158015610af657600080fd5b505afa158015610b0a573d6000803e3d6000fd5b505050506040513d6020811015610b2057600080fd5b50516001600160a01b039081166020838101919091528782166040808501919091528783166060850181905281517f70a08231000000000000000000000000000000000000000000000000000000008152938b166004850152905190926370a08231926024808301939192829003018186803b158015610b9f57600080fd5b505afa158015610bb3573d6000803e3d6000fd5b505050506040513d6020811015610bc957600080fd5b505160a082015260808101939093525060c08201529392505050565b610bf28160400151610951565b610c2d5760405162461bcd60e51b81526004018080602001828103825260238152602001806111606023913960400191505060405180910390fd5b6000816080015111610c705760405162461bcd60e51b815260040180806020018281038252603481526020018061112c6034913960400191505060405180910390fd5b80608001518160a001511015610cb75760405162461bcd60e51b81526004018080602001828103825260318152602001806110656031913960400191505060405180910390fd5b50565b604080516001600160a01b0393841660248201526044810192909252929091166064808301919091528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f69328dec00000000000000000000000000000000000000000000000000000000179052737d2768de32b0b80b7a3454c06bdac94a69ddc7a99160009190565b80608001518160a001510381606001516001600160a01b03166370a0823183600001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610db957600080fd5b505afa158015610dcd573d6000803e3d6000fd5b505050506040513d6020811015610de357600080fd5b505114610cb75760405162461bcd60e51b815260040180806020018281038252602f8152602001806110c6602f913960400191505060405180910390fd5b610e2e8160400151610951565b610e695760405162461bcd60e51b81526004018080602001828103825260238152602001806111606023913960400191505060405180910390fd5b6000816080015111610cb75760405162461bcd60e51b81526004018080602001828103825260378152602001806110f56037913960400191505060405180910390fd5b50737d2768de32b0b80b7a3454c06bdac94a69ddc7a990565b604080516001600160a01b0393841660248201526044810192909252929091166064820152600060848083018290528351808403909101815260a49092019092526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fe8eda9df00000000000000000000000000000000000000000000000000000000179052737d2768de32b0b80b7a3454c06bdac94a69ddc7a992565b8060a0015181606001516001600160a01b03166370a0823183600001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610fc057600080fd5b505afa158015610fd4573d6000803e3d6000fd5b505050506040513d6020811015610fea57600080fd5b505111610cb75760405162461bcd60e51b81526004018080602001828103825260308152602001806110966030913960400191505060405180910390fd5b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c08101919091529056fe5468652067617264656e20646f6573206e6f74206861766520656e6f75676820696e766573746d656e7420746f6b656e735468652067617264656e20646964206e6f7420726563656976652074686520696e766573746d656e7420746f6b656e735468652067617264656e20646964206e6f742072657475726e2074686520696e766573746d656e7420746f6b656e734d696e20696e766573746d656e7420746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030496e766573746d656e7420746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520696e766573746d656e742061646472657373206973206e6f742076616c6964a264697066735822122062d543a7b36fd346f38186b4c6256d64bf59d23b699d1d2337e03e7b79ac891164736f6c63430007060033", "devdoc": { "author": "Babylon Finance Protocol Aave lend integration.", "kind": "dev", @@ -369,7 +369,7 @@ "storageLayout": { "storage": [ { - "astId": 18742, + "astId": 17657, "contract": "contracts/integrations/lend/AaveLendIntegration.sol:AaveLendIntegration", "label": "controller", "offset": 0, @@ -377,7 +377,7 @@ "type": "t_address" }, { - "astId": 18746, + "astId": 17661, "contract": "contracts/integrations/lend/AaveLendIntegration.sol:AaveLendIntegration", "label": "name", "offset": 0, @@ -385,7 +385,7 @@ "type": "t_string_storage" }, { - "astId": 18750, + "astId": 17665, "contract": "contracts/integrations/lend/AaveLendIntegration.sol:AaveLendIntegration", "label": "initializedByGarden", "offset": 0, @@ -393,7 +393,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 7995, + "astId": 5603, "contract": "contracts/integrations/lend/AaveLendIntegration.sol:AaveLendIntegration", "label": "_status", "offset": 0, diff --git a/deployments/artifacts/mainnet/AddLiquidityOperation.json b/deployments/artifacts/mainnet/AddLiquidityOperation.json index c1cf4898f..fa05063b0 100644 --- a/deployments/artifacts/mainnet/AddLiquidityOperation.json +++ b/deployments/artifacts/mainnet/AddLiquidityOperation.json @@ -1,5 +1,5 @@ { - "address": "0x6DC8a9bF1b9d111aa9f64156be9F8bb6b27061F0", + "address": "0xf7F5dE7F9Aa6A80B484061E24f8B3477930B6AAE", "abi": [ { "inputs": [ @@ -196,30 +196,30 @@ "type": "function" } ], - "transactionHash": "0xec68323184f54b7d02264439db9e19510ae6a5096be9dc106bef52a660c34c0a", + "transactionHash": "0xb084a682d90df6d73866719188f73f7706f789b62aeada5c07a520dce7878b5f", "receipt": { "to": null, "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", - "contractAddress": "0x6DC8a9bF1b9d111aa9f64156be9F8bb6b27061F0", - "transactionIndex": 206, - "gasUsed": "2004663", + "contractAddress": "0xf7F5dE7F9Aa6A80B484061E24f8B3477930B6AAE", + "transactionIndex": 105, + "gasUsed": "1916960", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xb4f12f0d1206492604631328e669806d737b2c02dc55faf1fb7d8e6e5e55c019", - "transactionHash": "0xec68323184f54b7d02264439db9e19510ae6a5096be9dc106bef52a660c34c0a", + "blockHash": "0xf9d266f7b45c119c0688068c46dbc643747afb812bb591b2b2b19f2efff08709", + "transactionHash": "0xb084a682d90df6d73866719188f73f7706f789b62aeada5c07a520dce7878b5f", "logs": [], - "blockNumber": 12361037, - "cumulativeGasUsed": "14282160", + "blockNumber": 12451346, + "cumulativeGasUsed": "11040681", "status": 1, "byzantium": true }, "args": [ "lp", - "0xffe7c30daDb1B132b86aB7bbede496615d54c8Ac" + "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F" ], - "solcInputHash": "a02a2075cf667a20c416d2d0a5e8f337", - "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_capital\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"_pool\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"}],\"name\":\"executeOperation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_percentage\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"}],\"name\":\"exitOperation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"}],\"name\":\"getNAV\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"validateOperation\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Executes a add liquidity operation\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of the controller\",\"_name\":\"Name of the integration\"}},\"executeOperation(address,uint256,uint8,address,address,address)\":{\"params\":{\"_capital\":\"Amount of capital received from the garden\"}},\"exitOperation(uint256,address,address,address)\":{\"params\":{\"_percentage\":\"of capital to exit from the strategy\"}},\"getNAV(address,address,address)\":{\"returns\":{\"_0\":\"_nav NAV of the strategy\"}},\"validateOperation(address,address,address,uint256)\":{\"params\":{\"_data\":\"Operation data\"}}},\"title\":\"AddLiquidityOperation\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates the integration\"},\"executeOperation(address,uint256,uint8,address,address,address)\":{\"notice\":\"Executes the add liquidity operation\"},\"exitOperation(uint256,address,address,address)\":{\"notice\":\"Exits the add liquidity operation.\"},\"getNAV(address,address,address)\":{\"notice\":\"Gets the NAV of the add liquidity op in the reserve asset\"},\"getName()\":{\"notice\":\"Returns the name of the operation\"},\"validateOperation(address,address,address,uint256)\":{\"notice\":\"Sets operation data for the add liquidity operation\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/strategies/operations/AddLiquidityOperation.sol\":\"AddLiquidityOperation\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityMinimum(uint256 _minRiskyPairLiquidityEth) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minRiskyPairLiquidityEth() external view returns (uint256);\\n\\n function getUniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0x57cf4ece98219f805a416e8c24728d30d9b37c4126d66785d2617b97e35ffae6\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function nftAddress() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategy(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function reenableEthForStrategies() external;\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x5e460136e0b45024ea1c1f32cde607f3ce75dd5b14cee34007d6bbd08beabc82\",\"license\":\"Apache License\"},\"contracts/interfaces/IOperation.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from './IGarden.sol';\\nimport {IStrategy} from './IStrategy.sol';\\n\\n/**\\n * @title IOperation\\n * @author Babylon Finance\\n *\\n * Interface for an strategy operation\\n */\\ninterface IOperation {\\n function validateOperation(\\n address _data,\\n IGarden _garden,\\n address _integration,\\n uint256 _index\\n ) external view;\\n\\n function executeOperation(\\n address _asset,\\n uint256 _capital,\\n uint8 _assetStatus,\\n address _data,\\n IGarden _garden,\\n address _integration\\n )\\n external\\n returns (\\n address,\\n uint256,\\n uint8\\n );\\n\\n function exitOperation(\\n uint256 _percentage,\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external;\\n\\n function getNAV(\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external view returns (uint256);\\n\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x856e173e6c8e1fdbe54988df58d0805a23a6a2f8408bd4f90a488a1978e762ed\",\"license\":\"Apache License\"},\"contracts/interfaces/IPoolIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPoolIntegration\\n * @author Babylon Finance\\n *\\n * Interface for liquiditypool protocol integrations\\n */\\ninterface IPoolIntegration {\\n function joinPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensOut,\\n address[] memory _poolTokens,\\n uint256[] memory _maxAmountsIn\\n ) external;\\n\\n function exitPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensIn,\\n address[] memory _poolTokens,\\n uint256[] memory _minAmountsOut\\n ) external;\\n\\n function getPoolTokens(address _poolAddress) external view returns (address[] memory);\\n\\n function getPoolWeights(address _poolAddress) external view returns (uint256[] memory);\\n\\n function getPoolTokensOut(\\n address _poolAdress,\\n address _tokenAddress,\\n uint256 _maxAmountsIn\\n ) external view returns (uint256);\\n\\n function getPoolMinAmountsOut(address _poolAddress, uint256 _poolTokenAmount)\\n external\\n view\\n returns (uint256[] memory _minAmountsOut);\\n\\n function isPool(address _poolAddress) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xee7df0934dad8d729ee6dacf85e1ec327a0c8e17bcabaa2afa7d14d93325f9ac\",\"license\":\"Apache License\"},\"contracts/interfaces/IPriceOracle.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol IPriceOracle)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPriceOracle\\n * @author Babylon Finance\\n *\\n * Interface for interacting with PriceOracle\\n */\\ninterface IPriceOracle {\\n /* ============ Functions ============ */\\n\\n function getPrice(address _assetOne, address _assetTwo) external view returns (uint256);\\n\\n function updateAdapters(address _assetOne, address _assetTwo) external;\\n}\\n\",\"keccak256\":\"0xa22e0e5e166f6f6714553b736ee921b916c37bc5b557042bf6042cc010d2a041\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital,\\n address _strategyNft\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function strategyNft() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x4396906e436eb68c96715e0a53ae1656ac5d7934ebdaeb58ec3c33953465bc39\",\"license\":\"Apache License\"},\"contracts/interfaces/ITradeIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title ITrade\\n * @author Babylon Finance\\n *\\n * Interface for trading protocol integrations\\n */\\ninterface ITradeIntegration {\\n function trade(\\n address _strategy,\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken,\\n uint256 _minReceiveQuantity\\n ) external;\\n\\n function getConversionRates(\\n address _sourceToken,\\n address _destinationToken,\\n uint256 _sourceQuantity\\n ) external returns (uint256, uint256);\\n}\\n\",\"keccak256\":\"0x95df25f2cbfd3d82a9e22c9202f9fc2c497e90fd6e5fcfb00c4162f6447c0cbd\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"contracts/strategies/operations/AddLiquidityOperation.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Operation} from './Operation.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\\nimport {IPoolIntegration} from '../../interfaces/IPoolIntegration.sol';\\n\\n/**\\n * @title AddLiquidityOperation\\n * @author Babylon Finance\\n *\\n * Executes a add liquidity operation\\n */\\ncontract AddLiquidityOperation is Operation {\\n using SafeMath for uint256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _controller Address of the controller\\n */\\n constructor(string memory _name, address _controller) Operation(_name, _controller) {}\\n\\n /**\\n * Sets operation data for the add liquidity operation\\n *\\n * @param _data Operation data\\n */\\n function validateOperation(\\n address _data,\\n IGarden, /* _garden */\\n address _integration,\\n uint256 /* _index */\\n ) external view override onlyStrategy {\\n require(IPoolIntegration(_integration).isPool(_data), 'Not a valid pool');\\n }\\n\\n /**\\n * Executes the add liquidity operation\\n * @param _capital Amount of capital received from the garden\\n */\\n function executeOperation(\\n address _asset,\\n uint256 _capital,\\n uint8, /* _assetStatus */\\n address _pool,\\n IGarden _garden,\\n address _integration\\n )\\n external\\n override\\n onlyStrategy\\n returns (\\n address,\\n uint256,\\n uint8\\n )\\n {\\n address[] memory poolTokens = IPoolIntegration(_integration).getPoolTokens(_pool);\\n uint256[] memory _maxAmountsIn = new uint256[](poolTokens.length);\\n uint256[] memory _poolWeights = IPoolIntegration(_integration).getPoolWeights(_pool);\\n // Get the tokens needed to enter the pool\\n for (uint256 i = 0; i < poolTokens.length; i++) {\\n _maxAmountsIn[i] = _getMaxAmountTokenPool(_asset, _capital, _garden, _poolWeights[i], poolTokens[i]);\\n }\\n uint256 poolTokensOut = IPoolIntegration(_integration).getPoolTokensOut(_pool, poolTokens[0], _maxAmountsIn[0]);\\n IPoolIntegration(_integration).joinPool(\\n msg.sender,\\n _pool,\\n poolTokensOut.sub(poolTokensOut.preciseMul(SLIPPAGE_ALLOWED)),\\n poolTokens,\\n _maxAmountsIn\\n );\\n return (_pool, IERC20(_pool).balanceOf(msg.sender), 0); // liquid\\n }\\n\\n /**\\n * Exits the add liquidity operation.\\n * @param _percentage of capital to exit from the strategy\\n */\\n function exitOperation(\\n uint256 _percentage,\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external override onlyStrategy {\\n require(_percentage <= 100e18, 'Unwind Percentage <= 100%');\\n address pool = _data;\\n address[] memory poolTokens = IPoolIntegration(_integration).getPoolTokens(pool);\\n uint256 lpTokens = IERC20(pool).balanceOf(msg.sender).preciseMul(_percentage); // Sell all pool tokens\\n uint256[] memory _minAmountsOut = IPoolIntegration(_integration).getPoolMinAmountsOut(pool, lpTokens);\\n IPoolIntegration(_integration).exitPool(\\n msg.sender,\\n pool,\\n lpTokens, // Sell all pool tokens\\n poolTokens,\\n _minAmountsOut\\n );\\n // Exit Pool tokens\\n address reserveAsset = _garden.reserveAsset();\\n for (uint256 i = 0; i < poolTokens.length; i++) {\\n if (poolTokens[i] != reserveAsset) {\\n if (poolTokens[i] == address(0)) {\\n IStrategy(msg.sender).handleWeth(true, address(msg.sender).balance);\\n } else {\\n IStrategy(msg.sender).trade(\\n poolTokens[i],\\n IERC20(poolTokens[i]).balanceOf(msg.sender),\\n reserveAsset\\n );\\n }\\n }\\n }\\n }\\n\\n /**\\n * Gets the NAV of the add liquidity op in the reserve asset\\n *\\n * @return _nav NAV of the strategy\\n */\\n function getNAV(\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external view override onlyStrategy returns (uint256) {\\n if (!IStrategy(msg.sender).isStrategyActive()) {\\n return 0;\\n }\\n address pool = _data;\\n address[] memory poolTokens = IPoolIntegration(_integration).getPoolTokens(pool);\\n uint256 NAV;\\n uint256 totalSupply = IERC20(pool).totalSupply();\\n uint256 lpTokens = IERC20(pool).balanceOf(msg.sender);\\n for (uint256 i = 0; i < poolTokens.length; i++) {\\n uint256 price = _getPrice(_garden.reserveAsset(), poolTokens[i] != address(0) ? poolTokens[i] : WETH);\\n uint256 balance = poolTokens[i] != address(0) ? IERC20(poolTokens[i]).balanceOf(pool) : pool.balance;\\n NAV += balance.mul(lpTokens).div(totalSupply).preciseDiv(price);\\n }\\n require(NAV != 0, 'NAV has to be bigger 0');\\n return NAV;\\n }\\n\\n /* ============ Private Functions ============ */\\n\\n function _getMaxAmountTokenPool(\\n address _asset,\\n uint256 _capital,\\n IGarden _garden,\\n uint256 _poolWeight,\\n address _poolToken\\n ) private returns (uint256) {\\n uint256 normalizedAmount = _capital.preciseMul(_poolWeight);\\n if (_poolToken != _asset && _poolToken != address(0)) {\\n IStrategy(msg.sender).trade(_asset, normalizedAmount, _poolToken);\\n return IERC20(_poolToken).balanceOf(msg.sender);\\n }\\n if (_poolToken == address(0)) {\\n if (_asset != WETH) {\\n IStrategy(msg.sender).trade(_asset, normalizedAmount, WETH);\\n }\\n // Convert WETH to ETH\\n IStrategy(msg.sender).handleWeth(false, normalizedAmount);\\n }\\n return normalizedAmount;\\n }\\n}\\n\",\"keccak256\":\"0x5c44af8c8bea725db8ac70e9c816c51110afcb8041e9d704892442e0ee09d76d\",\"license\":\"Apache License\"},\"contracts/strategies/operations/Operation.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {IOperation} from '../../interfaces/IOperation.sol';\\nimport {ITradeIntegration} from '../../interfaces/ITradeIntegration.sol';\\nimport {IPriceOracle} from '../../interfaces/IPriceOracle.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\n\\n/**\\n * @title LongStrategy\\n * @author Babylon Finance\\n *\\n * Holds the data for a long strategy\\n */\\nabstract contract Operation is IOperation {\\n using SafeMath for uint256;\\n /* ============ Modifiers ============ */\\n\\n modifier onlyStrategy() {\\n IStrategy strategy = IStrategy(msg.sender);\\n IGarden garden = strategy.garden();\\n require(IBabController(controller).isSystemContract(address(garden)), 'Only a garden can call this');\\n require(garden.isStrategy(msg.sender), 'Sender must be a strategy');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n uint256 internal constant SLIPPAGE_ALLOWED = 1e16; // 1%\\n uint256 internal constant HUNDRED_PERCENT = 1e18; // 100%\\n address internal constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\\n\\n // Address of the controller\\n address public controller;\\n // Name of the operation\\n string public name;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _controller Address of the controller\\n */\\n constructor(string memory _name, address _controller) {\\n require(_controller != address(0), 'Controller must be defined');\\n name = _name;\\n controller = _controller;\\n }\\n\\n /* ============ Virtual External Functions ============ */\\n\\n function validateOperation(\\n address _data,\\n IGarden _garden,\\n address _integration,\\n uint256 _index\\n ) external view virtual override;\\n\\n function executeOperation(\\n address _asset,\\n uint256 _capital,\\n uint8 _assetStatus,\\n address _data,\\n IGarden _garden,\\n address _integration\\n )\\n external\\n virtual\\n override\\n returns (\\n address,\\n uint256,\\n uint8\\n );\\n\\n function exitOperation(\\n uint256 _percentage,\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external virtual override;\\n\\n function getNAV(\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external view virtual override returns (uint256);\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the name of the operation\\n */\\n function getName() external view override returns (string memory) {\\n return name;\\n }\\n\\n /**\\n * Returns the price of the pair through the price oracle\\n */\\n function _getPrice(address _assetOne, address _assetTwo) internal view returns (uint256) {\\n IPriceOracle oracle = IPriceOracle(IBabController(controller).priceOracle());\\n return oracle.getPrice(_assetOne, _assetTwo);\\n }\\n\\n function _normalizeDecimals(address _asset, uint256 _quantity) internal view returns (uint256) {\\n uint8 tokenDecimals = ERC20(_asset).decimals();\\n return tokenDecimals != 18 ? _quantity.mul(10**(18 - tokenDecimals)) : _quantity;\\n }\\n}\\n\",\"keccak256\":\"0x9b65b8d307d5c35ba537bf051095d28fbb3128c593091cc1ac16de22b4370d8e\",\"license\":\"Apache License\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b50604051620024ad380380620024ad833981810160405260408110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001519150829050816001600160a01b03811662000150576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c6572206d75737420626520646566696e6564000000000000604482015290519081900360640190fd5b81516200016590600190602085019062000190565b50600080546001600160a01b0319166001600160a01b0392909216919091179055506200023c915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001c8576000855562000213565b82601f10620001e357805160ff191683800117855562000213565b8280016001018555821562000213579182015b8281111562000213578251825591602001919060010190620001f6565b506200022192915062000225565b5090565b5b8082111562000221576000815560010162000226565b612261806200024c6000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80634222326a1161005b5780634222326a1461014757806355d9750b14610191578063c8cd307514610209578063f77c4791146102455761007d565b806306fdde031461008257806317d7de7c146100ff578063419ea18a14610107575b600080fd5b61008a610269565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100c45781810151838201526020016100ac565b50505050905090810190601f1680156100f15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61008a6102f6565b6101456004803603608081101561011d57600080fd5b508035906001600160a01b03602082013581169160408101358216916060909101351661038b565b005b61017f6004803603606081101561015d57600080fd5b506001600160a01b038135811691602081013582169160409091013516610c4c565b60408051918252519081900360200190f35b6101de600480360360c08110156101a757600080fd5b506001600160a01b03813581169160208101359160ff604083013516916060810135821691608082013581169160a00135166112ed565b604080516001600160a01b039094168452602084019290925260ff1682820152519081900360600190f35b6101456004803603608081101561021f57600080fd5b506001600160a01b03813581169160208101358216916040820135169060600135611a3f565b61024d611d0c565b604080516001600160a01b039092168252519081900360200190f35b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102ee5780601f106102c3576101008083540402835291602001916102ee565b820191906000526020600020905b8154815290600101906020018083116102d157829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156103815780601f1061035657610100808354040283529160200191610381565b820191906000526020600020905b81548152906001019060200180831161036457829003601f168201915b5050505050905090565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156103cb57600080fd5b505afa1580156103df573d6000803e3d6000fd5b505050506040513d60208110156103f557600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561044657600080fd5b505afa15801561045a573d6000803e3d6000fd5b505050506040513d602081101561047057600080fd5b50516104c3576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b15801561050957600080fd5b505afa15801561051d573d6000803e3d6000fd5b505050506040513d602081101561053357600080fd5b5051610586576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b68056bc75e2d631000008611156105e4576040805162461bcd60e51b815260206004820152601960248201527f556e77696e642050657263656e74616765203c3d203130302500000000000000604482015290519081900360640190fd5b60008590506000846001600160a01b031663ca4f2803836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060006040518083038186803b15801561063857600080fd5b505afa15801561064c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561067557600080fd5b810190808051604051939291908464010000000082111561069557600080fd5b9083019060208201858111156106aa57600080fd5b82518660208202830111640100000000821117156106c757600080fd5b82525081516020918201928201910280838360005b838110156106f45781810151838201526020016106dc565b505050509050016040525050509050600061078889846001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561075657600080fd5b505afa15801561076a573d6000803e3d6000fd5b505050506040513d602081101561078057600080fd5b505190611d1b565b90506000866001600160a01b031663f5e3932585846040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060006040518083038186803b1580156107e157600080fd5b505afa1580156107f5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561081e57600080fd5b810190808051604051939291908464010000000082111561083e57600080fd5b90830190602082018581111561085357600080fd5b825186602082028301116401000000008211171561087057600080fd5b82525081516020918201928201910280838360005b8381101561089d578181015183820152602001610885565b505050509050016040525050509050866001600160a01b03166362cc395a33868587866040518663ffffffff1660e01b815260040180866001600160a01b03168152602001856001600160a01b031681526020018481526020018060200180602001838103835285818151815260200191508051906020019060200280838360005b8381101561093757818101518382015260200161091f565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101561097657818101518382015260200161095e565b50505050905001975050505050505050600060405180830381600087803b1580156109a057600080fd5b505af11580156109b4573d6000803e3d6000fd5b505050506000886001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b1580156109f357600080fd5b505afa158015610a07573d6000803e3d6000fd5b505050506040513d6020811015610a1d57600080fd5b5051905060005b8451811015610c3e57816001600160a01b0316858281518110610a4357fe5b60200260200101516001600160a01b031614610c365760006001600160a01b0316858281518110610a7057fe5b60200260200101516001600160a01b03161415610aea5760408051631a5cfcb760e01b81526001600482015233803160248301529151631a5cfcb79160448082019260009290919082900301818387803b158015610acd57600080fd5b505af1158015610ae1573d6000803e3d6000fd5b50505050610c36565b336001600160a01b0316630e32db52868381518110610b0557fe5b6020026020010151878481518110610b1957fe5b60200260200101516001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610b6d57600080fd5b505afa158015610b81573d6000803e3d6000fd5b505050506040513d6020811015610b9757600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b03938416600482015260248101929092529186166044820152905160648083019260209291908290030181600087803b158015610c0957600080fd5b505af1158015610c1d573d6000803e3d6000fd5b505050506040513d6020811015610c3357600080fd5b50505b600101610a24565b505050505050505050505050565b6000803390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8d57600080fd5b505afa158015610ca1573d6000803e3d6000fd5b505050506040513d6020811015610cb757600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b158015610d0857600080fd5b505afa158015610d1c573d6000803e3d6000fd5b505050506040513d6020811015610d3257600080fd5b5051610d85576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b158015610dcb57600080fd5b505afa158015610ddf573d6000803e3d6000fd5b505050506040513d6020811015610df557600080fd5b5051610e48576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b336001600160a01b031663e4df5e1a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e8157600080fd5b505afa158015610e95573d6000803e3d6000fd5b505050506040513d6020811015610eab57600080fd5b5051610eba57600092506112e4565b60008690506000856001600160a01b031663ca4f2803836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060006040518083038186803b158015610f0e57600080fd5b505afa158015610f22573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610f4b57600080fd5b8101908080516040519392919084640100000000821115610f6b57600080fd5b908301906020820185811115610f8057600080fd5b8251866020820283011164010000000082111715610f9d57600080fd5b82525081516020918201928201910280838360005b83811015610fca578181015183820152602001610fb2565b505050509050016040525050509050600080836001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561101557600080fd5b505afa158015611029573d6000803e3d6000fd5b505050506040513d602081101561103f57600080fd5b5051604080516370a0823160e01b815233600482015290519192506000916001600160a01b038716916370a08231916024808301926020929190829003018186803b15801561108d57600080fd5b505afa1580156110a1573d6000803e3d6000fd5b505050506040513d60208110156110b757600080fd5b5051905060005b845181101561128957600061118d8c6001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561110557600080fd5b505afa158015611119573d6000803e3d6000fd5b505050506040513d602081101561112f57600080fd5b5051875160009089908690811061114257fe5b60200260200101516001600160a01b031614156111735773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2611188565b87848151811061117f57fe5b60200260200101515b611d3c565b90506000806001600160a01b03168784815181106111a757fe5b60200260200101516001600160a01b031614156111ce57876001600160a01b03163161125b565b8683815181106111da57fe5b60200260200101516001600160a01b03166370a08231896040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561122e57600080fd5b505afa158015611242573d6000803e3d6000fd5b505050506040513d602081101561125857600080fd5b50515b905061127b826112758761126f8589611e68565b90611ec1565b90611f28565b9095019450506001016110be565b50826112dc576040805162461bcd60e51b815260206004820152601660248201527f4e41562068617320746f20626520626967676572203000000000000000000000604482015290519081900360640190fd5b509095505050505b50509392505050565b6000806000803390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b15801561133157600080fd5b505afa158015611345573d6000803e3d6000fd5b505050506040513d602081101561135b57600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b1580156113ac57600080fd5b505afa1580156113c0573d6000803e3d6000fd5b505050506040513d60208110156113d657600080fd5b5051611429576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b15801561146f57600080fd5b505afa158015611483573d6000803e3d6000fd5b505050506040513d602081101561149957600080fd5b50516114ec576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b6000866001600160a01b031663ca4f28038a6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060006040518083038186803b15801561153b57600080fd5b505afa15801561154f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561157857600080fd5b810190808051604051939291908464010000000082111561159857600080fd5b9083019060208201858111156115ad57600080fd5b82518660208202830111640100000000821117156115ca57600080fd5b82525081516020918201928201910280838360005b838110156115f75781810151838201526020016115df565b5050505090500160405250505090506000815167ffffffffffffffff8111801561162057600080fd5b5060405190808252806020026020018201604052801561164a578160200160208202803683370190505b5090506000886001600160a01b031663bd9d8ad98c6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060006040518083038186803b15801561169c57600080fd5b505afa1580156116b0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156116d957600080fd5b81019080805160405193929190846401000000008211156116f957600080fd5b90830190602082018581111561170e57600080fd5b825186602082028301116401000000008211171561172b57600080fd5b82525081516020918201928201910280838360005b83811015611758578181015183820152602001611740565b50505050905001604052505050905060005b83518110156117c5576117a68f8f8d85858151811061178557fe5b602002602001015188868151811061179957fe5b6020026020010151611f40565b8382815181106117b257fe5b602090810291909101015260010161176a565b506000896001600160a01b0316633cd5bd958d866000815181106117e557fe5b6020026020010151866000815181106117fa57fe5b60200260200101516040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b03168152602001828152602001935050505060206040518083038186803b15801561185657600080fd5b505afa15801561186a573d6000803e3d6000fd5b505050506040513d602081101561188057600080fd5b505190506001600160a01b038a1663708a3476338e6118b06118a986662386f26fc10000611d1b565b86906121ad565b88886040518663ffffffff1660e01b815260040180866001600160a01b03168152602001856001600160a01b031681526020018481526020018060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015611929578181015183820152602001611911565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015611968578181015183820152602001611950565b50505050905001975050505050505050600060405180830381600087803b15801561199257600080fd5b505af11580156119a6573d6000803e3d6000fd5b505050508b8c6001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156119f857600080fd5b505afa158015611a0c573d6000803e3d6000fd5b505050506040513d6020811015611a2257600080fd5b505190995097506000965050505050505096509650969350505050565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015611a7f57600080fd5b505afa158015611a93573d6000803e3d6000fd5b505050506040513d6020811015611aa957600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b158015611afa57600080fd5b505afa158015611b0e573d6000803e3d6000fd5b505050506040513d6020811015611b2457600080fd5b5051611b77576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b158015611bbd57600080fd5b505afa158015611bd1573d6000803e3d6000fd5b505050506040513d6020811015611be757600080fd5b5051611c3a576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b836001600160a01b0316635b16ebb7876040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611c8757600080fd5b505afa158015611c9b573d6000803e3d6000fd5b505050506040513d6020811015611cb157600080fd5b5051611d04576040805162461bcd60e51b815260206004820152601060248201527f4e6f7420612076616c696420706f6f6c00000000000000000000000000000000604482015290519081900360640190fd5b505050505050565b6000546001600160a01b031681565b6000611d33670de0b6b3a764000061126f8585611e68565b90505b92915050565b60008054604080517f2630c12f000000000000000000000000000000000000000000000000000000008152905183926001600160a01b031691632630c12f916004808301926020929190829003018186803b158015611d9a57600080fd5b505afa158015611dae573d6000803e3d6000fd5b505050506040513d6020811015611dc457600080fd5b5051604080517fac41865a0000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152868116602483015291519293509083169163ac41865a91604480820192602092909190829003018186803b158015611e3457600080fd5b505afa158015611e48573d6000803e3d6000fd5b505050506040513d6020811015611e5e57600080fd5b5051949350505050565b600082611e7757506000611d36565b82820282848281611e8457fe5b0414611d335760405162461bcd60e51b815260040180806020018281038252602181526020018061220b6021913960400191505060405180910390fd5b6000808211611f17576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611f2057fe5b049392505050565b6000611d338261126f85670de0b6b3a7640000611e68565b600080611f4d8685611d1b565b9050866001600160a01b0316836001600160a01b031614158015611f7957506001600160a01b03831615155b1561207c57604080516307196da960e11b81526001600160a01b038981166004830152602482018490528516604482015290513391630e32db529160648083019260209291908290030181600087803b158015611fd557600080fd5b505af1158015611fe9573d6000803e3d6000fd5b505050506040513d6020811015611fff57600080fd5b5050604080516370a0823160e01b815233600482015290516001600160a01b038516916370a08231916024808301926020929190829003018186803b15801561204757600080fd5b505afa15801561205b573d6000803e3d6000fd5b505050506040513d602081101561207157600080fd5b505191506121a49050565b6001600160a01b0383166121a1576001600160a01b03871673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21461214457604080516307196da960e11b81526001600160a01b03891660048201526024810183905273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2604482015290513391630e32db529160648083019260209291908290030181600087803b15801561211757600080fd5b505af115801561212b573d6000803e3d6000fd5b505050506040513d602081101561214157600080fd5b50505b60408051631a5cfcb760e01b81526000600482018190526024820184905291513392631a5cfcb7926044808201939182900301818387803b15801561218857600080fd5b505af115801561219c573d6000803e3d6000fd5b505050505b90505b95945050505050565b600082821115612204576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b5090039056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a26469706673582212202ad896d42f83b416489fbc9e8dbaf46e08f41c03d64d377848ecdcddd777223564736f6c63430007060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80634222326a1161005b5780634222326a1461014757806355d9750b14610191578063c8cd307514610209578063f77c4791146102455761007d565b806306fdde031461008257806317d7de7c146100ff578063419ea18a14610107575b600080fd5b61008a610269565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100c45781810151838201526020016100ac565b50505050905090810190601f1680156100f15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61008a6102f6565b6101456004803603608081101561011d57600080fd5b508035906001600160a01b03602082013581169160408101358216916060909101351661038b565b005b61017f6004803603606081101561015d57600080fd5b506001600160a01b038135811691602081013582169160409091013516610c4c565b60408051918252519081900360200190f35b6101de600480360360c08110156101a757600080fd5b506001600160a01b03813581169160208101359160ff604083013516916060810135821691608082013581169160a00135166112ed565b604080516001600160a01b039094168452602084019290925260ff1682820152519081900360600190f35b6101456004803603608081101561021f57600080fd5b506001600160a01b03813581169160208101358216916040820135169060600135611a3f565b61024d611d0c565b604080516001600160a01b039092168252519081900360200190f35b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102ee5780601f106102c3576101008083540402835291602001916102ee565b820191906000526020600020905b8154815290600101906020018083116102d157829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156103815780601f1061035657610100808354040283529160200191610381565b820191906000526020600020905b81548152906001019060200180831161036457829003601f168201915b5050505050905090565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156103cb57600080fd5b505afa1580156103df573d6000803e3d6000fd5b505050506040513d60208110156103f557600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561044657600080fd5b505afa15801561045a573d6000803e3d6000fd5b505050506040513d602081101561047057600080fd5b50516104c3576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b15801561050957600080fd5b505afa15801561051d573d6000803e3d6000fd5b505050506040513d602081101561053357600080fd5b5051610586576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b68056bc75e2d631000008611156105e4576040805162461bcd60e51b815260206004820152601960248201527f556e77696e642050657263656e74616765203c3d203130302500000000000000604482015290519081900360640190fd5b60008590506000846001600160a01b031663ca4f2803836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060006040518083038186803b15801561063857600080fd5b505afa15801561064c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561067557600080fd5b810190808051604051939291908464010000000082111561069557600080fd5b9083019060208201858111156106aa57600080fd5b82518660208202830111640100000000821117156106c757600080fd5b82525081516020918201928201910280838360005b838110156106f45781810151838201526020016106dc565b505050509050016040525050509050600061078889846001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561075657600080fd5b505afa15801561076a573d6000803e3d6000fd5b505050506040513d602081101561078057600080fd5b505190611d1b565b90506000866001600160a01b031663f5e3932585846040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060006040518083038186803b1580156107e157600080fd5b505afa1580156107f5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561081e57600080fd5b810190808051604051939291908464010000000082111561083e57600080fd5b90830190602082018581111561085357600080fd5b825186602082028301116401000000008211171561087057600080fd5b82525081516020918201928201910280838360005b8381101561089d578181015183820152602001610885565b505050509050016040525050509050866001600160a01b03166362cc395a33868587866040518663ffffffff1660e01b815260040180866001600160a01b03168152602001856001600160a01b031681526020018481526020018060200180602001838103835285818151815260200191508051906020019060200280838360005b8381101561093757818101518382015260200161091f565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101561097657818101518382015260200161095e565b50505050905001975050505050505050600060405180830381600087803b1580156109a057600080fd5b505af11580156109b4573d6000803e3d6000fd5b505050506000886001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b1580156109f357600080fd5b505afa158015610a07573d6000803e3d6000fd5b505050506040513d6020811015610a1d57600080fd5b5051905060005b8451811015610c3e57816001600160a01b0316858281518110610a4357fe5b60200260200101516001600160a01b031614610c365760006001600160a01b0316858281518110610a7057fe5b60200260200101516001600160a01b03161415610aea5760408051631a5cfcb760e01b81526001600482015233803160248301529151631a5cfcb79160448082019260009290919082900301818387803b158015610acd57600080fd5b505af1158015610ae1573d6000803e3d6000fd5b50505050610c36565b336001600160a01b0316630e32db52868381518110610b0557fe5b6020026020010151878481518110610b1957fe5b60200260200101516001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610b6d57600080fd5b505afa158015610b81573d6000803e3d6000fd5b505050506040513d6020811015610b9757600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b03938416600482015260248101929092529186166044820152905160648083019260209291908290030181600087803b158015610c0957600080fd5b505af1158015610c1d573d6000803e3d6000fd5b505050506040513d6020811015610c3357600080fd5b50505b600101610a24565b505050505050505050505050565b6000803390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015610c8d57600080fd5b505afa158015610ca1573d6000803e3d6000fd5b505050506040513d6020811015610cb757600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b158015610d0857600080fd5b505afa158015610d1c573d6000803e3d6000fd5b505050506040513d6020811015610d3257600080fd5b5051610d85576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b158015610dcb57600080fd5b505afa158015610ddf573d6000803e3d6000fd5b505050506040513d6020811015610df557600080fd5b5051610e48576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b336001600160a01b031663e4df5e1a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e8157600080fd5b505afa158015610e95573d6000803e3d6000fd5b505050506040513d6020811015610eab57600080fd5b5051610eba57600092506112e4565b60008690506000856001600160a01b031663ca4f2803836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060006040518083038186803b158015610f0e57600080fd5b505afa158015610f22573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610f4b57600080fd5b8101908080516040519392919084640100000000821115610f6b57600080fd5b908301906020820185811115610f8057600080fd5b8251866020820283011164010000000082111715610f9d57600080fd5b82525081516020918201928201910280838360005b83811015610fca578181015183820152602001610fb2565b505050509050016040525050509050600080836001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561101557600080fd5b505afa158015611029573d6000803e3d6000fd5b505050506040513d602081101561103f57600080fd5b5051604080516370a0823160e01b815233600482015290519192506000916001600160a01b038716916370a08231916024808301926020929190829003018186803b15801561108d57600080fd5b505afa1580156110a1573d6000803e3d6000fd5b505050506040513d60208110156110b757600080fd5b5051905060005b845181101561128957600061118d8c6001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561110557600080fd5b505afa158015611119573d6000803e3d6000fd5b505050506040513d602081101561112f57600080fd5b5051875160009089908690811061114257fe5b60200260200101516001600160a01b031614156111735773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2611188565b87848151811061117f57fe5b60200260200101515b611d3c565b90506000806001600160a01b03168784815181106111a757fe5b60200260200101516001600160a01b031614156111ce57876001600160a01b03163161125b565b8683815181106111da57fe5b60200260200101516001600160a01b03166370a08231896040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561122e57600080fd5b505afa158015611242573d6000803e3d6000fd5b505050506040513d602081101561125857600080fd5b50515b905061127b826112758761126f8589611e68565b90611ec1565b90611f28565b9095019450506001016110be565b50826112dc576040805162461bcd60e51b815260206004820152601660248201527f4e41562068617320746f20626520626967676572203000000000000000000000604482015290519081900360640190fd5b509095505050505b50509392505050565b6000806000803390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b15801561133157600080fd5b505afa158015611345573d6000803e3d6000fd5b505050506040513d602081101561135b57600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b1580156113ac57600080fd5b505afa1580156113c0573d6000803e3d6000fd5b505050506040513d60208110156113d657600080fd5b5051611429576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b15801561146f57600080fd5b505afa158015611483573d6000803e3d6000fd5b505050506040513d602081101561149957600080fd5b50516114ec576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b6000866001600160a01b031663ca4f28038a6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060006040518083038186803b15801561153b57600080fd5b505afa15801561154f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561157857600080fd5b810190808051604051939291908464010000000082111561159857600080fd5b9083019060208201858111156115ad57600080fd5b82518660208202830111640100000000821117156115ca57600080fd5b82525081516020918201928201910280838360005b838110156115f75781810151838201526020016115df565b5050505090500160405250505090506000815167ffffffffffffffff8111801561162057600080fd5b5060405190808252806020026020018201604052801561164a578160200160208202803683370190505b5090506000886001600160a01b031663bd9d8ad98c6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060006040518083038186803b15801561169c57600080fd5b505afa1580156116b0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156116d957600080fd5b81019080805160405193929190846401000000008211156116f957600080fd5b90830190602082018581111561170e57600080fd5b825186602082028301116401000000008211171561172b57600080fd5b82525081516020918201928201910280838360005b83811015611758578181015183820152602001611740565b50505050905001604052505050905060005b83518110156117c5576117a68f8f8d85858151811061178557fe5b602002602001015188868151811061179957fe5b6020026020010151611f40565b8382815181106117b257fe5b602090810291909101015260010161176a565b506000896001600160a01b0316633cd5bd958d866000815181106117e557fe5b6020026020010151866000815181106117fa57fe5b60200260200101516040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b03168152602001828152602001935050505060206040518083038186803b15801561185657600080fd5b505afa15801561186a573d6000803e3d6000fd5b505050506040513d602081101561188057600080fd5b505190506001600160a01b038a1663708a3476338e6118b06118a986662386f26fc10000611d1b565b86906121ad565b88886040518663ffffffff1660e01b815260040180866001600160a01b03168152602001856001600160a01b031681526020018481526020018060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015611929578181015183820152602001611911565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015611968578181015183820152602001611950565b50505050905001975050505050505050600060405180830381600087803b15801561199257600080fd5b505af11580156119a6573d6000803e3d6000fd5b505050508b8c6001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156119f857600080fd5b505afa158015611a0c573d6000803e3d6000fd5b505050506040513d6020811015611a2257600080fd5b505190995097506000965050505050505096509650969350505050565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015611a7f57600080fd5b505afa158015611a93573d6000803e3d6000fd5b505050506040513d6020811015611aa957600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b158015611afa57600080fd5b505afa158015611b0e573d6000803e3d6000fd5b505050506040513d6020811015611b2457600080fd5b5051611b77576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b158015611bbd57600080fd5b505afa158015611bd1573d6000803e3d6000fd5b505050506040513d6020811015611be757600080fd5b5051611c3a576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b836001600160a01b0316635b16ebb7876040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611c8757600080fd5b505afa158015611c9b573d6000803e3d6000fd5b505050506040513d6020811015611cb157600080fd5b5051611d04576040805162461bcd60e51b815260206004820152601060248201527f4e6f7420612076616c696420706f6f6c00000000000000000000000000000000604482015290519081900360640190fd5b505050505050565b6000546001600160a01b031681565b6000611d33670de0b6b3a764000061126f8585611e68565b90505b92915050565b60008054604080517f2630c12f000000000000000000000000000000000000000000000000000000008152905183926001600160a01b031691632630c12f916004808301926020929190829003018186803b158015611d9a57600080fd5b505afa158015611dae573d6000803e3d6000fd5b505050506040513d6020811015611dc457600080fd5b5051604080517fac41865a0000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152868116602483015291519293509083169163ac41865a91604480820192602092909190829003018186803b158015611e3457600080fd5b505afa158015611e48573d6000803e3d6000fd5b505050506040513d6020811015611e5e57600080fd5b5051949350505050565b600082611e7757506000611d36565b82820282848281611e8457fe5b0414611d335760405162461bcd60e51b815260040180806020018281038252602181526020018061220b6021913960400191505060405180910390fd5b6000808211611f17576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611f2057fe5b049392505050565b6000611d338261126f85670de0b6b3a7640000611e68565b600080611f4d8685611d1b565b9050866001600160a01b0316836001600160a01b031614158015611f7957506001600160a01b03831615155b1561207c57604080516307196da960e11b81526001600160a01b038981166004830152602482018490528516604482015290513391630e32db529160648083019260209291908290030181600087803b158015611fd557600080fd5b505af1158015611fe9573d6000803e3d6000fd5b505050506040513d6020811015611fff57600080fd5b5050604080516370a0823160e01b815233600482015290516001600160a01b038516916370a08231916024808301926020929190829003018186803b15801561204757600080fd5b505afa15801561205b573d6000803e3d6000fd5b505050506040513d602081101561207157600080fd5b505191506121a49050565b6001600160a01b0383166121a1576001600160a01b03871673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21461214457604080516307196da960e11b81526001600160a01b03891660048201526024810183905273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2604482015290513391630e32db529160648083019260209291908290030181600087803b15801561211757600080fd5b505af115801561212b573d6000803e3d6000fd5b505050506040513d602081101561214157600080fd5b50505b60408051631a5cfcb760e01b81526000600482018190526024820184905291513392631a5cfcb7926044808201939182900301818387803b15801561218857600080fd5b505af115801561219c573d6000803e3d6000fd5b505050505b90505b95945050505050565b600082821115612204576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b5090039056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a26469706673582212202ad896d42f83b416489fbc9e8dbaf46e08f41c03d64d377848ecdcddd777223564736f6c63430007060033", + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_capital\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"_pool\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"}],\"name\":\"executeOperation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_percentage\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"}],\"name\":\"exitOperation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"}],\"name\":\"getNAV\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"validateOperation\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Executes a add liquidity operation\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of the controller\",\"_name\":\"Name of the integration\"}},\"executeOperation(address,uint256,uint8,address,address,address)\":{\"params\":{\"_capital\":\"Amount of capital received from the garden\"}},\"exitOperation(uint256,address,address,address)\":{\"params\":{\"_percentage\":\"of capital to exit from the strategy\"}},\"getNAV(address,address,address)\":{\"returns\":{\"_0\":\"_nav NAV of the strategy\"}},\"validateOperation(address,address,address,uint256)\":{\"params\":{\"_data\":\"Operation data\"}}},\"title\":\"AddLiquidityOperation\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates the integration\"},\"executeOperation(address,uint256,uint8,address,address,address)\":{\"notice\":\"Executes the add liquidity operation\"},\"exitOperation(uint256,address,address,address)\":{\"notice\":\"Exits the add liquidity operation.\"},\"getNAV(address,address,address)\":{\"notice\":\"Gets the NAV of the add liquidity op in the reserve asset\"},\"getName()\":{\"notice\":\"Returns the name of the operation\"},\"validateOperation(address,address,address,uint256)\":{\"notice\":\"Sets operation data for the add liquidity operation\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/strategies/operations/AddLiquidityOperation.sol\":\"AddLiquidityOperation\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editGardenNFT(address _newGardenNFT) external;\\n\\n function editStrategyNFT(address _newStrategyNFT) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function editUniswapFactory(address _newUniswapFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\\n\\n function maxContributorsPerGarden() external view returns (uint256);\\n\\n function gardenCreationIsOpen() external view returns (bool);\\n\\n function openPublicGardenCreation() external;\\n\\n function setMaxContributorsPerGarden(uint256 _newMax) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function gardenNFT() external view returns (address);\\n\\n function strategyNFT() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\\n\\n function uniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0xdee5a27301c24f507d312f32249487fa9b0a756062a7e479405a1d1ee9ee7bb8\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function isGardenStrategy(address _strategy) external view returns (bool);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategyActiveInGarden(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to,\\n bool _withPenalty\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x88f1786ffee23e386aaa1735177912e1b5a7cdd440dafe52fb139fe50fd621b4\",\"license\":\"Apache License\"},\"contracts/interfaces/IOperation.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from './IGarden.sol';\\nimport {IStrategy} from './IStrategy.sol';\\n\\n/**\\n * @title IOperation\\n * @author Babylon Finance\\n *\\n * Interface for an strategy operation\\n */\\ninterface IOperation {\\n function validateOperation(\\n address _data,\\n IGarden _garden,\\n address _integration,\\n uint256 _index\\n ) external view;\\n\\n function executeOperation(\\n address _asset,\\n uint256 _capital,\\n uint8 _assetStatus,\\n address _data,\\n IGarden _garden,\\n address _integration\\n )\\n external\\n returns (\\n address,\\n uint256,\\n uint8\\n );\\n\\n function exitOperation(\\n uint256 _percentage,\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external;\\n\\n function getNAV(\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external view returns (uint256);\\n\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x856e173e6c8e1fdbe54988df58d0805a23a6a2f8408bd4f90a488a1978e762ed\",\"license\":\"Apache License\"},\"contracts/interfaces/IPoolIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPoolIntegration\\n * @author Babylon Finance\\n *\\n * Interface for liquiditypool protocol integrations\\n */\\ninterface IPoolIntegration {\\n function joinPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensOut,\\n address[] memory _poolTokens,\\n uint256[] memory _maxAmountsIn\\n ) external;\\n\\n function exitPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensIn,\\n address[] memory _poolTokens,\\n uint256[] memory _minAmountsOut\\n ) external;\\n\\n function getPoolTokens(address _poolAddress) external view returns (address[] memory);\\n\\n function getPoolWeights(address _poolAddress) external view returns (uint256[] memory);\\n\\n function getPoolTokensOut(\\n address _poolAdress,\\n address _tokenAddress,\\n uint256 _maxAmountsIn\\n ) external view returns (uint256);\\n\\n function getPoolMinAmountsOut(address _poolAddress, uint256 _poolTokenAmount)\\n external\\n view\\n returns (uint256[] memory _minAmountsOut);\\n\\n function isPool(address _poolAddress) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xee7df0934dad8d729ee6dacf85e1ec327a0c8e17bcabaa2afa7d14d93325f9ac\",\"license\":\"Apache License\"},\"contracts/interfaces/IPriceOracle.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol IPriceOracle)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPriceOracle\\n * @author Babylon Finance\\n *\\n * Interface for interacting with PriceOracle\\n */\\ninterface IPriceOracle {\\n /* ============ Functions ============ */\\n\\n function getPrice(address _assetOne, address _assetTwo) external view returns (uint256);\\n\\n function updateAdapters(address _assetOne, address _assetTwo) external;\\n}\\n\",\"keccak256\":\"0xa22e0e5e166f6f6714553b736ee921b916c37bc5b557042bf6042cc010d2a041\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n address,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x850597ec9a68eb86f31f13b6b77d3b31350b4ed3d0019dedfbd3550ad1a1d9e2\",\"license\":\"Apache License\"},\"contracts/interfaces/ITradeIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title ITrade\\n * @author Babylon Finance\\n *\\n * Interface for trading protocol integrations\\n */\\ninterface ITradeIntegration {\\n function trade(\\n address _strategy,\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken,\\n uint256 _minReceiveQuantity\\n ) external;\\n\\n function getConversionRates(\\n address _sourceToken,\\n address _destinationToken,\\n uint256 _sourceQuantity\\n ) external returns (uint256, uint256);\\n}\\n\",\"keccak256\":\"0x95df25f2cbfd3d82a9e22c9202f9fc2c497e90fd6e5fcfb00c4162f6447c0cbd\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"contracts/strategies/operations/AddLiquidityOperation.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Operation} from './Operation.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\\nimport {IPoolIntegration} from '../../interfaces/IPoolIntegration.sol';\\n\\n/**\\n * @title AddLiquidityOperation\\n * @author Babylon Finance\\n *\\n * Executes a add liquidity operation\\n */\\ncontract AddLiquidityOperation is Operation {\\n using SafeMath for uint256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _controller Address of the controller\\n */\\n constructor(string memory _name, address _controller) Operation(_name, _controller) {}\\n\\n /**\\n * Sets operation data for the add liquidity operation\\n *\\n * @param _data Operation data\\n */\\n function validateOperation(\\n address _data,\\n IGarden, /* _garden */\\n address _integration,\\n uint256 /* _index */\\n ) external view override onlyStrategy {\\n require(IPoolIntegration(_integration).isPool(_data), 'Not a valid pool');\\n }\\n\\n /**\\n * Executes the add liquidity operation\\n * @param _capital Amount of capital received from the garden\\n */\\n function executeOperation(\\n address _asset,\\n uint256 _capital,\\n uint8, /* _assetStatus */\\n address _pool,\\n IGarden _garden,\\n address _integration\\n )\\n external\\n override\\n onlyStrategy\\n returns (\\n address,\\n uint256,\\n uint8\\n )\\n {\\n address[] memory poolTokens = IPoolIntegration(_integration).getPoolTokens(_pool);\\n uint256[] memory _maxAmountsIn = new uint256[](poolTokens.length);\\n uint256[] memory _poolWeights = IPoolIntegration(_integration).getPoolWeights(_pool);\\n // Get the tokens needed to enter the pool\\n for (uint256 i = 0; i < poolTokens.length; i++) {\\n _maxAmountsIn[i] = _getMaxAmountTokenPool(_asset, _capital, _garden, _poolWeights[i], poolTokens[i]);\\n }\\n uint256 poolTokensOut = IPoolIntegration(_integration).getPoolTokensOut(_pool, poolTokens[0], _maxAmountsIn[0]);\\n IPoolIntegration(_integration).joinPool(\\n msg.sender,\\n _pool,\\n poolTokensOut.sub(poolTokensOut.preciseMul(SLIPPAGE_ALLOWED)),\\n poolTokens,\\n _maxAmountsIn\\n );\\n return (_pool, IERC20(_pool).balanceOf(msg.sender), 0); // liquid\\n }\\n\\n /**\\n * Exits the add liquidity operation.\\n * @param _percentage of capital to exit from the strategy\\n */\\n function exitOperation(\\n uint256 _percentage,\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external override onlyStrategy {\\n require(_percentage <= 100e18, 'Unwind Percentage <= 100%');\\n address pool = _data;\\n address[] memory poolTokens = IPoolIntegration(_integration).getPoolTokens(pool);\\n uint256 lpTokens = IERC20(pool).balanceOf(msg.sender).preciseMul(_percentage); // Sell all pool tokens\\n uint256[] memory _minAmountsOut = IPoolIntegration(_integration).getPoolMinAmountsOut(pool, lpTokens);\\n IPoolIntegration(_integration).exitPool(\\n msg.sender,\\n pool,\\n lpTokens, // Sell all pool tokens\\n poolTokens,\\n _minAmountsOut\\n );\\n // Exit Pool tokens\\n address reserveAsset = _garden.reserveAsset();\\n for (uint256 i = 0; i < poolTokens.length; i++) {\\n if (poolTokens[i] != reserveAsset) {\\n if (poolTokens[i] == address(0)) {\\n IStrategy(msg.sender).handleWeth(true, address(msg.sender).balance);\\n poolTokens[i] = WETH;\\n }\\n if (poolTokens[i] != reserveAsset) {\\n IStrategy(msg.sender).trade(\\n poolTokens[i],\\n IERC20(poolTokens[i]).balanceOf(msg.sender),\\n reserveAsset\\n );\\n }\\n }\\n }\\n }\\n\\n /**\\n * Gets the NAV of the add liquidity op in the reserve asset\\n *\\n * @return _nav NAV of the strategy\\n */\\n function getNAV(\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external view override returns (uint256) {\\n if (!IStrategy(msg.sender).isStrategyActive()) {\\n return 0;\\n }\\n address pool = _data;\\n address[] memory poolTokens = IPoolIntegration(_integration).getPoolTokens(pool);\\n uint256 NAV;\\n uint256 totalSupply = IERC20(pool).totalSupply();\\n uint256 lpTokens = IERC20(pool).balanceOf(msg.sender);\\n for (uint256 i = 0; i < poolTokens.length; i++) {\\n uint256 price = _getPrice(_garden.reserveAsset(), poolTokens[i] != address(0) ? poolTokens[i] : WETH);\\n uint256 balance = poolTokens[i] != address(0) ? IERC20(poolTokens[i]).balanceOf(pool) : pool.balance;\\n NAV += balance.mul(lpTokens).div(totalSupply).preciseDiv(price);\\n }\\n require(NAV != 0, 'NAV has to be bigger 0');\\n return NAV;\\n }\\n\\n /* ============ Private Functions ============ */\\n\\n function _getMaxAmountTokenPool(\\n address _asset,\\n uint256 _capital,\\n IGarden, /* _garden */\\n uint256 _poolWeight,\\n address _poolToken\\n ) private returns (uint256) {\\n uint256 normalizedAmount = _capital.preciseMul(_poolWeight);\\n if (_poolToken != _asset && _poolToken != address(0)) {\\n IStrategy(msg.sender).trade(_asset, normalizedAmount, _poolToken);\\n return IERC20(_poolToken).balanceOf(msg.sender);\\n }\\n if (_poolToken == address(0)) {\\n if (_asset != WETH) {\\n IStrategy(msg.sender).trade(_asset, normalizedAmount, WETH);\\n }\\n // Convert WETH to ETH\\n IStrategy(msg.sender).handleWeth(false, normalizedAmount);\\n }\\n return normalizedAmount;\\n }\\n}\\n\",\"keccak256\":\"0x0d82873037b4cb1e45808f3c2550f4c430c7e50a07c885a21e0faff12bb2e625\",\"license\":\"Apache License\"},\"contracts/strategies/operations/Operation.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {IOperation} from '../../interfaces/IOperation.sol';\\nimport {ITradeIntegration} from '../../interfaces/ITradeIntegration.sol';\\nimport {IPriceOracle} from '../../interfaces/IPriceOracle.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\n\\n/**\\n * @title LongStrategy\\n * @author Babylon Finance\\n *\\n * Holds the data for a long strategy\\n */\\nabstract contract Operation is IOperation {\\n using SafeMath for uint256;\\n /* ============ Modifiers ============ */\\n\\n modifier onlyStrategy() {\\n IStrategy strategy = IStrategy(msg.sender);\\n IGarden garden = strategy.garden();\\n require(IBabController(controller).isSystemContract(address(garden)), 'Only a garden can call this');\\n require(garden.isStrategyActiveInGarden(msg.sender), 'Sender must be a strategy');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n uint256 internal constant SLIPPAGE_ALLOWED = 1e16; // 1%\\n uint256 internal constant HUNDRED_PERCENT = 1e18; // 100%\\n address internal constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\\n\\n // Address of the controller\\n address public controller;\\n // Name of the operation\\n string public name;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _controller Address of the controller\\n */\\n constructor(string memory _name, address _controller) {\\n require(_controller != address(0), 'Controller must be defined');\\n name = _name;\\n controller = _controller;\\n }\\n\\n /* ============ Virtual External Functions ============ */\\n\\n function validateOperation(\\n address _data,\\n IGarden _garden,\\n address _integration,\\n uint256 _index\\n ) external view virtual override;\\n\\n function executeOperation(\\n address _asset,\\n uint256 _capital,\\n uint8 _assetStatus,\\n address _data,\\n IGarden _garden,\\n address _integration\\n )\\n external\\n virtual\\n override\\n returns (\\n address,\\n uint256,\\n uint8\\n );\\n\\n function exitOperation(\\n uint256 _percentage,\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external virtual override;\\n\\n function getNAV(\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external view virtual override returns (uint256);\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the name of the operation\\n */\\n function getName() external view override returns (string memory) {\\n return name;\\n }\\n\\n /**\\n * Returns the price of the pair through the price oracle\\n */\\n function _getPrice(address _assetOne, address _assetTwo) internal view returns (uint256) {\\n IPriceOracle oracle = IPriceOracle(IBabController(controller).priceOracle());\\n return oracle.getPrice(_assetOne, _assetTwo);\\n }\\n\\n function _normalizeDecimals(address _asset, uint256 _quantity) internal view returns (uint256) {\\n uint8 tokenDecimals = ERC20(_asset).decimals();\\n return tokenDecimals != 18 ? _quantity.mul(10**(18 - tokenDecimals)) : _quantity;\\n }\\n}\\n\",\"keccak256\":\"0x0baba132298f5c3b3082ee381eed5314ab4587179905af9635e038c1b1845418\",\"license\":\"Apache License\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b506040516200231638038062002316833981810160405260408110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001519150829050816001600160a01b03811662000150576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c6572206d75737420626520646566696e6564000000000000604482015290519081900360640190fd5b81516200016590600190602085019062000190565b50600080546001600160a01b0319166001600160a01b0392909216919091179055506200023c915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001c8576000855562000213565b82601f10620001e357805160ff191683800117855562000213565b8280016001018555821562000213579182015b8281111562000213578251825591602001919060010190620001f6565b506200022192915062000225565b5090565b5b8082111562000221576000815560010162000226565b6120ca806200024c6000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80634222326a1161005b5780634222326a1461014757806355d9750b14610191578063c8cd307514610209578063f77c4791146102455761007d565b806306fdde031461008257806317d7de7c146100ff578063419ea18a14610107575b600080fd5b61008a610269565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100c45781810151838201526020016100ac565b50505050905090810190601f1680156100f15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61008a6102f6565b6101456004803603608081101561011d57600080fd5b508035906001600160a01b03602082013581169160408101358216916060909101351661038b565b005b61017f6004803603606081101561015d57600080fd5b506001600160a01b038135811691602081013582169160409091013516610cb4565b60408051918252519081900360200190f35b6101de600480360360c08110156101a757600080fd5b506001600160a01b03813581169160208101359160ff604083013516916060810135821691608082013581169160a0013516611158565b604080516001600160a01b039094168452602084019290925260ff1682820152519081900360600190f35b6101456004803603608081101561021f57600080fd5b506001600160a01b038135811691602081013582169160408201351690606001356118a9565b61024d611b75565b604080516001600160a01b039092168252519081900360200190f35b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102ee5780601f106102c3576101008083540402835291602001916102ee565b820191906000526020600020905b8154815290600101906020018083116102d157829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156103815780601f1061035657610100808354040283529160200191610381565b820191906000526020600020905b81548152906001019060200180831161036457829003601f168201915b5050505050905090565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156103cb57600080fd5b505afa1580156103df573d6000803e3d6000fd5b505050506040513d60208110156103f557600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561044657600080fd5b505afa15801561045a573d6000803e3d6000fd5b505050506040513d602081101561047057600080fd5b50516104c3576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b6040805162bd5cf960e51b815233600482015290516001600160a01b038316916317ab9f20916024808301926020929190829003018186803b15801561050857600080fd5b505afa15801561051c573d6000803e3d6000fd5b505050506040513d602081101561053257600080fd5b5051610585576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b68056bc75e2d631000008611156105e3576040805162461bcd60e51b815260206004820152601960248201527f556e77696e642050657263656e74616765203c3d203130302500000000000000604482015290519081900360640190fd5b60008590506000846001600160a01b031663ca4f2803836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060006040518083038186803b15801561063757600080fd5b505afa15801561064b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561067457600080fd5b810190808051604051939291908464010000000082111561069457600080fd5b9083019060208201858111156106a957600080fd5b82518660208202830111640100000000821117156106c657600080fd5b82525081516020918201928201910280838360005b838110156106f35781810151838201526020016106db565b505050509050016040525050509050600061078789846001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561075557600080fd5b505afa158015610769573d6000803e3d6000fd5b505050506040513d602081101561077f57600080fd5b505190611b84565b90506000866001600160a01b031663f5e3932585846040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060006040518083038186803b1580156107e057600080fd5b505afa1580156107f4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561081d57600080fd5b810190808051604051939291908464010000000082111561083d57600080fd5b90830190602082018581111561085257600080fd5b825186602082028301116401000000008211171561086f57600080fd5b82525081516020918201928201910280838360005b8381101561089c578181015183820152602001610884565b505050509050016040525050509050866001600160a01b03166362cc395a33868587866040518663ffffffff1660e01b815260040180866001600160a01b03168152602001856001600160a01b031681526020018481526020018060200180602001838103835285818151815260200191508051906020019060200280838360005b8381101561093657818101518382015260200161091e565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101561097557818101518382015260200161095d565b50505050905001975050505050505050600060405180830381600087803b15801561099f57600080fd5b505af11580156109b3573d6000803e3d6000fd5b505050506000886001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b1580156109f257600080fd5b505afa158015610a06573d6000803e3d6000fd5b505050506040513d6020811015610a1c57600080fd5b5051905060005b8451811015610ca657816001600160a01b0316858281518110610a4257fe5b60200260200101516001600160a01b031614610c9e5760006001600160a01b0316858281518110610a6f57fe5b60200260200101516001600160a01b03161415610b265760408051631a5cfcb760e01b81526001600482015233803160248301529151631a5cfcb79160448082019260009290919082900301818387803b158015610acc57600080fd5b505af1158015610ae0573d6000803e3d6000fd5b5050505073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2858281518110610b0557fe5b60200260200101906001600160a01b031690816001600160a01b0316815250505b816001600160a01b0316858281518110610b3c57fe5b60200260200101516001600160a01b031614610c9e57336001600160a01b0316630e32db52868381518110610b6d57fe5b6020026020010151878481518110610b8157fe5b60200260200101516001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610bd557600080fd5b505afa158015610be9573d6000803e3d6000fd5b505050506040513d6020811015610bff57600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b03938416600482015260248101929092529186166044820152905160648083019260209291908290030181600087803b158015610c7157600080fd5b505af1158015610c85573d6000803e3d6000fd5b505050506040513d6020811015610c9b57600080fd5b50505b600101610a23565b505050505050505050505050565b6000336001600160a01b031663e4df5e1a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610cef57600080fd5b505afa158015610d03573d6000803e3d6000fd5b505050506040513d6020811015610d1957600080fd5b5051610d2757506000611151565b60008490506000836001600160a01b031663ca4f2803836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060006040518083038186803b158015610d7b57600080fd5b505afa158015610d8f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610db857600080fd5b8101908080516040519392919084640100000000821115610dd857600080fd5b908301906020820185811115610ded57600080fd5b8251866020820283011164010000000082111715610e0a57600080fd5b82525081516020918201928201910280838360005b83811015610e37578181015183820152602001610e1f565b505050509050016040525050509050600080836001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e8257600080fd5b505afa158015610e96573d6000803e3d6000fd5b505050506040513d6020811015610eac57600080fd5b5051604080516370a0823160e01b815233600482015290519192506000916001600160a01b038716916370a08231916024808301926020929190829003018186803b158015610efa57600080fd5b505afa158015610f0e573d6000803e3d6000fd5b505050506040513d6020811015610f2457600080fd5b5051905060005b84518110156110f6576000610ffa8a6001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b158015610f7257600080fd5b505afa158015610f86573d6000803e3d6000fd5b505050506040513d6020811015610f9c57600080fd5b50518751600090899086908110610faf57fe5b60200260200101516001600160a01b03161415610fe05773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2610ff5565b878481518110610fec57fe5b60200260200101515b611ba5565b90506000806001600160a01b031687848151811061101457fe5b60200260200101516001600160a01b0316141561103b57876001600160a01b0316316110c8565b86838151811061104757fe5b60200260200101516001600160a01b03166370a08231896040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561109b57600080fd5b505afa1580156110af573d6000803e3d6000fd5b505050506040513d60208110156110c557600080fd5b50515b90506110e8826110e2876110dc8589611cd1565b90611d2a565b90611d91565b909501945050600101610f2b565b5082611149576040805162461bcd60e51b815260206004820152601660248201527f4e41562068617320746f20626520626967676572203000000000000000000000604482015290519081900360640190fd5b509093505050505b9392505050565b6000806000803390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b15801561119c57600080fd5b505afa1580156111b0573d6000803e3d6000fd5b505050506040513d60208110156111c657600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561121757600080fd5b505afa15801561122b573d6000803e3d6000fd5b505050506040513d602081101561124157600080fd5b5051611294576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b6040805162bd5cf960e51b815233600482015290516001600160a01b038316916317ab9f20916024808301926020929190829003018186803b1580156112d957600080fd5b505afa1580156112ed573d6000803e3d6000fd5b505050506040513d602081101561130357600080fd5b5051611356576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b6000866001600160a01b031663ca4f28038a6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060006040518083038186803b1580156113a557600080fd5b505afa1580156113b9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156113e257600080fd5b810190808051604051939291908464010000000082111561140257600080fd5b90830190602082018581111561141757600080fd5b825186602082028301116401000000008211171561143457600080fd5b82525081516020918201928201910280838360005b83811015611461578181015183820152602001611449565b5050505090500160405250505090506000815167ffffffffffffffff8111801561148a57600080fd5b506040519080825280602002602001820160405280156114b4578160200160208202803683370190505b5090506000886001600160a01b031663bd9d8ad98c6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060006040518083038186803b15801561150657600080fd5b505afa15801561151a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561154357600080fd5b810190808051604051939291908464010000000082111561156357600080fd5b90830190602082018581111561157857600080fd5b825186602082028301116401000000008211171561159557600080fd5b82525081516020918201928201910280838360005b838110156115c25781810151838201526020016115aa565b50505050905001604052505050905060005b835181101561162f576116108f8f8d8585815181106115ef57fe5b602002602001015188868151811061160357fe5b6020026020010151611da9565b83828151811061161c57fe5b60209081029190910101526001016115d4565b506000896001600160a01b0316633cd5bd958d8660008151811061164f57fe5b60200260200101518660008151811061166457fe5b60200260200101516040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b03168152602001828152602001935050505060206040518083038186803b1580156116c057600080fd5b505afa1580156116d4573d6000803e3d6000fd5b505050506040513d60208110156116ea57600080fd5b505190506001600160a01b038a1663708a3476338e61171a61171386662386f26fc10000611b84565b8690612016565b88886040518663ffffffff1660e01b815260040180866001600160a01b03168152602001856001600160a01b031681526020018481526020018060200180602001838103835285818151815260200191508051906020019060200280838360005b8381101561179357818101518382015260200161177b565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156117d25781810151838201526020016117ba565b50505050905001975050505050505050600060405180830381600087803b1580156117fc57600080fd5b505af1158015611810573d6000803e3d6000fd5b505050508b8c6001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561186257600080fd5b505afa158015611876573d6000803e3d6000fd5b505050506040513d602081101561188c57600080fd5b505190995097506000965050505050505096509650969350505050565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156118e957600080fd5b505afa1580156118fd573d6000803e3d6000fd5b505050506040513d602081101561191357600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561196457600080fd5b505afa158015611978573d6000803e3d6000fd5b505050506040513d602081101561198e57600080fd5b50516119e1576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b6040805162bd5cf960e51b815233600482015290516001600160a01b038316916317ab9f20916024808301926020929190829003018186803b158015611a2657600080fd5b505afa158015611a3a573d6000803e3d6000fd5b505050506040513d6020811015611a5057600080fd5b5051611aa3576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b836001600160a01b0316635b16ebb7876040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611af057600080fd5b505afa158015611b04573d6000803e3d6000fd5b505050506040513d6020811015611b1a57600080fd5b5051611b6d576040805162461bcd60e51b815260206004820152601060248201527f4e6f7420612076616c696420706f6f6c00000000000000000000000000000000604482015290519081900360640190fd5b505050505050565b6000546001600160a01b031681565b6000611b9c670de0b6b3a76400006110dc8585611cd1565b90505b92915050565b60008054604080517f2630c12f000000000000000000000000000000000000000000000000000000008152905183926001600160a01b031691632630c12f916004808301926020929190829003018186803b158015611c0357600080fd5b505afa158015611c17573d6000803e3d6000fd5b505050506040513d6020811015611c2d57600080fd5b5051604080517fac41865a0000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152868116602483015291519293509083169163ac41865a91604480820192602092909190829003018186803b158015611c9d57600080fd5b505afa158015611cb1573d6000803e3d6000fd5b505050506040513d6020811015611cc757600080fd5b5051949350505050565b600082611ce057506000611b9f565b82820282848281611ced57fe5b0414611b9c5760405162461bcd60e51b81526004018080602001828103825260218152602001806120746021913960400191505060405180910390fd5b6000808211611d80576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611d8957fe5b049392505050565b6000611b9c826110dc85670de0b6b3a7640000611cd1565b600080611db68685611b84565b9050866001600160a01b0316836001600160a01b031614158015611de257506001600160a01b03831615155b15611ee557604080516307196da960e11b81526001600160a01b038981166004830152602482018490528516604482015290513391630e32db529160648083019260209291908290030181600087803b158015611e3e57600080fd5b505af1158015611e52573d6000803e3d6000fd5b505050506040513d6020811015611e6857600080fd5b5050604080516370a0823160e01b815233600482015290516001600160a01b038516916370a08231916024808301926020929190829003018186803b158015611eb057600080fd5b505afa158015611ec4573d6000803e3d6000fd5b505050506040513d6020811015611eda57600080fd5b5051915061200d9050565b6001600160a01b03831661200a576001600160a01b03871673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc214611fad57604080516307196da960e11b81526001600160a01b03891660048201526024810183905273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2604482015290513391630e32db529160648083019260209291908290030181600087803b158015611f8057600080fd5b505af1158015611f94573d6000803e3d6000fd5b505050506040513d6020811015611faa57600080fd5b50505b60408051631a5cfcb760e01b81526000600482018190526024820184905291513392631a5cfcb7926044808201939182900301818387803b158015611ff157600080fd5b505af1158015612005573d6000803e3d6000fd5b505050505b90505b95945050505050565b60008282111561206d576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b5090039056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a26469706673582212206c1ccae7ff80798f5ae9194c1e1141603a98d31abb714600164dabf73c5c62de64736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80634222326a1161005b5780634222326a1461014757806355d9750b14610191578063c8cd307514610209578063f77c4791146102455761007d565b806306fdde031461008257806317d7de7c146100ff578063419ea18a14610107575b600080fd5b61008a610269565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100c45781810151838201526020016100ac565b50505050905090810190601f1680156100f15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61008a6102f6565b6101456004803603608081101561011d57600080fd5b508035906001600160a01b03602082013581169160408101358216916060909101351661038b565b005b61017f6004803603606081101561015d57600080fd5b506001600160a01b038135811691602081013582169160409091013516610cb4565b60408051918252519081900360200190f35b6101de600480360360c08110156101a757600080fd5b506001600160a01b03813581169160208101359160ff604083013516916060810135821691608082013581169160a0013516611158565b604080516001600160a01b039094168452602084019290925260ff1682820152519081900360600190f35b6101456004803603608081101561021f57600080fd5b506001600160a01b038135811691602081013582169160408201351690606001356118a9565b61024d611b75565b604080516001600160a01b039092168252519081900360200190f35b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102ee5780601f106102c3576101008083540402835291602001916102ee565b820191906000526020600020905b8154815290600101906020018083116102d157829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156103815780601f1061035657610100808354040283529160200191610381565b820191906000526020600020905b81548152906001019060200180831161036457829003601f168201915b5050505050905090565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156103cb57600080fd5b505afa1580156103df573d6000803e3d6000fd5b505050506040513d60208110156103f557600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561044657600080fd5b505afa15801561045a573d6000803e3d6000fd5b505050506040513d602081101561047057600080fd5b50516104c3576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b6040805162bd5cf960e51b815233600482015290516001600160a01b038316916317ab9f20916024808301926020929190829003018186803b15801561050857600080fd5b505afa15801561051c573d6000803e3d6000fd5b505050506040513d602081101561053257600080fd5b5051610585576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b68056bc75e2d631000008611156105e3576040805162461bcd60e51b815260206004820152601960248201527f556e77696e642050657263656e74616765203c3d203130302500000000000000604482015290519081900360640190fd5b60008590506000846001600160a01b031663ca4f2803836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060006040518083038186803b15801561063757600080fd5b505afa15801561064b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561067457600080fd5b810190808051604051939291908464010000000082111561069457600080fd5b9083019060208201858111156106a957600080fd5b82518660208202830111640100000000821117156106c657600080fd5b82525081516020918201928201910280838360005b838110156106f35781810151838201526020016106db565b505050509050016040525050509050600061078789846001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561075557600080fd5b505afa158015610769573d6000803e3d6000fd5b505050506040513d602081101561077f57600080fd5b505190611b84565b90506000866001600160a01b031663f5e3932585846040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060006040518083038186803b1580156107e057600080fd5b505afa1580156107f4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561081d57600080fd5b810190808051604051939291908464010000000082111561083d57600080fd5b90830190602082018581111561085257600080fd5b825186602082028301116401000000008211171561086f57600080fd5b82525081516020918201928201910280838360005b8381101561089c578181015183820152602001610884565b505050509050016040525050509050866001600160a01b03166362cc395a33868587866040518663ffffffff1660e01b815260040180866001600160a01b03168152602001856001600160a01b031681526020018481526020018060200180602001838103835285818151815260200191508051906020019060200280838360005b8381101561093657818101518382015260200161091e565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101561097557818101518382015260200161095d565b50505050905001975050505050505050600060405180830381600087803b15801561099f57600080fd5b505af11580156109b3573d6000803e3d6000fd5b505050506000886001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b1580156109f257600080fd5b505afa158015610a06573d6000803e3d6000fd5b505050506040513d6020811015610a1c57600080fd5b5051905060005b8451811015610ca657816001600160a01b0316858281518110610a4257fe5b60200260200101516001600160a01b031614610c9e5760006001600160a01b0316858281518110610a6f57fe5b60200260200101516001600160a01b03161415610b265760408051631a5cfcb760e01b81526001600482015233803160248301529151631a5cfcb79160448082019260009290919082900301818387803b158015610acc57600080fd5b505af1158015610ae0573d6000803e3d6000fd5b5050505073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2858281518110610b0557fe5b60200260200101906001600160a01b031690816001600160a01b0316815250505b816001600160a01b0316858281518110610b3c57fe5b60200260200101516001600160a01b031614610c9e57336001600160a01b0316630e32db52868381518110610b6d57fe5b6020026020010151878481518110610b8157fe5b60200260200101516001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610bd557600080fd5b505afa158015610be9573d6000803e3d6000fd5b505050506040513d6020811015610bff57600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b03938416600482015260248101929092529186166044820152905160648083019260209291908290030181600087803b158015610c7157600080fd5b505af1158015610c85573d6000803e3d6000fd5b505050506040513d6020811015610c9b57600080fd5b50505b600101610a23565b505050505050505050505050565b6000336001600160a01b031663e4df5e1a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610cef57600080fd5b505afa158015610d03573d6000803e3d6000fd5b505050506040513d6020811015610d1957600080fd5b5051610d2757506000611151565b60008490506000836001600160a01b031663ca4f2803836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060006040518083038186803b158015610d7b57600080fd5b505afa158015610d8f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610db857600080fd5b8101908080516040519392919084640100000000821115610dd857600080fd5b908301906020820185811115610ded57600080fd5b8251866020820283011164010000000082111715610e0a57600080fd5b82525081516020918201928201910280838360005b83811015610e37578181015183820152602001610e1f565b505050509050016040525050509050600080836001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e8257600080fd5b505afa158015610e96573d6000803e3d6000fd5b505050506040513d6020811015610eac57600080fd5b5051604080516370a0823160e01b815233600482015290519192506000916001600160a01b038716916370a08231916024808301926020929190829003018186803b158015610efa57600080fd5b505afa158015610f0e573d6000803e3d6000fd5b505050506040513d6020811015610f2457600080fd5b5051905060005b84518110156110f6576000610ffa8a6001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b158015610f7257600080fd5b505afa158015610f86573d6000803e3d6000fd5b505050506040513d6020811015610f9c57600080fd5b50518751600090899086908110610faf57fe5b60200260200101516001600160a01b03161415610fe05773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2610ff5565b878481518110610fec57fe5b60200260200101515b611ba5565b90506000806001600160a01b031687848151811061101457fe5b60200260200101516001600160a01b0316141561103b57876001600160a01b0316316110c8565b86838151811061104757fe5b60200260200101516001600160a01b03166370a08231896040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561109b57600080fd5b505afa1580156110af573d6000803e3d6000fd5b505050506040513d60208110156110c557600080fd5b50515b90506110e8826110e2876110dc8589611cd1565b90611d2a565b90611d91565b909501945050600101610f2b565b5082611149576040805162461bcd60e51b815260206004820152601660248201527f4e41562068617320746f20626520626967676572203000000000000000000000604482015290519081900360640190fd5b509093505050505b9392505050565b6000806000803390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b15801561119c57600080fd5b505afa1580156111b0573d6000803e3d6000fd5b505050506040513d60208110156111c657600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561121757600080fd5b505afa15801561122b573d6000803e3d6000fd5b505050506040513d602081101561124157600080fd5b5051611294576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b6040805162bd5cf960e51b815233600482015290516001600160a01b038316916317ab9f20916024808301926020929190829003018186803b1580156112d957600080fd5b505afa1580156112ed573d6000803e3d6000fd5b505050506040513d602081101561130357600080fd5b5051611356576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b6000866001600160a01b031663ca4f28038a6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060006040518083038186803b1580156113a557600080fd5b505afa1580156113b9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156113e257600080fd5b810190808051604051939291908464010000000082111561140257600080fd5b90830190602082018581111561141757600080fd5b825186602082028301116401000000008211171561143457600080fd5b82525081516020918201928201910280838360005b83811015611461578181015183820152602001611449565b5050505090500160405250505090506000815167ffffffffffffffff8111801561148a57600080fd5b506040519080825280602002602001820160405280156114b4578160200160208202803683370190505b5090506000886001600160a01b031663bd9d8ad98c6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060006040518083038186803b15801561150657600080fd5b505afa15801561151a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561154357600080fd5b810190808051604051939291908464010000000082111561156357600080fd5b90830190602082018581111561157857600080fd5b825186602082028301116401000000008211171561159557600080fd5b82525081516020918201928201910280838360005b838110156115c25781810151838201526020016115aa565b50505050905001604052505050905060005b835181101561162f576116108f8f8d8585815181106115ef57fe5b602002602001015188868151811061160357fe5b6020026020010151611da9565b83828151811061161c57fe5b60209081029190910101526001016115d4565b506000896001600160a01b0316633cd5bd958d8660008151811061164f57fe5b60200260200101518660008151811061166457fe5b60200260200101516040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b03168152602001828152602001935050505060206040518083038186803b1580156116c057600080fd5b505afa1580156116d4573d6000803e3d6000fd5b505050506040513d60208110156116ea57600080fd5b505190506001600160a01b038a1663708a3476338e61171a61171386662386f26fc10000611b84565b8690612016565b88886040518663ffffffff1660e01b815260040180866001600160a01b03168152602001856001600160a01b031681526020018481526020018060200180602001838103835285818151815260200191508051906020019060200280838360005b8381101561179357818101518382015260200161177b565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156117d25781810151838201526020016117ba565b50505050905001975050505050505050600060405180830381600087803b1580156117fc57600080fd5b505af1158015611810573d6000803e3d6000fd5b505050508b8c6001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561186257600080fd5b505afa158015611876573d6000803e3d6000fd5b505050506040513d602081101561188c57600080fd5b505190995097506000965050505050505096509650969350505050565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156118e957600080fd5b505afa1580156118fd573d6000803e3d6000fd5b505050506040513d602081101561191357600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561196457600080fd5b505afa158015611978573d6000803e3d6000fd5b505050506040513d602081101561198e57600080fd5b50516119e1576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b6040805162bd5cf960e51b815233600482015290516001600160a01b038316916317ab9f20916024808301926020929190829003018186803b158015611a2657600080fd5b505afa158015611a3a573d6000803e3d6000fd5b505050506040513d6020811015611a5057600080fd5b5051611aa3576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b836001600160a01b0316635b16ebb7876040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611af057600080fd5b505afa158015611b04573d6000803e3d6000fd5b505050506040513d6020811015611b1a57600080fd5b5051611b6d576040805162461bcd60e51b815260206004820152601060248201527f4e6f7420612076616c696420706f6f6c00000000000000000000000000000000604482015290519081900360640190fd5b505050505050565b6000546001600160a01b031681565b6000611b9c670de0b6b3a76400006110dc8585611cd1565b90505b92915050565b60008054604080517f2630c12f000000000000000000000000000000000000000000000000000000008152905183926001600160a01b031691632630c12f916004808301926020929190829003018186803b158015611c0357600080fd5b505afa158015611c17573d6000803e3d6000fd5b505050506040513d6020811015611c2d57600080fd5b5051604080517fac41865a0000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152868116602483015291519293509083169163ac41865a91604480820192602092909190829003018186803b158015611c9d57600080fd5b505afa158015611cb1573d6000803e3d6000fd5b505050506040513d6020811015611cc757600080fd5b5051949350505050565b600082611ce057506000611b9f565b82820282848281611ced57fe5b0414611b9c5760405162461bcd60e51b81526004018080602001828103825260218152602001806120746021913960400191505060405180910390fd5b6000808211611d80576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611d8957fe5b049392505050565b6000611b9c826110dc85670de0b6b3a7640000611cd1565b600080611db68685611b84565b9050866001600160a01b0316836001600160a01b031614158015611de257506001600160a01b03831615155b15611ee557604080516307196da960e11b81526001600160a01b038981166004830152602482018490528516604482015290513391630e32db529160648083019260209291908290030181600087803b158015611e3e57600080fd5b505af1158015611e52573d6000803e3d6000fd5b505050506040513d6020811015611e6857600080fd5b5050604080516370a0823160e01b815233600482015290516001600160a01b038516916370a08231916024808301926020929190829003018186803b158015611eb057600080fd5b505afa158015611ec4573d6000803e3d6000fd5b505050506040513d6020811015611eda57600080fd5b5051915061200d9050565b6001600160a01b03831661200a576001600160a01b03871673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc214611fad57604080516307196da960e11b81526001600160a01b03891660048201526024810183905273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2604482015290513391630e32db529160648083019260209291908290030181600087803b158015611f8057600080fd5b505af1158015611f94573d6000803e3d6000fd5b505050506040513d6020811015611faa57600080fd5b50505b60408051631a5cfcb760e01b81526000600482018190526024820184905291513392631a5cfcb7926044808201939182900301818387803b158015611ff157600080fd5b505af1158015612005573d6000803e3d6000fd5b505050505b90505b95945050505050565b60008282111561206d576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b5090039056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a26469706673582212206c1ccae7ff80798f5ae9194c1e1141603a98d31abb714600164dabf73c5c62de64736f6c63430007060033", "devdoc": { "author": "Babylon Finance Executes a add liquidity operation", "kind": "dev", @@ -281,7 +281,7 @@ "storageLayout": { "storage": [ { - "astId": 33459, + "astId": 33052, "contract": "contracts/strategies/operations/AddLiquidityOperation.sol:AddLiquidityOperation", "label": "controller", "offset": 0, @@ -289,7 +289,7 @@ "type": "t_address" }, { - "astId": 33461, + "astId": 33054, "contract": "contracts/strategies/operations/AddLiquidityOperation.sol:AddLiquidityOperation", "label": "name", "offset": 0, diff --git a/deployments/artifacts/mainnet/BABLToken.json b/deployments/artifacts/mainnet/BABLToken.json index bf8c891ed..39e8247ce 100644 --- a/deployments/artifacts/mainnet/BABLToken.json +++ b/deployments/artifacts/mainnet/BABLToken.json @@ -1,5 +1,5 @@ { - "address": "0xBe8B354695c9C766984520b6274db1e7842C0993", + "address": "0x927761829796FdE7fb3581Ee4FdDe35f371a1926", "abi": [ { "inputs": [ @@ -130,6 +130,25 @@ "name": "DelegateVotesChanged", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "LockedBalance", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -1255,59 +1274,59 @@ "type": "function" } ], - "transactionHash": "0x962fb89e0989cb0ae92190af7da212dbeaa29c004f99d0722d0bc44906ff19ed", + "transactionHash": "0x5312eb38223a49b64c3b0978bd5e79be325d74dcd9517234d8148e27d7d23ad2", "receipt": { "to": null, - "from": "0x311FEE0d859FA936FaEd456758dCD8047C4fFEd7", - "contractAddress": "0x8b7C579dFF83Adb1eC6E5DAF5f84b9425C4Bf0E4", - "transactionIndex": 11, - "gasUsed": "4475366", - "logsBloom": "0x00000000000000000000000000000000000000000002000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000810000000400000000000000000000000000000010000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002002000000000000000000000000000000000000000000000000020000004000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x322150feb2d3b0c4ff11e8bbcbc5df7e045cbc215d5488e1821c0920facd5963", - "transactionHash": "0x962fb89e0989cb0ae92190af7da212dbeaa29c004f99d0722d0bc44906ff19ed", + "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", + "contractAddress": "0x927761829796FdE7fb3581Ee4FdDe35f371a1926", + "transactionIndex": 115, + "gasUsed": "4491690", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000008000000000001000000000000000000000000000000000000030000000000000000000800000000000000000000000010000000400000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000010000000000000000000000400000000002000000000000000000000000000000000000000000004000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xb98d2c3322a87f2f541c8670081998365fe843007c8986f94b509eac40876d32", + "transactionHash": "0x5312eb38223a49b64c3b0978bd5e79be325d74dcd9517234d8148e27d7d23ad2", "logs": [ { - "transactionIndex": 11, - "blockNumber": 8516138, - "transactionHash": "0x962fb89e0989cb0ae92190af7da212dbeaa29c004f99d0722d0bc44906ff19ed", - "address": "0x8b7C579dFF83Adb1eC6E5DAF5f84b9425C4Bf0E4", + "transactionIndex": 115, + "blockNumber": 12451139, + "transactionHash": "0x5312eb38223a49b64c3b0978bd5e79be325d74dcd9517234d8148e27d7d23ad2", + "address": "0x927761829796FdE7fb3581Ee4FdDe35f371a1926", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000311fee0d859fa936faed456758dcd8047c4ffed7" + "0x000000000000000000000000040cc3af8455f3c34d1df1d2a305e047a062bebf" ], "data": "0x", - "logIndex": 24, - "blockHash": "0x322150feb2d3b0c4ff11e8bbcbc5df7e045cbc215d5488e1821c0920facd5963" + "logIndex": 150, + "blockHash": "0xb98d2c3322a87f2f541c8670081998365fe843007c8986f94b509eac40876d32" }, { - "transactionIndex": 11, - "blockNumber": 8516138, - "transactionHash": "0x962fb89e0989cb0ae92190af7da212dbeaa29c004f99d0722d0bc44906ff19ed", - "address": "0x8b7C579dFF83Adb1eC6E5DAF5f84b9425C4Bf0E4", + "transactionIndex": 115, + "blockNumber": 12451139, + "transactionHash": "0x5312eb38223a49b64c3b0978bd5e79be325d74dcd9517234d8148e27d7d23ad2", + "address": "0x927761829796FdE7fb3581Ee4FdDe35f371a1926", "topics": [ "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000311fee0d859fa936faed456758dcd8047c4ffed7" + "0x000000000000000000000000040cc3af8455f3c34d1df1d2a305e047a062bebf" ], "data": "0x00000000000000000000000000000000000000000000d3c21bcecceda1000000", - "logIndex": 25, - "blockHash": "0x322150feb2d3b0c4ff11e8bbcbc5df7e045cbc215d5488e1821c0920facd5963" + "logIndex": 151, + "blockHash": "0xb98d2c3322a87f2f541c8670081998365fe843007c8986f94b509eac40876d32" } ], - "blockNumber": 8516138, - "cumulativeGasUsed": "7913858", + "blockNumber": 12451139, + "cumulativeGasUsed": "10600289", "status": 1, "byzantium": true }, "args": [ "0x0000000000000000000000000000000000000000", - "0x26E44AD5b46C6A8C167815B7D180F6a5eD91D7bc" + "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F" ], - "solcInputHash": "1cde26e1be086ba932a8865ced5ceef3", - "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract TimeLockRegistry\",\"name\":\"newTimeLockRegistry\",\"type\":\"address\"},{\"internalType\":\"contract IBabController\",\"name\":\"newController\",\"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\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Cancel\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Claim\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromDelegate\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toDelegate\",\"type\":\"address\"}],\"name\":\"DelegateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"DelegateVotesChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousAllowedAfterValue\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newAllowedAfterValue\",\"type\":\"uint256\"}],\"name\":\"MaxSupplyAllowedAfterChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousMaxValue\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxValue\",\"type\":\"uint256\"}],\"name\":\"MaxSupplyChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokensminted\",\"type\":\"uint256\"}],\"name\":\"MintedNewTokens\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenslocked\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isTeamOrAdvisor\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"startingVesting\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"endingVesting\",\"type\":\"uint256\"}],\"name\":\"NewLockout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"NewRewardsDistributorRegistration\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"NewTimeLockRegistration\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"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\":\"BABLTokenDeploymentTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DELEGATION_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_SUPPLY_CAP\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINT_CAP\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"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\":\"rawAmount\",\"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\":\"address\",\"name\":\"lockedAccount\",\"type\":\"address\"}],\"name\":\"cancelVestedTokens\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newMaxSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newMaxSupplyAllowedAfter\",\"type\":\"uint256\"}],\"name\":\"changeMaxSupply\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"checkpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"fromBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"votes\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimMyTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"contract IBabController\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"delegatee\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"delegateBySig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disableTokensTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"enableTokensTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"}],\"name\":\"getCheckpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"fromBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"votes\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getCurrentVotes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getDelegatee\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMyDelegatee\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getNumberOfCheckpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPriorVotes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTimeLockRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"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\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"lockedBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxSupply\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxSupplyAllowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxSupplyAllowedAfter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"mintingAllowedAfter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"numCheckpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_profile\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_vestingBegin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_vestingEnd\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_lastClaim\",\"type\":\"uint256\"}],\"name\":\"registerLockup\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardsDistributor\",\"outputs\":[{\"internalType\":\"contract RewardsDistributor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract RewardsDistributor\",\"name\":\"newRewardsDistributor\",\"type\":\"address\"}],\"name\":\"setRewardsDistributor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract TimeLockRegistry\",\"name\":\"newTimeLockRegistry\",\"type\":\"address\"}],\"name\":\"setTimeLockRegistry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeLockRegistry\",\"outputs\":[{\"internalType\":\"contract TimeLockRegistry\",\"name\":\"\",\"type\":\"address\"}],\"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\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"unlockedBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"vestedToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"teamOrAdvisor\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"vestingBegin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"vestingEnd\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastClaim\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"viewLockedBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"The BABLToken contract is ERC20 using 18 decimals as a standard Is Ownable to transfer ownership to Governor Alpha for Decentralized Governance It overrides the mint and maximum supply to control the timing and maximum cap allowed along the time.\",\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"This will overwrite the approval amount for `spender` except in the case of spender is Time Lock Registry and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\",\"params\":{\"rawAmount\":\"The number of tokens that are approved (2^256-1 means infinite)\",\"spender\":\"The address of the account which may transfer tokens\"},\"returns\":{\"_0\":\"Whether or not the approval succeeded\"}},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"cancelVestedTokens(address)\":{\"details\":\"Cancel distribution registration\",\"params\":{\"lockedAccount\":\"that should have its still locked distribution removed due to non-completion of its vesting period\"}},\"changeMaxSupply(uint256,uint256)\":{\"params\":{\"newMaxSupply\":\"The new maximum limit, limited by a maximum of 5% cap per year\",\"newMaxSupplyAllowedAfter\":\"The new waiting period to change the maxSupplyAllowed limited for a minimum of 1 year\"},\"returns\":{\"_0\":\"Whether or not the changeMaxSupply succeeded\"}},\"claimMyTokens()\":{\"details\":\"Claim msg.sender tokens (if any available in the registry)\"},\"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 override with respect to the fulfillment of vesting conditions along the way An user cannot decrease the allowance to the Time Lock Registry who is in charge of vesting conditions\",\"returns\":{\"_0\":\"Whether or not the decreaseAllowance succeeded\"}},\"delegate(address)\":{\"params\":{\"delegatee\":\"The address to delegate votes to\"}},\"delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)\":{\"params\":{\"delegatee\":\"The address to delegate votes to\",\"expiry\":\"The time at which to expire the signature\",\"nonce\":\"The contract state required to match the signature\",\"r\":\"Half of the ECDSA signature pair\",\"s\":\"Half of the ECDSA signature pair\",\"v\":\"The recovery byte of the signature\"}},\"getCurrentVotes(address)\":{\"params\":{\"account\":\"Account to get voting power for\"},\"returns\":{\"_0\":\"Voting power for an account\"}},\"getPriorVotes(address,uint256)\":{\"params\":{\"account\":\"Account to get voting power for\",\"blockNumber\":\"Block to get voting power at\"},\"returns\":{\"_0\":\"Voting power for an account at specific block\"}},\"getTimeLockRegistry()\":{\"returns\":{\"_0\":\"Address of the Time Lock Registry\"}},\"increaseAllowance(address,uint256)\":{\"details\":\"This is an override with respect to the fulfillment of vesting conditions along the way However an user can increase allowance many times, it will never be able to transfer locked tokens during vesting period\",\"returns\":{\"_0\":\"Whether or not the increaseAllowance succeeded\"}},\"lockedBalance(address)\":{\"params\":{\"account\":\"Account to check\"},\"returns\":{\"_0\":\"Amount locked in the time of checking\"}},\"maxSupply()\":{\"returns\":{\"_0\":\"Returns the value of maxSupplyAllowed at the time\"}},\"mint(address,uint256)\":{\"details\":\"MINT_CAP The new maximum limit, limited by a 2% cap of totalSupply for each new mint and always limited by maxSupplyAllowed. mintingAllowedAfter Defines the next time allowed for a new mint\",\"params\":{\"_amount\":\"The number of tokens to be minted\",\"_to\":\"The address of the destination account that will receive the new BABL tokens\"},\"returns\":{\"_0\":\"Whether or not the mint succeeded\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"registerLockup(address,uint256,bool,uint256,uint256,uint256)\":{\"params\":{\"_amount\":\"Tokens to be transferred\",\"_lastClaim\":\"Unix Time when the claim was done from that particular address\",\"_profile\":\"True if is a Team Member or Advisor\",\"_receiver\":\"Address to receive the tokens\",\"_vestingBegin\":\"Unix Time when the vesting for that particular address\",\"_vestingEnd\":\"Unix Time when the vesting for that particular address\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setRewardsDistributor(address)\":{\"params\":{\"newRewardsDistributor\":\"Address of Rewards Distributor contract\"}},\"setTimeLockRegistry(address)\":{\"params\":{\"newTimeLockRegistry\":\"Address of TimeLockRegistry contract\"}},\"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`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unlockedBalance(address)\":{\"params\":{\"account\":\"Account to check\"},\"returns\":{\"_0\":\"Amount that is unlocked and available eg. to transfer\"}},\"viewLockedBalance(address)\":{\"params\":{\"account\":\"Account to check\"},\"returns\":{\"_0\":\"Amount locked in the time of checking\"}}},\"stateVariables\":{\"FIRST_EPOCH_MINT\":{\"details\":\"First Epoch Mint where no more than 1 Million BABL can be minted (>= 8 Years)\"},\"MIN_TIME_BETWEEN_MINTS\":{\"details\":\"Minimum time between mints after\"},\"NAME\":{\"details\":\"EIP-20 token name for this token\"},\"SYMBOL\":{\"details\":\"EIP-20 token symbol for this token\"},\"maxSupplyAllowed\":{\"details\":\"Maximum number of tokens in circulation of 1 million for the first 8 years (using 18 decimals as ERC20 standard)\"}},\"title\":\"BABL Token\",\"version\":1},\"userdoc\":{\"events\":{\"Cancel(address,uint256)\":{\"notice\":\"An event that emitted when a cancellation of Lock tokens is registered\"},\"Claim(address,uint256)\":{\"notice\":\"An event that emitted when a claim of tokens are registered\"},\"MaxSupplyAllowedAfterChanged(uint256,uint256)\":{\"notice\":\"An event that emitted when maxSupplyAllowedAfter changes\"},\"MaxSupplyChanged(uint256,uint256)\":{\"notice\":\"An event thats emitted when maxSupplyAllowed changes\"},\"MintedNewTokens(address,uint256)\":{\"notice\":\"An event that emitted when a new mint ocurr\"},\"NewLockout(address,uint256,bool,uint256,uint256)\":{\"notice\":\"An event that emitted when a new lockout ocurr\"},\"NewRewardsDistributorRegistration(address,address)\":{\"notice\":\"An event that emitted when a new Rewards Distributor is registered\"},\"NewTimeLockRegistration(address,address)\":{\"notice\":\"An event that emitted when a new Time Lock is registered\"}},\"kind\":\"user\",\"methods\":{\"BABLTokenDeploymentTimestamp()\":{\"notice\":\"The timestamp of BABL Token deployment\"},\"DELEGATION_TYPEHASH()\":{\"notice\":\"The EIP-712 typehash for the delegation struct used by the contract\"},\"DOMAIN_TYPEHASH()\":{\"notice\":\"The EIP-712 typehash for the contract's domain\"},\"MAX_SUPPLY_CAP()\":{\"notice\":\"Cap on the percentage of maxSupplyAllowed that can be increased per year after maxSupplyAllowedAfter\"},\"MINT_CAP()\":{\"notice\":\"Cap on the percentage of totalSupply that can be minted at each mint after the initial 1 Million BABL\"},\"approve(address,uint256)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Override the Approval of allowances of ERC20 with special conditions for vestingOverride of \\\"Approve\\\" function to allow the `spender` to transfer up to `amount` from `src`\"},\"cancelVestedTokens(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Cancel and remove locked tokens due to non-completion of vesting period applied only by Time Lock Registry and specifically to Team or Advisors as it does not apply to investors.\"},\"changeMaxSupply(uint256,uint256)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to change maxSupplyAllowedSet-up a greater maxSupplyAllowed value to allow more tokens to be minted\"},\"checkpoints(address,uint32)\":{\"notice\":\"A record of votes checkpoints for each account, by index\"},\"claimMyTokens()\":{\"notice\":\"GOVERNANCE FUNCTION. Each token owner can claim its own specific tokens with its own specific vesting conditions from the Time Lock Registry\"},\"constructor\":{\"notice\":\"Construct a new BABL token and gives ownership to sender\"},\"decreaseAllowance(address,uint256)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Override the decrease of allowances of ERC20 with special conditions for vestingAtomically decrease the allowance granted to `spender` by the caller.\"},\"delegate(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Delegating votes from msg.sender to delegateeDelegate votes from `msg.sender` to `delegatee`\"},\"delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Delegate votes using signature to 'delegatee'Delegates votes from signatory to `delegatee`\"},\"disableTokensTransfers()\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Disables transfers of ERC20 BABL Tokens\"},\"enableTokensTransfers()\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows transfers of ERC20 BABL Tokens Can only happen after the protocol is fully decentralized.\"},\"getCurrentVotes(address)\":{\"notice\":\"GOVERNANCE FUNCTION. Check Delegate votes using signature to 'delegatee'Get current voting power for an account\"},\"getPriorVotes(address,uint256)\":{\"notice\":\"GOVERNANCE FUNCTION. Get voting power at a specific block for an account\"},\"getTimeLockRegistry()\":{\"notice\":\"PUBLIC FUNCTION. Get the address of Time Lock RegistryGet the address of Time Lock Registry\"},\"increaseAllowance(address,uint256)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Override the Increase of allowances of ERC20 with special conditions for vestingAtomically increases the allowance granted to `spender` by the caller.\"},\"lockedBalance(address)\":{\"notice\":\"GOVERNANCE FUNCTION. Get locked balance for an accountGet locked balance for an account\"},\"maxSupply()\":{\"notice\":\"PUBLIC FUNCTION. Get the value of maxSupplyAllowed\"},\"maxSupplyAllowedAfter()\":{\"notice\":\"The timestamp after which a change on maxSupplyAllowed may occur\"},\"mint(address,uint256)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows to mint new tokensMint new BABL tokens. Initial 1 Million BABL. After 8 years new BABL could be minted by governance decision\"},\"mintingAllowedAfter()\":{\"notice\":\"The timestamp after which minting may occur after FIRST_EPOCH_MINT (8 years)\"},\"nonces(address)\":{\"notice\":\"A record of states for signing / validating signatures\"},\"numCheckpoints(address)\":{\"notice\":\"The number of checkpoints for each account\"},\"registerLockup(address,uint256,bool,uint256,uint256,uint256)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Register new token lockup conditions for vested tokens defined only by Time Lock RegistryTokens are completely delivered during the registration however lockup conditions apply for vested tokens locking them according to the distribution epoch periods and the type of recipient (Team, Advisor, Investor) Emits a transfer event showing a transfer to the recipient Only the registry can call this function\"},\"setRewardsDistributor(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Set the Rewards Distributor contract to control either BABL Mining or profit rewardsSet the Rewards Distriburor contract to control both types of rewards (profit and BABL Mining program)\"},\"setTimeLockRegistry(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Set the Time Lock Registry contract to control token vesting conditionsSet the Time Lock Registry contract to control token vesting conditions\"},\"unlockedBalance(address)\":{\"notice\":\"GOVERNANCE FUNCTION. Get unlocked balance for an accountGet unlocked balance for an account\"},\"vestedToken(address)\":{\"notice\":\"A record of token owners under vesting conditions for each account, by index\"},\"viewLockedBalance(address)\":{\"notice\":\"GOVERNANCE FUNCTION. View the locked balance for an accountView locked balance for an account\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/token/BABLToken.sol\":\"BABLToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () internal {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.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 using SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n // solhint-disable-next-line max-line-length\\n require((value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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 * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 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. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\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 { size := extcodesize(account) }\\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, \\\"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, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityMinimum(uint256 _minRiskyPairLiquidityEth) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minRiskyPairLiquidityEth() external view returns (uint256);\\n\\n function getUniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0x57cf4ece98219f805a416e8c24728d30d9b37c4126d66785d2617b97e35ffae6\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function nftAddress() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategy(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function reenableEthForStrategies() external;\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x5e460136e0b45024ea1c1f32cde607f3ce75dd5b14cee34007d6bbd08beabc82\",\"license\":\"Apache License\"},\"contracts/interfaces/IRewardsDistributor.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IRewardsDistributor\\n * @author Babylon Finance\\n *\\n * Interface for the distribute rewards of the BABL Mining Program.\\n */\\n\\ninterface IRewardsDistributor {\\n // Structs\\n struct PrincipalPerTimestamp {\\n uint256 principal;\\n uint256 time;\\n uint256 timeListPointer;\\n }\\n\\n function protocolPrincipal() external view returns (uint256);\\n\\n function pid() external view returns (uint256);\\n\\n // solhint-disable-next-line\\n function EPOCH_DURATION() external pure returns (uint256);\\n\\n // solhint-disable-next-line\\n function START_TIME() external view returns (uint256);\\n\\n // solhint-disable-next-line\\n function Q1_REWARDS() external pure returns (uint256);\\n\\n // solhint-disable-next-line\\n function DECAY_RATE() external pure returns (uint256);\\n\\n function addProtocolPrincipal(uint256 _capital) external;\\n\\n function substractProtocolPrincipal(uint256 _capital) external;\\n\\n function getStrategyRewards(address _strategy) external returns (uint96);\\n\\n function sendTokensToContributor(address _to, uint96 _amount) external;\\n\\n function getRewards(\\n address _garden,\\n address _contributor,\\n address[] calldata _finalizedStrategies\\n ) external view returns (uint256, uint96);\\n\\n function getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) external view returns (uint256);\\n\\n /**\\n function getContributor(address _garden, address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256[] memory,\\n uint256\\n );\\n */\\n function updateGardenPower(address _garden, uint256 _pid) external;\\n\\n function setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw,\\n uint256 _pid\\n ) external;\\n\\n function tokenSupplyPerQuarter(uint256 quarter) external view returns (uint96);\\n\\n function checkProtocol(uint256 _time)\\n external\\n view\\n returns (\\n uint256 principal,\\n uint256 time,\\n uint256 quarterBelonging,\\n uint256 timeListPointer,\\n uint256 power\\n );\\n\\n function checkQuarter(uint256 _num)\\n external\\n view\\n returns (\\n uint256 quarterPrincipal,\\n uint256 quarterNumber,\\n uint256 quarterPower,\\n uint96 supplyPerQuarter\\n );\\n}\\n\",\"keccak256\":\"0xc68eb7826b0174d4f6dff50320abb2cd958a978d4537c57867dd828dc2798662\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital,\\n address _strategyNft\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function strategyNft() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x4396906e436eb68c96715e0a53ae1656ac5d7934ebdaeb58ec3c33953465bc39\",\"license\":\"Apache License\"},\"contracts/interfaces/IVoteToken.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface IVoteToken {\\n function delegate(address delegatee) external;\\n\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n function getCurrentVotes(address account) external view returns (uint96);\\n\\n function getPriorVotes(address account, uint256 blockNumber) external view returns (uint96);\\n\\n function getMyDelegatee() external view returns (address);\\n\\n function getDelegatee(address account) external view returns (address);\\n\\n function getCheckpoints(address account, uint32 id) external view returns (uint32 fromBlock, uint96 votes);\\n\\n function getNumberOfCheckpoints(address account) external view returns (uint32);\\n}\\n\\ninterface IVoteTokenWithERC20 is IVoteToken, IERC20 {}\\n\",\"keccak256\":\"0xd3d6174f81ce2c1678a536b2a486179f9a5a694849b334556aeb155b9b13f777\",\"license\":\"Apache License\"},\"contracts/lib/BabylonErrors.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n// solhint-disable\\n\\n/**\\n * @notice Forked from https://github.com/balancer-labs/balancer-core-v2/blob/master/contracts/lib/helpers/BalancerErrors.sol\\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 // 'BAB#{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 \\\"BAB#\\\" part is a known constant\\n // (0x42414223): 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(0x42414223000000, 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 // Max deposit limit needs to be under the limit\\n uint256 internal constant MAX_DEPOSIT_LIMIT = 0;\\n // Creator needs to deposit\\n uint256 internal constant MIN_CONTRIBUTION = 1;\\n // Min Garden token supply >= 0\\n uint256 internal constant MIN_TOKEN_SUPPLY = 2;\\n // Deposit hardlock needs to be at least 1 block\\n uint256 internal constant DEPOSIT_HARDLOCK = 3;\\n // Needs to be at least the minimum\\n uint256 internal constant MIN_LIQUIDITY = 4;\\n // _reserveAssetQuantity is not equal to msg.value\\n uint256 internal constant MSG_VALUE_DO_NOT_MATCH = 5;\\n // Withdrawal amount has to be equal or less than msg.sender balance\\n uint256 internal constant MSG_SENDER_TOKENS_DO_NOT_MATCH = 6;\\n // Tokens are staked\\n uint256 internal constant TOKENS_STAKED = 7;\\n // Balance too low\\n uint256 internal constant BALANCE_TOO_LOW = 8;\\n // msg.sender doesn't have enough tokens\\n uint256 internal constant MSG_SENDER_TOKENS_TOO_LOW = 9;\\n // There is an open redemption window already\\n uint256 internal constant REDEMPTION_OPENED_ALREADY = 10;\\n // Cannot request twice in the same window\\n uint256 internal constant ALREADY_REQUESTED = 11;\\n // Rewards and profits already claimed\\n uint256 internal constant ALREADY_CLAIMED = 12;\\n // Value have to be greater than zero\\n uint256 internal constant GREATER_THAN_ZERO = 13;\\n // Must be reserve asset\\n uint256 internal constant MUST_BE_RESERVE_ASSET = 14;\\n // Only contributors allowed\\n uint256 internal constant ONLY_CONTRIBUTOR = 15;\\n // Only controller allowed\\n uint256 internal constant ONLY_CONTROLLER = 16;\\n // Only creator allowed\\n uint256 internal constant ONLY_CREATOR = 17;\\n // Only keeper allowed\\n uint256 internal constant ONLY_KEEPER = 18;\\n // Fee is too high\\n uint256 internal constant FEE_TOO_HIGH = 19;\\n // Only strategy allowed\\n uint256 internal constant ONLY_STRATEGY = 20;\\n // Only active allowed\\n uint256 internal constant ONLY_ACTIVE = 21;\\n // Only inactive allowed\\n uint256 internal constant ONLY_INACTIVE = 22;\\n // Address should be not zero address\\n uint256 internal constant ADDRESS_IS_ZERO = 23;\\n // Not within range\\n uint256 internal constant NOT_IN_RANGE = 24;\\n // Value is too low\\n uint256 internal constant VALUE_TOO_LOW = 25;\\n // Value is too high\\n uint256 internal constant VALUE_TOO_HIGH = 26;\\n // Only strategy or protocol allowed\\n uint256 internal constant ONLY_STRATEGY_OR_CONTROLLER = 27;\\n // Normal withdraw possible\\n uint256 internal constant NORMAL_WITHDRAWAL_POSSIBLE = 28;\\n // User does not have permissions to join garden\\n uint256 internal constant USER_CANNOT_JOIN = 29;\\n // User does not have permissions to add strategies in garden\\n uint256 internal constant USER_CANNOT_ADD_STRATEGIES = 30;\\n // Only Protocol or garden\\n uint256 internal constant ONLY_PROTOCOL_OR_GARDEN = 31;\\n // Only Strategist\\n uint256 internal constant ONLY_STRATEGIST = 32;\\n // Only Integration\\n uint256 internal constant ONLY_INTEGRATION = 33;\\n // Only garden and data not set\\n uint256 internal constant ONLY_GARDEN_AND_DATA_NOT_SET = 34;\\n // Only active garden\\n uint256 internal constant ONLY_ACTIVE_GARDEN = 35;\\n // Contract is not a garden\\n uint256 internal constant NOT_A_GARDEN = 36;\\n // Not enough tokens\\n uint256 internal constant STRATEGIST_TOKENS_TOO_LOW = 37;\\n // Stake is too low\\n uint256 internal constant STAKE_HAS_TO_AT_LEAST_ONE = 38;\\n // Duration must be in range\\n uint256 internal constant DURATION_MUST_BE_IN_RANGE = 39;\\n // Max Capital Requested\\n uint256 internal constant MAX_CAPITAL_REQUESTED = 41;\\n // Votes are already resolved\\n uint256 internal constant VOTES_ALREADY_RESOLVED = 42;\\n // Voting window is closed\\n uint256 internal constant VOTING_WINDOW_IS_OVER = 43;\\n // Strategy needs to be active\\n uint256 internal constant STRATEGY_NEEDS_TO_BE_ACTIVE = 44;\\n // Max capital reached\\n uint256 internal constant MAX_CAPITAL_REACHED = 45;\\n // Capital is less then rebalance\\n uint256 internal constant CAPITAL_IS_LESS_THAN_REBALANCE = 46;\\n // Strategy is in cooldown period\\n uint256 internal constant STRATEGY_IN_COOLDOWN = 47;\\n // Strategy is not executed\\n uint256 internal constant STRATEGY_IS_NOT_EXECUTED = 48;\\n // Strategy is not over yet\\n uint256 internal constant STRATEGY_IS_NOT_OVER_YET = 49;\\n // Strategy is already finalized\\n uint256 internal constant STRATEGY_IS_ALREADY_FINALIZED = 50;\\n // No capital to unwind\\n uint256 internal constant STRATEGY_NO_CAPITAL_TO_UNWIND = 51;\\n // Strategy needs to be inactive\\n uint256 internal constant STRATEGY_NEEDS_TO_BE_INACTIVE = 52;\\n // Duration needs to be less\\n uint256 internal constant DURATION_NEEDS_TO_BE_LESS = 53;\\n // Can't sweep reserve asset\\n uint256 internal constant CANNOT_SWEEP_RESERVE_ASSET = 54;\\n // Voting window is opened\\n uint256 internal constant VOTING_WINDOW_IS_OPENED = 55;\\n // Strategy is executed\\n uint256 internal constant STRATEGY_IS_EXECUTED = 56;\\n // Min Rebalance Capital\\n uint256 internal constant MIN_REBALANCE_CAPITAL = 57;\\n // Not a valid strategy NFT\\n uint256 internal constant NOT_STRATEGY_NFT = 58;\\n // Garden Transfers Disabled\\n uint256 internal constant GARDEN_TRANSFERS_DISABLED = 59;\\n // Tokens are hardlocked\\n uint256 internal constant TOKENS_HARDLOCKED = 60;\\n // Max contributors reached\\n uint256 internal constant MAX_CONTRIBUTORS = 61;\\n // BABL Transfers Disabled\\n uint256 internal constant BABL_TRANSFERS_DISABLED = 62;\\n // Strategy duration range error\\n uint256 internal constant DURATION_RANGE = 63;\\n // Checks the min amount of voters\\n uint256 internal constant MIN_VOTERS_CHECK = 64;\\n // Ge contributor power error\\n uint256 internal constant GET_CONTRIBUTOR_POWER = 65;\\n // Not enough ETH set aside\\n uint256 internal constant NOT_ENOUGH_ETH = 66;\\n // Garden is already public\\n uint256 internal constant GARDEN_ALREADY_PUBLIC = 67;\\n // Withdrawal with penalty\\n uint256 internal constant WITHDRAWAL_WITH_PENALTY = 68;\\n // Withdrawal with penalty\\n uint256 internal constant ONLY_MINING_ACTIVE = 69;\\n // Overflow in supply\\n uint256 internal constant OVERFLOW_IN_SUPPLY = 70;\\n // Overflow in power\\n uint256 internal constant OVERFLOW_IN_POWER = 71;\\n // Not a system contract\\n uint256 internal constant NOT_A_SYSTEM_CONTRACT = 72;\\n // Strategy vs Garden mismatch\\n uint256 internal constant STRATEGY_GARDEN_MISMATCH = 73;\\n // Minimum quarters is 1\\n uint256 internal constant QUARTERS_MIN_1 = 74;\\n // Too many strategy operations\\n uint256 internal constant TOO_MANY_OPS = 75;\\n // Only operations\\n uint256 internal constant ONLY_OPERATION = 76;\\n // Strat params wrong length\\n uint256 internal constant STRAT_PARAMS_LENGTH = 77;\\n // Garden params wrong length\\n uint256 internal constant GARDEN_PARAMS_LENGTH = 78;\\n}\\n\",\"keccak256\":\"0xdbb485a596718830e08a89b785cddc69d0dc7f3f43a1a8a19268336f8d925067\",\"license\":\"Apache License\"},\"contracts/lib/Math.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n// Libraries\\nimport './SafeDecimalMath.sol';\\n\\n// https://docs.synthetix.io/contracts/source/libraries/math\\nlibrary Math {\\n using SafeMath for uint256;\\n using SafeDecimalMath for uint256;\\n\\n /**\\n * @dev Uses \\\"exponentiation by squaring\\\" algorithm where cost is 0(logN)\\n * vs 0(N) for naive repeated multiplication.\\n * Calculates x^n with x as fixed-point and n as regular unsigned int.\\n * Calculates to 18 digits of precision with SafeDecimalMath.unit()\\n */\\n function powDecimal(uint256 x, uint256 n) internal pure returns (uint256) {\\n // https://mpark.github.io/programming/2014/08/18/exponentiation-by-squaring/\\n\\n uint256 result = SafeDecimalMath.unit();\\n while (n > 0) {\\n if (n % 2 != 0) {\\n result = result.multiplyDecimal(x);\\n }\\n x = x.multiplyDecimal(x);\\n n /= 2;\\n }\\n return result;\\n }\\n\\n function abs(int256 x) internal pure returns (int256) {\\n return x >= 0 ? x : -x;\\n }\\n}\\n\",\"keccak256\":\"0xc2ff8055f98dd7253df98838d870391067d9c622a68f263c942616ca8122bd93\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"contracts/lib/Safe3296.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nlibrary Safe3296 {\\n using SafeMath for uint256;\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint32\\n *\\n * @dev internal function to convert from uint256 to uint32\\n */\\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\\n require(n < 2**32, errorMessage);\\n return uint32(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint96\\n *\\n * @dev internal function to convert from uint256 to uint96\\n */\\n function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) {\\n require(n < 2**96, errorMessage);\\n return uint96(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to add two uint96 numbers\\n *\\n * @dev internal safe math function to add two uint96 numbers\\n */\\n function add96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n uint96 c = a + b;\\n require(c >= a, errorMessage);\\n return c;\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to subtract two uint96 numbers\\n *\\n * @dev internal safe math function to subtract two uint96 numbers\\n */\\n function sub96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n}\\n\",\"keccak256\":\"0x9ebf0856ab07500c9a8250d1be4b578a3e0ff454da7de67e3ab5632a7e6903c3\",\"license\":\"Apache License\"},\"contracts/lib/SafeDecimalMath.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nlibrary SafeDecimalMath {\\n using SafeMath for uint256;\\n\\n /* Number of decimal places in the representations. */\\n uint8 public constant decimals = 18;\\n uint8 public constant highPrecisionDecimals = 27;\\n\\n /* The number representing 1.0. */\\n uint256 public constant UNIT = 10**uint256(decimals);\\n\\n /* The number representing 1.0 for higher fidelity numbers. */\\n uint256 public constant PRECISE_UNIT = 10**uint256(highPrecisionDecimals);\\n uint256 private constant UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR = 10**uint256(highPrecisionDecimals - decimals);\\n\\n /**\\n * @return Provides an interface to UNIT.\\n */\\n function unit() external pure returns (uint256) {\\n return UNIT;\\n }\\n\\n /**\\n * @return Provides an interface to PRECISE_UNIT.\\n */\\n function preciseUnit() external pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @return The result of multiplying x and y, interpreting the operands as fixed-point\\n * decimals.\\n *\\n * @dev A unit factor is divided out after the product of x and y is evaluated,\\n * so that product must be less than 2**256. As this is an integer division,\\n * the internal division always rounds down. This helps save on gas. Rounding\\n * is more expensive on gas.\\n */\\n function multiplyDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\\n /* Divide by UNIT to remove the extra factor introduced by the product. */\\n return x.mul(y) / UNIT;\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of the specified precision unit.\\n *\\n * @dev The operands should be in the form of a the specified unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function _multiplyDecimalRound(\\n uint256 x,\\n uint256 y,\\n uint256 precisionUnit\\n ) private pure returns (uint256) {\\n /* Divide by UNIT to remove the extra factor introduced by the product. */\\n uint256 quotientTimesTen = x.mul(y) / (precisionUnit / 10);\\n\\n if (quotientTimesTen % 10 >= 5) {\\n quotientTimesTen += 10;\\n }\\n\\n return quotientTimesTen / 10;\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of a precise unit.\\n *\\n * @dev The operands should be in the precise unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function multiplyDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _multiplyDecimalRound(x, y, PRECISE_UNIT);\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of a standard unit.\\n *\\n * @dev The operands should be in the standard unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function multiplyDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _multiplyDecimalRound(x, y, UNIT);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is a high\\n * precision decimal.\\n *\\n * @dev y is divided after the product of x and the standard precision unit\\n * is evaluated, so the product of x and UNIT must be less than 2**256. As\\n * this is an integer division, the result is always rounded down.\\n * This helps save on gas. Rounding is more expensive on gas.\\n */\\n function divideDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\\n /* Reintroduce the UNIT factor that will be divided out by y. */\\n return x.mul(UNIT).div(y);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * decimal in the precision unit specified in the parameter.\\n *\\n * @dev y is divided after the product of x and the specified precision unit\\n * is evaluated, so the product of x and the specified precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function _divideDecimalRound(\\n uint256 x,\\n uint256 y,\\n uint256 precisionUnit\\n ) private pure returns (uint256) {\\n uint256 resultTimesTen = x.mul(precisionUnit * 10).div(y);\\n\\n if (resultTimesTen % 10 >= 5) {\\n resultTimesTen += 10;\\n }\\n\\n return resultTimesTen / 10;\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * standard precision decimal.\\n *\\n * @dev y is divided after the product of x and the standard precision unit\\n * is evaluated, so the product of x and the standard precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function divideDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _divideDecimalRound(x, y, UNIT);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * high precision decimal.\\n *\\n * @dev y is divided after the product of x and the high precision unit\\n * is evaluated, so the product of x and the high precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function divideDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _divideDecimalRound(x, y, PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Convert a standard decimal representation to a high precision one.\\n */\\n function decimalToPreciseDecimal(uint256 i) internal pure returns (uint256) {\\n return i.mul(UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR);\\n }\\n\\n /**\\n * @dev Convert a high precision decimal to a standard decimal representation.\\n */\\n function preciseDecimalToDecimal(uint256 i) internal pure returns (uint256) {\\n uint256 quotientTimesTen = i / (UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR / 10);\\n\\n if (quotientTimesTen % 10 >= 5) {\\n quotientTimesTen += 10;\\n }\\n\\n return quotientTimesTen / 10;\\n }\\n}\\n\",\"keccak256\":\"0x1372be4fa0c5813417396f128f5aa45da1cd7679e2d247a8e17d1ba5f0141253\",\"license\":\"Apache License\"},\"contracts/token/BABLToken.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {TimeLockedToken} from './TimeLockedToken.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\nimport {TimeLockRegistry} from './TimeLockRegistry.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\n\\n/**\\n * @title BABL Token\\n * @dev The BABLToken contract is ERC20 using 18 decimals as a standard\\n * Is Ownable to transfer ownership to Governor Alpha for Decentralized Governance\\n * It overrides the mint and maximum supply to control the timing and maximum cap allowed along the time.\\n */\\n\\ncontract BABLToken is TimeLockedToken {\\n using SafeMath for uint256;\\n using Address for address;\\n\\n /* ============ Events ============ */\\n\\n /// @notice An event that emitted when a new mint ocurr\\n event MintedNewTokens(address account, uint256 tokensminted);\\n\\n /// @notice An event thats emitted when maxSupplyAllowed changes\\n event MaxSupplyChanged(uint256 previousMaxValue, uint256 newMaxValue);\\n\\n /// @notice An event that emitted when maxSupplyAllowedAfter changes\\n event MaxSupplyAllowedAfterChanged(uint256 previousAllowedAfterValue, uint256 newAllowedAfterValue);\\n\\n /* ============ Modifiers ============ */\\n\\n /* ============ State Variables ============ */\\n\\n /// @dev EIP-20 token name for this token\\n string private constant NAME = 'Babylon.Finance';\\n\\n /// @dev EIP-20 token symbol for this token\\n string private constant SYMBOL = 'BABL';\\n\\n /// @dev Maximum number of tokens in circulation of 1 million for the first 8 years (using 18 decimals as ERC20 standard)\\n uint256 public maxSupplyAllowed = 1_000_000e18; //\\n\\n /// @notice The timestamp after which a change on maxSupplyAllowed may occur\\n uint256 public maxSupplyAllowedAfter;\\n\\n /// @notice Cap on the percentage of maxSupplyAllowed that can be increased per year after maxSupplyAllowedAfter\\n uint8 public constant MAX_SUPPLY_CAP = 5;\\n\\n /// @notice Cap on the percentage of totalSupply that can be minted at each mint after the initial 1 Million BABL\\n uint8 public constant MINT_CAP = 2;\\n\\n /// @notice The timestamp after which minting may occur after FIRST_EPOCH_MINT (8 years)\\n uint256 public mintingAllowedAfter;\\n\\n /// @notice The timestamp of BABL Token deployment\\n uint256 public BABLTokenDeploymentTimestamp;\\n\\n /// @dev First Epoch Mint where no more than 1 Million BABL can be minted (>= 8 Years)\\n uint32 private constant FIRST_EPOCH_MINT = 365 days * 8;\\n\\n /// @dev Minimum time between mints after\\n uint32 private constant MIN_TIME_BETWEEN_MINTS = 365 days;\\n\\n /* ============ Functions ============ */\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * @notice Construct a new BABL token and gives ownership to sender\\n */\\n constructor(TimeLockRegistry newTimeLockRegistry, IBabController newController) TimeLockedToken(NAME, SYMBOL) {\\n // Timestamp of contract deployment\\n BABLTokenDeploymentTimestamp = block.timestamp;\\n\\n // Set-up the minimum time of 8 years to wait until the maxSupplyAllowed can be changed (it will also include a max cap)\\n maxSupplyAllowedAfter = block.timestamp.add(FIRST_EPOCH_MINT);\\n\\n //Starting with a maxSupplyAllowed of 1 million for the first 8 years\\n _mint(msg.sender, 1_000_000e18);\\n\\n //Set-up the minimum time of 8 years for additional mints\\n mintingAllowedAfter = block.timestamp.add(FIRST_EPOCH_MINT);\\n\\n // Set the Time Lock Registry\\n timeLockRegistry = newTimeLockRegistry;\\n\\n // Set the Babylon Controller\\n controller = newController;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /* =========== Token related Gov Functions ====== */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows to mint new tokens\\n *\\n * @notice Mint new BABL tokens. Initial 1 Million BABL. After 8 years new BABL could be minted by governance decision\\n * @dev MINT_CAP The new maximum limit, limited by a 2% cap of totalSupply for each new mint and always limited by maxSupplyAllowed.\\n * mintingAllowedAfter Defines the next time allowed for a new mint\\n * @param _to The address of the destination account that will receive the new BABL tokens\\n * @param _amount The number of tokens to be minted\\n * @return Whether or not the mint succeeded\\n */\\n function mint(address _to, uint256 _amount) external onlyOwner returns (bool) {\\n require(totalSupply().add(_amount) <= maxSupplyAllowed, 'BABLToken::mint: max supply exceeded');\\n require(\\n block.timestamp >= BABLTokenDeploymentTimestamp.add(FIRST_EPOCH_MINT),\\n 'BABLToken::mint: minting not allowed after the FIRST_EPOCH_MINT has passed >= 8 years'\\n );\\n require(_amount > 0, 'BABLToken::mint: mint should be higher than zero');\\n require(\\n block.timestamp >= mintingAllowedAfter,\\n 'BABLToken::mint: minting not allowed yet because mintingAllowedAfter'\\n );\\n require(_to != address(0), 'BABLToken::mint: cannot transfer to the zero address');\\n require(_to != address(this), 'BABLToken::mint: cannot mint to the address of this contract');\\n\\n // set-up the new time where a new (the next) mint can be allowed\\n mintingAllowedAfter = block.timestamp.add(MIN_TIME_BETWEEN_MINTS);\\n\\n // mint the amount\\n uint96 amount = safe96(_amount, 'BABLToken::mint: amount exceeds 96 bits');\\n\\n // After FIRST_EPOCH_MINT (8 years) a MINT_CAP applies\\n require(\\n amount <= totalSupply().mul(MINT_CAP).div(100),\\n 'BABLToken::mint: exceeded mint cap of 2% of total supply'\\n );\\n _mint(_to, amount);\\n\\n emit MintedNewTokens(_to, amount);\\n\\n // move delegates to add voting power to the destination\\n _moveDelegates(address(0), delegates[_to], amount);\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to change maxSupplyAllowed\\n *\\n * @notice Set-up a greater maxSupplyAllowed value to allow more tokens to be minted\\n * @param newMaxSupply The new maximum limit, limited by a maximum of 5% cap per year\\n * @param newMaxSupplyAllowedAfter The new waiting period to change the maxSupplyAllowed limited for a minimum of 1 year\\n * @return Whether or not the changeMaxSupply succeeded\\n */\\n function changeMaxSupply(uint256 newMaxSupply, uint256 newMaxSupplyAllowedAfter) external onlyOwner returns (bool) {\\n require(\\n block.timestamp >= BABLTokenDeploymentTimestamp.add(FIRST_EPOCH_MINT),\\n 'BABLToken::changeMaxSupply: a change on maxSupplyAllowed not allowed until 8 years after deployment'\\n );\\n require(\\n block.timestamp >= maxSupplyAllowedAfter,\\n 'BABLToken::changeMaxSupply: a change on maxSupplyAllowed not allowed yet'\\n );\\n\\n // update the amount\\n require(\\n newMaxSupply > maxSupplyAllowed,\\n 'BABLToken::changeMaxSupply: changeMaxSupply should be higher than previous value'\\n );\\n uint256 limitedNewSupply = maxSupplyAllowed.add(maxSupplyAllowed.mul(MAX_SUPPLY_CAP).div(100));\\n require(newMaxSupply <= limitedNewSupply, 'BABLToken::changeMaxSupply: exceeded of allowed 5% cap');\\n emit MaxSupplyChanged(maxSupplyAllowed, newMaxSupply);\\n maxSupplyAllowed = safe96(newMaxSupply, 'BABLToken::changeMaxSupply: potential max amount exceeds 96 bits');\\n\\n // update the new waiting time until a new change could be done >= 1 year since this change\\n uint256 futureTime = block.timestamp.add(365 days);\\n require(\\n newMaxSupplyAllowedAfter >= futureTime,\\n 'BABLToken::changeMaxSupply: the newMaxSupplyAllowedAfter should be at least 1 year in the future'\\n );\\n emit MaxSupplyAllowedAfterChanged(maxSupplyAllowedAfter, newMaxSupplyAllowedAfter);\\n maxSupplyAllowedAfter = safe96(\\n newMaxSupplyAllowedAfter,\\n 'BABLToken::changeMaxSupply: new newMaxSupplyAllowedAfter exceeds 96 bits'\\n );\\n\\n return true;\\n }\\n\\n /**\\n * PUBLIC FUNCTION. Get the value of maxSupplyAllowed\\n *\\n * @return Returns the value of maxSupplyAllowed at the time\\n */\\n function maxSupply() external view returns (uint96, uint256) {\\n uint96 safeMaxSupply =\\n safe96(maxSupplyAllowed, 'BABLToken::maxSupplyAllowed: maxSupplyAllowed exceeds 96 bits'); // Overflow check\\n return (safeMaxSupply, maxSupplyAllowedAfter);\\n }\\n}\\n\",\"keccak256\":\"0x3a02c7d92032c08f2652aa76c14a017416249efb660550002c3a84fb59aebec3\",\"license\":\"Apache License\"},\"contracts/token/RewardsDistributor.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {TimeLockedToken} from './TimeLockedToken.sol';\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\nimport {SafeDecimalMath} from '../lib/SafeDecimalMath.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\nimport {Math} from '../lib/Math.sol';\\nimport {Safe3296} from '../lib/Safe3296.sol';\\nimport {Errors, _require} from '../lib/BabylonErrors.sol';\\n\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {TimeLockedToken} from './TimeLockedToken.sol';\\nimport {IRewardsDistributor} from '../interfaces/IRewardsDistributor.sol';\\n\\n/**\\n * @title Rewards Distributor implementing the BABL Mining Program and other Rewards to Strategists and Stewards\\n * @author Babylon Finance\\n * Rewards Distributor contract is a smart contract used to calculate and distribute all the BABL rewards of the BABL Mining Program\\n * along the time reserved for executed strategies. It implements a supply curve to distribute 500K BABL along the time.\\n * The supply curve is designed to optimize the long-term sustainability of the protocol.\\n * The rewards are front-loaded but they last for more than 10 years, slowly decreasing quarter by quarter.\\n * For that, it houses the state of the protocol power along the time as each strategy power is compared to the whole protocol usage.\\n * Rewards Distributor also is responsible for the calculation and delivery of other rewards as bonuses to specific profiles\\n * which are actively contributing to the protocol growth and their communities (Garden creators, Strategists and Stewards).\\n */\\ncontract RewardsDistributor is Ownable, IRewardsDistributor {\\n using SafeMath for uint256;\\n using SafeMath for int256;\\n using PreciseUnitMath for uint256;\\n using PreciseUnitMath for int256;\\n using SafeDecimalMath for uint256;\\n using SafeDecimalMath for int256;\\n using Math for uint256;\\n using Math for int256;\\n using Safe3296 for uint256;\\n using Safe3296 for int256;\\n using Safe3296 for uint96;\\n using Safe3296 for uint32;\\n\\n /* ========== Events ========== */\\n\\n /* ============ Modifiers ============ */\\n /**\\n * Throws if the call is not from a valid strategy\\n */\\n modifier onlyStrategy {\\n _require(controller.isSystemContract(address(IStrategy(msg.sender).garden())), Errors.ONLY_STRATEGY);\\n _;\\n }\\n /**\\n * Throws if the call is not from a valid active garden\\n */\\n modifier onlyActiveGarden(address _garden, uint256 _pid) {\\n if (_pid != 0 || gardenPid[address(_garden)] > 1) {\\n // Enable deploying flow with security restrictions\\n _require(IBabController(controller).isSystemContract(address(_garden)), Errors.NOT_A_SYSTEM_CONTRACT);\\n _require(IBabController(controller).isGarden(address(_garden)), Errors.ONLY_ACTIVE_GARDEN);\\n }\\n _require(msg.sender == address(_garden), Errors.ONLY_ACTIVE_GARDEN);\\n _require(IGarden(_garden).active(), Errors.ONLY_ACTIVE_GARDEN);\\n _;\\n }\\n\\n /**\\n * Throws if the BABL Rewards mining program is not active\\n */\\n modifier onlyMiningActive() {\\n _require(IBabController(controller).bablMiningProgramEnabled(), Errors.ONLY_MINING_ACTIVE);\\n _;\\n }\\n /**\\n * Throws if the sender is not the controller\\n */\\n modifier onlyController() {\\n _require(IBabController(controller).isSystemContract(msg.sender), Errors.NOT_A_SYSTEM_CONTRACT);\\n _require(address(controller) == msg.sender, Errors.ONLY_CONTROLLER);\\n _;\\n }\\n\\n /* ============ Constants ============ */\\n // 500K BABL allocated to this BABL Mining Program, the first quarter is Q1_REWARDS\\n // and the following quarters will follow the supply curve using a decay rate\\n uint256 public constant override Q1_REWARDS = 53_571_428_571_428_600e6; // First quarter (epoch) BABL rewards\\n // 12% quarterly decay rate (each 90 days)\\n // (Rewards on Q1 = 1,12 * Rewards on Q2) being Q1= Quarter 1, Q2 = Quarter 2\\n uint256 public constant override DECAY_RATE = 12e16;\\n // Duration of its EPOCH in days // BABL & profits split from the protocol\\n uint256 public constant override EPOCH_DURATION = 90 days;\\n\\n // solhint-disable-next-line\\n uint256 public override START_TIME; // Starting time of the rewards distribution\\n\\n // solhint-disable-next-line\\n uint256 public immutable BABL_STRATEGIST_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable BABL_STEWARD_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable BABL_LP_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_STRATEGIST_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_STEWARD_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_LP_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_PROTOCOL_FEE;\\n // solhint-disable-next-line\\n uint256 public immutable CREATOR_BONUS;\\n\\n /* ============ Structs ============ */\\n\\n struct ProtocolPerTimestamp {\\n // Protocol allocation checkpoints per timestamp along the time\\n uint256 principal; // Protocol principal allocation\\n uint256 time; // Time of the checkpoint\\n uint256 quarterBelonging; // # Quarter checkpoint belonging since START_TIME\\n uint256 timeListPointer; // Pointer to the array of timestamps to enable the possibility of struct iteration\\n uint256 power; // Protocol power checkpoint (power is proportional to = principal * duration)\\n }\\n\\n struct ProtocolPerQuarter {\\n // Protocol allocation checkpoints per timestamp per each quarter along the time\\n uint256 quarterPrincipal; // Checkpoint to keep track on accumulated protocol principal per quarter\\n uint256 quarterNumber; // # Quarter since START_TIME\\n uint256 quarterPower; // Accumulated Protocol power for each quarter\\n uint96 supplyPerQuarter; // Supply per quarter\\n }\\n\\n struct GardenPowerByTimestamp {\\n // Garden allocation checkpoints per timestamp per each garden\\n uint256 principal; // Checkpoint to keep track on garden allocation\\n uint256 timestamp; // Checkpoint timestamps\\n uint256 power; // Garden power checkpoint (power is proportional to = principal * duration)\\n }\\n struct ContributorPerGarden {\\n // Checkpoints to keep track on the evolution of each contributor vs. each garden\\n uint256 lastDepositAt; // Last deposit timestamp of each contributor in each garden\\n uint256 initialDepositAt; // Checkpoint of the initial deposit\\n uint256[] timeListPointer; // Array of timestamps for each user in each garden\\n uint256 pid; // Garden contributor checkpoints counter to enable iteration\\n mapping(uint256 => TimestampContribution) tsContributions; // Sub-mapping all the contributor checkpoints\\n }\\n\\n struct TimestampContribution {\\n // Sub-mapping with all checkpoints for deposits and withdrawals of garden users\\n uint256 principal; // Principal of user in each garden\\n uint256 timestamp; // Checkpoint time\\n uint256 timePointer; // Pointer\\n uint256 power; // Contributor power per checkpoint\\n }\\n struct Checkpoints {\\n // Checkpoints for contributor power calculations where a certain window (from -> to) is queried\\n uint256 fromDepositAt; // First contributor checkpoint within the provided window\\n uint256 lastDepositAt; // Last contributor checkpoint within the provided window\\n uint256 gardenFromDepositAt; // First contributor checkpoint within the provided window\\n uint256 gardenLastDepositAt; // Last garden checkpoint within the provided window\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Instance of the Controller contract\\n IBabController public controller;\\n\\n // BABL Token contract\\n TimeLockedToken public babltoken;\\n\\n // Protocol total allocation points. Must be the sum of all allocation points (strategyPrincipal) in all strategy pools.\\n uint256 public override protocolPrincipal;\\n mapping(uint256 => ProtocolPerTimestamp) public protocolPerTimestamp; // Mapping of all protocol checkpoints\\n uint256[] public timeList; // Array of all protocol checkpoints\\n uint256 public override pid; // Initialization of the ID assigning timeListPointer to the checkpoint number\\n\\n mapping(uint256 => ProtocolPerQuarter) public protocolPerQuarter; // Mapping of the accumulated protocol per each active quarter\\n mapping(uint256 => bool) public isProtocolPerQuarter; // Check if the protocol per quarter data has been initialized\\n\\n // Strategy overhead control. Only used if each strategy has power overhead due to changes overtime\\n mapping(address => mapping(uint256 => uint256)) public rewardsPowerOverhead; // Overhead control to enable high level accuracy calculations for strategy rewards\\n // Contributor power control\\n mapping(address => mapping(address => ContributorPerGarden)) public contributorPerGarden; // Enable high level accuracy calculations\\n mapping(address => mapping(address => Checkpoints)) private checkpoints;\\n // Garden power control\\n mapping(address => mapping(uint256 => GardenPowerByTimestamp)) public gardenPowerByTimestamp;\\n mapping(address => uint256[]) public gardenTimelist;\\n mapping(address => uint256) public gardenPid;\\n\\n /* ============ Constructor ============ */\\n\\n constructor(TimeLockedToken _bablToken, IBabController _controller) {\\n require(address(_bablToken) != address(0), 'Token needs to exist');\\n require(address(_controller) != address(0), 'Controller needs to exist');\\n babltoken = _bablToken;\\n controller = _controller;\\n\\n (BABL_STRATEGIST_SHARE, BABL_STEWARD_SHARE, BABL_LP_SHARE, CREATOR_BONUS) = controller.getBABLSharing();\\n (PROFIT_STRATEGIST_SHARE, PROFIT_STEWARD_SHARE, PROFIT_LP_SHARE) = controller.getProfitSharing();\\n PROFIT_PROTOCOL_FEE = controller.protocolPerformanceFee();\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Function that adds the capital received to the total principal of the protocol per timestamp\\n * @param _capital Amount of capital in WETH\\n */\\n function addProtocolPrincipal(uint256 _capital) external override onlyStrategy onlyMiningActive {\\n IStrategy strategy = IStrategy(msg.sender);\\n if (strategy.enteredAt() >= START_TIME) {\\n // onlyMiningActive control, it does not create a checkpoint if the strategy is not part of the Mining Program\\n _updateProtocolPrincipal(address(strategy), _capital, true);\\n }\\n }\\n\\n /**\\n * Function that removes the capital received to the total principal of the protocol per timestamp\\n * @param _capital Amount of capital in WETH\\n */\\n function substractProtocolPrincipal(uint256 _capital) external override onlyStrategy onlyMiningActive {\\n IStrategy strategy = IStrategy(msg.sender);\\n if (strategy.enteredAt() >= START_TIME) {\\n // onlyMiningActive control, it does not create a checkpoint if the strategy is not part of the Mining Program\\n _updateProtocolPrincipal(address(strategy), _capital, false);\\n }\\n }\\n\\n /**\\n * Gets the total amount of rewards for a given strategy\\n * @param _strategy Strategy to check\\n */\\n function getStrategyRewards(address _strategy) external view override returns (uint96) {\\n IStrategy strategy = IStrategy(_strategy);\\n _require(strategy.exitedAt() != 0, Errors.STRATEGY_IS_NOT_OVER_YET);\\n if ((strategy.enteredAt() >= START_TIME) && (START_TIME != 0)) {\\n // We avoid gas consuming once a strategy got its BABL rewards during its finalization\\n uint256 rewards = strategy.strategyRewards();\\n if (rewards != 0) {\\n return Safe3296.safe96(rewards, 'overflow 96 bits');\\n }\\n // If the calculation was not done earlier we go for it\\n (uint256 numQuarters, uint256 startingQuarter) =\\n _getRewardsWindow(strategy.executedAt(), strategy.exitedAt());\\n uint256 bablRewards = 0;\\n if (numQuarters <= 1) {\\n bablRewards = _getStrategyRewardsOneQuarter(_strategy, startingQuarter); // Proportional supply till that moment within the same epoch\\n _require(\\n bablRewards <= protocolPerQuarter[startingQuarter].supplyPerQuarter,\\n Errors.OVERFLOW_IN_SUPPLY\\n );\\n _require(\\n strategy.capitalAllocated().mul(strategy.exitedAt().sub(strategy.executedAt())).sub(\\n strategy.rewardsTotalOverhead()\\n ) <= protocolPerQuarter[startingQuarter].quarterPower,\\n Errors.OVERFLOW_IN_POWER\\n );\\n } else {\\n // The strategy takes longer than one quarter / epoch\\n // We need to calculate the strategy vs. protocol power ratio per each quarter\\n uint256[] memory strategyPower = new uint256[](numQuarters); // Strategy power in each Epoch\\n uint256[] memory protocolPower = new uint256[](numQuarters); // Protocol power in each Epoch\\n for (uint256 i = 0; i <= numQuarters.sub(1); i++) {\\n uint256 slotEnding = START_TIME.add(startingQuarter.add(i).mul(EPOCH_DURATION)); // Initialization timestamp at the end of the first slot where the strategy starts its execution\\n\\n // We iterate all the quarters where the strategy was active\\n uint256 percentage = 1e18;\\n if (strategy.executedAt().add(EPOCH_DURATION) > slotEnding) {\\n // We are in the first quarter of the strategy\\n\\n strategyPower[i] = strategy.capitalAllocated().mul(slotEnding.sub(strategy.executedAt())).sub(\\n rewardsPowerOverhead[address(strategy)][_getQuarter(strategy.executedAt())]\\n );\\n } else if (\\n strategy.executedAt() < slotEnding.sub(EPOCH_DURATION) && slotEnding < strategy.exitedAt()\\n ) {\\n // We are in an intermediate quarter different from starting or ending quarters\\n strategyPower[i] = strategy\\n .capitalAllocated()\\n .mul(slotEnding.sub(slotEnding.sub(EPOCH_DURATION)))\\n .sub(rewardsPowerOverhead[address(strategy)][_getQuarter(slotEnding.sub(45 days))]);\\n } else {\\n // We are in the last quarter of the strategy\\n percentage = block.timestamp.sub(slotEnding.sub(EPOCH_DURATION)).preciseDiv(\\n slotEnding.sub(slotEnding.sub(EPOCH_DURATION))\\n );\\n\\n strategyPower[i] = strategy\\n .capitalAllocated()\\n .mul(strategy.exitedAt().sub(slotEnding.sub(EPOCH_DURATION)))\\n .sub(rewardsPowerOverhead[address(strategy)][_getQuarter(strategy.exitedAt())]);\\n }\\n protocolPower[i] = protocolPerQuarter[startingQuarter.add(i)].quarterPower;\\n\\n _require(strategyPower[i] <= protocolPower[i], Errors.OVERFLOW_IN_POWER);\\n\\n bablRewards = bablRewards.add(\\n strategyPower[i]\\n .preciseDiv(protocolPower[i])\\n .preciseMul(uint256(protocolPerQuarter[startingQuarter.add(i)].supplyPerQuarter))\\n .preciseMul(percentage)\\n );\\n }\\n }\\n\\n // Babl rewards will be proportional to the total return (profit) with a max cap of x2\\n uint256 percentageMul = strategy.capitalReturned().preciseDiv(strategy.capitalAllocated());\\n if (percentageMul > 2e18) percentageMul = 2e18;\\n bablRewards = bablRewards.preciseMul(percentageMul);\\n return Safe3296.safe96(bablRewards, 'overflow 96 bits');\\n } else {\\n return 0;\\n }\\n }\\n\\n /**\\n * Sends BABL tokens rewards to a contributor after a claim is requested to the protocol.\\n * @param _to Address to send the tokens to\\n * @param _amount Amount of tokens to send the address to\\n */\\n function sendTokensToContributor(address _to, uint96 _amount) external override onlyMiningActive {\\n _require(controller.isSystemContract(msg.sender), Errors.NOT_A_SYSTEM_CONTRACT);\\n _safeBABLTransfer(_to, _amount);\\n }\\n\\n /**\\n * Starts BABL Rewards Mining Program from the controller.\\n */\\n function startBABLRewards() external onlyController {\\n if (START_TIME == 0) {\\n // It can only be activated once to avoid overriding START_TIME\\n START_TIME = block.timestamp;\\n }\\n }\\n\\n /**\\n * Calculates the profits and BABL that a contributor should receive from a series of finalized strategies\\n * @param _garden Garden to which the strategies and the user must belong to\\n * @param _contributor Address of the contributor to check\\n * @param _finalizedStrategies List of addresses of the finalized strategies to check\\n */\\n function getRewards(\\n address _garden,\\n address _contributor,\\n address[] calldata _finalizedStrategies\\n ) external view override returns (uint256, uint96) {\\n uint256 contributorTotalProfits = 0;\\n uint256 bablTotalRewards = 0;\\n for (uint256 i = 0; i < _finalizedStrategies.length; i++) {\\n (uint256 strategyProfits, uint256 strategyBABL) =\\n _getStrategyProfitsAndBABL(_garden, _finalizedStrategies[i], _contributor);\\n contributorTotalProfits = contributorTotalProfits.add(strategyProfits);\\n bablTotalRewards = bablTotalRewards.add(strategyBABL);\\n }\\n\\n return (contributorTotalProfits, Safe3296.safe96(bablTotalRewards, 'R28'));\\n }\\n\\n /* ========== View functions ========== */\\n\\n /**\\n * Gets the contributor power from one timestamp to the other\\n * @param _garden Address of the garden where the contributor belongs to\\n * @param _contributor Address if the contributor\\n * @param _from Initial timestamp\\n * @param _to End timestamp\\n * @return uint256 Contributor power during that period\\n */\\n function getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) external view override returns (uint256) {\\n return _getContributorPower(_garden, _contributor, _from, _to);\\n }\\n\\n function updateGardenPower(address _garden, uint256 _pid) external override onlyActiveGarden(_garden, _pid) {\\n _updateGardenPower(_garden);\\n }\\n\\n function setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw,\\n uint256 _pid\\n ) external override onlyActiveGarden(_garden, _pid) {\\n _setContributorTimestampParams(_garden, _contributor, _previousBalance, _depositOrWithdraw);\\n }\\n\\n function tokenSupplyPerQuarter(uint256 quarter) external pure override returns (uint96) {\\n return _tokenSupplyPerQuarter(quarter);\\n }\\n\\n function checkProtocol(uint256 _time)\\n external\\n view\\n override\\n returns (\\n uint256 principal,\\n uint256 time,\\n uint256 quarterBelonging,\\n uint256 timeListPointer,\\n uint256 power\\n )\\n {\\n return (\\n protocolPerTimestamp[_time].principal,\\n protocolPerTimestamp[_time].time,\\n protocolPerTimestamp[_time].quarterBelonging,\\n protocolPerTimestamp[_time].timeListPointer,\\n protocolPerTimestamp[_time].power\\n );\\n }\\n\\n function checkQuarter(uint256 _num)\\n external\\n view\\n override\\n returns (\\n uint256 quarterPrincipal,\\n uint256 quarterNumber,\\n uint256 quarterPower,\\n uint96 supplyPerQuarter\\n )\\n {\\n return (\\n protocolPerQuarter[_num].quarterPrincipal,\\n protocolPerQuarter[_num].quarterNumber,\\n protocolPerQuarter[_num].quarterPower,\\n protocolPerQuarter[_num].supplyPerQuarter\\n );\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n function _updateProtocolPrincipal(\\n address _strategy,\\n uint256 _capital,\\n bool _addOrSubstract\\n ) internal {\\n IStrategy strategy = IStrategy(_strategy);\\n ProtocolPerTimestamp storage protocolCheckpoint = protocolPerTimestamp[block.timestamp];\\n if (_addOrSubstract == false) {\\n // Substract\\n protocolPrincipal = protocolPrincipal.sub(_capital);\\n } else {\\n protocolPrincipal = protocolPrincipal.add(_capital);\\n }\\n protocolCheckpoint.principal = protocolPrincipal;\\n protocolCheckpoint.time = block.timestamp;\\n protocolCheckpoint.quarterBelonging = _getQuarter(block.timestamp);\\n protocolCheckpoint.timeListPointer = pid;\\n if (pid == 0) {\\n // The very first strategy of all strategies in the mining program\\n protocolCheckpoint.power = 0;\\n } else {\\n // Any other strategy different from the very first one (will have an antecesor)\\n protocolCheckpoint.power = protocolPerTimestamp[timeList[pid.sub(1)]].power.add(\\n protocolCheckpoint.time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time).mul(\\n protocolPerTimestamp[timeList[pid.sub(1)]].principal\\n )\\n );\\n }\\n timeList.push(block.timestamp); // Register of added strategies timestamps in the array for iteration\\n // Here we control the accumulated protocol power per each quarter\\n // Create the quarter checkpoint in case the checkpoint is the first in the epoch\\n _addProtocolPerQuarter(block.timestamp);\\n // We update the rewards overhead if any\\n _updatePowerOverhead(strategy, _capital);\\n pid++;\\n }\\n\\n function _getStrategyProfitsAndBABL(\\n address _garden,\\n address _strategy,\\n address _contributor\\n ) private view returns (uint256, uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n _require(address(strategy.garden()) == _garden, Errors.STRATEGY_GARDEN_MISMATCH);\\n uint256 contributorProfits = 0;\\n uint256 contributorBABL = 0;\\n // We get the state of the strategy in terms of profit and distance from expected to accurately calculate profits and rewards\\n (bool profit, uint256 profitValue, bool distance, uint256 distanceValue) =\\n _getStrategyRewardsContext(address(strategy));\\n\\n (, uint256 initialDepositAt, uint256 claimedAt, , , ) = IGarden(_garden).getContributor(_contributor);\\n // Positive strategies not yet claimed\\n if (\\n strategy.exitedAt() > claimedAt &&\\n strategy.executedAt() >= initialDepositAt &&\\n address(strategy.garden()) == _garden\\n ) {\\n uint256 contributorPower =\\n _getContributorPower(address(_garden), _contributor, strategy.executedAt(), strategy.exitedAt());\\n // If strategy returned money we give out the profits\\n if (profit == true) {\\n // We reserve 5% of profits for performance fees\\n profitValue = profitValue.sub(profitValue.multiplyDecimal(PROFIT_PROTOCOL_FEE));\\n }\\n // Get strategist rewards in case the contributor is also the strategist of the strategy\\n contributorBABL = contributorBABL.add(\\n _getStrategyStrategistBabl(\\n address(strategy),\\n _contributor,\\n profit,\\n profitValue,\\n distance,\\n distanceValue\\n )\\n );\\n\\n contributorProfits = contributorProfits.add(\\n _getStrategyStrategistProfits(address(strategy), _contributor, profit, profitValue)\\n );\\n\\n // Get steward rewards\\n contributorBABL = contributorBABL.add(\\n _getStrategyStewardBabl(address(strategy), _contributor, profit, profitValue, distance, distanceValue)\\n );\\n\\n contributorProfits = contributorProfits.add(\\n _getStrategyStewardProfits(\\n address(strategy),\\n _contributor,\\n profit,\\n profitValue,\\n distance,\\n distanceValue\\n )\\n );\\n\\n // Get LP rewards\\n\\n contributorBABL = contributorBABL.add(\\n uint256(strategy.strategyRewards()).multiplyDecimal(BABL_LP_SHARE).preciseMul(\\n contributorPower.preciseDiv(strategy.capitalAllocated())\\n )\\n );\\n\\n // Get a multiplier bonus in case the contributor is the garden creator\\n if (_contributor == IGarden(_garden).creator()) {\\n contributorBABL = contributorBABL.add(contributorBABL.multiplyDecimal(CREATOR_BONUS));\\n }\\n }\\n return (contributorProfits, contributorBABL);\\n }\\n\\n function _getStrategyRewardsContext(address _strategy)\\n private\\n view\\n returns (\\n bool,\\n uint256,\\n bool,\\n uint256\\n )\\n {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 returned = strategy.capitalReturned();\\n uint256 expected =\\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\\n uint256 allocated = strategy.capitalAllocated();\\n bool profit;\\n bool distance;\\n uint256 profitValue;\\n uint256 distanceValue;\\n if (returned > allocated && returned >= expected) {\\n // The strategy went equal or above expectations\\n profit = true; // positive\\n distance = true; // positive\\n profitValue = returned.sub(allocated);\\n distanceValue = returned.sub(expected);\\n } else if (returned >= allocated && returned < expected) {\\n // The strategy went worse than expected but with some profits\\n profit = true; // positive or zero profits\\n distance = false; // negative vs expected return (got less than expected)\\n profitValue = returned.sub(allocated);\\n distanceValue = expected.sub(returned);\\n } else if (returned < allocated && returned < expected) {\\n // Negative profits - bad investments has penalties\\n profit = false; // negative - loosing capital\\n distance = false; // negative vs expected return (got less than expected)\\n profitValue = allocated.sub(returned); // Negative number, there were no profits at all\\n distanceValue = expected.sub(returned);\\n }\\n\\n return (profit, profitValue, distance, distanceValue);\\n }\\n\\n function _getStrategyStewardBabl(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256, /* _profitValue */\\n bool _distance,\\n uint256 _distanceValue\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 strategyRewards = strategy.strategyRewards();\\n int256 userVotes = strategy.getUserVotes(_contributor);\\n uint256 bablCap;\\n uint256 expected =\\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\\n\\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\\n uint256 babl = 0;\\n if (userVotes > 0 && _profit == true && _distance == true) {\\n // Voting in favor of the execution of the strategy with profits and positive distance\\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\\n uint256(userVotes).preciseDiv(strategy.totalPositiveVotes())\\n );\\n } else if (userVotes > 0 && _profit == true && _distance == false) {\\n // Voting in favor positive profits but below expected return\\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\\n uint256(userVotes).preciseDiv(strategy.totalPositiveVotes())\\n );\\n babl = babl.sub(babl.preciseMul(_distanceValue.preciseDiv(expected))); // We discount the error of expected return vs real returns\\n } else if (userVotes > 0 && _profit == false) {\\n // Voting in favor of a non profitable strategy get nothing\\n babl = 0;\\n } else if (userVotes < 0 && _distance == false) {\\n // Voting against a strategy that got results below expected return provides rewards to the voter (helping the protocol to only have good strategies)\\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\\n uint256(Math.abs(userVotes)).preciseDiv(strategy.totalNegativeVotes())\\n );\\n\\n bablCap = babl.mul(2); // Max cap\\n babl = babl.add(babl.preciseMul(_distanceValue.preciseDiv(expected))); // We add a bonus inverse to the error of expected return vs real returns\\n\\n if (babl > bablCap) babl = bablCap; // We limit 2x by a Cap\\n } else if (userVotes < 0 && _distance == true) {\\n babl = 0;\\n }\\n return babl;\\n }\\n\\n function _getStrategyStewardProfits(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256 _profitValue,\\n bool _distance,\\n uint256 /* _distanceValue */\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\\n uint256 profits = 0;\\n int256 userVotes = strategy.getUserVotes(_contributor);\\n if (_profit == true) {\\n if (userVotes > 0) {\\n profits = _profitValue.multiplyDecimal(PROFIT_STEWARD_SHARE).preciseMul(uint256(userVotes)).preciseDiv(\\n strategy.totalPositiveVotes()\\n );\\n } else if ((userVotes < 0) && _distance == false) {\\n profits = _profitValue\\n .multiplyDecimal(PROFIT_STEWARD_SHARE)\\n .preciseMul(uint256(Math.abs(userVotes)))\\n .preciseDiv(strategy.totalNegativeVotes());\\n } else if ((userVotes < 0) && _distance == true) {\\n // Voted against a very profit strategy above expected returns, get no profit at all\\n profits = 0;\\n }\\n } else profits = 0; // No profits at all\\n\\n return profits;\\n }\\n\\n function _getStrategyStrategistBabl(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256, /* _profitValue */\\n bool _distance,\\n uint256 /* _distanceValue */\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 strategyRewards = strategy.strategyRewards();\\n uint256 babl;\\n uint256 bablCap;\\n uint256 expected =\\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\\n if (strategy.strategist() == _contributor) {\\n babl = strategyRewards.multiplyDecimal(BABL_STRATEGIST_SHARE); // Standard calculation to be ponderated\\n if (_profit == true && _distance == true) {\\n // Strategy with equal or higher profits than expected\\n bablCap = babl.mul(2); // Max cap\\n // The more the results are close to the expected the more bonus will get (limited by a x2 cap)\\n babl = babl.add(babl.preciseMul(expected.preciseDiv(strategy.capitalReturned())));\\n if (babl > bablCap) babl = bablCap; // We limit 2x by a Cap\\n } else if (_profit == true && _distance == false) {\\n //under expectations\\n // The more the results are close to the expected the less penalization it might have\\n babl = babl.sub(babl.sub(babl.preciseMul(strategy.capitalReturned().preciseDiv(expected))));\\n } else {\\n // No positive profit\\n return 0;\\n }\\n } else {\\n return 0;\\n }\\n\\n return babl;\\n }\\n\\n function _getStrategyStrategistProfits(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256 _profitValue\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\\n uint256 profits;\\n if (_profit == true) {\\n if (strategy.strategist() == _contributor) {\\n // If the contributor was the strategist of the strategy\\n profits = _profitValue.multiplyDecimal(PROFIT_STRATEGIST_SHARE);\\n }\\n } else profits = 0; // No profits at all\\n\\n return profits;\\n }\\n\\n function _addProtocolPerQuarter(uint256 _time) private onlyMiningActive {\\n ProtocolPerQuarter storage protocolCheckpoint = protocolPerQuarter[_getQuarter(_time)];\\n\\n if (!isProtocolPerQuarter[_getQuarter(_time).sub(1)]) {\\n // The quarter is not yet initialized then we create it\\n protocolCheckpoint.quarterNumber = _getQuarter(_time);\\n if (pid == 0) {\\n // The first strategy added in the first epoch\\n protocolCheckpoint.quarterPower = 0;\\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\\n } else {\\n // Each time a new epoch starts with either a new strategy execution or finalization\\n // We just take the proportional power for this quarter from previous checkpoint\\n uint256 powerToSplit =\\n protocolPerTimestamp[_time].power.sub(protocolPerTimestamp[timeList[pid.sub(1)]].power);\\n if (protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging == _getQuarter(_time).sub(1)) {\\n // There were no intermediate epochs without checkpoints\\n // We re-initialize the protocol power counting for this new quarter\\n protocolCheckpoint.quarterPower = powerToSplit\\n .mul(_time.sub(START_TIME.add(_getQuarter(_time).mul(EPOCH_DURATION).sub(EPOCH_DURATION))))\\n .div(_time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time));\\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\\n\\n protocolPerQuarter[_getQuarter(_time).sub(1)].quarterPower = protocolPerQuarter[\\n _getQuarter(_time).sub(1)\\n ]\\n .quarterPower\\n .add(powerToSplit.sub(protocolCheckpoint.quarterPower));\\n } else {\\n // There were intermediate epochs without checkpoints - we need to create their protocolPerQuarter's and update the last one\\n // We have to update all the quarters including where the previous checkpoint is and the one were we are now\\n for (\\n uint256 i = 0;\\n i <= _getQuarter(_time).sub(protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging);\\n i++\\n ) {\\n ProtocolPerQuarter storage newCheckpoint =\\n protocolPerQuarter[protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i)];\\n uint256 slotEnding =\\n START_TIME.add(\\n protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i).mul(EPOCH_DURATION)\\n );\\n if (i == 0) {\\n // We are in the first quarter to update, we add the corresponding part\\n\\n newCheckpoint.quarterPower = newCheckpoint.quarterPower.add(\\n powerToSplit.mul(slotEnding.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)).div(\\n _time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)\\n )\\n );\\n newCheckpoint.quarterPrincipal = protocolPerTimestamp[timeList[pid.sub(1)]].principal;\\n } else if (\\n i < _getQuarter(_time).sub(protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging)\\n ) {\\n // We are in an intermediate quarter\\n newCheckpoint.quarterPower = powerToSplit.mul(EPOCH_DURATION).div(\\n _time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)\\n );\\n newCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(\\n protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i)\\n );\\n newCheckpoint.quarterNumber = protocolPerTimestamp[timeList[pid.sub(1)]]\\n .quarterBelonging\\n .add(i);\\n newCheckpoint.quarterPrincipal = protocolPerTimestamp[timeList[pid.sub(1)]].principal;\\n } else {\\n // We are in the last quarter of the strategy\\n protocolCheckpoint.quarterPower = powerToSplit\\n .mul(\\n _time.sub(START_TIME.add(_getQuarter(_time).mul(EPOCH_DURATION).sub(EPOCH_DURATION)))\\n )\\n .div(_time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time));\\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\\n protocolCheckpoint.quarterNumber = _getQuarter(_time);\\n protocolCheckpoint.quarterPrincipal = protocolPrincipal;\\n }\\n }\\n }\\n }\\n isProtocolPerQuarter[_getQuarter(_time).sub(1)] = true;\\n } else {\\n // Quarter checkpoint already created, it must have been filled with general info\\n // We update the power of the quarter by adding the new difference between last quarter checkpoint and this checkpoint\\n protocolCheckpoint.quarterPower = protocolCheckpoint.quarterPower.add(\\n protocolPerTimestamp[_time].power.sub(protocolPerTimestamp[timeList[pid.sub(1)]].power)\\n );\\n }\\n protocolCheckpoint.quarterPrincipal = protocolPrincipal;\\n }\\n\\n function _updatePowerOverhead(IStrategy _strategy, uint256 _capital) private onlyMiningActive {\\n if (_strategy.updatedAt() != 0) {\\n // There will be overhead after the first execution not before\\n if (_getQuarter(block.timestamp) == _getQuarter(_strategy.updatedAt())) {\\n // The overhead will remain within the same epoch\\n rewardsPowerOverhead[address(_strategy)][_getQuarter(block.timestamp)] = rewardsPowerOverhead[\\n address(_strategy)\\n ][_getQuarter(block.timestamp)]\\n .add(_capital.mul(block.timestamp.sub(_strategy.updatedAt())));\\n } else {\\n // We need to iterate since last update of the strategy capital\\n (uint256 numQuarters, uint256 startingQuarter) =\\n _getRewardsWindow(_strategy.updatedAt(), block.timestamp);\\n uint256 overheadPerQuarter = _capital.mul(block.timestamp.sub(_strategy.updatedAt())).div(numQuarters);\\n for (uint256 i = 0; i <= numQuarters.sub(1); i++) {\\n rewardsPowerOverhead[address(_strategy)][startingQuarter.add(i)] = rewardsPowerOverhead[\\n address(_strategy)\\n ][startingQuarter.add(i)]\\n .add(overheadPerQuarter);\\n }\\n }\\n }\\n }\\n\\n function _getStrategyRewardsOneQuarter(address _strategy, uint256 _startingQuarter)\\n private\\n view\\n onlyMiningActive\\n returns (uint256)\\n {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 strategyOverTime =\\n strategy.capitalAllocated().mul(strategy.exitedAt().sub(strategy.executedAt())).sub(\\n strategy.rewardsTotalOverhead()\\n );\\n return\\n strategyOverTime\\n .preciseDiv(protocolPerQuarter[_startingQuarter].quarterPower)\\n .preciseMul(uint256(protocolPerQuarter[_startingQuarter].supplyPerQuarter))\\n .mul(strategy.exitedAt().sub(_startingQuarter))\\n .div(block.timestamp.sub(_startingQuarter));\\n }\\n\\n // Safe BABL transfer function, just in case if rounding error causes DistributorRewards to not have enough BABL.\\n function _safeBABLTransfer(address _to, uint96 _amount) private onlyMiningActive {\\n uint256 bablBal = babltoken.balanceOf(address(this));\\n if (_amount > bablBal) {\\n SafeERC20.safeTransfer(babltoken, _to, bablBal);\\n } else {\\n SafeERC20.safeTransfer(babltoken, _to, _amount);\\n }\\n }\\n\\n /**\\n * Gets the contributor power from one timestamp to the other\\n * @param _contributor Address if the contributor\\n * @param _from Initial timestamp\\n * @param _to End timestamp\\n * @return uint256 Contributor power during that period\\n */\\n\\n function _getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) private view returns (uint256) {\\n _require(_to >= IGarden(_garden).gardenInitializedAt() && _to >= _from, Errors.GET_CONTRIBUTOR_POWER);\\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][address(_contributor)];\\n Checkpoints memory powerCheckpoints = checkpoints[address(_garden)][address(_contributor)];\\n\\n if (contributor.initialDepositAt == 0 || contributor.initialDepositAt > _to) {\\n return 0;\\n } else {\\n if (_from <= IGarden(_garden).gardenInitializedAt()) {\\n // Avoid division by zero in case of _from parameter is not passed\\n _from = IGarden(_garden).gardenInitializedAt();\\n }\\n // Find closest point to _from and _to either contributor and garden checkpoints at their left\\n\\n (powerCheckpoints.fromDepositAt, powerCheckpoints.lastDepositAt) = _locateCheckpointsContributor(\\n _garden,\\n _contributor,\\n _from,\\n _to\\n );\\n (powerCheckpoints.gardenFromDepositAt, powerCheckpoints.gardenLastDepositAt) = _locateCheckpointsGarden(\\n _garden,\\n _from,\\n _to\\n );\\n\\n _require(\\n powerCheckpoints.fromDepositAt <= powerCheckpoints.lastDepositAt &&\\n powerCheckpoints.gardenFromDepositAt <= powerCheckpoints.gardenLastDepositAt,\\n Errors.GET_CONTRIBUTOR_POWER\\n );\\n uint256 contributorPower;\\n uint256 gardenPower;\\n\\n // \\\"FROM power calculations\\\" PART\\n // Avoid underflows\\n\\n if (_from < powerCheckpoints.fromDepositAt) {\\n // Contributor still has no power but _from is later than the start of the garden\\n contributorPower = 0;\\n } else if (_from > powerCheckpoints.fromDepositAt) {\\n contributorPower = contributor.tsContributions[powerCheckpoints.fromDepositAt].power.add(\\n (_from.sub(powerCheckpoints.fromDepositAt)).mul(\\n contributor.tsContributions[powerCheckpoints.fromDepositAt].principal\\n )\\n );\\n } else {\\n // _from == fromDepositAt\\n contributorPower = contributor.tsContributions[powerCheckpoints.fromDepositAt].power;\\n }\\n gardenPower = gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenFromDepositAt].power.add(\\n (_from.sub(powerCheckpoints.gardenFromDepositAt)).mul(\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenFromDepositAt].principal\\n )\\n );\\n // \\\"TO power calculations\\\" PART\\n // We go for accurate power calculations avoiding overflows\\n _require(contributorPower <= gardenPower, Errors.GET_CONTRIBUTOR_POWER);\\n if (_from == _to) {\\n // Requested a specific checkpoint calculation (no slot)\\n if (gardenPower == 0) {\\n return 0;\\n } else {\\n return contributorPower.preciseDiv(gardenPower);\\n }\\n // Not a checkpoint anymore but a slot\\n } else if (_to < powerCheckpoints.lastDepositAt) {\\n // contributor has not deposited yet\\n return 0;\\n } else if (\\n _to == powerCheckpoints.lastDepositAt &&\\n powerCheckpoints.fromDepositAt == powerCheckpoints.lastDepositAt\\n ) {\\n // no more contributor checkpoints in the slot\\n gardenPower = (\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].power.add(\\n (_to.sub(powerCheckpoints.gardenLastDepositAt)).mul(\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].principal\\n )\\n )\\n )\\n .sub(gardenPower);\\n _require(contributorPower <= gardenPower, Errors.GET_CONTRIBUTOR_POWER);\\n return contributorPower.preciseDiv(gardenPower);\\n } else {\\n contributorPower = (\\n contributor.tsContributions[powerCheckpoints.lastDepositAt].power.add(\\n (_to.sub(powerCheckpoints.lastDepositAt)).mul(\\n contributor.tsContributions[powerCheckpoints.lastDepositAt].principal\\n )\\n )\\n )\\n .sub(contributorPower);\\n\\n gardenPower = (\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].power.add(\\n (_to.sub(powerCheckpoints.gardenLastDepositAt)).mul(\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].principal\\n )\\n )\\n )\\n .sub(gardenPower);\\n _require(contributorPower <= gardenPower, Errors.GET_CONTRIBUTOR_POWER);\\n\\n return contributorPower.preciseDiv(gardenPower);\\n }\\n }\\n }\\n\\n function _locateCheckpointsContributor(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) private view returns (uint256, uint256) {\\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][address(_contributor)];\\n\\n uint256 lastDepositAt = contributor.timeListPointer[contributor.timeListPointer.length.sub(1)]; // Initialized with lastDeposit\\n uint256 fromDepositAt = contributor.timeListPointer[0]; // Initialized with initialDeposit\\n\\n if (lastDepositAt > _to || fromDepositAt < _from) {\\n // We go to find the closest deposits of the contributor to _from and _to\\n for (uint256 i = 0; i <= contributor.timeListPointer.length.sub(1); i++) {\\n if (contributor.timeListPointer[i] <= _to) {\\n lastDepositAt = contributor.timeListPointer[i];\\n }\\n if (contributor.timeListPointer[i] <= _from) {\\n fromDepositAt = contributor.timeListPointer[i];\\n }\\n }\\n }\\n return (fromDepositAt, lastDepositAt);\\n }\\n\\n function _locateCheckpointsGarden(\\n address _garden,\\n uint256 _from,\\n uint256 _to\\n ) private view returns (uint256, uint256) {\\n uint256 gardenLastCheckpoint = gardenTimelist[address(_garden)].length.sub(1);\\n uint256 gardenLastDepositAt = gardenTimelist[address(_garden)][gardenLastCheckpoint]; // Initialized to the last garden checkpoint\\n uint256 gardenFromDepositAt = gardenTimelist[address(_garden)][0]; // Initialized to the first garden checkpoint\\n\\n if (gardenLastDepositAt > _to || gardenFromDepositAt < _from) {\\n // We go for the closest timestamp of garden to _to and _from\\n for (uint256 i = 0; i <= gardenLastCheckpoint; i++) {\\n uint256 gardenTime = gardenTimelist[address(_garden)][i];\\n if (gardenTime <= _to) {\\n gardenLastDepositAt = gardenTime;\\n }\\n if (gardenTime <= _from) {\\n gardenFromDepositAt = gardenTime;\\n }\\n }\\n }\\n return (gardenFromDepositAt, gardenLastDepositAt);\\n }\\n\\n /**\\n * Function that keeps checkpoints of the garden power (deposits and withdrawals) per timestamp\\n */\\n function _updateGardenPower(address _garden) private {\\n IGarden garden = IGarden(_garden);\\n GardenPowerByTimestamp storage gardenTimestamp = gardenPowerByTimestamp[address(garden)][block.timestamp];\\n gardenTimestamp.principal = IERC20(address(IGarden(_garden))).totalSupply();\\n\\n gardenTimestamp.timestamp = block.timestamp;\\n\\n if (gardenPid[address(_garden)] == 0) {\\n // The very first deposit of all contributors in the mining program\\n gardenTimestamp.power = 0;\\n } else {\\n // Any other deposit different from the very first one (will have an antecesor)\\n gardenTimestamp.power = gardenPowerByTimestamp[address(garden)][\\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\\n ]\\n .power\\n .add(\\n gardenTimestamp\\n .timestamp\\n .sub(\\n gardenPowerByTimestamp[address(garden)][\\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\\n ]\\n .timestamp\\n )\\n .mul(\\n gardenPowerByTimestamp[address(garden)][\\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\\n ]\\n .principal\\n )\\n );\\n }\\n\\n gardenTimelist[address(garden)].push(block.timestamp); // Register of deposit timestamps in the array for iteration\\n gardenPid[address(garden)]++;\\n }\\n\\n /**\\n * Updates contributor timestamps params\\n */\\n function _setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw\\n ) private {\\n // We make checkpoints around contributor deposits to avoid fast loans and give the right rewards afterwards\\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][_contributor];\\n\\n contributor.tsContributions[block.timestamp].principal = IERC20(address(IGarden(_garden))).balanceOf(\\n address(_contributor)\\n );\\n\\n contributor.tsContributions[block.timestamp].timestamp = block.timestamp;\\n\\n contributor.tsContributions[block.timestamp].timePointer = contributor.pid;\\n\\n if (contributor.pid == 0) {\\n // The very first deposit\\n contributor.tsContributions[block.timestamp].power = 0;\\n } else {\\n // Any other deposits or withdrawals different from the very first one (will have an antecesor)\\n contributor.tsContributions[block.timestamp].power = contributor.tsContributions[contributor.lastDepositAt]\\n .power\\n .add(\\n (block.timestamp.sub(contributor.lastDepositAt)).mul(\\n contributor.tsContributions[contributor.lastDepositAt].principal\\n )\\n );\\n }\\n if (_depositOrWithdraw == true) {\\n // Deposit\\n if (_previousBalance == 0 || contributor.initialDepositAt == 0) {\\n contributor.initialDepositAt = block.timestamp;\\n }\\n contributor.lastDepositAt = block.timestamp;\\n } else {\\n // Withdrawals\\n if (IERC20(address(IGarden(_garden))).balanceOf(address(_contributor)) == 0) {\\n contributor.lastDepositAt = 0;\\n contributor.initialDepositAt = 0;\\n delete contributor.timeListPointer;\\n }\\n }\\n\\n contributor.timeListPointer.push(block.timestamp);\\n contributor.pid++;\\n }\\n\\n function _tokenSupplyPerQuarter(uint256 quarter) internal pure returns (uint96) {\\n _require(quarter >= 1, Errors.QUARTERS_MIN_1);\\n if (quarter >= 513) {\\n return 0;\\n } else {\\n uint256 firstFactor = (SafeDecimalMath.unit().add(DECAY_RATE)).powDecimal(quarter.sub(1));\\n uint256 supplyForQuarter = Q1_REWARDS.divideDecimal(firstFactor);\\n return Safe3296.safe96(supplyForQuarter, 'overflow 96 bits');\\n }\\n }\\n\\n function _getQuarter(uint256 _now) internal view returns (uint256) {\\n uint256 quarter = (_now.sub(START_TIME).preciseDivCeil(EPOCH_DURATION)).div(1e18);\\n return quarter.add(1);\\n }\\n\\n function _getRewardsWindow(uint256 _from, uint256 _to) internal view returns (uint256, uint256) {\\n uint256 quarters = (_to.sub(_from).preciseDivCeil(EPOCH_DURATION)).div(1e18);\\n uint256 startingQuarter = (_from.sub(START_TIME).preciseDivCeil(EPOCH_DURATION)).div(1e18);\\n return (quarters.add(1), startingQuarter.add(1));\\n }\\n}\\n\",\"keccak256\":\"0xdc467d640df88763a8c4eefbdb54b636673a9f663751902bd9517152f855b001\",\"license\":\"Apache License\"},\"contracts/token/TimeLockRegistry.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\nimport {TimeLockedToken} from './TimeLockedToken.sol';\\n\\n/**\\n * @title TimeLockRegistry\\n * @notice Register Lockups for TimeLocked ERC20 Token BABL (e.g. vesting)\\n * @author Babylon Finance\\n * @dev This contract allows owner to register distributions for a TimeLockedToken\\n *\\n * To register a distribution, register method should be called by the owner.\\n * claim() should be called only by the BABL Token smartcontract (modifier onlyBABLToken)\\n * when any account registered to receive tokens make its own claim\\n * If case of a mistake, owner can cancel registration before the claim is done by the account\\n *\\n * Note this contract address must be setup in the TimeLockedToken's contract pointing\\n * to interact with (e.g. setTimeLockRegistry() function)\\n */\\n\\ncontract TimeLockRegistry is Ownable {\\n using SafeMath for uint256;\\n using Address for address;\\n\\n /* ============ Events ============ */\\n\\n event Register(address receiver, uint256 distribution);\\n event Cancel(address receiver, uint256 distribution);\\n event Claim(address account, uint256 distribution);\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlyBABLToken() {\\n require(msg.sender == address(token), 'only BABL Token');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // time locked token\\n TimeLockedToken public token;\\n\\n /// @notice The profile of each token owner under vesting conditions and its special conditions\\n /**\\n * @param team Indicates whether or not is a Team member (true = team member / advisor, false = private investor)\\n * @param vestingBegin When the vesting begins for such token owner\\n * @param vestingEnd When the vesting ends for such token owner\\n * @param lastClaim When the last claim was done\\n */\\n struct TokenVested {\\n bool team;\\n bool cliff;\\n uint256 vestingBegin;\\n uint256 vestingEnd;\\n uint256 lastClaim;\\n }\\n\\n /// @notice A record of token owners under vesting conditions for each account, by index\\n mapping(address => TokenVested) public tokenVested;\\n\\n // mapping from token owners under vesting conditions to BABL due amount (e.g. SAFT addresses, team members, advisors)\\n mapping(address => uint256) public registeredDistributions;\\n\\n // vesting for Team Members\\n uint256 private teamVesting = 365 days * 4;\\n\\n // vesting for Investors and Advisors\\n uint256 private investorVesting = 365 days * 3;\\n\\n /* ============ Functions ============ */\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * @notice Construct a new Time Lock Registry and gives ownership to sender\\n * @param _token TimeLockedToken contract to use in this registry\\n */\\n constructor(TimeLockedToken _token) {\\n token = _token;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /* =========== Token related Gov Functions ====== */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Register new account under vesting conditions (Team, Advisors, Investors e.g. SAFT purchaser)\\n *\\n * @notice Register new account under vesting conditions (Team, Advisors, Investors e.g. SAFT purchaser)\\n * @param receiver Address belonging vesting conditions\\n * @param distribution Tokens amount that receiver is due to get\\n * @return Whether or not the registration succeeded\\n */\\n function register(\\n address receiver,\\n uint256 distribution,\\n bool investorType,\\n uint256 vestingStartingDate\\n ) external onlyOwner returns (bool) {\\n require(receiver != address(0), 'TimeLockRegistry::register: cannot register the zero address');\\n require(\\n receiver != address(this),\\n 'TimeLockRegistry::register: Time Lock Registry contract cannot be an investor'\\n );\\n require(distribution != 0, 'TimeLockRegistry::register: Distribution = 0');\\n require(\\n registeredDistributions[receiver] == 0,\\n 'TimeLockRegistry::register:Distribution for this address is already registered'\\n );\\n require(block.timestamp >= 1614553200, 'Cannot register earlier than March 2021'); // 1614553200 is UNIX TIME of 2021 March the 1st\\n\\n // register distribution\\n registeredDistributions[receiver] = distribution;\\n\\n // register token vested conditions\\n TokenVested storage newTokenVested = tokenVested[receiver];\\n newTokenVested.team = investorType;\\n newTokenVested.vestingBegin = vestingStartingDate;\\n\\n if (newTokenVested.team == true) {\\n newTokenVested.vestingEnd = vestingStartingDate.add(teamVesting);\\n } else {\\n newTokenVested.vestingEnd = vestingStartingDate.add(investorVesting);\\n }\\n newTokenVested.lastClaim = vestingStartingDate;\\n\\n tokenVested[receiver] = newTokenVested;\\n // TODO CHECK IF ALLOWANCE AS OF TODAY IS THE FINAL MODEL\\n // IN CASE OF A DIRECT MINT TO TIME LOCK REGISTRY ADDRESS THE TOKEN TRANSFER MIGHT BE UPDATED\\n // transfer tokens from owner who might have enough allowance of tokens by BABL Token owner\\n SafeERC20.safeTransferFrom(token, msg.sender, address(this), distribution);\\n\\n // emit register event\\n emit Register(receiver, distribution);\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel distribution registration in case of mistake and before a claim is done\\n *\\n * @notice Cancel distribution registration\\n * @dev A claim has not to be done earlier\\n * @param receiver Address that should have it's distribution removed\\n * @return Whether or not it succeeded\\n */\\n function cancelRegistration(address receiver) external onlyOwner returns (bool) {\\n require(registeredDistributions[receiver] != 0, 'Not registered');\\n\\n // get amount from distributions\\n uint256 amount = registeredDistributions[receiver];\\n\\n // set distribution mapping to 0\\n delete registeredDistributions[receiver];\\n\\n // set tokenVested mapping to 0\\n delete tokenVested[receiver];\\n\\n // TODO CHECK THE PROCESS ADDRESS(THIS) VS. OWNER\\n // transfer tokens back to owner\\n SafeERC20.safeTransfer(token, msg.sender, amount);\\n\\n // emit cancel event\\n emit Cancel(receiver, amount);\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel distribution registration in case of mistake and before a claim is done\\n *\\n * @notice Cancel already delivered tokens. It might only apply when non-completion of vesting period of Team members or Advisors\\n * @dev An automatic override allowance is granted during the claim process\\n * @param account Address that should have it's distribution removed\\n * @return Whether or not it succeeded\\n */\\n function cancelDeliveredTokens(address account) external onlyOwner returns (bool) {\\n uint256 loosingAmount = token.cancelVestedTokens(account);\\n\\n // emit cancel event\\n emit Cancel(account, loosingAmount);\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Recover tokens in Time Lock Registry smartcontract address by the owner\\n *\\n * @notice Send tokens from smartcontract address to the owner.\\n * It might only apply after a cancellation of vested tokens\\n * @param amount Amount to be recovered by the owner of the Time Lock Registry smartcontract from its balance\\n * @return Whether or not it succeeded\\n */\\n function transferToOwner(uint256 amount) external onlyOwner returns (bool) {\\n SafeERC20.safeTransfer(token, msg.sender, amount);\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Claim locked tokens by the registered account\\n *\\n * @notice Claim tokens due amount.\\n * @dev Claim is done by the user in the TimeLocked contract and the contract is the only allowed to call\\n * this function on behalf of the user to make the claim\\n * @return The amount of tokens registered and delivered after the claim\\n */\\n function claim(address _receiver) external onlyBABLToken returns (uint256) {\\n require(registeredDistributions[_receiver] != 0, 'Not registered');\\n\\n // get amount from distributions\\n uint256 amount = registeredDistributions[_receiver];\\n tokenVested[_receiver].lastClaim = block.timestamp;\\n\\n // set distribution mapping to 0\\n delete registeredDistributions[_receiver];\\n\\n // register lockup in TimeLockedToken\\n\\n // this will transfer funds from this contract and lock them for sender\\n token.registerLockup(\\n _receiver,\\n amount,\\n tokenVested[_receiver].team,\\n tokenVested[_receiver].vestingBegin,\\n tokenVested[_receiver].vestingEnd,\\n tokenVested[_receiver].lastClaim\\n );\\n\\n // set tokenVested mapping to 0\\n delete tokenVested[_receiver];\\n\\n // emit claim event\\n emit Claim(_receiver, amount);\\n\\n return amount;\\n }\\n\\n /* ============ Getter Functions ============ */\\n\\n function checkVesting(address address_)\\n external\\n view\\n returns (\\n bool team,\\n uint256 start,\\n uint256 end,\\n uint256 last\\n )\\n {\\n return (\\n tokenVested[address_].team,\\n tokenVested[address_].vestingBegin,\\n tokenVested[address_].vestingEnd,\\n tokenVested[address_].lastClaim\\n );\\n }\\n\\n function checkRegisteredDistribution(address address_) external view returns (uint256 amount) {\\n return registeredDistributions[address_];\\n }\\n}\\n\",\"keccak256\":\"0x97084d9e4d2804b0234c06e6e9e07343477d726ca8af07f2e3d91fba2ccbda76\",\"license\":\"Apache License\"},\"contracts/token/TimeLockedToken.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {TimeLockRegistry} from './TimeLockRegistry.sol';\\nimport {RewardsDistributor} from './RewardsDistributor.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {VoteToken} from './VoteToken.sol';\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {Errors, _require} from '../lib/BabylonErrors.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\n\\n/**\\n * @title TimeLockedToken\\n * @notice Time Locked ERC20 Token\\n * @author Babylon Finance\\n * @dev Contract which gives the ability to time-lock tokens specially for vesting purposes usage\\n *\\n * By overriding the balanceOf() and transfer() functions in ERC20,\\n * an account can show its full, post-distribution balance and use it for voting power\\n * but only transfer or spend up to an allowed amount\\n *\\n * A portion of previously non-spendable tokens are allowed to be transferred\\n * along the time depending on each vesting conditions, and after all epochs have passed, the full\\n * account balance is unlocked. In case on non-completion vesting period, only the Time Lock Registry can cancel\\n * the delivery of the pending tokens and only can cancel the remaining locked ones.\\n */\\n\\nabstract contract TimeLockedToken is VoteToken {\\n using SafeMath for uint256;\\n\\n /* ============ Events ============ */\\n\\n /// @notice An event that emitted when a new lockout ocurr\\n event NewLockout(\\n address account,\\n uint256 tokenslocked,\\n bool isTeamOrAdvisor,\\n uint256 startingVesting,\\n uint256 endingVesting\\n );\\n\\n /// @notice An event that emitted when a new Time Lock is registered\\n event NewTimeLockRegistration(address previousAddress, address newAddress);\\n\\n /// @notice An event that emitted when a new Rewards Distributor is registered\\n event NewRewardsDistributorRegistration(address previousAddress, address newAddress);\\n\\n /// @notice An event that emitted when a cancellation of Lock tokens is registered\\n event Cancel(address account, uint256 amount);\\n\\n /// @notice An event that emitted when a claim of tokens are registered\\n event Claim(address _receiver, uint256 amount);\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlyTimeLockRegistry() {\\n require(\\n msg.sender == address(timeLockRegistry),\\n 'TimeLockedToken:: onlyTimeLockRegistry: can only be executed by TimeLockRegistry'\\n );\\n _;\\n }\\n\\n modifier onlyTimeLockOwner() {\\n if (address(timeLockRegistry) != address(0)) {\\n require(\\n msg.sender == Ownable(timeLockRegistry).owner(),\\n 'TimeLockedToken:: onlyTimeLockOwner: can only be executed by the owner of TimeLockRegistry'\\n );\\n }\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // represents total distribution for locked balances\\n mapping(address => uint256) distribution;\\n\\n /// @notice The profile of each token owner under its particular vesting conditions\\n /**\\n * @param team Indicates whether or not is a Team member or Advisor (true = team member/advisor, false = private investor)\\n * @param vestingBegin When the vesting begins for such token owner\\n * @param vestingEnd When the vesting ends for such token owner\\n * @param lastClaim When the last claim was done\\n */\\n struct VestedToken {\\n bool teamOrAdvisor;\\n uint256 vestingBegin;\\n uint256 vestingEnd;\\n uint256 lastClaim;\\n }\\n\\n /// @notice A record of token owners under vesting conditions for each account, by index\\n mapping(address => VestedToken) public vestedToken;\\n\\n // vesting Cliff for Team Members and Advisors\\n uint256 private vestingCliff = 365 days;\\n\\n // vesting duration for Team Members and Advisors\\n uint256 private teamVesting = 365 days * 4;\\n\\n // vesting duration for Investors\\n uint256 private investorVesting = 365 days * 3;\\n\\n // address of Time Lock Registry contract\\n IBabController public controller;\\n\\n // address of Time Lock Registry contract\\n TimeLockRegistry public timeLockRegistry;\\n\\n // address of Rewards Distriburor contract\\n RewardsDistributor public rewardsDistributor;\\n\\n // Enable Transfer of ERC20 BABL Tokens\\n // Only Minting or transfers from/to TimeLockRegistry and Rewards Distributor can transfer tokens until the protocol is fully decentralized\\n bool private tokenTransfersEnabled;\\n bool private tokenTransfersWereDisabled;\\n\\n /* ============ Functions ============ */\\n\\n /* ============ Constructor ============ */\\n\\n constructor(string memory _name, string memory _symbol) VoteToken(_name, _symbol) {\\n tokenTransfersEnabled = true;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /* =========== Token related Gov Functions ====== */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Disables transfers of ERC20 BABL Tokens\\n */\\n function disableTokensTransfers() external onlyOwner {\\n require(!tokenTransfersWereDisabled, 'BABL must flow');\\n tokenTransfersEnabled = false;\\n tokenTransfersWereDisabled = true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows transfers of ERC20 BABL Tokens\\n * Can only happen after the protocol is fully decentralized.\\n */\\n function enableTokensTransfers() external onlyOwner {\\n tokenTransfersEnabled = true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Set the Time Lock Registry contract to control token vesting conditions\\n *\\n * @notice Set the Time Lock Registry contract to control token vesting conditions\\n * @param newTimeLockRegistry Address of TimeLockRegistry contract\\n */\\n function setTimeLockRegistry(TimeLockRegistry newTimeLockRegistry) external onlyTimeLockOwner returns (bool) {\\n require(address(newTimeLockRegistry) != address(0), 'cannot be zero address');\\n require(address(newTimeLockRegistry) != address(this), 'cannot be this contract');\\n require(address(newTimeLockRegistry) != address(timeLockRegistry), 'must be new TimeLockRegistry');\\n emit NewTimeLockRegistration(address(timeLockRegistry), address(newTimeLockRegistry));\\n\\n timeLockRegistry = newTimeLockRegistry;\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Set the Rewards Distributor contract to control either BABL Mining or profit rewards\\n *\\n * @notice Set the Rewards Distriburor contract to control both types of rewards (profit and BABL Mining program)\\n * @param newRewardsDistributor Address of Rewards Distributor contract\\n */\\n function setRewardsDistributor(RewardsDistributor newRewardsDistributor) external onlyOwner returns (bool) {\\n require(address(newRewardsDistributor) != address(0), 'cannot be zero address');\\n require(address(newRewardsDistributor) != address(this), 'cannot be this contract');\\n require(address(newRewardsDistributor) != address(rewardsDistributor), 'must be new Rewards Distributor');\\n emit NewRewardsDistributorRegistration(address(rewardsDistributor), address(newRewardsDistributor));\\n\\n rewardsDistributor = newRewardsDistributor;\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Register new token lockup conditions for vested tokens defined only by Time Lock Registry\\n *\\n * @notice Tokens are completely delivered during the registration however lockup conditions apply for vested tokens\\n * locking them according to the distribution epoch periods and the type of recipient (Team, Advisor, Investor)\\n * Emits a transfer event showing a transfer to the recipient\\n * Only the registry can call this function\\n * @param _receiver Address to receive the tokens\\n * @param _amount Tokens to be transferred\\n * @param _profile True if is a Team Member or Advisor\\n * @param _vestingBegin Unix Time when the vesting for that particular address\\n * @param _vestingEnd Unix Time when the vesting for that particular address\\n * @param _lastClaim Unix Time when the claim was done from that particular address\\n *\\n */\\n function registerLockup(\\n address _receiver,\\n uint256 _amount,\\n bool _profile,\\n uint256 _vestingBegin,\\n uint256 _vestingEnd,\\n uint256 _lastClaim\\n ) external onlyTimeLockRegistry returns (bool) {\\n require(balanceOf(msg.sender) >= _amount, 'insufficient balance');\\n require(_receiver != address(0), 'cannot be zero address');\\n require(_receiver != address(this), 'cannot be this contract');\\n require(_receiver != address(timeLockRegistry), 'cannot be the TimeLockRegistry contract itself');\\n require(_receiver != msg.sender, 'the owner cannot lockup itself');\\n\\n // update amount of locked distribution\\n distribution[_receiver] = distribution[_receiver].add(_amount);\\n\\n VestedToken storage newVestedToken = vestedToken[_receiver];\\n\\n newVestedToken.teamOrAdvisor = _profile;\\n newVestedToken.vestingBegin = _vestingBegin;\\n newVestedToken.vestingEnd = _vestingEnd;\\n newVestedToken.lastClaim = _lastClaim;\\n\\n // transfer tokens to the recipient\\n _transfer(msg.sender, _receiver, _amount);\\n emit NewLockout(_receiver, _amount, _profile, _vestingBegin, _vestingEnd);\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel and remove locked tokens due to non-completion of vesting period\\n * applied only by Time Lock Registry and specifically to Team or Advisors as it does not apply to investors.\\n *\\n * @dev Cancel distribution registration\\n * @param lockedAccount that should have its still locked distribution removed due to non-completion of its vesting period\\n */\\n function cancelVestedTokens(address lockedAccount) external onlyTimeLockRegistry returns (uint256) {\\n return _cancelVestedTokensFromTimeLock(lockedAccount);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Each token owner can claim its own specific tokens with its own specific vesting conditions from the Time Lock Registry\\n *\\n * @dev Claim msg.sender tokens (if any available in the registry)\\n */\\n function claimMyTokens() external {\\n // claim msg.sender tokens from timeLockRegistry\\n uint256 amount = timeLockRegistry.claim(msg.sender);\\n // After a proper claim, locked tokens of Team and Advisors profiles are under restricted special vesting conditions so they automatic grant\\n // rights to the Time Lock Registry to only retire locked tokens if non-compliance vesting conditions take places along the vesting periods.\\n // It does not apply to Investors under vesting (their locked tokens cannot be removed).\\n if (vestedToken[msg.sender].teamOrAdvisor == true) {\\n approve(address(timeLockRegistry), amount);\\n }\\n // emit claim event\\n emit Claim(msg.sender, amount);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Get unlocked balance for an account\\n *\\n * @notice Get unlocked balance for an account\\n * @param account Account to check\\n * @return Amount that is unlocked and available eg. to transfer\\n */\\n function unlockedBalance(address account) public returns (uint256) {\\n // totalBalance - lockedBalance\\n return balanceOf(account).sub(lockedBalance(account));\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. View the locked balance for an account\\n *\\n * @notice View locked balance for an account\\n * @param account Account to check\\n * @return Amount locked in the time of checking\\n */\\n\\n function viewLockedBalance(address account) public view returns (uint256) {\\n // distribution of locked tokens\\n // get amount from distributions\\n\\n uint256 amount = distribution[account];\\n uint256 lockedAmount = amount;\\n\\n // Team and investors cannot transfer tokens in the first year\\n if (vestedToken[account].vestingBegin.add(365 days) > block.timestamp) {\\n return lockedAmount;\\n }\\n\\n // in case of vesting has passed, all tokens are now available\\n if (block.timestamp >= vestedToken[account].vestingEnd) {\\n lockedAmount = 0;\\n } else {\\n // in case of still under vesting period, locked tokens are recalculated\\n lockedAmount = amount.mul(vestedToken[account].vestingEnd - block.timestamp).div(\\n vestedToken[account].vestingEnd - vestedToken[account].vestingBegin\\n );\\n }\\n return lockedAmount;\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Get locked balance for an account\\n *\\n * @notice Get locked balance for an account\\n * @param account Account to check\\n * @return Amount locked in the time of checking\\n */\\n function lockedBalance(address account) public returns (uint256) {\\n // get amount from distributions locked tokens (if any)\\n\\n uint256 lockedAmount = viewLockedBalance(account);\\n\\n // in case of vesting has passed, all tokens are now available so we set mapping to 0\\n if (block.timestamp >= vestedToken[account].vestingEnd && msg.sender == account && lockedAmount == 0) {\\n delete distribution[account];\\n } else if (msg.sender == account) {\\n vestedToken[msg.sender].lastClaim = block.timestamp;\\n }\\n return lockedAmount;\\n }\\n\\n /**\\n * PUBLIC FUNCTION. Get the address of Time Lock Registry\\n *\\n * @notice Get the address of Time Lock Registry\\n * @return Address of the Time Lock Registry\\n */\\n function getTimeLockRegistry() external view returns (address) {\\n return address(timeLockRegistry);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the Approval of allowances of ERC20 with special conditions for vesting\\n *\\n * @notice Override of \\\"Approve\\\" function to allow the `spender` to transfer up to `amount` from `src`\\n * @dev This will overwrite the approval amount for `spender` except in the case of spender is Time Lock Registry\\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\\n * @param spender The address of the account which may transfer tokens\\n * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\\n * @return Whether or not the approval succeeded\\n */\\n function approve(address spender, uint256 rawAmount) public override nonReentrant returns (bool) {\\n require(spender != address(0), 'TimeLockedToken::approve: spender cannot be zero address');\\n require(spender != msg.sender, 'TimeLockedToken::approve: spender cannot be the msg.sender');\\n\\n uint96 amount;\\n if (rawAmount == uint256(-1)) {\\n amount = uint96(-1);\\n } else {\\n amount = safe96(rawAmount, 'TimeLockedToken::approve: amount exceeds 96 bits');\\n }\\n\\n // There is no option to decreaseAllowance to timeLockRegistry in case of vested tokens\\n if ((spender == address(timeLockRegistry)) && (amount < allowance(msg.sender, address(timeLockRegistry)))) {\\n amount = safe96(\\n allowance(msg.sender, address(timeLockRegistry)),\\n 'TimeLockedToken::approve: cannot decrease allowance to timelockregistry'\\n );\\n }\\n _approve(msg.sender, spender, amount);\\n emit Approval(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the Increase of allowances of ERC20 with special conditions for vesting\\n *\\n * @notice Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * @dev This is an override with respect to the fulfillment of vesting conditions along the way\\n * However an user can increase allowance many times, it will never be able to transfer locked tokens during vesting period\\n * @return Whether or not the increaseAllowance succeeded\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public override nonReentrant returns (bool) {\\n require(\\n unlockedBalance(msg.sender) >= addedValue,\\n 'TimeLockedToken::increaseAllowance:Not enough unlocked tokens'\\n );\\n require(spender != address(0), 'TimeLockedToken::increaseAllowance:Spender cannot be zero address');\\n require(spender != msg.sender, 'TimeLockedToken::increaseAllowance:Spender cannot be the msg.sender');\\n _approve(msg.sender, spender, allowance(msg.sender, spender).add(addedValue));\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the decrease of allowances of ERC20 with special conditions for vesting\\n *\\n * @notice Atomically decrease the allowance granted to `spender` by the caller.\\n *\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n * This is an override with respect to the fulfillment of vesting conditions along the way\\n * An user cannot decrease the allowance to the Time Lock Registry who is in charge of vesting conditions\\n * @return Whether or not the decreaseAllowance succeeded\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public override nonReentrant returns (bool) {\\n require(spender != address(0), 'TimeLockedToken::decreaseAllowance:Spender cannot be zero address');\\n require(spender != msg.sender, 'TimeLockedToken::decreaseAllowance:Spender cannot be the msg.sender');\\n require(\\n allowance(msg.sender, spender) >= subtractedValue,\\n 'TimeLockedToken::decreaseAllowance:Underflow condition'\\n );\\n\\n // There is no option to decreaseAllowance to timeLockRegistry in case of vested tokens\\n require(\\n address(spender) != address(timeLockRegistry),\\n 'TimeLockedToken::decreaseAllowance:cannot decrease allowance to timeLockRegistry'\\n );\\n\\n _approve(\\n msg.sender,\\n spender,\\n allowance(msg.sender, spender).sub(subtractedValue, 'ERC20: decreased allowance below zero')\\n );\\n return true;\\n }\\n\\n /* ============ Internal Only Function ============ */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the _transfer of ERC20 BABL tokens only allowing the transfer of unlocked tokens\\n *\\n * @dev Transfer function which includes only unlocked tokens\\n * Locked tokens can always be transfered back to the returns address\\n * Transferring to owner allows re-issuance of funds through registry\\n *\\n * @param _from The address to send tokens from\\n * @param _to The address that will receive the tokens\\n * @param _value The amount of tokens to be transferred\\n */\\n function _transfer(\\n address _from,\\n address _to,\\n uint256 _value\\n ) internal override {\\n require(_from != address(0), 'TimeLockedToken:: _transfer: cannot transfer from the zero address');\\n require(_to != address(0), 'TimeLockedToken:: _transfer: cannot transfer to the zero address');\\n require(\\n _to != address(this),\\n 'TimeLockedToken:: _transfer: do not transfer tokens to the token contract itself'\\n );\\n\\n require(balanceOf(_from) >= _value, 'TimeLockedToken:: _transfer: insufficient balance');\\n\\n // check if enough unlocked balance to transfer\\n require(unlockedBalance(_from) >= _value, 'TimeLockedToken:: _transfer: attempting to transfer locked funds');\\n super._transfer(_from, _to, _value);\\n // voting power\\n _moveDelegates(\\n delegates[_from],\\n delegates[_to],\\n safe96(_value, 'TimeLockedToken:: _transfer: uint96 overflow')\\n );\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Disable BABL token transfer until certain conditions are met\\n *\\n * @dev Override the _beforeTokenTransfer of ERC20 BABL tokens until certain conditions are met:\\n * Only allowing minting or transfers from Time Lock Registry and Rewards Distributor until transfers are allowed in the controller\\n * Transferring to owner allows re-issuance of funds through registry\\n *\\n * @param _from The address to send tokens from\\n * @param _to The address that will receive the tokens\\n * @param _value The amount of tokens to be transferred\\n */\\n\\n // Disable garden token transfers. Allow minting and burning.\\n function _beforeTokenTransfer(\\n address _from,\\n address _to,\\n uint256 _value\\n ) internal virtual override {\\n super._beforeTokenTransfer(_from, _to, _value);\\n _require(\\n _from == address(0) ||\\n _from == address(timeLockRegistry) ||\\n _from == address(rewardsDistributor) ||\\n _to == address(timeLockRegistry) ||\\n tokenTransfersEnabled,\\n Errors.BABL_TRANSFERS_DISABLED\\n );\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel and remove locked tokens due to non-completion of vesting period\\n * applied only by Time Lock Registry and specifically to Team or Advisors\\n *\\n * @dev Cancel distribution registration\\n * @param lockedAccount that should have its still locked distribution removed due to non-completion of its vesting period\\n */\\n function _cancelVestedTokensFromTimeLock(address lockedAccount) internal onlyTimeLockRegistry returns (uint256) {\\n require(distribution[lockedAccount] != 0, 'TimeLockedToken::cancelTokens:Not registered');\\n\\n // get an update on locked amount from distributions at this precise moment\\n uint256 loosingAmount = lockedBalance(lockedAccount);\\n\\n require(loosingAmount > 0, 'TimeLockedToken::cancelTokens:There are no more locked tokens');\\n require(\\n vestedToken[lockedAccount].teamOrAdvisor == true,\\n 'TimeLockedToken::cancelTokens:cannot cancel locked tokens to Investors'\\n );\\n\\n // set distribution mapping to 0\\n delete distribution[lockedAccount];\\n\\n // set tokenVested mapping to 0\\n delete vestedToken[lockedAccount];\\n\\n // transfer only locked tokens back to TimeLockRegistry Owner (msg.sender)\\n require(\\n transferFrom(lockedAccount, address(timeLockRegistry), loosingAmount),\\n 'TimeLockedToken::cancelTokens:Transfer failed'\\n );\\n\\n // emit cancel event\\n emit Cancel(lockedAccount, loosingAmount);\\n\\n return loosingAmount;\\n }\\n}\\n\",\"keccak256\":\"0x2a828aee1f8f7ef1a0b5e982ecca7c92ea79c09a8073777f8bd1096ed0e14ea3\",\"license\":\"Apache License\"},\"contracts/token/VoteToken.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\n\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {IVoteToken} from '../interfaces/IVoteToken.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Context} from '@openzeppelin/contracts/utils/Context.sol';\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\n\\n/**\\n * @title VoteToken\\n * @notice Custom token which tracks voting power for governance\\n * @dev This is an abstraction of a fork of the Compound governance contract\\n * VoteToken is used by BABL to allow tracking voting power\\n * Checkpoints are created every time state is changed which record voting power\\n * Inherits standard ERC20 behavior\\n */\\n\\nabstract contract VoteToken is Context, ERC20, Ownable, IVoteToken, ReentrancyGuard {\\n using SafeMath for uint256;\\n using Address for address;\\n\\n /* ============ Events ============ */\\n\\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\\n event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);\\n\\n /* ============ Modifiers ============ */\\n\\n /* ============ State Variables ============ */\\n\\n /// @notice The EIP-712 typehash for the contract's domain\\n bytes32 public constant DOMAIN_TYPEHASH =\\n keccak256('EIP712Domain(string name,uint256 chainId,address verifyingContract)');\\n\\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\\n bytes32 public constant DELEGATION_TYPEHASH =\\n keccak256('Delegation(address delegatee,uint256 nonce,uint256 expiry)');\\n\\n /// @dev A record of votes checkpoints for each account, by index\\n mapping(address => address) public delegates;\\n\\n /// @notice A checkpoint for marking number of votes from a given block\\n struct Checkpoint {\\n uint32 fromBlock;\\n uint96 votes;\\n }\\n\\n /// @notice A record of votes checkpoints for each account, by index\\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\\n\\n /// @notice The number of checkpoints for each account\\n mapping(address => uint32) public numCheckpoints;\\n\\n /// @notice A record of states for signing / validating signatures\\n mapping(address => uint256) public nonces;\\n\\n /* ============ Functions ============ */\\n\\n /* ============ Constructor ============ */\\n\\n constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {}\\n\\n /* ============ External Functions ============ */\\n\\n /* =========== Token related Gov Functions ====== */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Delegating votes from msg.sender to delegatee\\n *\\n * @notice Delegate votes from `msg.sender` to `delegatee`\\n * @param delegatee The address to delegate votes to\\n */\\n\\n function delegate(address delegatee) external override {\\n return _delegate(msg.sender, delegatee);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Delegate votes using signature to 'delegatee'\\n *\\n * @notice Delegates votes from signatory to `delegatee`\\n * @param delegatee The address to delegate votes to\\n * @param nonce The contract state required to match the signature\\n * @param expiry The time at which to expire the signature\\n * @param v The recovery byte of the signature\\n * @param r Half of the ECDSA signature pair\\n * @param s Half of the ECDSA signature pair\\n */\\n\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external override {\\n bytes32 domainSeparator =\\n keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name())), getChainId(), address(this)));\\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\\n bytes32 digest = keccak256(abi.encodePacked('\\\\x19\\\\x01', domainSeparator, structHash));\\n address signatory = ecrecover(digest, v, r, s);\\n require(signatory != address(0), 'VoteToken::delegateBySig: invalid signature');\\n require(nonce == nonces[signatory] + 1, 'VoteToken::delegateBySig: invalid nonce');\\n nonces[signatory]++;\\n require(block.timestamp <= expiry, 'VoteToken::delegateBySig: signature expired');\\n return _delegate(signatory, delegatee);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Check Delegate votes using signature to 'delegatee'\\n *\\n * @notice Get current voting power for an account\\n * @param account Account to get voting power for\\n * @return Voting power for an account\\n */\\n function getCurrentVotes(address account) external view virtual override returns (uint96) {\\n uint32 nCheckpoints = numCheckpoints[account];\\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Get voting power at a specific block for an account\\n *\\n * @param account Account to get voting power for\\n * @param blockNumber Block to get voting power at\\n * @return Voting power for an account at specific block\\n */\\n function getPriorVotes(address account, uint256 blockNumber) external view virtual override returns (uint96) {\\n require(blockNumber < block.number, 'BABLToken::getPriorVotes: not yet determined');\\n\\n uint32 nCheckpoints = numCheckpoints[account];\\n if (nCheckpoints == 0) {\\n return 0;\\n }\\n\\n // First check most recent balance\\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\\n return checkpoints[account][nCheckpoints - 1].votes;\\n }\\n\\n // Next check implicit zero balance\\n if (checkpoints[account][0].fromBlock > blockNumber) {\\n return 0;\\n }\\n\\n uint32 lower = 0;\\n uint32 upper = nCheckpoints - 1;\\n while (upper > lower) {\\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\\n Checkpoint memory cp = checkpoints[account][center];\\n if (cp.fromBlock == blockNumber) {\\n return cp.votes;\\n } else if (cp.fromBlock < blockNumber) {\\n lower = center;\\n } else {\\n upper = center - 1;\\n }\\n }\\n return checkpoints[account][lower].votes;\\n }\\n\\n function getMyDelegatee() external view override returns (address) {\\n return delegates[msg.sender];\\n }\\n\\n function getDelegatee(address account) external view override returns (address) {\\n return delegates[account];\\n }\\n\\n function getCheckpoints(address account, uint32 id)\\n external\\n view\\n override\\n returns (uint32 fromBlock, uint96 votes)\\n {\\n Checkpoint storage getCheckpoint = checkpoints[account][id];\\n return (getCheckpoint.fromBlock, getCheckpoint.votes);\\n }\\n\\n function getNumberOfCheckpoints(address account) external view override returns (uint32) {\\n return numCheckpoints[account];\\n }\\n\\n /* ============ Internal Only Function ============ */\\n\\n /**\\n * GOVERNANCE FUNCTION. Make a delegation\\n *\\n * @dev Internal function to delegate voting power to an account\\n * @param delegator The address of the account delegating votes from\\n * @param delegatee The address to delegate votes to\\n */\\n\\n function _delegate(address delegator, address delegatee) internal {\\n address currentDelegate = delegates[delegator];\\n uint96 delegatorBalance = safe96(_balanceOf(delegator), 'VoteToken::_delegate: uint96 overflow');\\n delegates[delegator] = delegatee;\\n\\n emit DelegateChanged(delegator, currentDelegate, delegatee);\\n\\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\\n }\\n\\n function _balanceOf(address account) internal view virtual returns (uint256) {\\n return balanceOf(account);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Move the delegates\\n *\\n * @dev Internal function to move delegates between accounts\\n * @param srcRep The address of the account delegating votes from\\n * @param dstRep The address of the account delegating votes to\\n * @param amount The voting power to move\\n */\\n function _moveDelegates(\\n address srcRep,\\n address dstRep,\\n uint96 amount\\n ) internal {\\n if (srcRep != dstRep && amount > 0) {\\n // It must not revert but do nothing in cases of address(0) being part of the move\\n // Sub voting amount to source in case it is not the zero address (e.g. transfers)\\n if (srcRep != address(0)) {\\n uint32 srcRepNum = numCheckpoints[srcRep];\\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\\n uint96 srcRepNew = sub96(srcRepOld, amount, 'VoteToken::_moveDelegates: vote amount underflows');\\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\\n }\\n if (dstRep != address(0)) {\\n // Add it to destination in case it is not the zero address (e.g. any transfer of tokens or delegations except a first mint to a specific address)\\n uint32 dstRepNum = numCheckpoints[dstRep];\\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\\n uint96 dstRepNew = add96(dstRepOld, amount, 'VoteToken::_moveDelegates: vote amount overflows');\\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\\n }\\n }\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Internal function to write a checkpoint for voting power\\n *\\n * @dev internal function to write a checkpoint for voting power\\n * @param delegatee The address of the account delegating votes to\\n * @param nCheckpoints The num checkpoint\\n * @param oldVotes The previous voting power\\n * @param newVotes The new voting power\\n */\\n function _writeCheckpoint(\\n address delegatee,\\n uint32 nCheckpoints,\\n uint96 oldVotes,\\n uint96 newVotes\\n ) internal {\\n uint32 blockNumber = safe32(block.number, 'VoteToken::_writeCheckpoint: block number exceeds 32 bits');\\n\\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\\n } else {\\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\\n numCheckpoints[delegatee] = nCheckpoints + 1;\\n }\\n\\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint32\\n *\\n * @dev internal function to convert from uint256 to uint32\\n */\\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\\n require(n < 2**32, errorMessage);\\n return uint32(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint96\\n *\\n * @dev internal function to convert from uint256 to uint96\\n */\\n function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) {\\n require(n < 2**96, errorMessage);\\n return uint96(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to add two uint96 numbers\\n *\\n * @dev internal safe math function to add two uint96 numbers\\n */\\n function add96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n uint96 c = a + b;\\n require(c >= a, errorMessage);\\n return c;\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to subtract two uint96 numbers\\n *\\n * @dev internal safe math function to subtract two uint96 numbers\\n */\\n function sub96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to get chain ID\\n *\\n * @dev internal function to get chain ID\\n */\\n function getChainId() internal pure returns (uint256) {\\n uint256 chainId;\\n assembly {\\n chainId := chainid()\\n }\\n return chainId;\\n }\\n}\\n\",\"keccak256\":\"0x594b8ba6deb5c071f512773cdfcc892166d1f701d4fcd8c8b4b3517fe8125089\",\"license\":\"Apache License\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60806040526301e13380600d55630784ce00600e556305a39a80600f5569d3c21bcecceda10000006013553480156200003757600080fd5b5060405162004ea938038062004ea9833981810160405260408110156200005d57600080fd5b508051602091820151604080518082018252600f81526e426162796c6f6e2e46696e616e636560881b818601908152825180840190935260048352631090509360e21b9583019590955280519394929390928391839183918391620000c6916003919062000471565b508051620000dc90600490602084019062000471565b50506005805460ff19166012179055506000620000f862000200565b60058054610100600160a81b0319166101006001600160a01b03841690810291909117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350506001600655505060128054600160a01b60ff60a01b19909116179055504260168190556200018e90630f099c0062000204602090811b62002ce917901c565b601455620001a73369d3c21bcecceda100000062000266565b620001cb630f099c0063ffffffff16426200020460201b62002ce91790919060201c565b601555601180546001600160a01b039384166001600160a01b031991821617909155601080549290931691161790556200051d565b3390565b6000828201838110156200025f576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b038216620002c2576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b620002d06000838362000375565b620002ec816002546200020460201b62002ce91790919060201c565b6002556001600160a01b038216600090815260208181526040909120546200031f91839062002ce962000204821b17901c565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6200038d8383836200040460201b62002d431760201c565b620004046001600160a01b0384161580620003b557506011546001600160a01b038581169116145b80620003ce57506012546001600160a01b038581169116145b80620003e757506011546001600160a01b038481169116145b80620003fc5750601254600160a01b900460ff165b603e62000409565b505050565b816200041a576200041a816200041e565b5050565b62461bcd60e51b6000908152602060045260076024526642414223000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620004a95760008555620004f4565b82601f10620004c457805160ff1916838001178555620004f4565b82800160010185558215620004f4579182015b82811115620004f4578251825591602001919060010190620004d7565b506200050292915062000506565b5090565b5b8082111562000502576000815560010162000507565b61497c806200052d6000396000f3fe608060405234801561001057600080fd5b506004361061034c5760003560e01c806382e012b1116101bd578063b23ddce7116100f9578063d5e62855116100a2578063e7a324dc1161007c578063e7a324dc146109f8578063f1127ed814610a00578063f2fde38b14610a32578063f77c479114610a585761034c565b8063d5e62855146109ba578063d6a73a54146109c2578063dd62ed3e146109ca5761034c565b8063c7de902d116100d3578063c7de902d14610943578063d1f5c33b14610969578063d5abeb011461098f5761034c565b8063b23ddce71461087c578063b4b5ea57146108d6578063c3cda520146108fc5761034c565b8063962399e2116101665780639b4e735f116101405780639b4e735f146107f6578063a15d39d41461081c578063a457c2d714610824578063a9059cbb146108505761034c565b8063962399e2146107a257806398f1312e146107c85780639ae697bf146107d05761034c565b80638da5cb5b116101975780638da5cb5b1461078a578063937f2e331461079257806395d89b411461079a5761034c565b806382e012b1146106ee57806386cb9498146106f65780638cec2923146107445761034c565b806340c10f191161028c57806360caae5811610235578063715018a61161020f578063715018a61461067057806376ee403814610678578063782d6fe1146106805780637ecebe00146106c85761034c565b806360caae581461061c5780636fcfff451461062457806370a082311461064a5761034c565b8063587cde1e11610266578063587cde1e146105a85780635c19a95c146105ce5780635e0fac2e146105f65761034c565b806340c10f191461051757806342061268146105435780634f205087146105825761034c565b806323b872dd116102f9578063313ce567116102d3578063313ce567146104bd57806339509351146104db5780633dd5a83e146105075780633f2a55401461050f5761034c565b806323b872dd1461045c578063265e7bde1461049257806330b36cef146104b55761034c565b806318160ddd1161032a57806318160ddd1461042857806320606b7014610430578063238189a8146104385761034c565b806306fdde0314610351578063095ea7b3146103ce5780631523a3711461040e575b600080fd5b610359610a60565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561039357818101518382015260200161037b565b50505050905090810190601f1680156103c05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103fa600480360360408110156103e457600080fd5b506001600160a01b038135169060200135610af6565b604080519115158252519081900360200190f35b610416610d05565b60408051918252519081900360200190f35b610416610d0b565b610416610d11565b610440610d35565b604080516001600160a01b039092168252519081900360200190f35b6103fa6004803603606081101561047257600080fd5b506001600160a01b03813581169160208101359091169060400135610d44565b6103fa600480360360408110156104a857600080fd5b5080359060200135610dcb565b6104166110b8565b6104c56110be565b6040805160ff9092168252519081900360200190f35b6103fa600480360360408110156104f157600080fd5b506001600160a01b0381351690602001356110c7565b610440611220565b61044061122f565b6103fa6004803603604081101561052d57600080fd5b506001600160a01b03813516906020013561123e565b6105696004803603602081101561055957600080fd5b50356001600160a01b0316611579565b6040805163ffffffff9092168252519081900360200190f35b6104166004803603602081101561059857600080fd5b50356001600160a01b031661159e565b610440600480360360208110156105be57600080fd5b50356001600160a01b03166115f3565b6105f4600480360360208110156105e457600080fd5b50356001600160a01b031661160e565b005b6104166004803603602081101561060c57600080fd5b50356001600160a01b031661161b565b6104c5611638565b6105696004803603602081101561063a57600080fd5b50356001600160a01b031661163d565b6104166004803603602081101561066057600080fd5b50356001600160a01b0316611655565b6105f4611670565b610440611741565b6106ac6004803603604081101561069657600080fd5b506001600160a01b03813516906020013561175d565b604080516001600160601b039092168252519081900360200190f35b610416600480360360208110156106de57600080fd5b50356001600160a01b0316611988565b6105f461199a565b61071c6004803603602081101561070c57600080fd5b50356001600160a01b0316611a3e565b6040805194151585526020850193909352838301919091526060830152519081900360800190f35b6103fa600480360360c081101561075a57600080fd5b506001600160a01b0381351690602081013590604081013515159060608101359060808101359060a00135611a69565b610440611d4f565b6105f4611d63565b610359611e6a565b6103fa600480360360208110156107b857600080fd5b50356001600160a01b0316611ecb565b6104c5612135565b610416600480360360208110156107e657600080fd5b50356001600160a01b031661213a565b6104406004803603602081101561080c57600080fd5b50356001600160a01b03166121d6565b6104166121f4565b6103fa6004803603604081101561083a57600080fd5b506001600160a01b0381351690602001356121fa565b6103fa6004803603604081101561086657600080fd5b506001600160a01b0381351690602001356123ae565b6108ae6004803603604081101561089257600080fd5b5080356001600160a01b0316906020013563ffffffff166123cb565b6040805163ffffffff90931683526001600160601b0390911660208301528051918290030190f35b6106ac600480360360208110156108ec57600080fd5b50356001600160a01b0316612411565b6105f4600480360360c081101561091257600080fd5b506001600160a01b038135169060208101359060408101359060ff6060820135169060808101359060a00135612483565b6104166004803603602081101561095957600080fd5b50356001600160a01b031661272b565b6103fa6004803603602081101561097f57600080fd5b50356001600160a01b03166127dd565b6109976129e9565b604080516001600160601b03909316835260208301919091528051918290030190f35b6105f4612a1f565b610416612b22565b610416600480360360408110156109e057600080fd5b506001600160a01b0381358116916020013516612b28565b610416612b53565b6108ae60048036036040811015610a1657600080fd5b5080356001600160a01b0316906020013563ffffffff16612b77565b6105f460048036036020811015610a4857600080fd5b50356001600160a01b0316612bad565b610440612cda565b60038054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610aec5780601f10610ac157610100808354040283529160200191610aec565b820191906000526020600020905b815481529060010190602001808311610acf57829003601f168201915b5050505050905090565b600060026006541415610b50576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026006556001600160a01b038316610b9a5760405162461bcd60e51b81526004018080602001828103825260388152602001806140716038913960400191505060405180910390fd5b6001600160a01b038316331415610be25760405162461bcd60e51b815260040180806020018281038252603a8152602001806146c1603a913960400191505060405180910390fd5b6000600019831415610bf75750600019610c1c565b610c1983604051806060016040528060308152602001613f6c60309139612d48565b90505b6011546001600160a01b038581169116148015610c575750601154610c4b9033906001600160a01b0316612b28565b816001600160601b0316105b15610c9857601154610c9590610c779033906001600160a01b0316612b28565b60405180608001604052806047815260200161476660479139612d48565b90505b610cac3385836001600160601b0316612deb565b604080516001600160601b038316815290516001600160a01b0386169133917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259181900360200190a36001915050600160065592915050565b60165481565b60025490565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6011546001600160a01b031681565b6000610d51848484612ed7565b610dc184610d5d61309d565b610dbc85604051806060016040528060288152602001614254602891396001600160a01b038a16600090815260016020526040812090610d9b61309d565b6001600160a01b0316815260208101919091526040016000205491906130a1565b612deb565b5060019392505050565b6000610dd561309d565b6001600160a01b0316610de6611d4f565b6001600160a01b031614610e41576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b601654610e5290630f099c00612ce9565b421015610e905760405162461bcd60e51b81526004018080602001828103825260638152602001806142dc6063913960800191505060405180910390fd5b601454421015610ed15760405162461bcd60e51b81526004018080602001828103825260488152602001806144706048913960600191505060405180910390fd5b6013548311610f115760405162461bcd60e51b81526004018080602001828103825260508152602001806140216050913960600191505060405180910390fd5b6000610f43610f3a6064610f34600560ff166013546130fb90919063ffffffff16565b90613154565b60135490612ce9565b905080841115610f845760405162461bcd60e51b815260040180806020018281038252603681526020018061415e6036913960400191505060405180910390fd5b601354604080519182526020820186905280517fa626f93317e2474b716846a09cf0e28aacb96052643b252fe97704208fecf9b59281900390910190a1610fe3846040518060600160405280604081526020016146fb60409139612d48565b6001600160601b03166013556000610fff426301e13380612ce9565b9050808410156110405760405162461bcd60e51b815260040180806020018281038252606081526020018061427c6060913960600191505060405180910390fd5b601454604080519182526020820186905280517f63abb52e09389994840613a4780aa50f65baa62888e3cdcfcb088ac2de0b7db59281900390910190a161109f84604051806080016040528060488152602001613fd960489139612d48565b6001600160601b03166014555060019150505b92915050565b60155481565b60055460ff1690565b600060026006541415611121576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600655816111303361161b565b101561116d5760405162461bcd60e51b815260040180806020018281038252603d8152602001806147fd603d913960400191505060405180910390fd5b6001600160a01b0383166111b25760405162461bcd60e51b81526004018080602001828103825260418152602001806141c26041913960600191505060405180910390fd5b6001600160a01b0383163314156111fa5760405162461bcd60e51b81526004018080602001828103825260438152602001806149046043913960600191505060405180910390fd5b6112133384610dbc8561120d3389612b28565b90612ce9565b5060018060065592915050565b6011546001600160a01b031690565b6012546001600160a01b031681565b600061124861309d565b6001600160a01b0316611259611d4f565b6001600160a01b0316146112b4576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6013546112c38361120d610d0b565b11156113005760405162461bcd60e51b81526004018080602001828103825260248152602001806143cb6024913960400191505060405180910390fd5b60165461131190630f099c00612ce9565b42101561134f5760405162461bcd60e51b815260040180806020018281038252605581526020018061483a6055913960600191505060405180910390fd5b6000821161138e5760405162461bcd60e51b81526004018080602001828103825260308152602001806142246030913960400191505060405180910390fd5b6015544210156113cf5760405162461bcd60e51b81526004018080602001828103825260448152602001806140da6044913960600191505060405180910390fd5b6001600160a01b0383166114145760405162461bcd60e51b81526004018080602001828103825260348152602001806143976034913960400191505060405180910390fd5b6001600160a01b03831630141561145c5760405162461bcd60e51b815260040180806020018281038252603c815260200180613eba603c913960400191505060405180910390fd5b61146a426301e13380612ce9565b6015819055506000611494836040518060600160405280602781526020016145e960279139612d48565b90506114ae6064610f3460026114a8610d0b565b906130fb565b816001600160601b031611156114f55760405162461bcd60e51b81526004018080602001828103825260388152602001806145376038913960400191505060405180910390fd5b61150884826001600160601b03166131bb565b604080516001600160a01b03861681526001600160601b038316602082015281517f51c018f451551bf4e92356d59bc5f1fcd317ef0f884d97807cae6dd395da7fe0929181900390910190a16001600160a01b03808516600090815260076020526040812054610dc19216836132ab565b6001600160a01b03811660009081526009602052604090205463ffffffff165b919050565b6011546000906001600160a01b031633146115ea5760405162461bcd60e51b8152600401808060200182810382526050815260200180613dec6050913960600191505060405180910390fd5b6110b28261343f565b6007602052600090815260409020546001600160a01b031681565b611618338261365c565b50565b60006110b26116298361213a565b61163284611655565b9061371f565b600581565b60096020526000908152604090205463ffffffff1681565b6001600160a01b031660009081526020819052604090205490565b61167861309d565b6001600160a01b0316611689611d4f565b6001600160a01b0316146116e4576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60055460405160009161010090046001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36005805474ffffffffffffffffffffffffffffffffffffffff0019169055565b336000908152600760205260409020546001600160a01b031690565b600043821061179d5760405162461bcd60e51b815260040180806020018281038252602c815260200180614610602c913960400191505060405180910390fd5b6001600160a01b03831660009081526009602052604090205463ffffffff16806117cb5760009150506110b2565b6001600160a01b038416600090815260086020908152604080832063ffffffff600019860181168552925290912054168310611848576001600160a01b03841660009081526008602090815260408083206000199490940163ffffffff168352929052205464010000000090046001600160601b031690506110b2565b6001600160a01b038416600090815260086020908152604080832083805290915290205463ffffffff168310156118835760009150506110b2565b600060001982015b8163ffffffff168163ffffffff161115611942576000600263ffffffff848403166001600160a01b038916600090815260086020908152604080832094909304860363ffffffff8181168452948252918390208351808501909452549384168084526401000000009094046001600160601b03169083015292509087141561191d576020015194506110b29350505050565b805163ffffffff168711156119345781935061193b565b6001820392505b505061188b565b506001600160a01b038516600090815260086020908152604080832063ffffffff909416835292905220546001600160601b036401000000009091041691505092915050565b600a6020526000908152604090205481565b6119a261309d565b6001600160a01b03166119b3611d4f565b6001600160a01b031614611a0e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b601280547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b179055565b600c60205260009081526040902080546001820154600283015460039093015460ff90921692909184565b6011546000906001600160a01b03163314611ab55760405162461bcd60e51b8152600401808060200182810382526050815260200180613dec6050913960600191505060405180910390fd5b85611abf33611655565b1015611b12576040805162461bcd60e51b815260206004820152601460248201527f696e73756666696369656e742062616c616e6365000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038716611b6d576040805162461bcd60e51b815260206004820152601660248201527f63616e6e6f74206265207a65726f206164647265737300000000000000000000604482015290519081900360640190fd5b6001600160a01b038716301415611bcb576040805162461bcd60e51b815260206004820152601760248201527f63616e6e6f74206265207468697320636f6e7472616374000000000000000000604482015290519081900360640190fd5b6011546001600160a01b0388811691161415611c185760405162461bcd60e51b815260040180806020018281038252602e815260200180614194602e913960400191505060405180910390fd5b6001600160a01b038716331415611c76576040805162461bcd60e51b815260206004820152601e60248201527f746865206f776e65722063616e6e6f74206c6f636b757020697473656c660000604482015290519081900360640190fd5b6001600160a01b0387166000908152600b6020526040902054611c999087612ce9565b6001600160a01b0388166000908152600b6020908152604080832093909355600c905220805460ff1916861515178155600181018590556002810184905560038101839055611ce9338989612ed7565b604080516001600160a01b038a1681526020810189905287151581830152606081018790526080810186905290517f7ec8d498ce0e4d11d52cf0588976b9a8b30679d7135f9e82de77e2e318a1ea409181900360a00190a1506001979650505050505050565b60055461010090046001600160a01b031690565b601154604080517f1e83409a00000000000000000000000000000000000000000000000000000000815233600482015290516000926001600160a01b031691631e83409a91602480830192602092919082900301818787803b158015611dc857600080fd5b505af1158015611ddc573d6000803e3d6000fd5b505050506040513d6020811015611df257600080fd5b5051336000908152600c602052604090205490915060ff16151560011415611e2c57601154611e2a906001600160a01b031682610af6565b505b604080513381526020810183905281517f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4929181900390910190a150565b60048054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610aec5780601f10610ac157610100808354040283529160200191610aec565b6011546000906001600160a01b031615611f9f57601160009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611f2d57600080fd5b505afa158015611f41573d6000803e3d6000fd5b505050506040513d6020811015611f5757600080fd5b50516001600160a01b03163314611f9f5760405162461bcd60e51b815260040180806020018281038252605a815260200180613d65605a913960600191505060405180910390fd5b6001600160a01b038216611ffa576040805162461bcd60e51b815260206004820152601660248201527f63616e6e6f74206265207a65726f206164647265737300000000000000000000604482015290519081900360640190fd5b6001600160a01b038216301415612058576040805162461bcd60e51b815260206004820152601760248201527f63616e6e6f74206265207468697320636f6e7472616374000000000000000000604482015290519081900360640190fd5b6011546001600160a01b03838116911614156120bb576040805162461bcd60e51b815260206004820152601c60248201527f6d757374206265206e65772054696d654c6f636b526567697374727900000000604482015290519081900360640190fd5b601154604080516001600160a01b039283168152918416602083015280517f1b4fa7e35ece4dcbbb914f91d8c3539c828d43c0b8a700237373966a27a9693a9281900390910190a150601180546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff199091161790556001919050565b600281565b6000806121468361272b565b6001600160a01b0384166000908152600c6020526040902060020154909150421080159061217c5750336001600160a01b038416145b8015612186575080155b156121a9576001600160a01b0383166000908152600b60205260408120556110b2565b336001600160a01b03841614156110b257336000908152600c602052604090204260039091015592915050565b6001600160a01b039081166000908152600760205260409020541690565b60135481565b600060026006541415612254576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026006556001600160a01b03831661229e5760405162461bcd60e51b81526004018080602001828103825260418152602001806143ef6041913960600191505060405180910390fd5b6001600160a01b0383163314156122e65760405162461bcd60e51b815260040180806020018281038252604381526020018061467e6043913960600191505060405180910390fd5b816122f13385612b28565b101561232e5760405162461bcd60e51b8152600401808060200182810382526036815260200180613e846036913960400191505060405180910390fd5b6011546001600160a01b038481169116141561237b5760405162461bcd60e51b8152600401808060200182810382526050815260200180613f1c6050913960600191505060405180910390fd5b6112133384610dbc856040518060600160405280602581526020016148b4602591396123a7338a612b28565b91906130a1565b60006123c26123bb61309d565b8484612ed7565b50600192915050565b6001600160a01b0391909116600090815260086020908152604080832063ffffffff9485168452909152902054908116916401000000009091046001600160601b031690565b6001600160a01b03811660009081526009602052604081205463ffffffff168061243c57600061247c565b6001600160a01b0383166000908152600860209081526040808320600019850163ffffffff16845290915290205464010000000090046001600160601b03165b9392505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8666124ae610a60565b805190602001206124bd61377c565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c08401526001600160a01b038b1660e084015261010083018a90526101208084018a905282518085039091018152610140840183528051908501207f19010000000000000000000000000000000000000000000000000000000000006101608501526101628401829052610182808501829052835180860390910181526101a285018085528151918701919091206000918290526101c2860180865281905260ff8b166101e287015261020286018a90526102228601899052935192965090949293909260019261024280840193601f198301929081900390910190855afa15801561260b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661265d5760405162461bcd60e51b815260040180806020018281038252602b81526020018061473b602b913960400191505060405180910390fd5b6001600160a01b0381166000908152600a602052604090205460010189146126b65760405162461bcd60e51b8152600401808060200182810382526027815260200180613d0e6027913960400191505060405180910390fd5b6001600160a01b0381166000908152600a6020526040902080546001019055428810156127145760405162461bcd60e51b815260040180806020018281038252602b8152602001806148d9602b913960400191505060405180910390fd5b61271e818b61365c565b505050505b505050505050565b6001600160a01b0381166000908152600b6020908152604080832054600c90925282206001015481904290612764906301e13380612ce9565b11156127735791506115999050565b6001600160a01b0384166000908152600c6020526040902060020154421061279d5750600061247c565b6001600160a01b0384166000908152600c6020526040902060018101546002909101546127d591810390610f349085904290036130fb565b949350505050565b60006127e761309d565b6001600160a01b03166127f8611d4f565b6001600160a01b031614612853576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0382166128ae576040805162461bcd60e51b815260206004820152601660248201527f63616e6e6f74206265207a65726f206164647265737300000000000000000000604482015290519081900360640190fd5b6001600160a01b03821630141561290c576040805162461bcd60e51b815260206004820152601760248201527f63616e6e6f74206265207468697320636f6e7472616374000000000000000000604482015290519081900360640190fd5b6012546001600160a01b038381169116141561296f576040805162461bcd60e51b815260206004820152601f60248201527f6d757374206265206e65772052657761726473204469737472696275746f7200604482015290519081900360640190fd5b601254604080516001600160a01b039283168152918416602083015280517fd8732c543edde4e60b54e1136459ee3a610f1243749765d9dbdbcf9fe76a7bd59281900390910190a150601280546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff199091161790556001919050565b6000806000612a126013546040518060600160405280603d8152602001613cae603d9139612d48565b6014549093509150509091565b612a2761309d565b6001600160a01b0316612a38611d4f565b6001600160a01b031614612a93576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b601254600160a81b900460ff1615612af2576040805162461bcd60e51b815260206004820152600e60248201527f4241424c206d75737420666c6f77000000000000000000000000000000000000604482015290519081900360640190fd5b601280547fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff16600160a81b179055565b60145481565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b600860209081526000928352604080842090915290825290205463ffffffff81169064010000000090046001600160601b031682565b612bb561309d565b6001600160a01b0316612bc6611d4f565b6001600160a01b031614612c21576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116612c665760405162461bcd60e51b8152600401808060200182810382526026815260200180613e3c6026913960400191505060405180910390fd5b6005546040516001600160a01b0380841692610100900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b039092166101000274ffffffffffffffffffffffffffffffffffffffff0019909216919091179055565b6010546001600160a01b031681565b60008282018381101561247c576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b505050565b6000816c010000000000000000000000008410612de35760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612da8578181015183820152602001612d90565b50505050905090810190601f168015612dd55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b509192915050565b6001600160a01b038316612e305760405162461bcd60e51b81526004018080602001828103825260248152602001806145c56024913960400191505060405180910390fd5b6001600160a01b038216612e755760405162461bcd60e51b8152600401808060200182810382526022815260200180613e626022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316612f1c5760405162461bcd60e51b815260040180806020018281038252604281526020018061463c6042913960600191505060405180910390fd5b6001600160a01b038216612f615760405162461bcd60e51b815260040180806020018281038252604081526020018061411e6040913960400191505060405180910390fd5b6001600160a01b038216301415612fa95760405162461bcd60e51b81526004018080602001828103825260508152602001806147ad6050913960600191505060405180910390fd5b80612fb384611655565b1015612ff05760405162461bcd60e51b81526004018080602001828103825260318152602001806145946031913960400191505060405180910390fd5b80612ffa8461161b565b10156130375760405162461bcd60e51b81526004018080602001828103825260408152602001806144306040913960400191505060405180910390fd5b613042838383613780565b6001600160a01b0380841660009081526007602090815260408083205486851684529281902054815160608101909252602c808352612d4395948516949190911692613098928792909161433f90830139612d48565b6132ab565b3390565b600081848411156130f35760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612da8578181015183820152602001612d90565b505050900390565b60008261310a575060006110b2565b8282028284828161311757fe5b041461247c5760405162461bcd60e51b81526004018080602001828103825260218152602001806142036021913960400191505060405180910390fd5b60008082116131aa576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816131b357fe5b049392505050565b6001600160a01b038216613216576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b613222600083836138db565b60025461322f9082612ce9565b6002556001600160a01b0382166000908152602081905260409020546132559082612ce9565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b816001600160a01b0316836001600160a01b0316141580156132d657506000816001600160601b0316115b15612d43576001600160a01b0383161561338f576001600160a01b03831660009081526009602052604081205463ffffffff169081613316576000613356565b6001600160a01b0385166000908152600860209081526040808320600019860163ffffffff16845290915290205464010000000090046001600160601b03165b9050600061337d82856040518060600160405280603181526020016140a960319139613957565b905061338b868484846139bc565b5050505b6001600160a01b03821615612d43576001600160a01b03821660009081526009602052604081205463ffffffff1690816133ca57600061340a565b6001600160a01b0384166000908152600860209081526040808320600019860163ffffffff16845290915290205464010000000090046001600160601b03165b905060006134318285604051806060016040528060308152602001613d3560309139613b7d565b9050612723858484846139bc565b6011546000906001600160a01b0316331461348b5760405162461bcd60e51b8152600401808060200182810382526050815260200180613dec6050913960600191505060405180910390fd5b6001600160a01b0382166000908152600b60205260409020546134df5760405162461bcd60e51b815260040180806020018281038252602c81526020018061436b602c913960400191505060405180910390fd5b60006134ea8361213a565b90506000811161352b5760405162461bcd60e51b815260040180806020018281038252603d815260200180613f9c603d913960400191505060405180910390fd5b6001600160a01b0383166000908152600c602052604090205460ff1615156001146135875760405162461bcd60e51b81526004018080602001828103825260468152602001806144f16046913960600191505060405180910390fd5b6001600160a01b038084166000908152600b60209081526040808320839055600c9091528120805460ff191681556001810182905560028101829055600301556011546135d79185911683610d44565b6136125760405162461bcd60e51b815260040180806020018281038252602d815260200180613dbf602d913960400191505060405180910390fd5b604080516001600160a01b03851681526020810183905281517f27f83af92b39768b17fe0c8d6922452702717efb8626d97e7a754e0b27d4f6d2929181900390910190a192915050565b6001600160a01b03808316600090815260076020526040812054909116906136a461368685613be7565b60405180606001604052806025815260200161488f60259139612d48565b6001600160a01b03858116600081815260076020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916898616908117909155905194955093928616927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a46137198284836132ab565b50505050565b600082821115613776576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b4690565b6001600160a01b0383166137c55760405162461bcd60e51b815260040180806020018281038252602581526020018061456f6025913960400191505060405180910390fd5b6001600160a01b03821661380a5760405162461bcd60e51b8152600401808060200182810382526023815260200180613ceb6023913960400191505060405180910390fd5b6138158383836138db565b61385281604051806060016040528060268152602001613ef6602691396001600160a01b03861660009081526020819052604090205491906130a1565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546138819082612ce9565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6138e6838383612d43565b612d436001600160a01b038416158061390c57506011546001600160a01b038581169116145b8061392457506012546001600160a01b038581169116145b8061393c57506011546001600160a01b038481169116145b806139505750601254600160a01b900460ff165b603e613bf2565b6000836001600160601b0316836001600160601b0316111582906130f35760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612da8578181015183820152602001612d90565b60006139e0436040518060600160405280603981526020016144b860399139613c04565b905060008463ffffffff16118015613a2957506001600160a01b038516600090815260086020908152604080832063ffffffff6000198901811685529252909120548282169116145b15613a89576001600160a01b0385166000908152600860209081526040808320600019880163ffffffff168452909152902080546fffffffffffffffffffffffff0000000019166401000000006001600160601b03851602179055613b29565b60408051808201825263ffffffff80841682526001600160601b0380861660208085019182526001600160a01b038b166000818152600883528781208c871682528352878120965187549451909516640100000000026fffffffffffffffffffffffff000000001995871663ffffffff19958616179590951694909417909555938252600990935292909220805460018801909316929091169190911790555b604080516001600160601b0380861682528416602082015281516001600160a01b038816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b6000838301826001600160601b038087169083161015613bde5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612da8578181015183820152602001612d90565b50949350505050565b60006110b282611655565b81613c0057613c0081613c5a565b5050565b6000816401000000008410612de35760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612da8578181015183820152602001612d90565b62461bcd60e51b6000908152602060045260076024526642414223000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fdfe4241424c546f6b656e3a3a6d6178537570706c79416c6c6f7765643a206d6178537570706c79416c6c6f7765642065786365656473203936206269747345524332303a207472616e7366657220746f20746865207a65726f2061646472657373566f7465546f6b656e3a3a64656c656761746542795369673a20696e76616c6964206e6f6e6365566f7465546f6b656e3a3a5f6d6f766544656c6567617465733a20766f746520616d6f756e74206f766572666c6f777354696d654c6f636b6564546f6b656e3a3a206f6e6c7954696d654c6f636b4f776e65723a2063616e206f6e6c7920626520657865637574656420627920746865206f776e6572206f662054696d654c6f636b526567697374727954696d654c6f636b6564546f6b656e3a3a63616e63656c546f6b656e733a5472616e73666572206661696c656454696d654c6f636b6564546f6b656e3a3a206f6e6c7954696d654c6f636b52656769737472793a2063616e206f6e6c792062652065786563757465642062792054696d654c6f636b52656769737472794f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737354696d654c6f636b6564546f6b656e3a3a6465637265617365416c6c6f77616e63653a556e646572666c6f7720636f6e646974696f6e4241424c546f6b656e3a3a6d696e743a2063616e6e6f74206d696e7420746f207468652061646472657373206f66207468697320636f6e747261637445524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636554696d654c6f636b6564546f6b656e3a3a6465637265617365416c6c6f77616e63653a63616e6e6f7420646563726561736520616c6c6f77616e636520746f2074696d654c6f636b526567697374727954696d654c6f636b6564546f6b656e3a3a617070726f76653a20616d6f756e742065786365656473203936206269747354696d654c6f636b6564546f6b656e3a3a63616e63656c546f6b656e733a546865726520617265206e6f206d6f7265206c6f636b656420746f6b656e734241424c546f6b656e3a3a6368616e67654d6178537570706c793a206e6577206e65774d6178537570706c79416c6c6f7765644166746572206578636565647320393620626974734241424c546f6b656e3a3a6368616e67654d6178537570706c793a206368616e67654d6178537570706c792073686f756c6420626520686967686572207468616e2070726576696f75732076616c756554696d654c6f636b6564546f6b656e3a3a617070726f76653a207370656e6465722063616e6e6f74206265207a65726f2061646472657373566f7465546f6b656e3a3a5f6d6f766544656c6567617465733a20766f746520616d6f756e7420756e646572666c6f77734241424c546f6b656e3a3a6d696e743a206d696e74696e67206e6f7420616c6c6f776564207965742062656361757365206d696e74696e67416c6c6f776564416674657254696d654c6f636b6564546f6b656e3a3a205f7472616e736665723a2063616e6e6f74207472616e7366657220746f20746865207a65726f20616464726573734241424c546f6b656e3a3a6368616e67654d6178537570706c793a206578636565646564206f6620616c6c6f7765642035252063617063616e6e6f74206265207468652054696d654c6f636b526567697374727920636f6e747261637420697473656c6654696d654c6f636b6564546f6b656e3a3a696e637265617365416c6c6f77616e63653a5370656e6465722063616e6e6f74206265207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774241424c546f6b656e3a3a6d696e743a206d696e742073686f756c6420626520686967686572207468616e207a65726f45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654241424c546f6b656e3a3a6368616e67654d6178537570706c793a20746865206e65774d6178537570706c79416c6c6f77656441667465722073686f756c64206265206174206c656173742031207965617220696e20746865206675747572654241424c546f6b656e3a3a6368616e67654d6178537570706c793a2061206368616e6765206f6e206d6178537570706c79416c6c6f776564206e6f7420616c6c6f77656420756e74696c2038207965617273206166746572206465706c6f796d656e7454696d654c6f636b6564546f6b656e3a3a205f7472616e736665723a2075696e743936206f766572666c6f7754696d654c6f636b6564546f6b656e3a3a63616e63656c546f6b656e733a4e6f7420726567697374657265644241424c546f6b656e3a3a6d696e743a2063616e6e6f74207472616e7366657220746f20746865207a65726f20616464726573734241424c546f6b656e3a3a6d696e743a206d617820737570706c7920657863656564656454696d654c6f636b6564546f6b656e3a3a6465637265617365416c6c6f77616e63653a5370656e6465722063616e6e6f74206265207a65726f206164647265737354696d654c6f636b6564546f6b656e3a3a205f7472616e736665723a20617474656d7074696e6720746f207472616e73666572206c6f636b65642066756e64734241424c546f6b656e3a3a6368616e67654d6178537570706c793a2061206368616e6765206f6e206d6178537570706c79416c6c6f776564206e6f7420616c6c6f77656420796574566f7465546f6b656e3a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747354696d654c6f636b6564546f6b656e3a3a63616e63656c546f6b656e733a63616e6e6f742063616e63656c206c6f636b656420746f6b656e7320746f20496e766573746f72734241424c546f6b656e3a3a6d696e743a206578636565646564206d696e7420636170206f66203225206f6620746f74616c20737570706c7945524332303a207472616e736665722066726f6d20746865207a65726f206164647265737354696d654c6f636b6564546f6b656e3a3a205f7472616e736665723a20696e73756666696369656e742062616c616e636545524332303a20617070726f76652066726f6d20746865207a65726f20616464726573734241424c546f6b656e3a3a6d696e743a20616d6f756e74206578636565647320393620626974734241424c546f6b656e3a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e656454696d654c6f636b6564546f6b656e3a3a205f7472616e736665723a2063616e6e6f74207472616e736665722066726f6d20746865207a65726f206164647265737354696d654c6f636b6564546f6b656e3a3a6465637265617365416c6c6f77616e63653a5370656e6465722063616e6e6f7420626520746865206d73672e73656e64657254696d654c6f636b6564546f6b656e3a3a617070726f76653a207370656e6465722063616e6e6f7420626520746865206d73672e73656e6465724241424c546f6b656e3a3a6368616e67654d6178537570706c793a20706f74656e7469616c206d617820616d6f756e7420657863656564732039362062697473566f7465546f6b656e3a3a64656c656761746542795369673a20696e76616c6964207369676e617475726554696d654c6f636b6564546f6b656e3a3a617070726f76653a2063616e6e6f7420646563726561736520616c6c6f77616e636520746f2074696d656c6f636b726567697374727954696d654c6f636b6564546f6b656e3a3a205f7472616e736665723a20646f206e6f74207472616e7366657220746f6b656e7320746f2074686520746f6b656e20636f6e747261637420697473656c6654696d654c6f636b6564546f6b656e3a3a696e637265617365416c6c6f77616e63653a4e6f7420656e6f75676820756e6c6f636b656420746f6b656e734241424c546f6b656e3a3a6d696e743a206d696e74696e67206e6f7420616c6c6f776564206166746572207468652046495253545f45504f43485f4d494e542068617320706173736564203e3d2038207965617273566f7465546f6b656e3a3a5f64656c65676174653a2075696e743936206f766572666c6f7745524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f566f7465546f6b656e3a3a64656c656761746542795369673a207369676e6174757265206578706972656454696d654c6f636b6564546f6b656e3a3a696e637265617365416c6c6f77616e63653a5370656e6465722063616e6e6f7420626520746865206d73672e73656e646572a26469706673582212202d212a7a002da8040d91ec0016331229c6241c6a79297ad5e840431000e764b464736f6c63430007060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061034c5760003560e01c806382e012b1116101bd578063b23ddce7116100f9578063d5e62855116100a2578063e7a324dc1161007c578063e7a324dc146109f8578063f1127ed814610a00578063f2fde38b14610a32578063f77c479114610a585761034c565b8063d5e62855146109ba578063d6a73a54146109c2578063dd62ed3e146109ca5761034c565b8063c7de902d116100d3578063c7de902d14610943578063d1f5c33b14610969578063d5abeb011461098f5761034c565b8063b23ddce71461087c578063b4b5ea57146108d6578063c3cda520146108fc5761034c565b8063962399e2116101665780639b4e735f116101405780639b4e735f146107f6578063a15d39d41461081c578063a457c2d714610824578063a9059cbb146108505761034c565b8063962399e2146107a257806398f1312e146107c85780639ae697bf146107d05761034c565b80638da5cb5b116101975780638da5cb5b1461078a578063937f2e331461079257806395d89b411461079a5761034c565b806382e012b1146106ee57806386cb9498146106f65780638cec2923146107445761034c565b806340c10f191161028c57806360caae5811610235578063715018a61161020f578063715018a61461067057806376ee403814610678578063782d6fe1146106805780637ecebe00146106c85761034c565b806360caae581461061c5780636fcfff451461062457806370a082311461064a5761034c565b8063587cde1e11610266578063587cde1e146105a85780635c19a95c146105ce5780635e0fac2e146105f65761034c565b806340c10f191461051757806342061268146105435780634f205087146105825761034c565b806323b872dd116102f9578063313ce567116102d3578063313ce567146104bd57806339509351146104db5780633dd5a83e146105075780633f2a55401461050f5761034c565b806323b872dd1461045c578063265e7bde1461049257806330b36cef146104b55761034c565b806318160ddd1161032a57806318160ddd1461042857806320606b7014610430578063238189a8146104385761034c565b806306fdde0314610351578063095ea7b3146103ce5780631523a3711461040e575b600080fd5b610359610a60565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561039357818101518382015260200161037b565b50505050905090810190601f1680156103c05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103fa600480360360408110156103e457600080fd5b506001600160a01b038135169060200135610af6565b604080519115158252519081900360200190f35b610416610d05565b60408051918252519081900360200190f35b610416610d0b565b610416610d11565b610440610d35565b604080516001600160a01b039092168252519081900360200190f35b6103fa6004803603606081101561047257600080fd5b506001600160a01b03813581169160208101359091169060400135610d44565b6103fa600480360360408110156104a857600080fd5b5080359060200135610dcb565b6104166110b8565b6104c56110be565b6040805160ff9092168252519081900360200190f35b6103fa600480360360408110156104f157600080fd5b506001600160a01b0381351690602001356110c7565b610440611220565b61044061122f565b6103fa6004803603604081101561052d57600080fd5b506001600160a01b03813516906020013561123e565b6105696004803603602081101561055957600080fd5b50356001600160a01b0316611579565b6040805163ffffffff9092168252519081900360200190f35b6104166004803603602081101561059857600080fd5b50356001600160a01b031661159e565b610440600480360360208110156105be57600080fd5b50356001600160a01b03166115f3565b6105f4600480360360208110156105e457600080fd5b50356001600160a01b031661160e565b005b6104166004803603602081101561060c57600080fd5b50356001600160a01b031661161b565b6104c5611638565b6105696004803603602081101561063a57600080fd5b50356001600160a01b031661163d565b6104166004803603602081101561066057600080fd5b50356001600160a01b0316611655565b6105f4611670565b610440611741565b6106ac6004803603604081101561069657600080fd5b506001600160a01b03813516906020013561175d565b604080516001600160601b039092168252519081900360200190f35b610416600480360360208110156106de57600080fd5b50356001600160a01b0316611988565b6105f461199a565b61071c6004803603602081101561070c57600080fd5b50356001600160a01b0316611a3e565b6040805194151585526020850193909352838301919091526060830152519081900360800190f35b6103fa600480360360c081101561075a57600080fd5b506001600160a01b0381351690602081013590604081013515159060608101359060808101359060a00135611a69565b610440611d4f565b6105f4611d63565b610359611e6a565b6103fa600480360360208110156107b857600080fd5b50356001600160a01b0316611ecb565b6104c5612135565b610416600480360360208110156107e657600080fd5b50356001600160a01b031661213a565b6104406004803603602081101561080c57600080fd5b50356001600160a01b03166121d6565b6104166121f4565b6103fa6004803603604081101561083a57600080fd5b506001600160a01b0381351690602001356121fa565b6103fa6004803603604081101561086657600080fd5b506001600160a01b0381351690602001356123ae565b6108ae6004803603604081101561089257600080fd5b5080356001600160a01b0316906020013563ffffffff166123cb565b6040805163ffffffff90931683526001600160601b0390911660208301528051918290030190f35b6106ac600480360360208110156108ec57600080fd5b50356001600160a01b0316612411565b6105f4600480360360c081101561091257600080fd5b506001600160a01b038135169060208101359060408101359060ff6060820135169060808101359060a00135612483565b6104166004803603602081101561095957600080fd5b50356001600160a01b031661272b565b6103fa6004803603602081101561097f57600080fd5b50356001600160a01b03166127dd565b6109976129e9565b604080516001600160601b03909316835260208301919091528051918290030190f35b6105f4612a1f565b610416612b22565b610416600480360360408110156109e057600080fd5b506001600160a01b0381358116916020013516612b28565b610416612b53565b6108ae60048036036040811015610a1657600080fd5b5080356001600160a01b0316906020013563ffffffff16612b77565b6105f460048036036020811015610a4857600080fd5b50356001600160a01b0316612bad565b610440612cda565b60038054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610aec5780601f10610ac157610100808354040283529160200191610aec565b820191906000526020600020905b815481529060010190602001808311610acf57829003601f168201915b5050505050905090565b600060026006541415610b50576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026006556001600160a01b038316610b9a5760405162461bcd60e51b81526004018080602001828103825260388152602001806140716038913960400191505060405180910390fd5b6001600160a01b038316331415610be25760405162461bcd60e51b815260040180806020018281038252603a8152602001806146c1603a913960400191505060405180910390fd5b6000600019831415610bf75750600019610c1c565b610c1983604051806060016040528060308152602001613f6c60309139612d48565b90505b6011546001600160a01b038581169116148015610c575750601154610c4b9033906001600160a01b0316612b28565b816001600160601b0316105b15610c9857601154610c9590610c779033906001600160a01b0316612b28565b60405180608001604052806047815260200161476660479139612d48565b90505b610cac3385836001600160601b0316612deb565b604080516001600160601b038316815290516001600160a01b0386169133917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259181900360200190a36001915050600160065592915050565b60165481565b60025490565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6011546001600160a01b031681565b6000610d51848484612ed7565b610dc184610d5d61309d565b610dbc85604051806060016040528060288152602001614254602891396001600160a01b038a16600090815260016020526040812090610d9b61309d565b6001600160a01b0316815260208101919091526040016000205491906130a1565b612deb565b5060019392505050565b6000610dd561309d565b6001600160a01b0316610de6611d4f565b6001600160a01b031614610e41576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b601654610e5290630f099c00612ce9565b421015610e905760405162461bcd60e51b81526004018080602001828103825260638152602001806142dc6063913960800191505060405180910390fd5b601454421015610ed15760405162461bcd60e51b81526004018080602001828103825260488152602001806144706048913960600191505060405180910390fd5b6013548311610f115760405162461bcd60e51b81526004018080602001828103825260508152602001806140216050913960600191505060405180910390fd5b6000610f43610f3a6064610f34600560ff166013546130fb90919063ffffffff16565b90613154565b60135490612ce9565b905080841115610f845760405162461bcd60e51b815260040180806020018281038252603681526020018061415e6036913960400191505060405180910390fd5b601354604080519182526020820186905280517fa626f93317e2474b716846a09cf0e28aacb96052643b252fe97704208fecf9b59281900390910190a1610fe3846040518060600160405280604081526020016146fb60409139612d48565b6001600160601b03166013556000610fff426301e13380612ce9565b9050808410156110405760405162461bcd60e51b815260040180806020018281038252606081526020018061427c6060913960600191505060405180910390fd5b601454604080519182526020820186905280517f63abb52e09389994840613a4780aa50f65baa62888e3cdcfcb088ac2de0b7db59281900390910190a161109f84604051806080016040528060488152602001613fd960489139612d48565b6001600160601b03166014555060019150505b92915050565b60155481565b60055460ff1690565b600060026006541415611121576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600655816111303361161b565b101561116d5760405162461bcd60e51b815260040180806020018281038252603d8152602001806147fd603d913960400191505060405180910390fd5b6001600160a01b0383166111b25760405162461bcd60e51b81526004018080602001828103825260418152602001806141c26041913960600191505060405180910390fd5b6001600160a01b0383163314156111fa5760405162461bcd60e51b81526004018080602001828103825260438152602001806149046043913960600191505060405180910390fd5b6112133384610dbc8561120d3389612b28565b90612ce9565b5060018060065592915050565b6011546001600160a01b031690565b6012546001600160a01b031681565b600061124861309d565b6001600160a01b0316611259611d4f565b6001600160a01b0316146112b4576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6013546112c38361120d610d0b565b11156113005760405162461bcd60e51b81526004018080602001828103825260248152602001806143cb6024913960400191505060405180910390fd5b60165461131190630f099c00612ce9565b42101561134f5760405162461bcd60e51b815260040180806020018281038252605581526020018061483a6055913960600191505060405180910390fd5b6000821161138e5760405162461bcd60e51b81526004018080602001828103825260308152602001806142246030913960400191505060405180910390fd5b6015544210156113cf5760405162461bcd60e51b81526004018080602001828103825260448152602001806140da6044913960600191505060405180910390fd5b6001600160a01b0383166114145760405162461bcd60e51b81526004018080602001828103825260348152602001806143976034913960400191505060405180910390fd5b6001600160a01b03831630141561145c5760405162461bcd60e51b815260040180806020018281038252603c815260200180613eba603c913960400191505060405180910390fd5b61146a426301e13380612ce9565b6015819055506000611494836040518060600160405280602781526020016145e960279139612d48565b90506114ae6064610f3460026114a8610d0b565b906130fb565b816001600160601b031611156114f55760405162461bcd60e51b81526004018080602001828103825260388152602001806145376038913960400191505060405180910390fd5b61150884826001600160601b03166131bb565b604080516001600160a01b03861681526001600160601b038316602082015281517f51c018f451551bf4e92356d59bc5f1fcd317ef0f884d97807cae6dd395da7fe0929181900390910190a16001600160a01b03808516600090815260076020526040812054610dc19216836132ab565b6001600160a01b03811660009081526009602052604090205463ffffffff165b919050565b6011546000906001600160a01b031633146115ea5760405162461bcd60e51b8152600401808060200182810382526050815260200180613dec6050913960600191505060405180910390fd5b6110b28261343f565b6007602052600090815260409020546001600160a01b031681565b611618338261365c565b50565b60006110b26116298361213a565b61163284611655565b9061371f565b600581565b60096020526000908152604090205463ffffffff1681565b6001600160a01b031660009081526020819052604090205490565b61167861309d565b6001600160a01b0316611689611d4f565b6001600160a01b0316146116e4576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60055460405160009161010090046001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36005805474ffffffffffffffffffffffffffffffffffffffff0019169055565b336000908152600760205260409020546001600160a01b031690565b600043821061179d5760405162461bcd60e51b815260040180806020018281038252602c815260200180614610602c913960400191505060405180910390fd5b6001600160a01b03831660009081526009602052604090205463ffffffff16806117cb5760009150506110b2565b6001600160a01b038416600090815260086020908152604080832063ffffffff600019860181168552925290912054168310611848576001600160a01b03841660009081526008602090815260408083206000199490940163ffffffff168352929052205464010000000090046001600160601b031690506110b2565b6001600160a01b038416600090815260086020908152604080832083805290915290205463ffffffff168310156118835760009150506110b2565b600060001982015b8163ffffffff168163ffffffff161115611942576000600263ffffffff848403166001600160a01b038916600090815260086020908152604080832094909304860363ffffffff8181168452948252918390208351808501909452549384168084526401000000009094046001600160601b03169083015292509087141561191d576020015194506110b29350505050565b805163ffffffff168711156119345781935061193b565b6001820392505b505061188b565b506001600160a01b038516600090815260086020908152604080832063ffffffff909416835292905220546001600160601b036401000000009091041691505092915050565b600a6020526000908152604090205481565b6119a261309d565b6001600160a01b03166119b3611d4f565b6001600160a01b031614611a0e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b601280547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b179055565b600c60205260009081526040902080546001820154600283015460039093015460ff90921692909184565b6011546000906001600160a01b03163314611ab55760405162461bcd60e51b8152600401808060200182810382526050815260200180613dec6050913960600191505060405180910390fd5b85611abf33611655565b1015611b12576040805162461bcd60e51b815260206004820152601460248201527f696e73756666696369656e742062616c616e6365000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038716611b6d576040805162461bcd60e51b815260206004820152601660248201527f63616e6e6f74206265207a65726f206164647265737300000000000000000000604482015290519081900360640190fd5b6001600160a01b038716301415611bcb576040805162461bcd60e51b815260206004820152601760248201527f63616e6e6f74206265207468697320636f6e7472616374000000000000000000604482015290519081900360640190fd5b6011546001600160a01b0388811691161415611c185760405162461bcd60e51b815260040180806020018281038252602e815260200180614194602e913960400191505060405180910390fd5b6001600160a01b038716331415611c76576040805162461bcd60e51b815260206004820152601e60248201527f746865206f776e65722063616e6e6f74206c6f636b757020697473656c660000604482015290519081900360640190fd5b6001600160a01b0387166000908152600b6020526040902054611c999087612ce9565b6001600160a01b0388166000908152600b6020908152604080832093909355600c905220805460ff1916861515178155600181018590556002810184905560038101839055611ce9338989612ed7565b604080516001600160a01b038a1681526020810189905287151581830152606081018790526080810186905290517f7ec8d498ce0e4d11d52cf0588976b9a8b30679d7135f9e82de77e2e318a1ea409181900360a00190a1506001979650505050505050565b60055461010090046001600160a01b031690565b601154604080517f1e83409a00000000000000000000000000000000000000000000000000000000815233600482015290516000926001600160a01b031691631e83409a91602480830192602092919082900301818787803b158015611dc857600080fd5b505af1158015611ddc573d6000803e3d6000fd5b505050506040513d6020811015611df257600080fd5b5051336000908152600c602052604090205490915060ff16151560011415611e2c57601154611e2a906001600160a01b031682610af6565b505b604080513381526020810183905281517f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4929181900390910190a150565b60048054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610aec5780601f10610ac157610100808354040283529160200191610aec565b6011546000906001600160a01b031615611f9f57601160009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611f2d57600080fd5b505afa158015611f41573d6000803e3d6000fd5b505050506040513d6020811015611f5757600080fd5b50516001600160a01b03163314611f9f5760405162461bcd60e51b815260040180806020018281038252605a815260200180613d65605a913960600191505060405180910390fd5b6001600160a01b038216611ffa576040805162461bcd60e51b815260206004820152601660248201527f63616e6e6f74206265207a65726f206164647265737300000000000000000000604482015290519081900360640190fd5b6001600160a01b038216301415612058576040805162461bcd60e51b815260206004820152601760248201527f63616e6e6f74206265207468697320636f6e7472616374000000000000000000604482015290519081900360640190fd5b6011546001600160a01b03838116911614156120bb576040805162461bcd60e51b815260206004820152601c60248201527f6d757374206265206e65772054696d654c6f636b526567697374727900000000604482015290519081900360640190fd5b601154604080516001600160a01b039283168152918416602083015280517f1b4fa7e35ece4dcbbb914f91d8c3539c828d43c0b8a700237373966a27a9693a9281900390910190a150601180546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff199091161790556001919050565b600281565b6000806121468361272b565b6001600160a01b0384166000908152600c6020526040902060020154909150421080159061217c5750336001600160a01b038416145b8015612186575080155b156121a9576001600160a01b0383166000908152600b60205260408120556110b2565b336001600160a01b03841614156110b257336000908152600c602052604090204260039091015592915050565b6001600160a01b039081166000908152600760205260409020541690565b60135481565b600060026006541415612254576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026006556001600160a01b03831661229e5760405162461bcd60e51b81526004018080602001828103825260418152602001806143ef6041913960600191505060405180910390fd5b6001600160a01b0383163314156122e65760405162461bcd60e51b815260040180806020018281038252604381526020018061467e6043913960600191505060405180910390fd5b816122f13385612b28565b101561232e5760405162461bcd60e51b8152600401808060200182810382526036815260200180613e846036913960400191505060405180910390fd5b6011546001600160a01b038481169116141561237b5760405162461bcd60e51b8152600401808060200182810382526050815260200180613f1c6050913960600191505060405180910390fd5b6112133384610dbc856040518060600160405280602581526020016148b4602591396123a7338a612b28565b91906130a1565b60006123c26123bb61309d565b8484612ed7565b50600192915050565b6001600160a01b0391909116600090815260086020908152604080832063ffffffff9485168452909152902054908116916401000000009091046001600160601b031690565b6001600160a01b03811660009081526009602052604081205463ffffffff168061243c57600061247c565b6001600160a01b0383166000908152600860209081526040808320600019850163ffffffff16845290915290205464010000000090046001600160601b03165b9392505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8666124ae610a60565b805190602001206124bd61377c565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c08401526001600160a01b038b1660e084015261010083018a90526101208084018a905282518085039091018152610140840183528051908501207f19010000000000000000000000000000000000000000000000000000000000006101608501526101628401829052610182808501829052835180860390910181526101a285018085528151918701919091206000918290526101c2860180865281905260ff8b166101e287015261020286018a90526102228601899052935192965090949293909260019261024280840193601f198301929081900390910190855afa15801561260b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661265d5760405162461bcd60e51b815260040180806020018281038252602b81526020018061473b602b913960400191505060405180910390fd5b6001600160a01b0381166000908152600a602052604090205460010189146126b65760405162461bcd60e51b8152600401808060200182810382526027815260200180613d0e6027913960400191505060405180910390fd5b6001600160a01b0381166000908152600a6020526040902080546001019055428810156127145760405162461bcd60e51b815260040180806020018281038252602b8152602001806148d9602b913960400191505060405180910390fd5b61271e818b61365c565b505050505b505050505050565b6001600160a01b0381166000908152600b6020908152604080832054600c90925282206001015481904290612764906301e13380612ce9565b11156127735791506115999050565b6001600160a01b0384166000908152600c6020526040902060020154421061279d5750600061247c565b6001600160a01b0384166000908152600c6020526040902060018101546002909101546127d591810390610f349085904290036130fb565b949350505050565b60006127e761309d565b6001600160a01b03166127f8611d4f565b6001600160a01b031614612853576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0382166128ae576040805162461bcd60e51b815260206004820152601660248201527f63616e6e6f74206265207a65726f206164647265737300000000000000000000604482015290519081900360640190fd5b6001600160a01b03821630141561290c576040805162461bcd60e51b815260206004820152601760248201527f63616e6e6f74206265207468697320636f6e7472616374000000000000000000604482015290519081900360640190fd5b6012546001600160a01b038381169116141561296f576040805162461bcd60e51b815260206004820152601f60248201527f6d757374206265206e65772052657761726473204469737472696275746f7200604482015290519081900360640190fd5b601254604080516001600160a01b039283168152918416602083015280517fd8732c543edde4e60b54e1136459ee3a610f1243749765d9dbdbcf9fe76a7bd59281900390910190a150601280546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff199091161790556001919050565b6000806000612a126013546040518060600160405280603d8152602001613cae603d9139612d48565b6014549093509150509091565b612a2761309d565b6001600160a01b0316612a38611d4f565b6001600160a01b031614612a93576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b601254600160a81b900460ff1615612af2576040805162461bcd60e51b815260206004820152600e60248201527f4241424c206d75737420666c6f77000000000000000000000000000000000000604482015290519081900360640190fd5b601280547fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff16600160a81b179055565b60145481565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b600860209081526000928352604080842090915290825290205463ffffffff81169064010000000090046001600160601b031682565b612bb561309d565b6001600160a01b0316612bc6611d4f565b6001600160a01b031614612c21576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116612c665760405162461bcd60e51b8152600401808060200182810382526026815260200180613e3c6026913960400191505060405180910390fd5b6005546040516001600160a01b0380841692610100900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b039092166101000274ffffffffffffffffffffffffffffffffffffffff0019909216919091179055565b6010546001600160a01b031681565b60008282018381101561247c576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b505050565b6000816c010000000000000000000000008410612de35760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612da8578181015183820152602001612d90565b50505050905090810190601f168015612dd55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b509192915050565b6001600160a01b038316612e305760405162461bcd60e51b81526004018080602001828103825260248152602001806145c56024913960400191505060405180910390fd5b6001600160a01b038216612e755760405162461bcd60e51b8152600401808060200182810382526022815260200180613e626022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316612f1c5760405162461bcd60e51b815260040180806020018281038252604281526020018061463c6042913960600191505060405180910390fd5b6001600160a01b038216612f615760405162461bcd60e51b815260040180806020018281038252604081526020018061411e6040913960400191505060405180910390fd5b6001600160a01b038216301415612fa95760405162461bcd60e51b81526004018080602001828103825260508152602001806147ad6050913960600191505060405180910390fd5b80612fb384611655565b1015612ff05760405162461bcd60e51b81526004018080602001828103825260318152602001806145946031913960400191505060405180910390fd5b80612ffa8461161b565b10156130375760405162461bcd60e51b81526004018080602001828103825260408152602001806144306040913960400191505060405180910390fd5b613042838383613780565b6001600160a01b0380841660009081526007602090815260408083205486851684529281902054815160608101909252602c808352612d4395948516949190911692613098928792909161433f90830139612d48565b6132ab565b3390565b600081848411156130f35760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612da8578181015183820152602001612d90565b505050900390565b60008261310a575060006110b2565b8282028284828161311757fe5b041461247c5760405162461bcd60e51b81526004018080602001828103825260218152602001806142036021913960400191505060405180910390fd5b60008082116131aa576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816131b357fe5b049392505050565b6001600160a01b038216613216576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b613222600083836138db565b60025461322f9082612ce9565b6002556001600160a01b0382166000908152602081905260409020546132559082612ce9565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b816001600160a01b0316836001600160a01b0316141580156132d657506000816001600160601b0316115b15612d43576001600160a01b0383161561338f576001600160a01b03831660009081526009602052604081205463ffffffff169081613316576000613356565b6001600160a01b0385166000908152600860209081526040808320600019860163ffffffff16845290915290205464010000000090046001600160601b03165b9050600061337d82856040518060600160405280603181526020016140a960319139613957565b905061338b868484846139bc565b5050505b6001600160a01b03821615612d43576001600160a01b03821660009081526009602052604081205463ffffffff1690816133ca57600061340a565b6001600160a01b0384166000908152600860209081526040808320600019860163ffffffff16845290915290205464010000000090046001600160601b03165b905060006134318285604051806060016040528060308152602001613d3560309139613b7d565b9050612723858484846139bc565b6011546000906001600160a01b0316331461348b5760405162461bcd60e51b8152600401808060200182810382526050815260200180613dec6050913960600191505060405180910390fd5b6001600160a01b0382166000908152600b60205260409020546134df5760405162461bcd60e51b815260040180806020018281038252602c81526020018061436b602c913960400191505060405180910390fd5b60006134ea8361213a565b90506000811161352b5760405162461bcd60e51b815260040180806020018281038252603d815260200180613f9c603d913960400191505060405180910390fd5b6001600160a01b0383166000908152600c602052604090205460ff1615156001146135875760405162461bcd60e51b81526004018080602001828103825260468152602001806144f16046913960600191505060405180910390fd5b6001600160a01b038084166000908152600b60209081526040808320839055600c9091528120805460ff191681556001810182905560028101829055600301556011546135d79185911683610d44565b6136125760405162461bcd60e51b815260040180806020018281038252602d815260200180613dbf602d913960400191505060405180910390fd5b604080516001600160a01b03851681526020810183905281517f27f83af92b39768b17fe0c8d6922452702717efb8626d97e7a754e0b27d4f6d2929181900390910190a192915050565b6001600160a01b03808316600090815260076020526040812054909116906136a461368685613be7565b60405180606001604052806025815260200161488f60259139612d48565b6001600160a01b03858116600081815260076020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916898616908117909155905194955093928616927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a46137198284836132ab565b50505050565b600082821115613776576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b4690565b6001600160a01b0383166137c55760405162461bcd60e51b815260040180806020018281038252602581526020018061456f6025913960400191505060405180910390fd5b6001600160a01b03821661380a5760405162461bcd60e51b8152600401808060200182810382526023815260200180613ceb6023913960400191505060405180910390fd5b6138158383836138db565b61385281604051806060016040528060268152602001613ef6602691396001600160a01b03861660009081526020819052604090205491906130a1565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546138819082612ce9565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6138e6838383612d43565b612d436001600160a01b038416158061390c57506011546001600160a01b038581169116145b8061392457506012546001600160a01b038581169116145b8061393c57506011546001600160a01b038481169116145b806139505750601254600160a01b900460ff165b603e613bf2565b6000836001600160601b0316836001600160601b0316111582906130f35760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612da8578181015183820152602001612d90565b60006139e0436040518060600160405280603981526020016144b860399139613c04565b905060008463ffffffff16118015613a2957506001600160a01b038516600090815260086020908152604080832063ffffffff6000198901811685529252909120548282169116145b15613a89576001600160a01b0385166000908152600860209081526040808320600019880163ffffffff168452909152902080546fffffffffffffffffffffffff0000000019166401000000006001600160601b03851602179055613b29565b60408051808201825263ffffffff80841682526001600160601b0380861660208085019182526001600160a01b038b166000818152600883528781208c871682528352878120965187549451909516640100000000026fffffffffffffffffffffffff000000001995871663ffffffff19958616179590951694909417909555938252600990935292909220805460018801909316929091169190911790555b604080516001600160601b0380861682528416602082015281516001600160a01b038816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b6000838301826001600160601b038087169083161015613bde5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612da8578181015183820152602001612d90565b50949350505050565b60006110b282611655565b81613c0057613c0081613c5a565b5050565b6000816401000000008410612de35760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612da8578181015183820152602001612d90565b62461bcd60e51b6000908152602060045260076024526642414223000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fdfe4241424c546f6b656e3a3a6d6178537570706c79416c6c6f7765643a206d6178537570706c79416c6c6f7765642065786365656473203936206269747345524332303a207472616e7366657220746f20746865207a65726f2061646472657373566f7465546f6b656e3a3a64656c656761746542795369673a20696e76616c6964206e6f6e6365566f7465546f6b656e3a3a5f6d6f766544656c6567617465733a20766f746520616d6f756e74206f766572666c6f777354696d654c6f636b6564546f6b656e3a3a206f6e6c7954696d654c6f636b4f776e65723a2063616e206f6e6c7920626520657865637574656420627920746865206f776e6572206f662054696d654c6f636b526567697374727954696d654c6f636b6564546f6b656e3a3a63616e63656c546f6b656e733a5472616e73666572206661696c656454696d654c6f636b6564546f6b656e3a3a206f6e6c7954696d654c6f636b52656769737472793a2063616e206f6e6c792062652065786563757465642062792054696d654c6f636b52656769737472794f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737354696d654c6f636b6564546f6b656e3a3a6465637265617365416c6c6f77616e63653a556e646572666c6f7720636f6e646974696f6e4241424c546f6b656e3a3a6d696e743a2063616e6e6f74206d696e7420746f207468652061646472657373206f66207468697320636f6e747261637445524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636554696d654c6f636b6564546f6b656e3a3a6465637265617365416c6c6f77616e63653a63616e6e6f7420646563726561736520616c6c6f77616e636520746f2074696d654c6f636b526567697374727954696d654c6f636b6564546f6b656e3a3a617070726f76653a20616d6f756e742065786365656473203936206269747354696d654c6f636b6564546f6b656e3a3a63616e63656c546f6b656e733a546865726520617265206e6f206d6f7265206c6f636b656420746f6b656e734241424c546f6b656e3a3a6368616e67654d6178537570706c793a206e6577206e65774d6178537570706c79416c6c6f7765644166746572206578636565647320393620626974734241424c546f6b656e3a3a6368616e67654d6178537570706c793a206368616e67654d6178537570706c792073686f756c6420626520686967686572207468616e2070726576696f75732076616c756554696d654c6f636b6564546f6b656e3a3a617070726f76653a207370656e6465722063616e6e6f74206265207a65726f2061646472657373566f7465546f6b656e3a3a5f6d6f766544656c6567617465733a20766f746520616d6f756e7420756e646572666c6f77734241424c546f6b656e3a3a6d696e743a206d696e74696e67206e6f7420616c6c6f776564207965742062656361757365206d696e74696e67416c6c6f776564416674657254696d654c6f636b6564546f6b656e3a3a205f7472616e736665723a2063616e6e6f74207472616e7366657220746f20746865207a65726f20616464726573734241424c546f6b656e3a3a6368616e67654d6178537570706c793a206578636565646564206f6620616c6c6f7765642035252063617063616e6e6f74206265207468652054696d654c6f636b526567697374727920636f6e747261637420697473656c6654696d654c6f636b6564546f6b656e3a3a696e637265617365416c6c6f77616e63653a5370656e6465722063616e6e6f74206265207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774241424c546f6b656e3a3a6d696e743a206d696e742073686f756c6420626520686967686572207468616e207a65726f45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654241424c546f6b656e3a3a6368616e67654d6178537570706c793a20746865206e65774d6178537570706c79416c6c6f77656441667465722073686f756c64206265206174206c656173742031207965617220696e20746865206675747572654241424c546f6b656e3a3a6368616e67654d6178537570706c793a2061206368616e6765206f6e206d6178537570706c79416c6c6f776564206e6f7420616c6c6f77656420756e74696c2038207965617273206166746572206465706c6f796d656e7454696d654c6f636b6564546f6b656e3a3a205f7472616e736665723a2075696e743936206f766572666c6f7754696d654c6f636b6564546f6b656e3a3a63616e63656c546f6b656e733a4e6f7420726567697374657265644241424c546f6b656e3a3a6d696e743a2063616e6e6f74207472616e7366657220746f20746865207a65726f20616464726573734241424c546f6b656e3a3a6d696e743a206d617820737570706c7920657863656564656454696d654c6f636b6564546f6b656e3a3a6465637265617365416c6c6f77616e63653a5370656e6465722063616e6e6f74206265207a65726f206164647265737354696d654c6f636b6564546f6b656e3a3a205f7472616e736665723a20617474656d7074696e6720746f207472616e73666572206c6f636b65642066756e64734241424c546f6b656e3a3a6368616e67654d6178537570706c793a2061206368616e6765206f6e206d6178537570706c79416c6c6f776564206e6f7420616c6c6f77656420796574566f7465546f6b656e3a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747354696d654c6f636b6564546f6b656e3a3a63616e63656c546f6b656e733a63616e6e6f742063616e63656c206c6f636b656420746f6b656e7320746f20496e766573746f72734241424c546f6b656e3a3a6d696e743a206578636565646564206d696e7420636170206f66203225206f6620746f74616c20737570706c7945524332303a207472616e736665722066726f6d20746865207a65726f206164647265737354696d654c6f636b6564546f6b656e3a3a205f7472616e736665723a20696e73756666696369656e742062616c616e636545524332303a20617070726f76652066726f6d20746865207a65726f20616464726573734241424c546f6b656e3a3a6d696e743a20616d6f756e74206578636565647320393620626974734241424c546f6b656e3a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e656454696d654c6f636b6564546f6b656e3a3a205f7472616e736665723a2063616e6e6f74207472616e736665722066726f6d20746865207a65726f206164647265737354696d654c6f636b6564546f6b656e3a3a6465637265617365416c6c6f77616e63653a5370656e6465722063616e6e6f7420626520746865206d73672e73656e64657254696d654c6f636b6564546f6b656e3a3a617070726f76653a207370656e6465722063616e6e6f7420626520746865206d73672e73656e6465724241424c546f6b656e3a3a6368616e67654d6178537570706c793a20706f74656e7469616c206d617820616d6f756e7420657863656564732039362062697473566f7465546f6b656e3a3a64656c656761746542795369673a20696e76616c6964207369676e617475726554696d654c6f636b6564546f6b656e3a3a617070726f76653a2063616e6e6f7420646563726561736520616c6c6f77616e636520746f2074696d656c6f636b726567697374727954696d654c6f636b6564546f6b656e3a3a205f7472616e736665723a20646f206e6f74207472616e7366657220746f6b656e7320746f2074686520746f6b656e20636f6e747261637420697473656c6654696d654c6f636b6564546f6b656e3a3a696e637265617365416c6c6f77616e63653a4e6f7420656e6f75676820756e6c6f636b656420746f6b656e734241424c546f6b656e3a3a6d696e743a206d696e74696e67206e6f7420616c6c6f776564206166746572207468652046495253545f45504f43485f4d494e542068617320706173736564203e3d2038207965617273566f7465546f6b656e3a3a5f64656c65676174653a2075696e743936206f766572666c6f7745524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f566f7465546f6b656e3a3a64656c656761746542795369673a207369676e6174757265206578706972656454696d654c6f636b6564546f6b656e3a3a696e637265617365416c6c6f77616e63653a5370656e6465722063616e6e6f7420626520746865206d73672e73656e646572a26469706673582212202d212a7a002da8040d91ec0016331229c6241c6a79297ad5e840431000e764b464736f6c63430007060033", + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract TimeLockRegistry\",\"name\":\"newTimeLockRegistry\",\"type\":\"address\"},{\"internalType\":\"contract IBabController\",\"name\":\"newController\",\"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\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Cancel\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Claim\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromDelegate\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toDelegate\",\"type\":\"address\"}],\"name\":\"DelegateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"DelegateVotesChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"LockedBalance\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousAllowedAfterValue\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newAllowedAfterValue\",\"type\":\"uint256\"}],\"name\":\"MaxSupplyAllowedAfterChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousMaxValue\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxValue\",\"type\":\"uint256\"}],\"name\":\"MaxSupplyChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokensminted\",\"type\":\"uint256\"}],\"name\":\"MintedNewTokens\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenslocked\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isTeamOrAdvisor\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"startingVesting\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"endingVesting\",\"type\":\"uint256\"}],\"name\":\"NewLockout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"NewRewardsDistributorRegistration\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"NewTimeLockRegistration\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"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\":\"BABLTokenDeploymentTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DELEGATION_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_SUPPLY_CAP\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINT_CAP\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"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\":\"rawAmount\",\"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\":\"address\",\"name\":\"lockedAccount\",\"type\":\"address\"}],\"name\":\"cancelVestedTokens\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newMaxSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newMaxSupplyAllowedAfter\",\"type\":\"uint256\"}],\"name\":\"changeMaxSupply\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"checkpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"fromBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"votes\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimMyTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"contract IBabController\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"delegatee\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"delegateBySig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disableTokensTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"enableTokensTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"}],\"name\":\"getCheckpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"fromBlock\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"votes\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getCurrentVotes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getDelegatee\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMyDelegatee\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getNumberOfCheckpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPriorVotes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTimeLockRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"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\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"lockedBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxSupply\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxSupplyAllowed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxSupplyAllowedAfter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"mintingAllowedAfter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"numCheckpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_profile\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_vestingBegin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_vestingEnd\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_lastClaim\",\"type\":\"uint256\"}],\"name\":\"registerLockup\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardsDistributor\",\"outputs\":[{\"internalType\":\"contract RewardsDistributor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract RewardsDistributor\",\"name\":\"newRewardsDistributor\",\"type\":\"address\"}],\"name\":\"setRewardsDistributor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract TimeLockRegistry\",\"name\":\"newTimeLockRegistry\",\"type\":\"address\"}],\"name\":\"setTimeLockRegistry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeLockRegistry\",\"outputs\":[{\"internalType\":\"contract TimeLockRegistry\",\"name\":\"\",\"type\":\"address\"}],\"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\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"unlockedBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"vestedToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"teamOrAdvisor\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"vestingBegin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"vestingEnd\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastClaim\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"viewLockedBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"The BABLToken contract is ERC20 using 18 decimals as a standard Is Ownable to transfer ownership to Governor Alpha for Decentralized Governance It overrides the mint and maximum supply to control the timing and maximum cap allowed along the time.\",\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"This will overwrite the approval amount for `spender` except in the case of spender is Time Lock Registry and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\",\"params\":{\"rawAmount\":\"The number of tokens that are approved (2^256-1 means infinite)\",\"spender\":\"The address of the account which may transfer tokens\"},\"returns\":{\"_0\":\"Whether or not the approval succeeded\"}},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"cancelVestedTokens(address)\":{\"details\":\"Cancel distribution registration\",\"params\":{\"lockedAccount\":\"that should have its still locked distribution removed due to non-completion of its vesting period\"}},\"changeMaxSupply(uint256,uint256)\":{\"params\":{\"newMaxSupply\":\"The new maximum limit, limited by a maximum of 5% cap per year\",\"newMaxSupplyAllowedAfter\":\"The new waiting period to change the maxSupplyAllowed limited for a minimum of 1 year\"},\"returns\":{\"_0\":\"Whether or not the changeMaxSupply succeeded\"}},\"claimMyTokens()\":{\"details\":\"Claim msg.sender tokens (if any available in the registry)\"},\"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 override with respect to the fulfillment of vesting conditions along the way An user cannot decrease the allowance to the Time Lock Registry who is in charge of vesting conditions\",\"returns\":{\"_0\":\"Whether or not the decreaseAllowance succeeded\"}},\"delegate(address)\":{\"params\":{\"delegatee\":\"The address to delegate votes to\"}},\"delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)\":{\"params\":{\"delegatee\":\"The address to delegate votes to\",\"expiry\":\"The time at which to expire the signature\",\"nonce\":\"The contract state required to match the signature\",\"r\":\"Half of the ECDSA signature pair\",\"s\":\"Half of the ECDSA signature pair\",\"v\":\"The recovery byte of the signature\"}},\"getCurrentVotes(address)\":{\"params\":{\"account\":\"Account to get voting power for\"},\"returns\":{\"_0\":\"Voting power for an account\"}},\"getPriorVotes(address,uint256)\":{\"params\":{\"account\":\"Account to get voting power for\",\"blockNumber\":\"Block to get voting power at\"},\"returns\":{\"_0\":\"Voting power for an account at specific block\"}},\"getTimeLockRegistry()\":{\"returns\":{\"_0\":\"Address of the Time Lock Registry\"}},\"increaseAllowance(address,uint256)\":{\"details\":\"This is an override with respect to the fulfillment of vesting conditions along the way However an user can increase allowance many times, it will never be able to transfer locked tokens during vesting period\",\"returns\":{\"_0\":\"Whether or not the increaseAllowance succeeded\"}},\"lockedBalance(address)\":{\"params\":{\"account\":\"Account to check\"},\"returns\":{\"_0\":\"Amount locked in the time of checking\"}},\"maxSupply()\":{\"returns\":{\"_0\":\"Returns the value of maxSupplyAllowed at the time\"}},\"mint(address,uint256)\":{\"details\":\"MINT_CAP The new maximum limit, limited by a 2% cap of totalSupply for each new mint and always limited by maxSupplyAllowed. mintingAllowedAfter Defines the next time allowed for a new mint\",\"params\":{\"_amount\":\"The number of tokens to be minted\",\"_to\":\"The address of the destination account that will receive the new BABL tokens\"},\"returns\":{\"_0\":\"Whether or not the mint succeeded\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"registerLockup(address,uint256,bool,uint256,uint256,uint256)\":{\"params\":{\"_amount\":\"Tokens to be transferred\",\"_lastClaim\":\"Unix Time when the claim was done from that particular address\",\"_profile\":\"True if is a Team Member or Advisor\",\"_receiver\":\"Address to receive the tokens\",\"_vestingBegin\":\"Unix Time when the vesting for that particular address\",\"_vestingEnd\":\"Unix Time when the vesting for that particular address\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setRewardsDistributor(address)\":{\"params\":{\"newRewardsDistributor\":\"Address of Rewards Distributor contract\"}},\"setTimeLockRegistry(address)\":{\"params\":{\"newTimeLockRegistry\":\"Address of TimeLockRegistry contract\"}},\"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`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unlockedBalance(address)\":{\"params\":{\"account\":\"Account to check\"},\"returns\":{\"_0\":\"Amount that is unlocked and available eg. to transfer\"}},\"viewLockedBalance(address)\":{\"params\":{\"account\":\"Account to check\"},\"returns\":{\"_0\":\"Amount locked in the time of checking\"}}},\"stateVariables\":{\"FIRST_EPOCH_MINT\":{\"details\":\"First Epoch Mint where no more than 1 Million BABL can be minted (>= 8 Years)\"},\"MIN_TIME_BETWEEN_MINTS\":{\"details\":\"Minimum time between mints after\"},\"NAME\":{\"details\":\"EIP-20 token name for this token\"},\"SYMBOL\":{\"details\":\"EIP-20 token symbol for this token\"},\"maxSupplyAllowed\":{\"details\":\"Maximum number of tokens in circulation of 1 million for the first 8 years (using 18 decimals as ERC20 standard)\"}},\"title\":\"BABL Token\",\"version\":1},\"userdoc\":{\"events\":{\"Cancel(address,uint256)\":{\"notice\":\"An event that emitted when a cancellation of Lock tokens is registered\"},\"Claim(address,uint256)\":{\"notice\":\"An event that emitted when a claim of tokens are registered\"},\"LockedBalance(address,uint256)\":{\"notice\":\"An event that emitted when a lockedBalance query is done\"},\"MaxSupplyAllowedAfterChanged(uint256,uint256)\":{\"notice\":\"An event that emitted when maxSupplyAllowedAfter changes\"},\"MaxSupplyChanged(uint256,uint256)\":{\"notice\":\"An event thats emitted when maxSupplyAllowed changes\"},\"MintedNewTokens(address,uint256)\":{\"notice\":\"An event that emitted when a new mint ocurr\"},\"NewLockout(address,uint256,bool,uint256,uint256)\":{\"notice\":\"An event that emitted when a new lockout ocurr\"},\"NewRewardsDistributorRegistration(address,address)\":{\"notice\":\"An event that emitted when a new Rewards Distributor is registered\"},\"NewTimeLockRegistration(address,address)\":{\"notice\":\"An event that emitted when a new Time Lock is registered\"}},\"kind\":\"user\",\"methods\":{\"BABLTokenDeploymentTimestamp()\":{\"notice\":\"The timestamp of BABL Token deployment\"},\"DELEGATION_TYPEHASH()\":{\"notice\":\"The EIP-712 typehash for the delegation struct used by the contract\"},\"DOMAIN_TYPEHASH()\":{\"notice\":\"The EIP-712 typehash for the contract's domain\"},\"MAX_SUPPLY_CAP()\":{\"notice\":\"Cap on the percentage of maxSupplyAllowed that can be increased per year after maxSupplyAllowedAfter\"},\"MINT_CAP()\":{\"notice\":\"Cap on the percentage of totalSupply that can be minted at each mint after the initial 1 Million BABL\"},\"approve(address,uint256)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Override the Approval of allowances of ERC20 with special conditions for vestingOverride of \\\"Approve\\\" function to allow the `spender` to transfer up to `amount` from `src`\"},\"cancelVestedTokens(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Cancel and remove locked tokens due to non-completion of vesting period applied only by Time Lock Registry and specifically to Team or Advisors as it does not apply to investors.\"},\"changeMaxSupply(uint256,uint256)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to change maxSupplyAllowedSet-up a greater maxSupplyAllowed value to allow more tokens to be minted\"},\"checkpoints(address,uint32)\":{\"notice\":\"A record of votes checkpoints for each account, by index\"},\"claimMyTokens()\":{\"notice\":\"GOVERNANCE FUNCTION. Each token owner can claim its own specific tokens with its own specific vesting conditions from the Time Lock Registry\"},\"constructor\":{\"notice\":\"Construct a new BABL token and gives ownership to sender\"},\"decreaseAllowance(address,uint256)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Override the decrease of allowances of ERC20 with special conditions for vestingAtomically decrease the allowance granted to `spender` by the caller.\"},\"delegate(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Delegating votes from msg.sender to delegateeDelegate votes from `msg.sender` to `delegatee`\"},\"delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Delegate votes using signature to 'delegatee'Delegates votes from signatory to `delegatee`\"},\"disableTokensTransfers()\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Disables transfers of ERC20 BABL Tokens\"},\"enableTokensTransfers()\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows transfers of ERC20 BABL Tokens Can only happen after the protocol is fully decentralized.\"},\"getCurrentVotes(address)\":{\"notice\":\"GOVERNANCE FUNCTION. Check Delegate votes using signature to 'delegatee'Get current voting power for an account\"},\"getPriorVotes(address,uint256)\":{\"notice\":\"GOVERNANCE FUNCTION. Get voting power at a specific block for an account\"},\"getTimeLockRegistry()\":{\"notice\":\"PUBLIC FUNCTION. Get the address of Time Lock RegistryGet the address of Time Lock Registry\"},\"increaseAllowance(address,uint256)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Override the Increase of allowances of ERC20 with special conditions for vestingAtomically increases the allowance granted to `spender` by the caller.\"},\"lockedBalance(address)\":{\"notice\":\"GOVERNANCE FUNCTION. Get locked balance for an accountGet locked balance for an account\"},\"maxSupply()\":{\"notice\":\"PUBLIC FUNCTION. Get the value of maxSupplyAllowed\"},\"maxSupplyAllowedAfter()\":{\"notice\":\"The timestamp after which a change on maxSupplyAllowed may occur\"},\"mint(address,uint256)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows to mint new tokensMint new BABL tokens. Initial 1 Million BABL. After 8 years new BABL could be minted by governance decision\"},\"mintingAllowedAfter()\":{\"notice\":\"The timestamp after which minting may occur after FIRST_EPOCH_MINT (8 years)\"},\"nonces(address)\":{\"notice\":\"A record of states for signing / validating signatures\"},\"numCheckpoints(address)\":{\"notice\":\"The number of checkpoints for each account\"},\"registerLockup(address,uint256,bool,uint256,uint256,uint256)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Register new token lockup conditions for vested tokens defined only by Time Lock RegistryTokens are completely delivered during the registration however lockup conditions apply for vested tokens locking them according to the distribution epoch periods and the type of recipient (Team, Advisor, Investor) Emits a transfer event showing a transfer to the recipient Only the registry can call this function\"},\"setRewardsDistributor(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Set the Rewards Distributor contract to control either BABL Mining or profit rewardsSet the Rewards Distriburor contract to control both types of rewards (profit and BABL Mining program)\"},\"setTimeLockRegistry(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Set the Time Lock Registry contract to control token vesting conditionsSet the Time Lock Registry contract to control token vesting conditions\"},\"unlockedBalance(address)\":{\"notice\":\"GOVERNANCE FUNCTION. Get unlocked balance for an accountGet unlocked balance for an account\"},\"vestedToken(address)\":{\"notice\":\"A record of token owners under vesting conditions for each account, by index\"},\"viewLockedBalance(address)\":{\"notice\":\"GOVERNANCE FUNCTION. View the locked balance for an accountView locked balance for an account\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/token/BABLToken.sol\":\"BABLToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () internal {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.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 using SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n // solhint-disable-next-line max-line-length\\n require((value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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 * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 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. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\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 { size := extcodesize(account) }\\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, \\\"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, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editGardenNFT(address _newGardenNFT) external;\\n\\n function editStrategyNFT(address _newStrategyNFT) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function editUniswapFactory(address _newUniswapFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\\n\\n function maxContributorsPerGarden() external view returns (uint256);\\n\\n function gardenCreationIsOpen() external view returns (bool);\\n\\n function openPublicGardenCreation() external;\\n\\n function setMaxContributorsPerGarden(uint256 _newMax) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function gardenNFT() external view returns (address);\\n\\n function strategyNFT() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\\n\\n function uniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0xdee5a27301c24f507d312f32249487fa9b0a756062a7e479405a1d1ee9ee7bb8\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function isGardenStrategy(address _strategy) external view returns (bool);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategyActiveInGarden(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to,\\n bool _withPenalty\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x88f1786ffee23e386aaa1735177912e1b5a7cdd440dafe52fb139fe50fd621b4\",\"license\":\"Apache License\"},\"contracts/interfaces/IPriceOracle.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol IPriceOracle)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPriceOracle\\n * @author Babylon Finance\\n *\\n * Interface for interacting with PriceOracle\\n */\\ninterface IPriceOracle {\\n /* ============ Functions ============ */\\n\\n function getPrice(address _assetOne, address _assetTwo) external view returns (uint256);\\n\\n function updateAdapters(address _assetOne, address _assetTwo) external;\\n}\\n\",\"keccak256\":\"0xa22e0e5e166f6f6714553b736ee921b916c37bc5b557042bf6042cc010d2a041\",\"license\":\"Apache License\"},\"contracts/interfaces/IRewardsDistributor.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IRewardsDistributor\\n * @author Babylon Finance\\n *\\n * Interface for the distribute rewards of the BABL Mining Program.\\n */\\n\\ninterface IRewardsDistributor {\\n // Structs\\n struct PrincipalPerTimestamp {\\n uint256 principal;\\n uint256 time;\\n uint256 timeListPointer;\\n }\\n\\n function protocolPrincipal() external view returns (uint256);\\n\\n function pid() external view returns (uint256);\\n\\n // solhint-disable-next-line\\n function EPOCH_DURATION() external pure returns (uint256);\\n\\n // solhint-disable-next-line\\n function START_TIME() external view returns (uint256);\\n\\n // solhint-disable-next-line\\n function Q1_REWARDS() external pure returns (uint256);\\n\\n // solhint-disable-next-line\\n function DECAY_RATE() external pure returns (uint256);\\n\\n function addProtocolPrincipal(uint256 _capital) external;\\n\\n function substractProtocolPrincipal(uint256 _capital) external;\\n\\n function getStrategyRewards(address _strategy) external returns (uint96);\\n\\n function sendTokensToContributor(address _to, uint96 _amount) external;\\n\\n function getRewards(\\n address _garden,\\n address _contributor,\\n address[] calldata _finalizedStrategies\\n ) external view returns (uint256, uint96);\\n\\n function getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) external view returns (uint256);\\n\\n /**\\n function getContributor(address _garden, address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256[] memory,\\n uint256\\n );\\n */\\n function updateGardenPower(address _garden, uint256 _pid) external;\\n\\n function setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw,\\n uint256 _pid\\n ) external;\\n\\n function tokenSupplyPerQuarter(uint256 quarter) external view returns (uint96);\\n\\n function checkProtocol(uint256 _time)\\n external\\n view\\n returns (\\n uint256 principal,\\n uint256 time,\\n uint256 quarterBelonging,\\n uint256 timeListPointer,\\n uint256 power\\n );\\n\\n function checkQuarter(uint256 _num)\\n external\\n view\\n returns (\\n uint256 quarterPrincipal,\\n uint256 quarterNumber,\\n uint256 quarterPower,\\n uint96 supplyPerQuarter\\n );\\n}\\n\",\"keccak256\":\"0xc68eb7826b0174d4f6dff50320abb2cd958a978d4537c57867dd828dc2798662\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n address,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x850597ec9a68eb86f31f13b6b77d3b31350b4ed3d0019dedfbd3550ad1a1d9e2\",\"license\":\"Apache License\"},\"contracts/interfaces/IVoteToken.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface IVoteToken {\\n function delegate(address delegatee) external;\\n\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n function getCurrentVotes(address account) external view returns (uint96);\\n\\n function getPriorVotes(address account, uint256 blockNumber) external view returns (uint96);\\n\\n function getMyDelegatee() external view returns (address);\\n\\n function getDelegatee(address account) external view returns (address);\\n\\n function getCheckpoints(address account, uint32 id) external view returns (uint32 fromBlock, uint96 votes);\\n\\n function getNumberOfCheckpoints(address account) external view returns (uint32);\\n}\\n\\ninterface IVoteTokenWithERC20 is IVoteToken, IERC20 {}\\n\",\"keccak256\":\"0xd3d6174f81ce2c1678a536b2a486179f9a5a694849b334556aeb155b9b13f777\",\"license\":\"Apache License\"},\"contracts/lib/AddressArrayUtils.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n/**\\n * @title AddressArrayUtils\\n * @author Set Protocol\\n *\\n * Utility functions to handle Address Arrays\\n */\\nlibrary AddressArrayUtils {\\n /**\\n * Finds the index of the first occurrence of the given element.\\n * @param A The input array to search\\n * @param a The value to find\\n * @return Returns (index and isIn) for the first occurrence starting from index 0\\n */\\n function indexOf(address[] memory A, address a) internal pure returns (uint256, bool) {\\n uint256 length = A.length;\\n for (uint256 i = 0; i < length; i++) {\\n if (A[i] == a) {\\n return (i, true);\\n }\\n }\\n return (uint256(-1), false);\\n }\\n\\n /**\\n * Returns true if the value is present in the list. Uses indexOf internally.\\n * @param A The input array to search\\n * @param a The value to find\\n * @return Returns isIn for the first occurrence starting from index 0\\n */\\n function contains(address[] memory A, address a) internal pure returns (bool) {\\n (, bool isIn) = indexOf(A, a);\\n return isIn;\\n }\\n\\n /**\\n * Returns true if there are 2 elements that are the same in an array\\n * @param A The input array to search\\n * @return Returns boolean for the first occurrence of a duplicate\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n require(A.length > 0, 'A is empty');\\n\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n address current = A[i];\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (current == A[j]) {\\n return true;\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @param A The input array to search\\n * @param a The address to remove\\n * @return Returns the array with the object removed.\\n */\\n function remove(address[] memory A, address a) internal pure returns (address[] memory) {\\n (uint256 index, bool isIn) = indexOf(A, a);\\n if (!isIn) {\\n revert('Address not in array.');\\n } else {\\n (address[] memory _A, ) = pop(A, index);\\n return _A;\\n }\\n }\\n\\n /**\\n * Removes specified index from array\\n * @param A The input array to search\\n * @param index The index to remove\\n * @return Returns the new array and the removed entry\\n */\\n function pop(address[] memory A, uint256 index) internal pure returns (address[] memory, address) {\\n uint256 length = A.length;\\n require(index < A.length, 'Index must be < A length');\\n address[] memory newAddresses = new address[](length - 1);\\n for (uint256 i = 0; i < index; i++) {\\n newAddresses[i] = A[i];\\n }\\n for (uint256 j = index + 1; j < length; j++) {\\n newAddresses[j - 1] = A[j];\\n }\\n return (newAddresses, A[index]);\\n }\\n\\n /**\\n * Returns the combination of the two arrays\\n * @param A The first array\\n * @param B The second array\\n * @return Returns A extended by B\\n */\\n function extend(address[] memory A, address[] memory B) internal pure returns (address[] memory) {\\n uint256 aLength = A.length;\\n uint256 bLength = B.length;\\n address[] memory newAddresses = new address[](aLength + bLength);\\n for (uint256 i = 0; i < aLength; i++) {\\n newAddresses[i] = A[i];\\n }\\n for (uint256 j = 0; j < bLength; j++) {\\n newAddresses[aLength + j] = B[j];\\n }\\n return newAddresses;\\n }\\n}\\n\",\"keccak256\":\"0x409127cd8cadb573e5de48fd992efbd8b0f1e243d235abc3c5f2fa873195c16a\",\"license\":\"Apache License\"},\"contracts/lib/BabylonErrors.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n// solhint-disable\\n\\n/**\\n * @notice Forked from https://github.com/balancer-labs/balancer-core-v2/blob/master/contracts/lib/helpers/BalancerErrors.sol\\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 // 'BAB#{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 \\\"BAB#\\\" part is a known constant\\n // (0x42414223): 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(0x42414223000000, 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 // Max deposit limit needs to be under the limit\\n uint256 internal constant MAX_DEPOSIT_LIMIT = 0;\\n // Creator needs to deposit\\n uint256 internal constant MIN_CONTRIBUTION = 1;\\n // Min Garden token supply >= 0\\n uint256 internal constant MIN_TOKEN_SUPPLY = 2;\\n // Deposit hardlock needs to be at least 1 block\\n uint256 internal constant DEPOSIT_HARDLOCK = 3;\\n // Needs to be at least the minimum\\n uint256 internal constant MIN_LIQUIDITY = 4;\\n // _reserveAssetQuantity is not equal to msg.value\\n uint256 internal constant MSG_VALUE_DO_NOT_MATCH = 5;\\n // Withdrawal amount has to be equal or less than msg.sender balance\\n uint256 internal constant MSG_SENDER_TOKENS_DO_NOT_MATCH = 6;\\n // Tokens are staked\\n uint256 internal constant TOKENS_STAKED = 7;\\n // Balance too low\\n uint256 internal constant BALANCE_TOO_LOW = 8;\\n // msg.sender doesn't have enough tokens\\n uint256 internal constant MSG_SENDER_TOKENS_TOO_LOW = 9;\\n // There is an open redemption window already\\n uint256 internal constant REDEMPTION_OPENED_ALREADY = 10;\\n // Cannot request twice in the same window\\n uint256 internal constant ALREADY_REQUESTED = 11;\\n // Rewards and profits already claimed\\n uint256 internal constant ALREADY_CLAIMED = 12;\\n // Value have to be greater than zero\\n uint256 internal constant GREATER_THAN_ZERO = 13;\\n // Must be reserve asset\\n uint256 internal constant MUST_BE_RESERVE_ASSET = 14;\\n // Only contributors allowed\\n uint256 internal constant ONLY_CONTRIBUTOR = 15;\\n // Only controller allowed\\n uint256 internal constant ONLY_CONTROLLER = 16;\\n // Only creator allowed\\n uint256 internal constant ONLY_CREATOR = 17;\\n // Only keeper allowed\\n uint256 internal constant ONLY_KEEPER = 18;\\n // Fee is too high\\n uint256 internal constant FEE_TOO_HIGH = 19;\\n // Only strategy allowed\\n uint256 internal constant ONLY_STRATEGY = 20;\\n // Only active allowed\\n uint256 internal constant ONLY_ACTIVE = 21;\\n // Only inactive allowed\\n uint256 internal constant ONLY_INACTIVE = 22;\\n // Address should be not zero address\\n uint256 internal constant ADDRESS_IS_ZERO = 23;\\n // Not within range\\n uint256 internal constant NOT_IN_RANGE = 24;\\n // Value is too low\\n uint256 internal constant VALUE_TOO_LOW = 25;\\n // Value is too high\\n uint256 internal constant VALUE_TOO_HIGH = 26;\\n // Only strategy or protocol allowed\\n uint256 internal constant ONLY_STRATEGY_OR_CONTROLLER = 27;\\n // Normal withdraw possible\\n uint256 internal constant NORMAL_WITHDRAWAL_POSSIBLE = 28;\\n // User does not have permissions to join garden\\n uint256 internal constant USER_CANNOT_JOIN = 29;\\n // User does not have permissions to add strategies in garden\\n uint256 internal constant USER_CANNOT_ADD_STRATEGIES = 30;\\n // Only Protocol or garden\\n uint256 internal constant ONLY_PROTOCOL_OR_GARDEN = 31;\\n // Only Strategist\\n uint256 internal constant ONLY_STRATEGIST = 32;\\n // Only Integration\\n uint256 internal constant ONLY_INTEGRATION = 33;\\n // Only garden and data not set\\n uint256 internal constant ONLY_GARDEN_AND_DATA_NOT_SET = 34;\\n // Only active garden\\n uint256 internal constant ONLY_ACTIVE_GARDEN = 35;\\n // Contract is not a garden\\n uint256 internal constant NOT_A_GARDEN = 36;\\n // Not enough tokens\\n uint256 internal constant STRATEGIST_TOKENS_TOO_LOW = 37;\\n // Stake is too low\\n uint256 internal constant STAKE_HAS_TO_AT_LEAST_ONE = 38;\\n // Duration must be in range\\n uint256 internal constant DURATION_MUST_BE_IN_RANGE = 39;\\n // Max Capital Requested\\n uint256 internal constant MAX_CAPITAL_REQUESTED = 41;\\n // Votes are already resolved\\n uint256 internal constant VOTES_ALREADY_RESOLVED = 42;\\n // Voting window is closed\\n uint256 internal constant VOTING_WINDOW_IS_OVER = 43;\\n // Strategy needs to be active\\n uint256 internal constant STRATEGY_NEEDS_TO_BE_ACTIVE = 44;\\n // Max capital reached\\n uint256 internal constant MAX_CAPITAL_REACHED = 45;\\n // Capital is less then rebalance\\n uint256 internal constant CAPITAL_IS_LESS_THAN_REBALANCE = 46;\\n // Strategy is in cooldown period\\n uint256 internal constant STRATEGY_IN_COOLDOWN = 47;\\n // Strategy is not executed\\n uint256 internal constant STRATEGY_IS_NOT_EXECUTED = 48;\\n // Strategy is not over yet\\n uint256 internal constant STRATEGY_IS_NOT_OVER_YET = 49;\\n // Strategy is already finalized\\n uint256 internal constant STRATEGY_IS_ALREADY_FINALIZED = 50;\\n // No capital to unwind\\n uint256 internal constant STRATEGY_NO_CAPITAL_TO_UNWIND = 51;\\n // Strategy needs to be inactive\\n uint256 internal constant STRATEGY_NEEDS_TO_BE_INACTIVE = 52;\\n // Duration needs to be less\\n uint256 internal constant DURATION_NEEDS_TO_BE_LESS = 53;\\n // Can't sweep reserve asset\\n uint256 internal constant CANNOT_SWEEP_RESERVE_ASSET = 54;\\n // Voting window is opened\\n uint256 internal constant VOTING_WINDOW_IS_OPENED = 55;\\n // Strategy is executed\\n uint256 internal constant STRATEGY_IS_EXECUTED = 56;\\n // Min Rebalance Capital\\n uint256 internal constant MIN_REBALANCE_CAPITAL = 57;\\n // Not a valid strategy NFT\\n uint256 internal constant NOT_STRATEGY_NFT = 58;\\n // Garden Transfers Disabled\\n uint256 internal constant GARDEN_TRANSFERS_DISABLED = 59;\\n // Tokens are hardlocked\\n uint256 internal constant TOKENS_HARDLOCKED = 60;\\n // Max contributors reached\\n uint256 internal constant MAX_CONTRIBUTORS = 61;\\n // BABL Transfers Disabled\\n uint256 internal constant BABL_TRANSFERS_DISABLED = 62;\\n // Strategy duration range error\\n uint256 internal constant DURATION_RANGE = 63;\\n // Checks the min amount of voters\\n uint256 internal constant MIN_VOTERS_CHECK = 64;\\n // Ge contributor power error\\n uint256 internal constant CONTRIBUTOR_POWER_CHECK_WINDOW = 65;\\n // Not enough reserve set aside\\n uint256 internal constant NOT_ENOUGH_RESERVE = 66;\\n // Garden is already public\\n uint256 internal constant GARDEN_ALREADY_PUBLIC = 67;\\n // Withdrawal with penalty\\n uint256 internal constant WITHDRAWAL_WITH_PENALTY = 68;\\n // Withdrawal with penalty\\n uint256 internal constant ONLY_MINING_ACTIVE = 69;\\n // Overflow in supply\\n uint256 internal constant OVERFLOW_IN_SUPPLY = 70;\\n // Overflow in power\\n uint256 internal constant OVERFLOW_IN_POWER = 71;\\n // Not a system contract\\n uint256 internal constant NOT_A_SYSTEM_CONTRACT = 72;\\n // Strategy vs Garden mismatch\\n uint256 internal constant STRATEGY_GARDEN_MISMATCH = 73;\\n // Minimum quarters is 1\\n uint256 internal constant QUARTERS_MIN_1 = 74;\\n // Too many strategy operations\\n uint256 internal constant TOO_MANY_OPS = 75;\\n // Only operations\\n uint256 internal constant ONLY_OPERATION = 76;\\n // Strat params wrong length\\n uint256 internal constant STRAT_PARAMS_LENGTH = 77;\\n // Garden params wrong length\\n uint256 internal constant GARDEN_PARAMS_LENGTH = 78;\\n // Token names too long\\n uint256 internal constant NAME_TOO_LONG = 79;\\n // Contributor power overflows over garden power\\n uint256 internal constant CONTRIBUTOR_POWER_OVERFLOW = 80;\\n // Contributor power window out of bounds\\n uint256 internal constant CONTRIBUTOR_POWER_CHECK_DEPOSITS = 81;\\n}\\n\",\"keccak256\":\"0x9c9c2ea9026fe9033762f7221e2d5a91ed6b5f64cc14558b89fbd975cfb2d7b7\",\"license\":\"Apache License\"},\"contracts/lib/Math.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n// Libraries\\nimport './SafeDecimalMath.sol';\\n\\n// https://docs.synthetix.io/contracts/source/libraries/math\\nlibrary Math {\\n using SafeMath for uint256;\\n using SafeDecimalMath for uint256;\\n\\n /**\\n * @dev Uses \\\"exponentiation by squaring\\\" algorithm where cost is 0(logN)\\n * vs 0(N) for naive repeated multiplication.\\n * Calculates x^n with x as fixed-point and n as regular unsigned int.\\n * Calculates to 18 digits of precision with SafeDecimalMath.unit()\\n */\\n function powDecimal(uint256 x, uint256 n) internal pure returns (uint256) {\\n // https://mpark.github.io/programming/2014/08/18/exponentiation-by-squaring/\\n\\n uint256 result = SafeDecimalMath.unit();\\n while (n > 0) {\\n if (n % 2 != 0) {\\n result = result.multiplyDecimal(x);\\n }\\n x = x.multiplyDecimal(x);\\n n /= 2;\\n }\\n return result;\\n }\\n\\n function abs(int256 x) internal pure returns (int256) {\\n return x >= 0 ? x : -x;\\n }\\n}\\n\",\"keccak256\":\"0xc2ff8055f98dd7253df98838d870391067d9c622a68f263c942616ca8122bd93\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"contracts/lib/Safe3296.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nlibrary Safe3296 {\\n using SafeMath for uint256;\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint32\\n *\\n * @dev internal function to convert from uint256 to uint32\\n */\\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\\n require(n < 2**32, errorMessage);\\n return uint32(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint96\\n *\\n * @dev internal function to convert from uint256 to uint96\\n */\\n function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) {\\n require(n < 2**96, errorMessage);\\n return uint96(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to add two uint96 numbers\\n *\\n * @dev internal safe math function to add two uint96 numbers\\n */\\n function add96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n uint96 c = a + b;\\n require(c >= a, errorMessage);\\n return c;\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to subtract two uint96 numbers\\n *\\n * @dev internal safe math function to subtract two uint96 numbers\\n */\\n function sub96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n}\\n\",\"keccak256\":\"0x9ebf0856ab07500c9a8250d1be4b578a3e0ff454da7de67e3ab5632a7e6903c3\",\"license\":\"Apache License\"},\"contracts/lib/SafeDecimalMath.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nlibrary SafeDecimalMath {\\n using SafeMath for uint256;\\n\\n /* Number of decimal places in the representations. */\\n uint8 public constant decimals = 18;\\n uint8 public constant highPrecisionDecimals = 27;\\n\\n /* The number representing 1.0. */\\n uint256 public constant UNIT = 10**uint256(decimals);\\n\\n /* The number representing 1.0 for higher fidelity numbers. */\\n uint256 public constant PRECISE_UNIT = 10**uint256(highPrecisionDecimals);\\n uint256 private constant UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR = 10**uint256(highPrecisionDecimals - decimals);\\n\\n /**\\n * @return Provides an interface to UNIT.\\n */\\n function unit() external pure returns (uint256) {\\n return UNIT;\\n }\\n\\n /**\\n * @return Provides an interface to PRECISE_UNIT.\\n */\\n function preciseUnit() external pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @return The result of multiplying x and y, interpreting the operands as fixed-point\\n * decimals.\\n *\\n * @dev A unit factor is divided out after the product of x and y is evaluated,\\n * so that product must be less than 2**256. As this is an integer division,\\n * the internal division always rounds down. This helps save on gas. Rounding\\n * is more expensive on gas.\\n */\\n function multiplyDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\\n /* Divide by UNIT to remove the extra factor introduced by the product. */\\n return x.mul(y) / UNIT;\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of the specified precision unit.\\n *\\n * @dev The operands should be in the form of a the specified unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function _multiplyDecimalRound(\\n uint256 x,\\n uint256 y,\\n uint256 precisionUnit\\n ) private pure returns (uint256) {\\n /* Divide by UNIT to remove the extra factor introduced by the product. */\\n uint256 quotientTimesTen = x.mul(y) / (precisionUnit / 10);\\n\\n if (quotientTimesTen % 10 >= 5) {\\n quotientTimesTen += 10;\\n }\\n\\n return quotientTimesTen / 10;\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of a precise unit.\\n *\\n * @dev The operands should be in the precise unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function multiplyDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _multiplyDecimalRound(x, y, PRECISE_UNIT);\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of a standard unit.\\n *\\n * @dev The operands should be in the standard unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function multiplyDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _multiplyDecimalRound(x, y, UNIT);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is a high\\n * precision decimal.\\n *\\n * @dev y is divided after the product of x and the standard precision unit\\n * is evaluated, so the product of x and UNIT must be less than 2**256. As\\n * this is an integer division, the result is always rounded down.\\n * This helps save on gas. Rounding is more expensive on gas.\\n */\\n function divideDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\\n /* Reintroduce the UNIT factor that will be divided out by y. */\\n return x.mul(UNIT).div(y);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * decimal in the precision unit specified in the parameter.\\n *\\n * @dev y is divided after the product of x and the specified precision unit\\n * is evaluated, so the product of x and the specified precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function _divideDecimalRound(\\n uint256 x,\\n uint256 y,\\n uint256 precisionUnit\\n ) private pure returns (uint256) {\\n uint256 resultTimesTen = x.mul(precisionUnit * 10).div(y);\\n\\n if (resultTimesTen % 10 >= 5) {\\n resultTimesTen += 10;\\n }\\n\\n return resultTimesTen / 10;\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * standard precision decimal.\\n *\\n * @dev y is divided after the product of x and the standard precision unit\\n * is evaluated, so the product of x and the standard precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function divideDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _divideDecimalRound(x, y, UNIT);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * high precision decimal.\\n *\\n * @dev y is divided after the product of x and the high precision unit\\n * is evaluated, so the product of x and the high precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function divideDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _divideDecimalRound(x, y, PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Convert a standard decimal representation to a high precision one.\\n */\\n function decimalToPreciseDecimal(uint256 i) internal pure returns (uint256) {\\n return i.mul(UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR);\\n }\\n\\n /**\\n * @dev Convert a high precision decimal to a standard decimal representation.\\n */\\n function preciseDecimalToDecimal(uint256 i) internal pure returns (uint256) {\\n uint256 quotientTimesTen = i / (UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR / 10);\\n\\n if (quotientTimesTen % 10 >= 5) {\\n quotientTimesTen += 10;\\n }\\n\\n return quotientTimesTen / 10;\\n }\\n}\\n\",\"keccak256\":\"0x1372be4fa0c5813417396f128f5aa45da1cd7679e2d247a8e17d1ba5f0141253\",\"license\":\"Apache License\"},\"contracts/token/BABLToken.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {TimeLockedToken} from './TimeLockedToken.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\nimport {TimeLockRegistry} from './TimeLockRegistry.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\n\\n/**\\n * @title BABL Token\\n * @dev The BABLToken contract is ERC20 using 18 decimals as a standard\\n * Is Ownable to transfer ownership to Governor Alpha for Decentralized Governance\\n * It overrides the mint and maximum supply to control the timing and maximum cap allowed along the time.\\n */\\n\\ncontract BABLToken is TimeLockedToken {\\n using SafeMath for uint256;\\n using Address for address;\\n\\n /* ============ Events ============ */\\n\\n /// @notice An event that emitted when a new mint ocurr\\n event MintedNewTokens(address account, uint256 tokensminted);\\n\\n /// @notice An event thats emitted when maxSupplyAllowed changes\\n event MaxSupplyChanged(uint256 previousMaxValue, uint256 newMaxValue);\\n\\n /// @notice An event that emitted when maxSupplyAllowedAfter changes\\n event MaxSupplyAllowedAfterChanged(uint256 previousAllowedAfterValue, uint256 newAllowedAfterValue);\\n\\n /* ============ Modifiers ============ */\\n\\n /* ============ State Variables ============ */\\n\\n /// @dev EIP-20 token name for this token\\n string private constant NAME = 'Babylon.Finance';\\n\\n /// @dev EIP-20 token symbol for this token\\n string private constant SYMBOL = 'BABL';\\n\\n /// @dev Maximum number of tokens in circulation of 1 million for the first 8 years (using 18 decimals as ERC20 standard)\\n uint256 public maxSupplyAllowed = 1_000_000e18; //\\n\\n /// @notice The timestamp after which a change on maxSupplyAllowed may occur\\n uint256 public maxSupplyAllowedAfter;\\n\\n /// @notice Cap on the percentage of maxSupplyAllowed that can be increased per year after maxSupplyAllowedAfter\\n uint8 public constant MAX_SUPPLY_CAP = 5;\\n\\n /// @notice Cap on the percentage of totalSupply that can be minted at each mint after the initial 1 Million BABL\\n uint8 public constant MINT_CAP = 2;\\n\\n /// @notice The timestamp after which minting may occur after FIRST_EPOCH_MINT (8 years)\\n uint256 public mintingAllowedAfter;\\n\\n /// @notice The timestamp of BABL Token deployment\\n uint256 public BABLTokenDeploymentTimestamp;\\n\\n /// @dev First Epoch Mint where no more than 1 Million BABL can be minted (>= 8 Years)\\n uint32 private constant FIRST_EPOCH_MINT = 365 days * 8;\\n\\n /// @dev Minimum time between mints after\\n uint32 private constant MIN_TIME_BETWEEN_MINTS = 365 days;\\n\\n /* ============ Functions ============ */\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * @notice Construct a new BABL token and gives ownership to sender\\n */\\n constructor(TimeLockRegistry newTimeLockRegistry, IBabController newController) TimeLockedToken(NAME, SYMBOL) {\\n // Timestamp of contract deployment\\n BABLTokenDeploymentTimestamp = block.timestamp;\\n\\n // Set-up the minimum time of 8 years to wait until the maxSupplyAllowed can be changed (it will also include a max cap)\\n maxSupplyAllowedAfter = block.timestamp.add(FIRST_EPOCH_MINT);\\n\\n //Starting with a maxSupplyAllowed of 1 million for the first 8 years\\n _mint(msg.sender, 1_000_000e18);\\n\\n //Set-up the minimum time of 8 years for additional mints\\n mintingAllowedAfter = block.timestamp.add(FIRST_EPOCH_MINT);\\n\\n // Set the Time Lock Registry\\n timeLockRegistry = newTimeLockRegistry;\\n\\n // Set the Babylon Controller\\n controller = newController;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /* =========== Token related Gov Functions ====== */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows to mint new tokens\\n *\\n * @notice Mint new BABL tokens. Initial 1 Million BABL. After 8 years new BABL could be minted by governance decision\\n * @dev MINT_CAP The new maximum limit, limited by a 2% cap of totalSupply for each new mint and always limited by maxSupplyAllowed.\\n * mintingAllowedAfter Defines the next time allowed for a new mint\\n * @param _to The address of the destination account that will receive the new BABL tokens\\n * @param _amount The number of tokens to be minted\\n * @return Whether or not the mint succeeded\\n */\\n function mint(address _to, uint256 _amount) external onlyOwner returns (bool) {\\n require(totalSupply().add(_amount) <= maxSupplyAllowed, 'BABLToken::mint: max supply exceeded');\\n require(\\n block.timestamp >= BABLTokenDeploymentTimestamp.add(FIRST_EPOCH_MINT),\\n 'BABLToken::mint: minting not allowed after the FIRST_EPOCH_MINT has passed >= 8 years'\\n );\\n require(_amount > 0, 'BABLToken::mint: mint should be higher than zero');\\n require(\\n block.timestamp >= mintingAllowedAfter,\\n 'BABLToken::mint: minting not allowed yet because mintingAllowedAfter'\\n );\\n require(_to != address(0), 'BABLToken::mint: cannot transfer to the zero address');\\n require(_to != address(this), 'BABLToken::mint: cannot mint to the address of this contract');\\n\\n // set-up the new time where a new (the next) mint can be allowed\\n mintingAllowedAfter = block.timestamp.add(MIN_TIME_BETWEEN_MINTS);\\n\\n // mint the amount\\n uint96 amount = safe96(_amount, 'BABLToken::mint: amount exceeds 96 bits');\\n\\n // After FIRST_EPOCH_MINT (8 years) a MINT_CAP applies\\n require(\\n amount <= totalSupply().mul(MINT_CAP).div(100),\\n 'BABLToken::mint: exceeded mint cap of 2% of total supply'\\n );\\n _mint(_to, amount);\\n\\n emit MintedNewTokens(_to, amount);\\n\\n // move delegates to add voting power to the destination\\n _moveDelegates(address(0), delegates[_to], amount);\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to change maxSupplyAllowed\\n *\\n * @notice Set-up a greater maxSupplyAllowed value to allow more tokens to be minted\\n * @param newMaxSupply The new maximum limit, limited by a maximum of 5% cap per year\\n * @param newMaxSupplyAllowedAfter The new waiting period to change the maxSupplyAllowed limited for a minimum of 1 year\\n * @return Whether or not the changeMaxSupply succeeded\\n */\\n function changeMaxSupply(uint256 newMaxSupply, uint256 newMaxSupplyAllowedAfter) external onlyOwner returns (bool) {\\n require(\\n block.timestamp >= BABLTokenDeploymentTimestamp.add(FIRST_EPOCH_MINT),\\n 'BABLToken::changeMaxSupply: a change on maxSupplyAllowed not allowed until 8 years after deployment'\\n );\\n require(\\n block.timestamp >= maxSupplyAllowedAfter,\\n 'BABLToken::changeMaxSupply: a change on maxSupplyAllowed not allowed yet'\\n );\\n\\n // update the amount\\n require(\\n newMaxSupply > maxSupplyAllowed,\\n 'BABLToken::changeMaxSupply: changeMaxSupply should be higher than previous value'\\n );\\n uint256 limitedNewSupply = maxSupplyAllowed.add(maxSupplyAllowed.mul(MAX_SUPPLY_CAP).div(100));\\n require(newMaxSupply <= limitedNewSupply, 'BABLToken::changeMaxSupply: exceeded of allowed 5% cap');\\n emit MaxSupplyChanged(maxSupplyAllowed, newMaxSupply);\\n maxSupplyAllowed = safe96(newMaxSupply, 'BABLToken::changeMaxSupply: potential max amount exceeds 96 bits');\\n\\n // update the new waiting time until a new change could be done >= 1 year since this change\\n uint256 futureTime = block.timestamp.add(365 days);\\n require(\\n newMaxSupplyAllowedAfter >= futureTime,\\n 'BABLToken::changeMaxSupply: the newMaxSupplyAllowedAfter should be at least 1 year in the future'\\n );\\n emit MaxSupplyAllowedAfterChanged(maxSupplyAllowedAfter, newMaxSupplyAllowedAfter);\\n maxSupplyAllowedAfter = safe96(\\n newMaxSupplyAllowedAfter,\\n 'BABLToken::changeMaxSupply: new newMaxSupplyAllowedAfter exceeds 96 bits'\\n );\\n\\n return true;\\n }\\n\\n /**\\n * PUBLIC FUNCTION. Get the value of maxSupplyAllowed\\n *\\n * @return Returns the value of maxSupplyAllowed at the time\\n */\\n function maxSupply() external view returns (uint96, uint256) {\\n uint96 safeMaxSupply =\\n safe96(maxSupplyAllowed, 'BABLToken::maxSupplyAllowed: maxSupplyAllowed exceeds 96 bits'); // Overflow check\\n return (safeMaxSupply, maxSupplyAllowedAfter);\\n }\\n}\\n\",\"keccak256\":\"0x2c47e5891f832eab9a1ae337d95d460343bf3cfee9baa5cf9263877c9d1c2bc3\",\"license\":\"Apache License\"},\"contracts/token/RewardsDistributor.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {TimeLockedToken} from './TimeLockedToken.sol';\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\nimport {SafeDecimalMath} from '../lib/SafeDecimalMath.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\nimport {Math} from '../lib/Math.sol';\\nimport {Safe3296} from '../lib/Safe3296.sol';\\nimport {Errors, _require} from '../lib/BabylonErrors.sol';\\n\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {TimeLockedToken} from './TimeLockedToken.sol';\\nimport {IRewardsDistributor} from '../interfaces/IRewardsDistributor.sol';\\nimport {IPriceOracle} from '../interfaces/IPriceOracle.sol';\\n\\n/**\\n * @title Rewards Distributor implementing the BABL Mining Program and other Rewards to Strategists and Stewards\\n * @author Babylon Finance\\n * Rewards Distributor contract is a smart contract used to calculate and distribute all the BABL rewards of the BABL Mining Program\\n * along the time reserved for executed strategies. It implements a supply curve to distribute 500K BABL along the time.\\n * The supply curve is designed to optimize the long-term sustainability of the protocol.\\n * The rewards are front-loaded but they last for more than 10 years, slowly decreasing quarter by quarter.\\n * For that, it houses the state of the protocol power along the time as each strategy power is compared to the whole protocol usage.\\n * Rewards Distributor also is responsible for the calculation and delivery of other rewards as bonuses to specific profiles\\n * which are actively contributing to the protocol growth and their communities (Garden creators, Strategists and Stewards).\\n */\\ncontract RewardsDistributor is Ownable, IRewardsDistributor {\\n using SafeMath for uint256;\\n using SafeMath for int256;\\n using PreciseUnitMath for uint256;\\n using PreciseUnitMath for int256;\\n using SafeDecimalMath for uint256;\\n using SafeDecimalMath for int256;\\n using Math for uint256;\\n using Math for int256;\\n using Safe3296 for uint256;\\n using Safe3296 for int256;\\n using Safe3296 for uint96;\\n using Safe3296 for uint32;\\n\\n /* ========== Events ========== */\\n\\n /* ============ Modifiers ============ */\\n /**\\n * Throws if the call is not from a valid strategy\\n */\\n modifier onlyStrategy {\\n _require(controller.isSystemContract(address(IStrategy(msg.sender).garden())), Errors.ONLY_STRATEGY);\\n _;\\n }\\n /**\\n * Throws if the call is not from a valid active garden\\n */\\n modifier onlyActiveGarden(address _garden, uint256 _pid) {\\n if (_pid != 0 || gardenPid[address(_garden)] > 1) {\\n // Enable deploying flow with security restrictions\\n _require(IBabController(controller).isSystemContract(address(_garden)), Errors.NOT_A_SYSTEM_CONTRACT);\\n _require(IBabController(controller).isGarden(address(_garden)), Errors.ONLY_ACTIVE_GARDEN);\\n }\\n _require(msg.sender == address(_garden), Errors.ONLY_ACTIVE_GARDEN);\\n _require(IGarden(_garden).active(), Errors.ONLY_ACTIVE_GARDEN);\\n _;\\n }\\n\\n /**\\n * Throws if the BABL Rewards mining program is not active\\n */\\n modifier onlyMiningActive() {\\n _require(IBabController(controller).bablMiningProgramEnabled(), Errors.ONLY_MINING_ACTIVE);\\n _;\\n }\\n /**\\n * Throws if the sender is not the controller\\n */\\n modifier onlyController() {\\n _require(IBabController(controller).isSystemContract(msg.sender), Errors.NOT_A_SYSTEM_CONTRACT);\\n _require(address(controller) == msg.sender, Errors.ONLY_CONTROLLER);\\n _;\\n }\\n\\n /* ============ Constants ============ */\\n // 500K BABL allocated to this BABL Mining Program, the first quarter is Q1_REWARDS\\n // and the following quarters will follow the supply curve using a decay rate\\n uint256 public constant override Q1_REWARDS = 53_571_428_571_428_600e6; // First quarter (epoch) BABL rewards\\n // 12% quarterly decay rate (each 90 days)\\n // (Rewards on Q1 = 1,12 * Rewards on Q2) being Q1= Quarter 1, Q2 = Quarter 2\\n uint256 public constant override DECAY_RATE = 12e16;\\n // Duration of its EPOCH in days // BABL & profits split from the protocol\\n uint256 public constant override EPOCH_DURATION = 90 days;\\n\\n // solhint-disable-next-line\\n uint256 public override START_TIME; // Starting time of the rewards distribution\\n\\n // solhint-disable-next-line\\n uint256 public immutable BABL_STRATEGIST_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable BABL_STEWARD_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable BABL_LP_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_STRATEGIST_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_STEWARD_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_LP_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_PROTOCOL_FEE;\\n // solhint-disable-next-line\\n uint256 public immutable CREATOR_BONUS;\\n\\n // DAI normalize asset\\n address private constant DAI = 0x6B175474E89094C44Da98b954EedeAC495271d0F;\\n\\n /* ============ Structs ============ */\\n\\n struct ProtocolPerTimestamp {\\n // Protocol allocation checkpoints per timestamp along the time\\n uint256 principal; // Protocol principal allocation in normalized asset (DAI)\\n uint256 time; // Time of the checkpoint\\n uint256 quarterBelonging; // # Quarter checkpoint belonging since START_TIME\\n uint256 timeListPointer; // Pointer to the array of timestamps to enable the possibility of struct iteration\\n uint256 power; // Protocol power checkpoint (power is proportional to = principal * duration)\\n }\\n\\n struct ProtocolPerQuarter {\\n // Protocol allocation checkpoints per timestamp per each quarter along the time\\n uint256 quarterPrincipal; // Checkpoint to keep track on accumulated protocol principal per quarter in normalized asset (DAI)\\n uint256 quarterNumber; // # Quarter since START_TIME\\n uint256 quarterPower; // Accumulated Protocol power for each quarter\\n uint96 supplyPerQuarter; // Supply per quarter\\n }\\n\\n struct GardenPowerByTimestamp {\\n // Garden allocation checkpoints per timestamp per each garden\\n uint256 supply; // Checkpoint to keep track on garden supply\\n uint256 timestamp; // Checkpoint timestamps\\n uint256 power; // Garden power checkpoint (power is proportional to = principal * duration)\\n }\\n struct ContributorPerGarden {\\n // Checkpoints to keep track on the evolution of each contributor vs. each garden\\n uint256 lastDepositAt; // Last deposit timestamp of each contributor in each garden\\n uint256 initialDepositAt; // Checkpoint of the initial deposit\\n uint256[] timeListPointer; // Array of timestamps for each user in each garden\\n uint256 pid; // Garden contributor checkpoints counter to enable iteration\\n mapping(uint256 => TimestampContribution) tsContributions; // Sub-mapping all the contributor checkpoints\\n }\\n\\n struct TimestampContribution {\\n // Sub-mapping with all checkpoints for deposits and withdrawals of garden users\\n uint256 supply; // Garden token balance of user in each garden along the time\\n uint256 timestamp; // Checkpoint time\\n uint256 timePointer; // Pointer\\n uint256 power; // Contributor power per checkpoint\\n }\\n struct Checkpoints {\\n // Checkpoints for contributor power calculations where a certain window (from -> to) is queried\\n uint256 fromDepositAt; // First contributor checkpoint within the provided window\\n uint256 lastDepositAt; // Last contributor checkpoint within the provided window\\n uint256 gardenFromDepositAt; // First contributor checkpoint within the provided window\\n uint256 gardenLastDepositAt; // Last garden checkpoint within the provided window\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Instance of the Controller contract\\n IBabController public controller;\\n\\n // BABL Token contract\\n TimeLockedToken public babltoken;\\n\\n // Protocol total allocation points. Must be the sum of all allocation points (strategyPrincipal) in all strategy pools.\\n uint256 public override protocolPrincipal;\\n mapping(uint256 => ProtocolPerTimestamp) public protocolPerTimestamp; // Mapping of all protocol checkpoints\\n uint256[] public timeList; // Array of all protocol checkpoints\\n uint256 public override pid; // Initialization of the ID assigning timeListPointer to the checkpoint number\\n\\n mapping(uint256 => ProtocolPerQuarter) public protocolPerQuarter; // Mapping of the accumulated protocol per each active quarter\\n mapping(uint256 => bool) public isProtocolPerQuarter; // Check if the protocol per quarter data has been initialized\\n\\n // Strategy overhead control. Only used if each strategy has power overhead due to changes overtime\\n mapping(address => mapping(uint256 => uint256)) public rewardsPowerOverhead; // Overhead control to enable high level accuracy calculations for strategy rewards\\n // Contributor power control\\n mapping(address => mapping(address => ContributorPerGarden)) public contributorPerGarden; // Enable high level accuracy calculations\\n mapping(address => mapping(address => Checkpoints)) private checkpoints;\\n // Garden power control\\n mapping(address => mapping(uint256 => GardenPowerByTimestamp)) public gardenPowerByTimestamp;\\n mapping(address => uint256[]) public gardenTimelist;\\n mapping(address => uint256) public gardenPid;\\n\\n /* ============ Constructor ============ */\\n\\n constructor(TimeLockedToken _bablToken, IBabController _controller) {\\n require(address(_bablToken) != address(0), 'Token needs to exist');\\n require(address(_controller) != address(0), 'Controller needs to exist');\\n babltoken = _bablToken;\\n controller = _controller;\\n\\n (BABL_STRATEGIST_SHARE, BABL_STEWARD_SHARE, BABL_LP_SHARE, CREATOR_BONUS) = controller.getBABLSharing();\\n (PROFIT_STRATEGIST_SHARE, PROFIT_STEWARD_SHARE, PROFIT_LP_SHARE) = controller.getProfitSharing();\\n PROFIT_PROTOCOL_FEE = controller.protocolPerformanceFee();\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Function that adds the capital received to the total principal of the protocol per timestamp\\n * @param _capital Amount of capital in any type of asset to be normalized into DAI\\n */\\n function addProtocolPrincipal(uint256 _capital) external override onlyStrategy onlyMiningActive {\\n IStrategy strategy = IStrategy(msg.sender);\\n if (strategy.enteredAt() >= START_TIME) {\\n // onlyMiningActive control, it does not create a checkpoint if the strategy is not part of the Mining Program\\n _updateProtocolPrincipal(address(strategy), _capital, true);\\n }\\n }\\n\\n /**\\n * Function that removes the capital received to the total principal of the protocol per timestamp\\n * @param _capital Amount of capital in any type of asset to be normalized into DAI\\n */\\n function substractProtocolPrincipal(uint256 _capital) external override onlyStrategy onlyMiningActive {\\n IStrategy strategy = IStrategy(msg.sender);\\n if (strategy.enteredAt() >= START_TIME) {\\n // onlyMiningActive control, it does not create a checkpoint if the strategy is not part of the Mining Program\\n _updateProtocolPrincipal(address(strategy), _capital, false);\\n }\\n }\\n\\n /**\\n * Gets the total amount of rewards for a given strategy\\n * @param _strategy Strategy to check\\n */\\n function getStrategyRewards(address _strategy) external view override returns (uint96) {\\n IStrategy strategy = IStrategy(_strategy);\\n _require(strategy.exitedAt() != 0, Errors.STRATEGY_IS_NOT_OVER_YET);\\n IPriceOracle oracle = IPriceOracle(IBabController(controller).priceOracle());\\n uint256 pricePerTokenUnit = oracle.getPrice(IGarden(strategy.garden()).reserveAsset(), DAI);\\n uint256 allocated = strategy.capitalAllocated().preciseMul(pricePerTokenUnit);\\n uint256 returned = strategy.capitalReturned().preciseMul(pricePerTokenUnit);\\n if ((strategy.enteredAt() >= START_TIME) && (START_TIME != 0)) {\\n // We avoid gas consuming once a strategy got its BABL rewards during its finalization\\n uint256 rewards = strategy.strategyRewards();\\n if (rewards != 0) {\\n return Safe3296.safe96(rewards, 'overflow 96 bits');\\n }\\n // If the calculation was not done earlier we go for it\\n (uint256 numQuarters, uint256 startingQuarter) =\\n _getRewardsWindow(strategy.executedAt(), strategy.exitedAt());\\n uint256 bablRewards = 0;\\n if (numQuarters <= 1) {\\n bablRewards = _getStrategyRewardsOneQuarter(_strategy, allocated, startingQuarter); // Proportional supply till that moment within the same epoch\\n _require(\\n bablRewards <= protocolPerQuarter[startingQuarter].supplyPerQuarter,\\n Errors.OVERFLOW_IN_SUPPLY\\n );\\n _require(\\n allocated.mul(strategy.exitedAt().sub(strategy.executedAt())).sub(\\n strategy.rewardsTotalOverhead()\\n ) <= protocolPerQuarter[startingQuarter].quarterPower,\\n Errors.OVERFLOW_IN_POWER\\n );\\n } else {\\n bablRewards = _getStrategyRewardsSomeQuarters(_strategy, allocated, startingQuarter, numQuarters);\\n }\\n\\n // Babl rewards will be proportional to the total return (profit) with a max cap of x2\\n uint256 percentageMul = returned.preciseDiv(allocated);\\n if (percentageMul > 2e18) percentageMul = 2e18;\\n bablRewards = bablRewards.preciseMul(percentageMul);\\n return Safe3296.safe96(bablRewards, 'overflow 96 bits');\\n } else {\\n return 0;\\n }\\n }\\n\\n /**\\n * Sends BABL tokens rewards to a contributor after a claim is requested to the protocol.\\n * @param _to Address to send the tokens to\\n * @param _amount Amount of tokens to send the address to\\n */\\n function sendTokensToContributor(address _to, uint96 _amount) external override onlyMiningActive {\\n _require(controller.isSystemContract(msg.sender), Errors.NOT_A_SYSTEM_CONTRACT);\\n _safeBABLTransfer(_to, _amount);\\n }\\n\\n /**\\n * Starts BABL Rewards Mining Program from the controller.\\n */\\n function startBABLRewards() external onlyController {\\n if (START_TIME == 0) {\\n // It can only be activated once to avoid overriding START_TIME\\n START_TIME = block.timestamp;\\n }\\n }\\n\\n /**\\n * Function that set each contributor timestamp per garden\\n * @param _garden Address of the garden the contributor belongs to\\n * @param _contributor Address of the contributor\\n * @param _previousBalance Previous balance of the contributor\\n * @param _depositOrWithdraw If the timestamp is a deposit (true) or a withdraw (false)\\n * @param _pid The pid # of the Garden timestamps\\n */\\n function setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw,\\n uint256 _pid\\n ) external override onlyActiveGarden(_garden, _pid) {\\n _setContributorTimestampParams(_garden, _contributor, _previousBalance, _depositOrWithdraw);\\n }\\n\\n /**\\n * Function that set each garden timestamp\\n * @param _garden Address of the garden\\n * @param _pid The pid # of the Garden timestamp\\n */\\n function updateGardenPower(address _garden, uint256 _pid) external override onlyActiveGarden(_garden, _pid) {\\n _updateGardenPower(_garden);\\n }\\n\\n /* ========== View functions ========== */\\n\\n /**\\n * Calculates the profits and BABL that a contributor should receive from a series of finalized strategies\\n * @param _garden Garden to which the strategies and the user must belong to\\n * @param _contributor Address of the contributor to check\\n * @param _finalizedStrategies List of addresses of the finalized strategies to check\\n */\\n function getRewards(\\n address _garden,\\n address _contributor,\\n address[] calldata _finalizedStrategies\\n ) external view override returns (uint256, uint96) {\\n uint256 contributorTotalProfits = 0;\\n uint256 bablTotalRewards = 0;\\n _require(IBabController(controller).isGarden(address(_garden)), Errors.ONLY_ACTIVE_GARDEN);\\n for (uint256 i = 0; i < _finalizedStrategies.length; i++) {\\n (uint256 strategyProfits, uint256 strategyBABL) =\\n _getStrategyProfitsAndBABL(_garden, _finalizedStrategies[i], _contributor);\\n contributorTotalProfits = contributorTotalProfits.add(strategyProfits);\\n bablTotalRewards = bablTotalRewards.add(strategyBABL);\\n }\\n\\n return (contributorTotalProfits, Safe3296.safe96(bablTotalRewards, 'R28'));\\n }\\n\\n /**\\n * Gets the contributor power from one timestamp to the other\\n * @param _garden Address of the garden where the contributor belongs to\\n * @param _contributor Address if the contributor\\n * @param _from Initial timestamp\\n * @param _to End timestamp\\n * @return uint256 Contributor power during that period\\n */\\n function getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) external view override returns (uint256) {\\n return _getContributorPower(_garden, _contributor, _from, _to);\\n }\\n\\n /**\\n * Calculates the BABL rewards supply for each quarter\\n * @param _quarter Number of the epoch (quarter)\\n */\\n function tokenSupplyPerQuarter(uint256 _quarter) external pure override returns (uint96) {\\n return _tokenSupplyPerQuarter(_quarter);\\n }\\n\\n /**\\n * Check the protocol state in a certain timestamp\\n * @param time Timestamp\\n */\\n function checkProtocol(uint256 _time)\\n external\\n view\\n override\\n returns (\\n uint256 principal,\\n uint256 time,\\n uint256 quarterBelonging,\\n uint256 timeListPointer,\\n uint256 power\\n )\\n {\\n return (\\n protocolPerTimestamp[_time].principal,\\n protocolPerTimestamp[_time].time,\\n protocolPerTimestamp[_time].quarterBelonging,\\n protocolPerTimestamp[_time].timeListPointer,\\n protocolPerTimestamp[_time].power\\n );\\n }\\n\\n /**\\n * Check the quarter state for a specific quarter\\n * @param _num Number of quarter\\n */\\n function checkQuarter(uint256 _num)\\n external\\n view\\n override\\n returns (\\n uint256 quarterPrincipal,\\n uint256 quarterNumber,\\n uint256 quarterPower,\\n uint96 supplyPerQuarter\\n )\\n {\\n return (\\n protocolPerQuarter[_num].quarterPrincipal,\\n protocolPerQuarter[_num].quarterNumber,\\n protocolPerQuarter[_num].quarterPower,\\n protocolPerQuarter[_num].supplyPerQuarter\\n );\\n }\\n\\n /* ============ Internal Functions ============ */\\n /**\\n * Update the protocol principal checkpoints\\n * @param _strategy Strategy which is adding/removing principal\\n * @param _capital Capital to update\\n * @param _addOrSubstract Adding (true) or removing (false)\\n */\\n\\n function _updateProtocolPrincipal(\\n address _strategy,\\n uint256 _capital,\\n bool _addOrSubstract\\n ) internal {\\n IStrategy strategy = IStrategy(_strategy);\\n // Normalizing into DAI\\n IPriceOracle oracle = IPriceOracle(IBabController(controller).priceOracle());\\n uint256 pricePerTokenUnit = oracle.getPrice(IGarden(strategy.garden()).reserveAsset(), DAI);\\n _capital = _capital.preciseMul(pricePerTokenUnit);\\n ProtocolPerTimestamp storage protocolCheckpoint = protocolPerTimestamp[block.timestamp];\\n if (_addOrSubstract == false) {\\n // Substract\\n protocolPrincipal = protocolPrincipal.sub(_capital);\\n } else {\\n protocolPrincipal = protocolPrincipal.add(_capital);\\n }\\n protocolCheckpoint.principal = protocolPrincipal;\\n protocolCheckpoint.time = block.timestamp;\\n protocolCheckpoint.quarterBelonging = _getQuarter(block.timestamp);\\n protocolCheckpoint.timeListPointer = pid;\\n if (pid == 0) {\\n // The very first strategy of all strategies in the mining program\\n protocolCheckpoint.power = 0;\\n } else {\\n // Any other strategy different from the very first one (will have an antecesor)\\n protocolCheckpoint.power = protocolPerTimestamp[timeList[pid.sub(1)]].power.add(\\n protocolCheckpoint.time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time).mul(\\n protocolPerTimestamp[timeList[pid.sub(1)]].principal\\n )\\n );\\n }\\n timeList.push(block.timestamp); // Register of added strategies timestamps in the array for iteration\\n // Here we control the accumulated protocol power per each quarter\\n // Create the quarter checkpoint in case the checkpoint is the first in the epoch\\n _addProtocolPerQuarter(block.timestamp);\\n // We update the rewards overhead if any in normalized DAI\\n _updatePowerOverhead(strategy, _capital);\\n pid++;\\n }\\n\\n /**\\n * Get the rewards for a specific contributor activately contributing in strategies of a specific garden\\n * @param _garden Garden address responsible of the strategies to calculate rewards\\n * @param _strategy Strategy address\\n * @param _contributor Contributor address\\n */\\n function _getStrategyProfitsAndBABL(\\n address _garden,\\n address _strategy,\\n address _contributor\\n ) private view returns (uint256, uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n _require(address(strategy.garden()) == _garden, Errors.STRATEGY_GARDEN_MISMATCH);\\n _require(IGarden(_garden).isGardenStrategy(_strategy), Errors.STRATEGY_GARDEN_MISMATCH);\\n uint256 contributorProfits = 0;\\n uint256 contributorBABL = 0;\\n // We get the state of the strategy in terms of profit and distance from expected to accurately calculate profits and rewards\\n (bool profit, uint256 profitValue, bool distance, uint256 distanceValue) =\\n _getStrategyRewardsContext(address(strategy));\\n\\n (, uint256 initialDepositAt, uint256 claimedAt, , , ) = IGarden(_garden).getContributor(_contributor);\\n // Positive strategies not yet claimed\\n if (\\n strategy.exitedAt() > claimedAt &&\\n strategy.executedAt() >= initialDepositAt &&\\n address(strategy.garden()) == _garden\\n ) {\\n uint256 contributorPower =\\n _getContributorPower(address(_garden), _contributor, strategy.executedAt(), strategy.exitedAt());\\n // If strategy returned money we give out the profits\\n if (profit == true) {\\n // We reserve 5% of profits for performance fees\\n profitValue = profitValue.sub(profitValue.multiplyDecimal(PROFIT_PROTOCOL_FEE));\\n }\\n // Get strategist rewards in case the contributor is also the strategist of the strategy\\n contributorBABL = contributorBABL.add(\\n _getStrategyStrategistBabl(\\n address(strategy),\\n _contributor,\\n profit,\\n profitValue,\\n distance,\\n distanceValue\\n )\\n );\\n\\n contributorProfits = contributorProfits.add(\\n _getStrategyStrategistProfits(address(strategy), _contributor, profit, profitValue)\\n );\\n\\n // Get steward rewards\\n contributorBABL = contributorBABL.add(\\n _getStrategyStewardBabl(address(strategy), _contributor, profit, profitValue, distance, distanceValue)\\n );\\n\\n contributorProfits = contributorProfits.add(\\n _getStrategyStewardProfits(\\n address(strategy),\\n _contributor,\\n profit,\\n profitValue,\\n distance,\\n distanceValue\\n )\\n );\\n\\n // Get LP rewards\\n\\n contributorBABL = contributorBABL.add(\\n uint256(strategy.strategyRewards()).multiplyDecimal(BABL_LP_SHARE).preciseMul(\\n contributorPower.preciseDiv(strategy.capitalAllocated())\\n )\\n );\\n\\n // Get a multiplier bonus in case the contributor is the garden creator\\n if (_contributor == IGarden(_garden).creator()) {\\n contributorBABL = contributorBABL.add(contributorBABL.multiplyDecimal(CREATOR_BONUS));\\n }\\n }\\n return (contributorProfits, contributorBABL);\\n }\\n\\n /**\\n * Get the context of a specific address depending on their expected returns, capital allocated and capital returned\\n * @param _strategy Strategy address\\n */\\n function _getStrategyRewardsContext(address _strategy)\\n private\\n view\\n returns (\\n bool,\\n uint256,\\n bool,\\n uint256\\n )\\n {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 returned = strategy.capitalReturned();\\n uint256 expected =\\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\\n uint256 allocated = strategy.capitalAllocated();\\n bool profit;\\n bool distance;\\n uint256 profitValue;\\n uint256 distanceValue;\\n if (returned > allocated && returned >= expected) {\\n // The strategy went equal or above expectations\\n profit = true; // positive\\n distance = true; // positive\\n profitValue = returned.sub(allocated);\\n distanceValue = returned.sub(expected);\\n } else if (returned >= allocated && returned < expected) {\\n // The strategy went worse than expected but with some profits\\n profit = true; // positive or zero profits\\n distance = false; // negative vs expected return (got less than expected)\\n profitValue = returned.sub(allocated);\\n distanceValue = expected.sub(returned);\\n } else if (returned < allocated && returned < expected) {\\n // Negative profits - bad investments has penalties\\n profit = false; // negative - loosing capital\\n distance = false; // negative vs expected return (got less than expected)\\n profitValue = allocated.sub(returned); // Negative number, there were no profits at all\\n distanceValue = expected.sub(returned);\\n }\\n\\n return (profit, profitValue, distance, distanceValue);\\n }\\n\\n /**\\n * Get the BABL rewards (Mining program) for a Steward profile\\n * @param _strategy Strategy address\\n * @param _contributor Contributor address\\n * @param _profit Whether or not the strategy had profits\\n * @param _distance If true the results were above expected returns, false means opposite\\n * @param _distanceValue The distance from/to expected returns for capital returned\\n */\\n function _getStrategyStewardBabl(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256, /* _profitValue */\\n bool _distance,\\n uint256 _distanceValue\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 strategyRewards = strategy.strategyRewards();\\n int256 userVotes = strategy.getUserVotes(_contributor);\\n uint256 bablCap;\\n uint256 expected =\\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\\n\\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\\n uint256 babl = 0;\\n if (userVotes > 0 && _profit == true && _distance == true) {\\n // Voting in favor of the execution of the strategy with profits and positive distance\\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\\n uint256(userVotes).preciseDiv(strategy.totalPositiveVotes())\\n );\\n } else if (userVotes > 0 && _profit == true && _distance == false) {\\n // Voting in favor positive profits but below expected return\\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\\n uint256(userVotes).preciseDiv(strategy.totalPositiveVotes())\\n );\\n babl = babl.sub(babl.preciseMul(_distanceValue.preciseDiv(expected))); // We discount the error of expected return vs real returns\\n } else if (userVotes > 0 && _profit == false) {\\n // Voting in favor of a non profitable strategy get nothing\\n babl = 0;\\n } else if (userVotes < 0 && _distance == false) {\\n // Voting against a strategy that got results below expected return provides rewards to the voter (helping the protocol to only have good strategies)\\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\\n uint256(Math.abs(userVotes)).preciseDiv(strategy.totalNegativeVotes())\\n );\\n\\n bablCap = babl.mul(2); // Max cap\\n babl = babl.add(babl.preciseMul(_distanceValue.preciseDiv(expected))); // We add a bonus inverse to the error of expected return vs real returns\\n\\n if (babl > bablCap) babl = bablCap; // We limit 2x by a Cap\\n } else if (userVotes < 0 && _distance == true) {\\n babl = 0;\\n }\\n return babl;\\n }\\n\\n /**\\n * Get the rewards for a Steward profile\\n * @param _strategy Strategy address\\n * @param _contributor Contributor address\\n * @param _profit Whether or not the strategy had profits\\n * @param _profitValue The value of profits\\n * @param _distance If true the results were above expected returns, false means opposite\\n */\\n function _getStrategyStewardProfits(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256 _profitValue,\\n bool _distance,\\n uint256 /* _distanceValue */\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\\n uint256 profits = 0;\\n int256 userVotes = strategy.getUserVotes(_contributor);\\n if (_profit == true) {\\n if (userVotes > 0) {\\n profits = _profitValue.multiplyDecimal(PROFIT_STEWARD_SHARE).preciseMul(uint256(userVotes)).preciseDiv(\\n strategy.totalPositiveVotes()\\n );\\n } else if ((userVotes < 0) && _distance == false) {\\n profits = _profitValue\\n .multiplyDecimal(PROFIT_STEWARD_SHARE)\\n .preciseMul(uint256(Math.abs(userVotes)))\\n .preciseDiv(strategy.totalNegativeVotes());\\n } else if ((userVotes < 0) && _distance == true) {\\n // Voted against a very profit strategy above expected returns, get no profit at all\\n profits = 0;\\n }\\n } else profits = 0; // No profits at all\\n\\n return profits;\\n }\\n\\n /**\\n * Get the BABL rewards (Mining program) for a Strategist profile\\n * @param _strategy Strategy address\\n * @param _contributor Contributor address\\n * @param _profit Whether or not the strategy had profits\\n * @param _distance If true the results were above expected returns, false means opposite\\n */\\n function _getStrategyStrategistBabl(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256, /* _profitValue */\\n bool _distance,\\n uint256 /* _distanceValue */\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 strategyRewards = strategy.strategyRewards();\\n uint256 babl;\\n uint256 bablCap;\\n uint256 expected =\\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\\n if (strategy.strategist() == _contributor) {\\n babl = strategyRewards.multiplyDecimal(BABL_STRATEGIST_SHARE); // Standard calculation to be ponderated\\n if (_profit == true && _distance == true) {\\n // Strategy with equal or higher profits than expected\\n bablCap = babl.mul(2); // Max cap\\n // The more the results are close to the expected the more bonus will get (limited by a x2 cap)\\n babl = babl.add(babl.preciseMul(expected.preciseDiv(strategy.capitalReturned())));\\n if (babl > bablCap) babl = bablCap; // We limit 2x by a Cap\\n } else if (_profit == true && _distance == false) {\\n //under expectations\\n // The more the results are close to the expected the less penalization it might have\\n babl = babl.sub(babl.sub(babl.preciseMul(strategy.capitalReturned().preciseDiv(expected))));\\n } else {\\n // No positive profit\\n return 0;\\n }\\n } else {\\n return 0;\\n }\\n return babl;\\n }\\n\\n /**\\n * Get the rewards for a Strategist profile\\n * @param _strategy Strategy address\\n * @param _contributor Contributor address\\n * @param _profit Whether or not the strategy had profits\\n * @param _profitValue The value of profits\\n */\\n function _getStrategyStrategistProfits(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256 _profitValue\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\\n uint256 profits;\\n if (_profit == true) {\\n if (strategy.strategist() == _contributor) {\\n // If the contributor was the strategist of the strategy\\n profits = _profitValue.multiplyDecimal(PROFIT_STRATEGIST_SHARE);\\n }\\n } else profits = 0; // No profits at all\\n\\n return profits;\\n }\\n\\n /**\\n * Add protocol power timestamps for each quarter\\n * @param _time Timestamp\\n */\\n function _addProtocolPerQuarter(uint256 _time) private onlyMiningActive {\\n ProtocolPerQuarter storage protocolCheckpoint = protocolPerQuarter[_getQuarter(_time)];\\n\\n if (!isProtocolPerQuarter[_getQuarter(_time).sub(1)]) {\\n // The quarter is not yet initialized then we create it\\n protocolCheckpoint.quarterNumber = _getQuarter(_time);\\n if (pid == 0) {\\n // The first strategy added in the first epoch\\n protocolCheckpoint.quarterPower = 0;\\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\\n } else {\\n // Each time a new epoch starts with either a new strategy execution or finalization\\n // We just take the proportional power for this quarter from previous checkpoint\\n uint256 powerToSplit =\\n protocolPerTimestamp[_time].power.sub(protocolPerTimestamp[timeList[pid.sub(1)]].power);\\n if (protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging == _getQuarter(_time).sub(1)) {\\n // There were no intermediate epochs without checkpoints\\n // We re-initialize the protocol power counting for this new quarter\\n protocolCheckpoint.quarterPower = powerToSplit\\n .mul(_time.sub(START_TIME.add(_getQuarter(_time).mul(EPOCH_DURATION).sub(EPOCH_DURATION))))\\n .div(_time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time));\\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\\n\\n protocolPerQuarter[_getQuarter(_time).sub(1)].quarterPower = protocolPerQuarter[\\n _getQuarter(_time).sub(1)\\n ]\\n .quarterPower\\n .add(powerToSplit.sub(protocolCheckpoint.quarterPower));\\n } else {\\n // There were intermediate epochs without checkpoints - we need to create their protocolPerQuarter's and update the last one\\n // We have to update all the quarters including where the previous checkpoint is and the one were we are now\\n for (\\n uint256 i = 0;\\n i <= _getQuarter(_time).sub(protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging);\\n i++\\n ) {\\n ProtocolPerQuarter storage newCheckpoint =\\n protocolPerQuarter[protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i)];\\n uint256 slotEnding =\\n START_TIME.add(\\n protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i).mul(EPOCH_DURATION)\\n );\\n if (i == 0) {\\n // We are in the first quarter to update, we add the corresponding part\\n\\n newCheckpoint.quarterPower = newCheckpoint.quarterPower.add(\\n powerToSplit.mul(slotEnding.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)).div(\\n _time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)\\n )\\n );\\n newCheckpoint.quarterPrincipal = protocolPerTimestamp[timeList[pid.sub(1)]].principal;\\n } else if (\\n i < _getQuarter(_time).sub(protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging)\\n ) {\\n // We are in an intermediate quarter\\n newCheckpoint.quarterPower = powerToSplit.mul(EPOCH_DURATION).div(\\n _time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)\\n );\\n newCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(\\n protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i)\\n );\\n newCheckpoint.quarterNumber = protocolPerTimestamp[timeList[pid.sub(1)]]\\n .quarterBelonging\\n .add(i);\\n newCheckpoint.quarterPrincipal = protocolPerTimestamp[timeList[pid.sub(1)]].principal;\\n } else {\\n // We are in the last quarter of the strategy\\n protocolCheckpoint.quarterPower = powerToSplit\\n .mul(\\n _time.sub(START_TIME.add(_getQuarter(_time).mul(EPOCH_DURATION).sub(EPOCH_DURATION)))\\n )\\n .div(_time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time));\\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\\n protocolCheckpoint.quarterNumber = _getQuarter(_time);\\n protocolCheckpoint.quarterPrincipal = protocolPrincipal;\\n }\\n }\\n }\\n }\\n isProtocolPerQuarter[_getQuarter(_time).sub(1)] = true;\\n } else {\\n // Quarter checkpoint already created, it must have been filled with general info\\n // We update the power of the quarter by adding the new difference between last quarter checkpoint and this checkpoint\\n protocolCheckpoint.quarterPower = protocolCheckpoint.quarterPower.add(\\n protocolPerTimestamp[_time].power.sub(protocolPerTimestamp[timeList[pid.sub(1)]].power)\\n );\\n }\\n protocolCheckpoint.quarterPrincipal = protocolPrincipal;\\n }\\n\\n /**\\n * Updates the strategy power overhead for rewards calculations of each strategy out of the whole protocol\\n * @param _strategy Strategy\\n * @param _capital New capital normalized in DAI\\n */\\n function _updatePowerOverhead(IStrategy _strategy, uint256 _capital) private onlyMiningActive {\\n if (_strategy.updatedAt() != 0) {\\n // There will be overhead after the first execution not before\\n if (_getQuarter(block.timestamp) == _getQuarter(_strategy.updatedAt())) {\\n // The overhead will remain within the same epoch\\n rewardsPowerOverhead[address(_strategy)][_getQuarter(block.timestamp)] = rewardsPowerOverhead[\\n address(_strategy)\\n ][_getQuarter(block.timestamp)]\\n .add(_capital.mul(block.timestamp.sub(_strategy.updatedAt())));\\n } else {\\n // We need to iterate since last update of the strategy capital\\n (uint256 numQuarters, uint256 startingQuarter) =\\n _getRewardsWindow(_strategy.updatedAt(), block.timestamp);\\n uint256 overheadPerQuarter = _capital.mul(block.timestamp.sub(_strategy.updatedAt())).div(numQuarters);\\n for (uint256 i = 0; i <= numQuarters.sub(1); i++) {\\n rewardsPowerOverhead[address(_strategy)][startingQuarter.add(i)] = rewardsPowerOverhead[\\n address(_strategy)\\n ][startingQuarter.add(i)]\\n .add(overheadPerQuarter);\\n }\\n }\\n }\\n }\\n\\n /**\\n * Check the strategy rewards for strategies starting and ending in the same quarter\\n * @param _strategy Strategy\\n * @param _startingQuarter Starting quarter\\n */\\n function _getStrategyRewardsOneQuarter(\\n address _strategy,\\n uint256 _allocated,\\n uint256 _startingQuarter\\n ) private view onlyMiningActive returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 strategyOverTime =\\n _allocated.mul(strategy.exitedAt().sub(strategy.executedAt())).sub(strategy.rewardsTotalOverhead());\\n return\\n strategyOverTime\\n .preciseDiv(protocolPerQuarter[_startingQuarter].quarterPower)\\n .preciseMul(uint256(protocolPerQuarter[_startingQuarter].supplyPerQuarter))\\n .mul(strategy.exitedAt().sub(_startingQuarter))\\n .div(block.timestamp.sub(_startingQuarter));\\n }\\n\\n /**\\n * Check the strategy rewards for strategies starting and ending in different quarters and/or more quarters\\n * @param _strategy Strategy\\n * @param _allocated Normalized allocated in DAI\\n * @param _startingQuarter Starting quarter\\n * @param _numQuarters Num of Quarters (in epochs)\\n */\\n function _getStrategyRewardsSomeQuarters(\\n address _strategy,\\n uint256 _allocated,\\n uint256 _startingQuarter,\\n uint256 _numQuarters\\n ) private view onlyMiningActive returns (uint256) {\\n // The strategy takes longer than one quarter / epoch\\n uint256 bablRewards;\\n for (uint256 i = 0; i <= _numQuarters.sub(1); i++) {\\n uint256 slotEnding = START_TIME.add(_startingQuarter.add(i).mul(EPOCH_DURATION)); // Initialization timestamp at the end of the first slot where the strategy starts its execution\\n uint256 powerRatioInQuarter =\\n _getStrategyRewardsPerQuarter(_strategy, _allocated, _startingQuarter, i, slotEnding);\\n bablRewards = bablRewards.add(powerRatioInQuarter);\\n }\\n return bablRewards;\\n }\\n\\n /**\\n * Check the strategy rewards for a specific quarter when strategies starting and ending in different quarters and/or more quarters\\n * @param _strategy Strategy\\n * @param _allocated Normalized allocated in DAI\\n * @param _startingQuarter Starting quarter\\n * @param _id Epoch number\\n * @param _slotEnding Ending slot timestamp of current slot (epoch)\\n */\\n function _getStrategyRewardsPerQuarter(\\n address _strategy,\\n uint256 _allocated,\\n uint256 _startingQuarter,\\n uint256 _id,\\n uint256 _slotEnding\\n ) private view onlyMiningActive returns (uint256) {\\n // The strategy takes longer than one quarter / epoch\\n // We need to calculate the strategy vs. protocol power ratio per each quarter\\n uint256 strategyPower; // Strategy power in each Epoch\\n uint256 protocolPower; // Protocol power in each Epoch\\n\\n // We iterate all the quarters where the strategy was active\\n uint256 percentage = 1e18;\\n if (IStrategy(_strategy).executedAt().add(EPOCH_DURATION) > _slotEnding) {\\n // We are in the first quarter of the strategy\\n\\n strategyPower = _allocated.mul(_slotEnding.sub(IStrategy(_strategy).executedAt())).sub(\\n rewardsPowerOverhead[address(_strategy)][_getQuarter(IStrategy(_strategy).executedAt())]\\n );\\n } else if (\\n IStrategy(_strategy).executedAt() < _slotEnding.sub(EPOCH_DURATION) &&\\n _slotEnding < IStrategy(_strategy).exitedAt()\\n ) {\\n // We are in an intermediate quarter different from starting or ending quarters\\n strategyPower = _allocated.mul(_slotEnding.sub(_slotEnding.sub(EPOCH_DURATION))).sub(\\n rewardsPowerOverhead[address(_strategy)][_getQuarter(_slotEnding.sub(45 days))]\\n );\\n } else {\\n // We are in the last quarter of the strategy\\n percentage = block.timestamp.sub(_slotEnding.sub(EPOCH_DURATION)).preciseDiv(\\n _slotEnding.sub(_slotEnding.sub(EPOCH_DURATION))\\n );\\n\\n strategyPower = _allocated.mul(IStrategy(_strategy).exitedAt().sub(_slotEnding.sub(EPOCH_DURATION))).sub(\\n rewardsPowerOverhead[address(_strategy)][_getQuarter(IStrategy(_strategy).exitedAt())]\\n );\\n }\\n protocolPower = protocolPerQuarter[_startingQuarter.add(_id)].quarterPower;\\n\\n _require(strategyPower <= protocolPower, Errors.OVERFLOW_IN_POWER);\\n\\n return\\n strategyPower\\n .preciseDiv(protocolPower)\\n .preciseMul(uint256(protocolPerQuarter[_startingQuarter.add(_id)].supplyPerQuarter))\\n .preciseMul(percentage);\\n }\\n\\n /**\\n * Safe BABL rewards (Mining program) token transfer.\\n * It handle cases when in case of rounding errors, RewardsDistributor might not have enough BABL.\\n * @param _to The receiver address of the contributor to send\\n * @param _amount The amount of BABL tokens to be rewarded during this claim\\n */\\n function _safeBABLTransfer(address _to, uint96 _amount) private onlyMiningActive {\\n uint256 bablBal = babltoken.balanceOf(address(this));\\n if (_amount > bablBal) {\\n SafeERC20.safeTransfer(babltoken, _to, bablBal);\\n } else {\\n SafeERC20.safeTransfer(babltoken, _to, _amount);\\n }\\n }\\n\\n /**\\n * Gets the contributor power from a timestamp to a specific timestamp within a garden\\n * @param _garden Address of the garden\\n * @param _contributor Address if the contributor\\n * @param _from Initial timestamp\\n * @param _to End timestamp\\n * @return uint256 Contributor power during that period\\n */\\n function _getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) private view returns (uint256) {\\n // Out of bounds\\n _require(_to >= IGarden(_garden).gardenInitializedAt() && _to >= _from, Errors.CONTRIBUTOR_POWER_CHECK_WINDOW);\\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][address(_contributor)];\\n Checkpoints memory powerCheckpoints = checkpoints[address(_garden)][address(_contributor)];\\n\\n if (contributor.initialDepositAt == 0 || contributor.initialDepositAt > _to) {\\n return 0;\\n } else {\\n if (_from <= IGarden(_garden).gardenInitializedAt()) {\\n // Avoid division by zero in case of _from parameter is not passed\\n _from = IGarden(_garden).gardenInitializedAt();\\n }\\n // Find closest point to _from and _to either contributor and garden checkpoints at their left\\n (powerCheckpoints.fromDepositAt, powerCheckpoints.lastDepositAt) = _locateCheckpointsContributor(\\n _garden,\\n _contributor,\\n _from,\\n _to\\n );\\n (powerCheckpoints.gardenFromDepositAt, powerCheckpoints.gardenLastDepositAt) = _locateCheckpointsGarden(\\n _garden,\\n _from,\\n _to\\n );\\n\\n // origin must be less than end window\\n _require(\\n powerCheckpoints.fromDepositAt <= powerCheckpoints.lastDepositAt &&\\n powerCheckpoints.gardenFromDepositAt <= powerCheckpoints.gardenLastDepositAt,\\n Errors.CONTRIBUTOR_POWER_CHECK_DEPOSITS\\n );\\n uint256 contributorPower;\\n uint256 gardenPower;\\n\\n // \\\"FROM power calculations\\\" PART\\n // Avoid underflows\\n\\n if (_from < powerCheckpoints.fromDepositAt) {\\n // Contributor still has no power but _from is later than the start of the garden\\n contributorPower = 0;\\n } else if (_from > powerCheckpoints.fromDepositAt) {\\n contributorPower = contributor.tsContributions[powerCheckpoints.fromDepositAt].power.add(\\n (_from.sub(powerCheckpoints.fromDepositAt)).mul(\\n contributor.tsContributions[powerCheckpoints.fromDepositAt].supply\\n )\\n );\\n } else {\\n // _from == fromDepositAt\\n contributorPower = contributor.tsContributions[powerCheckpoints.fromDepositAt].power;\\n }\\n gardenPower = gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenFromDepositAt].power.add(\\n (_from.sub(powerCheckpoints.gardenFromDepositAt)).mul(\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenFromDepositAt].supply\\n )\\n );\\n // \\\"TO power calculations\\\" PART\\n // We go for accurate power calculations avoiding overflows\\n // contributor power overflow\\n _require(contributorPower <= gardenPower, Errors.CONTRIBUTOR_POWER_OVERFLOW);\\n if (_from == _to) {\\n // Requested a specific checkpoint calculation (no slot)\\n if (gardenPower == 0) {\\n return 0;\\n } else {\\n return contributorPower.preciseDiv(gardenPower);\\n }\\n // Not a checkpoint anymore but a slot\\n } else if (_to < powerCheckpoints.lastDepositAt) {\\n // contributor has not deposited yet\\n return 0;\\n } else if (\\n _to == powerCheckpoints.lastDepositAt &&\\n powerCheckpoints.fromDepositAt == powerCheckpoints.lastDepositAt\\n ) {\\n // no more contributor checkpoints in the slot\\n gardenPower = (\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].power.add(\\n (_to.sub(powerCheckpoints.gardenLastDepositAt)).mul(\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].supply\\n )\\n )\\n )\\n .sub(gardenPower);\\n _require(contributorPower <= gardenPower, Errors.CONTRIBUTOR_POWER_OVERFLOW);\\n return contributorPower.preciseDiv(gardenPower);\\n } else {\\n contributorPower = (\\n contributor.tsContributions[powerCheckpoints.lastDepositAt].power.add(\\n (_to.sub(powerCheckpoints.lastDepositAt)).mul(\\n contributor.tsContributions[powerCheckpoints.lastDepositAt].supply\\n )\\n )\\n )\\n .sub(contributorPower);\\n\\n gardenPower = (\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].power.add(\\n (_to.sub(powerCheckpoints.gardenLastDepositAt)).mul(\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].supply\\n )\\n )\\n )\\n .sub(gardenPower);\\n _require(contributorPower <= gardenPower, Errors.CONTRIBUTOR_POWER_OVERFLOW);\\n\\n return contributorPower.preciseDiv(gardenPower);\\n }\\n }\\n }\\n\\n /**\\n * Gets the earlier and closest (deposit/withdrawal) checkpoints of a contributor in a specific range\\n * @param _garden Address of the garden\\n * @param _contributor Address if the contributor\\n * @param _from Initial timestamp\\n * @param _to End timestamp\\n * @return uint256 Contributor power during that period\\n */\\n function _locateCheckpointsContributor(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) private view returns (uint256, uint256) {\\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][address(_contributor)];\\n\\n uint256 lastDepositAt = contributor.timeListPointer[contributor.timeListPointer.length.sub(1)]; // Initialized with lastDeposit\\n uint256 fromDepositAt = contributor.timeListPointer[0]; // Initialized with initialDeposit\\n\\n if (lastDepositAt > _to || fromDepositAt < _from) {\\n // We go to find the closest deposits of the contributor to _from and _to\\n for (uint256 i = 0; i <= contributor.timeListPointer.length.sub(1); i++) {\\n if (contributor.timeListPointer[i] <= _to) {\\n lastDepositAt = contributor.timeListPointer[i];\\n }\\n if (contributor.timeListPointer[i] <= _from) {\\n fromDepositAt = contributor.timeListPointer[i];\\n }\\n }\\n }\\n return (fromDepositAt, lastDepositAt);\\n }\\n\\n /**\\n * Gets the earlier and closest (deposit/withdrawal) checkpoints of a garden in a specific range\\n * @param _garden Address of the garden\\n * @param _from Initial timestamp\\n * @param _to End timestamp\\n * @return uint256 Contributor power during that period\\n */\\n function _locateCheckpointsGarden(\\n address _garden,\\n uint256 _from,\\n uint256 _to\\n ) private view returns (uint256, uint256) {\\n uint256 gardenLastCheckpoint = gardenTimelist[address(_garden)].length.sub(1);\\n uint256 gardenLastDepositAt = gardenTimelist[address(_garden)][gardenLastCheckpoint]; // Initialized to the last garden checkpoint\\n uint256 gardenFromDepositAt = gardenTimelist[address(_garden)][0]; // Initialized to the first garden checkpoint\\n\\n if (gardenLastDepositAt > _to || gardenFromDepositAt < _from) {\\n // We go for the closest timestamp of garden to _to and _from\\n for (uint256 i = 0; i <= gardenLastCheckpoint; i++) {\\n uint256 gardenTime = gardenTimelist[address(_garden)][i];\\n if (gardenTime <= _to) {\\n gardenLastDepositAt = gardenTime;\\n }\\n if (gardenTime <= _from) {\\n gardenFromDepositAt = gardenTime;\\n }\\n }\\n }\\n return (gardenFromDepositAt, gardenLastDepositAt);\\n }\\n\\n /**\\n * Function that keeps checkpoints of the garden power (deposits and withdrawals) per timestamp\\n * @param _garden Garden address\\n */\\n function _updateGardenPower(address _garden) private {\\n IGarden garden = IGarden(_garden);\\n GardenPowerByTimestamp storage gardenTimestamp = gardenPowerByTimestamp[address(garden)][block.timestamp];\\n gardenTimestamp.supply = IERC20(address(IGarden(_garden))).totalSupply();\\n\\n gardenTimestamp.timestamp = block.timestamp;\\n\\n if (gardenPid[address(_garden)] == 0) {\\n // The very first deposit of all contributors in the mining program\\n gardenTimestamp.power = 0;\\n } else {\\n // Any other deposit different from the very first one (will have an antecesor)\\n gardenTimestamp.power = gardenPowerByTimestamp[address(garden)][\\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\\n ]\\n .power\\n .add(\\n gardenTimestamp\\n .timestamp\\n .sub(\\n gardenPowerByTimestamp[address(garden)][\\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\\n ]\\n .timestamp\\n )\\n .mul(\\n gardenPowerByTimestamp[address(garden)][\\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\\n ]\\n .supply\\n )\\n );\\n }\\n\\n gardenTimelist[address(garden)].push(block.timestamp); // Register of deposit timestamps in the array for iteration\\n gardenPid[address(garden)]++;\\n }\\n\\n /**\\n * Updates contributor timestamps params\\n * @param _garden Garden address\\n * @param _contributor Contributor address\\n * @param _previousBalance Previous balance\\n * @param _depositOrWithdraw Whether it is a deposit or a withdraw\\n */\\n function _setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw\\n ) private {\\n // We make checkpoints around contributor deposits to avoid fast loans and give the right rewards afterwards\\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][_contributor];\\n\\n contributor.tsContributions[block.timestamp].supply = IERC20(address(IGarden(_garden))).balanceOf(\\n address(_contributor)\\n );\\n\\n contributor.tsContributions[block.timestamp].timestamp = block.timestamp;\\n\\n contributor.tsContributions[block.timestamp].timePointer = contributor.pid;\\n\\n if (contributor.pid == 0) {\\n // The very first deposit\\n contributor.tsContributions[block.timestamp].power = 0;\\n } else {\\n // Any other deposits or withdrawals different from the very first one (will have an antecesor)\\n contributor.tsContributions[block.timestamp].power = contributor.tsContributions[contributor.lastDepositAt]\\n .power\\n .add(\\n (block.timestamp.sub(contributor.lastDepositAt)).mul(\\n contributor.tsContributions[contributor.lastDepositAt].supply\\n )\\n );\\n }\\n if (_depositOrWithdraw == true) {\\n // Deposit\\n if (_previousBalance == 0 || contributor.initialDepositAt == 0) {\\n contributor.initialDepositAt = block.timestamp;\\n }\\n contributor.lastDepositAt = block.timestamp;\\n } else {\\n // Withdrawals\\n if (IERC20(address(IGarden(_garden))).balanceOf(address(_contributor)) == 0) {\\n contributor.lastDepositAt = 0;\\n contributor.initialDepositAt = 0;\\n delete contributor.timeListPointer;\\n }\\n }\\n\\n contributor.timeListPointer.push(block.timestamp);\\n contributor.pid++;\\n }\\n\\n /**\\n * Calculates the BABL rewards supply for each quarter\\n * @param _quarter Number of the epoch (quarter)\\n */\\n function _tokenSupplyPerQuarter(uint256 _quarter) internal pure returns (uint96) {\\n _require(_quarter >= 1, Errors.QUARTERS_MIN_1);\\n if (_quarter >= 513) {\\n return 0;\\n } else {\\n uint256 firstFactor = (SafeDecimalMath.unit().add(DECAY_RATE)).powDecimal(_quarter.sub(1));\\n uint256 supplyForQuarter = Q1_REWARDS.divideDecimal(firstFactor);\\n return Safe3296.safe96(supplyForQuarter, 'overflow 96 bits');\\n }\\n }\\n\\n /**\\n * Calculates the quarter number for a specific time since START_TIME\\n * @param _now Timestamp to calculate its quarter\\n */\\n function _getQuarter(uint256 _now) internal view returns (uint256) {\\n uint256 quarter = (_now.sub(START_TIME).preciseDivCeil(EPOCH_DURATION)).div(1e18);\\n return quarter.add(1);\\n }\\n\\n /**\\n * Calculates the range (starting quarter and ending quarter since START_TIME)\\n * @param _from Starting timestamp\\n * @param _to Ending timestamp\\n */\\n function _getRewardsWindow(uint256 _from, uint256 _to) internal view returns (uint256, uint256) {\\n uint256 quarters = (_to.sub(_from).preciseDivCeil(EPOCH_DURATION)).div(1e18);\\n uint256 startingQuarter = (_from.sub(START_TIME).preciseDivCeil(EPOCH_DURATION)).div(1e18);\\n return (quarters.add(1), startingQuarter.add(1));\\n }\\n}\\n\",\"keccak256\":\"0xfc441c92c5baa279ff5037f9c7649f501a244641d504b90fd8c64c25aac755b6\",\"license\":\"Apache License\"},\"contracts/token/TimeLockRegistry.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\npragma experimental ABIEncoderV2;\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\nimport {TimeLockedToken} from './TimeLockedToken.sol';\\nimport {AddressArrayUtils} from '../lib/AddressArrayUtils.sol';\\n\\n/**\\n * @title TimeLockRegistry\\n * @notice Register Lockups for TimeLocked ERC20 Token BABL (e.g. vesting)\\n * @author Babylon Finance\\n * @dev This contract allows owner to register distributions for a TimeLockedToken\\n *\\n * To register a distribution, register method should be called by the owner.\\n * claim() should be called only by the BABL Token smartcontract (modifier onlyBABLToken)\\n * when any account registered to receive tokens make its own claim\\n * If case of a mistake, owner can cancel registration before the claim is done by the account\\n *\\n * Note this contract address must be setup in the TimeLockedToken's contract pointing\\n * to interact with (e.g. setTimeLockRegistry() function)\\n */\\n\\ncontract TimeLockRegistry is Ownable {\\n using SafeMath for uint256;\\n using Address for address;\\n using AddressArrayUtils for address[];\\n\\n /* ============ Events ============ */\\n\\n event Register(address receiver, uint256 distribution);\\n event Cancel(address receiver, uint256 distribution);\\n event Claim(address account, uint256 distribution);\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlyBABLToken() {\\n require(msg.sender == address(token), 'only BABL Token');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // time locked token\\n TimeLockedToken public token;\\n\\n /**\\n * @notice The profile of each token owner under vesting conditions and its special conditions\\n * @param receiver Account being registered\\n * @param investorType Indicates whether or not is a Team member (true = team member / advisor, false = private investor)\\n * @param vestingStarting Date When the vesting begins for such token owner\\n * @param distribution Tokens amount that receiver is due to get\\n */\\n struct Registration {\\n address receiver;\\n uint256 distribution;\\n bool investorType;\\n uint256 vestingStartingDate;\\n }\\n\\n /**\\n * @notice The profile of each token owner under vesting conditions and its special conditions\\n * @param team Indicates whether or not is a Team member (true = team member / advisor, false = private investor)\\n * @param vestingBegin When the vesting begins for such token owner\\n * @param vestingEnd When the vesting ends for such token owner\\n * @param lastClaim When the last claim was done\\n */\\n struct TokenVested {\\n bool team;\\n bool cliff;\\n uint256 vestingBegin;\\n uint256 vestingEnd;\\n uint256 lastClaim;\\n }\\n\\n /// @notice A record of token owners under vesting conditions for each account, by index\\n mapping(address => TokenVested) public tokenVested;\\n\\n // mapping from token owners under vesting conditions to BABL due amount (e.g. SAFT addresses, team members, advisors)\\n mapping(address => uint256) public registeredDistributions;\\n\\n // array of all registrations\\n address[] public registrations;\\n\\n // total amount of tokens registered\\n uint256 public totalTokens;\\n\\n // vesting for Team Members\\n uint256 private teamVesting = 365 days * 4;\\n\\n // vesting for Investors and Advisors\\n uint256 private investorVesting = 365 days * 3;\\n\\n /* ============ Functions ============ */\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * @notice Construct a new Time Lock Registry and gives ownership to sender\\n * @param _token TimeLockedToken contract to use in this registry\\n */\\n constructor(TimeLockedToken _token) {\\n token = _token;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /* ============ External Getter Functions ============ */\\n\\n /**\\n * Gets registrations\\n *\\n * @return address[] Returns list of registrations\\n */\\n\\n function getRegistrations() external view returns (address[] memory) {\\n return registrations;\\n }\\n\\n /* =========== Token related Gov Functions ====== */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION\\n *\\n * @notice Register multiple investors/team in a batch\\n * @param _registrations Registrations to process\\n */\\n function registerBatch(Registration[] memory _registrations) external onlyOwner {\\n for (uint256 i = 0; i < _registrations.length; i++) {\\n register(\\n _registrations[i].receiver,\\n _registrations[i].distribution,\\n _registrations[i].investorType,\\n _registrations[i].vestingStartingDate\\n );\\n }\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION\\n *\\n * @notice Register new account under vesting conditions (Team, Advisors, Investors e.g. SAFT purchaser)\\n * @param receiver Address belonging vesting conditions\\n * @param distribution Tokens amount that receiver is due to get\\n */\\n function register(\\n address receiver,\\n uint256 distribution,\\n bool investorType,\\n uint256 vestingStartingDate\\n ) public onlyOwner {\\n require(receiver != address(0), 'TimeLockRegistry::register: cannot register the zero address');\\n require(\\n receiver != address(this),\\n 'TimeLockRegistry::register: Time Lock Registry contract cannot be an investor'\\n );\\n require(distribution != 0, 'TimeLockRegistry::register: Distribution = 0');\\n require(\\n registeredDistributions[receiver] == 0,\\n 'TimeLockRegistry::register:Distribution for this address is already registered'\\n );\\n require(block.timestamp >= 1614553200, 'Cannot register earlier than March 2021'); // 1614553200 is UNIX TIME of 2021 March the 1st\\n require(totalTokens.add(distribution) <= IERC20(token).balanceOf(address(this)), 'Not enough tokens');\\n\\n totalTokens = totalTokens.add(distribution);\\n // register distribution\\n registeredDistributions[receiver] = distribution;\\n registrations.push(receiver);\\n\\n // register token vested conditions\\n TokenVested storage newTokenVested = tokenVested[receiver];\\n newTokenVested.team = investorType;\\n newTokenVested.vestingBegin = vestingStartingDate;\\n\\n if (newTokenVested.team == true) {\\n newTokenVested.vestingEnd = vestingStartingDate.add(teamVesting);\\n } else {\\n newTokenVested.vestingEnd = vestingStartingDate.add(investorVesting);\\n }\\n newTokenVested.lastClaim = vestingStartingDate;\\n\\n tokenVested[receiver] = newTokenVested;\\n\\n // emit register event\\n emit Register(receiver, distribution);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel distribution registration in case of mistake and before a claim is done\\n *\\n * @notice Cancel distribution registration\\n * @dev A claim has not to be done earlier\\n * @param receiver Address that should have it's distribution removed\\n * @return Whether or not it succeeded\\n */\\n function cancelRegistration(address receiver) external onlyOwner returns (bool) {\\n require(registeredDistributions[receiver] != 0, 'Not registered');\\n\\n // get amount from distributions\\n uint256 amount = registeredDistributions[receiver];\\n\\n // set distribution mapping to 0\\n delete registeredDistributions[receiver];\\n\\n // set tokenVested mapping to 0\\n delete tokenVested[receiver];\\n\\n // remove from the list of all registrations\\n registrations.remove(receiver);\\n\\n // decrease total tokens\\n totalTokens = totalTokens.sub(amount);\\n\\n // emit cancel event\\n emit Cancel(receiver, amount);\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel distribution registration in case of mistake and before a claim is done\\n *\\n * @notice Cancel already delivered tokens. It might only apply when non-completion of vesting period of Team members or Advisors\\n * @dev An automatic override allowance is granted during the claim process\\n * @param account Address that should have it's distribution removed\\n * @return Whether or not it succeeded\\n */\\n function cancelDeliveredTokens(address account) external onlyOwner returns (bool) {\\n uint256 loosingAmount = token.cancelVestedTokens(account);\\n\\n // emit cancel event\\n emit Cancel(account, loosingAmount);\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Recover tokens in Time Lock Registry smartcontract address by the owner\\n *\\n * @notice Send tokens from smartcontract address to the owner.\\n * It might only apply after a cancellation of vested tokens\\n * @param amount Amount to be recovered by the owner of the Time Lock Registry smartcontract from its balance\\n * @return Whether or not it succeeded\\n */\\n function transferToOwner(uint256 amount) external onlyOwner returns (bool) {\\n SafeERC20.safeTransfer(token, msg.sender, amount);\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Claim locked tokens by the registered account\\n *\\n * @notice Claim tokens due amount.\\n * @dev Claim is done by the user in the TimeLocked contract and the contract is the only allowed to call\\n * this function on behalf of the user to make the claim\\n * @return The amount of tokens registered and delivered after the claim\\n */\\n function claim(address _receiver) external onlyBABLToken returns (uint256) {\\n require(registeredDistributions[_receiver] != 0, 'Not registered');\\n\\n // get amount from distributions\\n uint256 amount = registeredDistributions[_receiver];\\n tokenVested[_receiver].lastClaim = block.timestamp;\\n\\n // set distribution mapping to 0\\n delete registeredDistributions[_receiver];\\n\\n // decrease total tokens\\n totalTokens = totalTokens.sub(amount);\\n\\n // register lockup in TimeLockedToken\\n // this will transfer funds from this contract and lock them for sender\\n token.registerLockup(\\n _receiver,\\n amount,\\n tokenVested[_receiver].team,\\n tokenVested[_receiver].vestingBegin,\\n tokenVested[_receiver].vestingEnd,\\n tokenVested[_receiver].lastClaim\\n );\\n\\n // set tokenVested mapping to 0\\n delete tokenVested[_receiver];\\n\\n // emit claim event\\n emit Claim(_receiver, amount);\\n\\n return amount;\\n }\\n\\n /* ============ Getter Functions ============ */\\n\\n function checkVesting(address address_)\\n external\\n view\\n returns (\\n bool team,\\n uint256 start,\\n uint256 end,\\n uint256 last\\n )\\n {\\n return (\\n tokenVested[address_].team,\\n tokenVested[address_].vestingBegin,\\n tokenVested[address_].vestingEnd,\\n tokenVested[address_].lastClaim\\n );\\n }\\n\\n function checkRegisteredDistribution(address address_) external view returns (uint256 amount) {\\n return registeredDistributions[address_];\\n }\\n}\\n\",\"keccak256\":\"0x5a2812398ff49dac4f10d03763768340a5de4e0f75fd2d00e18b5922051d094d\",\"license\":\"Apache License\"},\"contracts/token/TimeLockedToken.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {TimeLockRegistry} from './TimeLockRegistry.sol';\\nimport {RewardsDistributor} from './RewardsDistributor.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {VoteToken} from './VoteToken.sol';\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {Errors, _require} from '../lib/BabylonErrors.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\n\\n/**\\n * @title TimeLockedToken\\n * @notice Time Locked ERC20 Token\\n * @author Babylon Finance\\n * @dev Contract which gives the ability to time-lock tokens specially for vesting purposes usage\\n *\\n * By overriding the balanceOf() and transfer() functions in ERC20,\\n * an account can show its full, post-distribution balance and use it for voting power\\n * but only transfer or spend up to an allowed amount\\n *\\n * A portion of previously non-spendable tokens are allowed to be transferred\\n * along the time depending on each vesting conditions, and after all epochs have passed, the full\\n * account balance is unlocked. In case on non-completion vesting period, only the Time Lock Registry can cancel\\n * the delivery of the pending tokens and only can cancel the remaining locked ones.\\n */\\n\\nabstract contract TimeLockedToken is VoteToken {\\n using SafeMath for uint256;\\n\\n /* ============ Events ============ */\\n\\n /// @notice An event that emitted when a new lockout ocurr\\n event NewLockout(\\n address account,\\n uint256 tokenslocked,\\n bool isTeamOrAdvisor,\\n uint256 startingVesting,\\n uint256 endingVesting\\n );\\n\\n /// @notice An event that emitted when a new Time Lock is registered\\n event NewTimeLockRegistration(address previousAddress, address newAddress);\\n\\n /// @notice An event that emitted when a new Rewards Distributor is registered\\n event NewRewardsDistributorRegistration(address previousAddress, address newAddress);\\n\\n /// @notice An event that emitted when a cancellation of Lock tokens is registered\\n event Cancel(address account, uint256 amount);\\n\\n /// @notice An event that emitted when a claim of tokens are registered\\n event Claim(address _receiver, uint256 amount);\\n\\n /// @notice An event that emitted when a lockedBalance query is done\\n event LockedBalance(address _account, uint256 amount);\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlyTimeLockRegistry() {\\n require(\\n msg.sender == address(timeLockRegistry),\\n 'TimeLockedToken:: onlyTimeLockRegistry: can only be executed by TimeLockRegistry'\\n );\\n _;\\n }\\n\\n modifier onlyTimeLockOwner() {\\n if (address(timeLockRegistry) != address(0)) {\\n require(\\n msg.sender == Ownable(timeLockRegistry).owner(),\\n 'TimeLockedToken:: onlyTimeLockOwner: can only be executed by the owner of TimeLockRegistry'\\n );\\n }\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // represents total distribution for locked balances\\n mapping(address => uint256) distribution;\\n\\n /// @notice The profile of each token owner under its particular vesting conditions\\n /**\\n * @param team Indicates whether or not is a Team member or Advisor (true = team member/advisor, false = private investor)\\n * @param vestingBegin When the vesting begins for such token owner\\n * @param vestingEnd When the vesting ends for such token owner\\n * @param lastClaim When the last claim was done\\n */\\n struct VestedToken {\\n bool teamOrAdvisor;\\n uint256 vestingBegin;\\n uint256 vestingEnd;\\n uint256 lastClaim;\\n }\\n\\n /// @notice A record of token owners under vesting conditions for each account, by index\\n mapping(address => VestedToken) public vestedToken;\\n\\n // vesting duration for Team Members and Advisors\\n uint256 private teamVesting = 365 days * 4;\\n\\n // vesting duration for Investors\\n uint256 private investorVesting = 365 days * 3;\\n\\n // address of Time Lock Registry contract\\n IBabController public controller;\\n\\n // address of Time Lock Registry contract\\n TimeLockRegistry public timeLockRegistry;\\n\\n // address of Rewards Distriburor contract\\n RewardsDistributor public rewardsDistributor;\\n\\n // Enable Transfer of ERC20 BABL Tokens\\n // Only Minting or transfers from/to TimeLockRegistry and Rewards Distributor can transfer tokens until the protocol is fully decentralized\\n bool private tokenTransfersEnabled;\\n bool private tokenTransfersWereDisabled;\\n\\n /* ============ Functions ============ */\\n\\n /* ============ Constructor ============ */\\n\\n constructor(string memory _name, string memory _symbol) VoteToken(_name, _symbol) {\\n tokenTransfersEnabled = true;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /* =========== Token related Gov Functions ====== */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Disables transfers of ERC20 BABL Tokens\\n */\\n function disableTokensTransfers() external onlyOwner {\\n require(!tokenTransfersWereDisabled, 'BABL must flow');\\n tokenTransfersEnabled = false;\\n tokenTransfersWereDisabled = true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows transfers of ERC20 BABL Tokens\\n * Can only happen after the protocol is fully decentralized.\\n */\\n function enableTokensTransfers() external onlyOwner {\\n tokenTransfersEnabled = true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Set the Time Lock Registry contract to control token vesting conditions\\n *\\n * @notice Set the Time Lock Registry contract to control token vesting conditions\\n * @param newTimeLockRegistry Address of TimeLockRegistry contract\\n */\\n function setTimeLockRegistry(TimeLockRegistry newTimeLockRegistry) external onlyTimeLockOwner returns (bool) {\\n require(address(newTimeLockRegistry) != address(0), 'cannot be zero address');\\n require(address(newTimeLockRegistry) != address(this), 'cannot be this contract');\\n require(address(newTimeLockRegistry) != address(timeLockRegistry), 'must be new TimeLockRegistry');\\n emit NewTimeLockRegistration(address(timeLockRegistry), address(newTimeLockRegistry));\\n\\n timeLockRegistry = newTimeLockRegistry;\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Set the Rewards Distributor contract to control either BABL Mining or profit rewards\\n *\\n * @notice Set the Rewards Distriburor contract to control both types of rewards (profit and BABL Mining program)\\n * @param newRewardsDistributor Address of Rewards Distributor contract\\n */\\n function setRewardsDistributor(RewardsDistributor newRewardsDistributor) external onlyOwner returns (bool) {\\n require(address(newRewardsDistributor) != address(0), 'cannot be zero address');\\n require(address(newRewardsDistributor) != address(this), 'cannot be this contract');\\n require(address(newRewardsDistributor) != address(rewardsDistributor), 'must be new Rewards Distributor');\\n emit NewRewardsDistributorRegistration(address(rewardsDistributor), address(newRewardsDistributor));\\n\\n rewardsDistributor = newRewardsDistributor;\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Register new token lockup conditions for vested tokens defined only by Time Lock Registry\\n *\\n * @notice Tokens are completely delivered during the registration however lockup conditions apply for vested tokens\\n * locking them according to the distribution epoch periods and the type of recipient (Team, Advisor, Investor)\\n * Emits a transfer event showing a transfer to the recipient\\n * Only the registry can call this function\\n * @param _receiver Address to receive the tokens\\n * @param _amount Tokens to be transferred\\n * @param _profile True if is a Team Member or Advisor\\n * @param _vestingBegin Unix Time when the vesting for that particular address\\n * @param _vestingEnd Unix Time when the vesting for that particular address\\n * @param _lastClaim Unix Time when the claim was done from that particular address\\n *\\n */\\n function registerLockup(\\n address _receiver,\\n uint256 _amount,\\n bool _profile,\\n uint256 _vestingBegin,\\n uint256 _vestingEnd,\\n uint256 _lastClaim\\n ) external onlyTimeLockRegistry returns (bool) {\\n require(balanceOf(msg.sender) >= _amount, 'insufficient balance');\\n require(_receiver != address(0), 'cannot be zero address');\\n require(_receiver != address(this), 'cannot be this contract');\\n require(_receiver != address(timeLockRegistry), 'cannot be the TimeLockRegistry contract itself');\\n require(_receiver != msg.sender, 'the owner cannot lockup itself');\\n\\n // update amount of locked distribution\\n distribution[_receiver] = distribution[_receiver].add(_amount);\\n\\n VestedToken storage newVestedToken = vestedToken[_receiver];\\n\\n newVestedToken.teamOrAdvisor = _profile;\\n newVestedToken.vestingBegin = _vestingBegin;\\n newVestedToken.vestingEnd = _vestingEnd;\\n newVestedToken.lastClaim = _lastClaim;\\n\\n // transfer tokens to the recipient\\n _transfer(msg.sender, _receiver, _amount);\\n emit NewLockout(_receiver, _amount, _profile, _vestingBegin, _vestingEnd);\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel and remove locked tokens due to non-completion of vesting period\\n * applied only by Time Lock Registry and specifically to Team or Advisors as it does not apply to investors.\\n *\\n * @dev Cancel distribution registration\\n * @param lockedAccount that should have its still locked distribution removed due to non-completion of its vesting period\\n */\\n function cancelVestedTokens(address lockedAccount) external onlyTimeLockRegistry returns (uint256) {\\n return _cancelVestedTokensFromTimeLock(lockedAccount);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Each token owner can claim its own specific tokens with its own specific vesting conditions from the Time Lock Registry\\n *\\n * @dev Claim msg.sender tokens (if any available in the registry)\\n */\\n function claimMyTokens() external {\\n // claim msg.sender tokens from timeLockRegistry\\n uint256 amount = timeLockRegistry.claim(msg.sender);\\n // After a proper claim, locked tokens of Team and Advisors profiles are under restricted special vesting conditions so they automatic grant\\n // rights to the Time Lock Registry to only retire locked tokens if non-compliance vesting conditions take places along the vesting periods.\\n // It does not apply to Investors under vesting (their locked tokens cannot be removed).\\n if (vestedToken[msg.sender].teamOrAdvisor == true) {\\n approve(address(timeLockRegistry), amount);\\n }\\n // emit claim event\\n emit Claim(msg.sender, amount);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Get unlocked balance for an account\\n *\\n * @notice Get unlocked balance for an account\\n * @param account Account to check\\n * @return Amount that is unlocked and available eg. to transfer\\n */\\n function unlockedBalance(address account) public returns (uint256) {\\n // totalBalance - lockedBalance\\n return balanceOf(account).sub(lockedBalance(account));\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. View the locked balance for an account\\n *\\n * @notice View locked balance for an account\\n * @param account Account to check\\n * @return Amount locked in the time of checking\\n */\\n\\n function viewLockedBalance(address account) public view returns (uint256) {\\n // distribution of locked tokens\\n // get amount from distributions\\n\\n uint256 amount = distribution[account];\\n uint256 lockedAmount = amount;\\n\\n // Team and investors cannot transfer tokens in the first year\\n if (vestedToken[account].vestingBegin.add(365 days) > block.timestamp && amount != 0) {\\n return lockedAmount;\\n }\\n\\n // in case of vesting has passed, all tokens are now available, if no vesting lock is 0 as well\\n if (block.timestamp >= vestedToken[account].vestingEnd || amount == 0) {\\n lockedAmount = 0;\\n } else if (amount != 0) {\\n // in case of still under vesting period, locked tokens are recalculated\\n lockedAmount = amount.mul(vestedToken[account].vestingEnd.sub(block.timestamp)).div(\\n vestedToken[account].vestingEnd.sub(vestedToken[account].vestingBegin)\\n );\\n }\\n return lockedAmount;\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Get locked balance for an account\\n *\\n * @notice Get locked balance for an account\\n * @param account Account to check\\n * @return Amount locked in the time of checking\\n */\\n function lockedBalance(address account) public returns (uint256) {\\n // get amount from distributions locked tokens (if any)\\n uint256 lockedAmount = viewLockedBalance(account);\\n // in case of vesting has passed, all tokens are now available so we set mapping to 0 only for accounts under vesting\\n if (\\n block.timestamp >= vestedToken[account].vestingEnd &&\\n msg.sender == account &&\\n lockedAmount == 0 &&\\n vestedToken[account].vestingEnd != 0\\n ) {\\n delete distribution[account];\\n }\\n emit LockedBalance(account, lockedAmount);\\n return lockedAmount;\\n }\\n\\n /**\\n * PUBLIC FUNCTION. Get the address of Time Lock Registry\\n *\\n * @notice Get the address of Time Lock Registry\\n * @return Address of the Time Lock Registry\\n */\\n function getTimeLockRegistry() external view returns (address) {\\n return address(timeLockRegistry);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the Approval of allowances of ERC20 with special conditions for vesting\\n *\\n * @notice Override of \\\"Approve\\\" function to allow the `spender` to transfer up to `amount` from `src`\\n * @dev This will overwrite the approval amount for `spender` except in the case of spender is Time Lock Registry\\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\\n * @param spender The address of the account which may transfer tokens\\n * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\\n * @return Whether or not the approval succeeded\\n */\\n function approve(address spender, uint256 rawAmount) public override nonReentrant returns (bool) {\\n require(spender != address(0), 'TimeLockedToken::approve: spender cannot be zero address');\\n require(spender != msg.sender, 'TimeLockedToken::approve: spender cannot be the msg.sender');\\n\\n uint96 amount;\\n if (rawAmount == uint256(-1)) {\\n amount = uint96(-1);\\n } else {\\n amount = safe96(rawAmount, 'TimeLockedToken::approve: amount exceeds 96 bits');\\n }\\n\\n // There is no option to decreaseAllowance to timeLockRegistry in case of vested tokens\\n if ((spender == address(timeLockRegistry)) && (amount < allowance(msg.sender, address(timeLockRegistry)))) {\\n amount = safe96(\\n allowance(msg.sender, address(timeLockRegistry)),\\n 'TimeLockedToken::approve: cannot decrease allowance to timelockregistry'\\n );\\n }\\n _approve(msg.sender, spender, amount);\\n emit Approval(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the Increase of allowances of ERC20 with special conditions for vesting\\n *\\n * @notice Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * @dev This is an override with respect to the fulfillment of vesting conditions along the way\\n * However an user can increase allowance many times, it will never be able to transfer locked tokens during vesting period\\n * @return Whether or not the increaseAllowance succeeded\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public override nonReentrant returns (bool) {\\n require(\\n unlockedBalance(msg.sender) >= allowance(msg.sender, spender).add(addedValue) ||\\n spender == address(timeLockRegistry),\\n 'TimeLockedToken::increaseAllowance:Not enough unlocked tokens'\\n );\\n require(spender != address(0), 'TimeLockedToken::increaseAllowance:Spender cannot be zero address');\\n require(spender != msg.sender, 'TimeLockedToken::increaseAllowance:Spender cannot be the msg.sender');\\n _approve(msg.sender, spender, allowance(msg.sender, spender).add(addedValue));\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the decrease of allowances of ERC20 with special conditions for vesting\\n *\\n * @notice Atomically decrease the allowance granted to `spender` by the caller.\\n *\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n * This is an override with respect to the fulfillment of vesting conditions along the way\\n * An user cannot decrease the allowance to the Time Lock Registry who is in charge of vesting conditions\\n * @return Whether or not the decreaseAllowance succeeded\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public override nonReentrant returns (bool) {\\n require(spender != address(0), 'TimeLockedToken::decreaseAllowance:Spender cannot be zero address');\\n require(spender != msg.sender, 'TimeLockedToken::decreaseAllowance:Spender cannot be the msg.sender');\\n require(\\n allowance(msg.sender, spender) >= subtractedValue,\\n 'TimeLockedToken::decreaseAllowance:Underflow condition'\\n );\\n\\n // There is no option to decreaseAllowance to timeLockRegistry in case of vested tokens\\n require(\\n address(spender) != address(timeLockRegistry),\\n 'TimeLockedToken::decreaseAllowance:cannot decrease allowance to timeLockRegistry'\\n );\\n\\n _approve(\\n msg.sender,\\n spender,\\n allowance(msg.sender, spender).sub(subtractedValue, 'ERC20: decreased allowance below zero')\\n );\\n return true;\\n }\\n\\n /* ============ Internal Only Function ============ */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the _transfer of ERC20 BABL tokens only allowing the transfer of unlocked tokens\\n *\\n * @dev Transfer function which includes only unlocked tokens\\n * Locked tokens can always be transfered back to the returns address\\n * Transferring to owner allows re-issuance of funds through registry\\n *\\n * @param _from The address to send tokens from\\n * @param _to The address that will receive the tokens\\n * @param _value The amount of tokens to be transferred\\n */\\n function _transfer(\\n address _from,\\n address _to,\\n uint256 _value\\n ) internal override {\\n require(_from != address(0), 'TimeLockedToken:: _transfer: cannot transfer from the zero address');\\n require(_to != address(0), 'TimeLockedToken:: _transfer: cannot transfer to the zero address');\\n require(\\n _to != address(this),\\n 'TimeLockedToken:: _transfer: do not transfer tokens to the token contract itself'\\n );\\n\\n require(balanceOf(_from) >= _value, 'TimeLockedToken:: _transfer: insufficient balance');\\n\\n // check if enough unlocked balance to transfer\\n require(unlockedBalance(_from) >= _value, 'TimeLockedToken:: _transfer: attempting to transfer locked funds');\\n super._transfer(_from, _to, _value);\\n // voting power\\n _moveDelegates(\\n delegates[_from],\\n delegates[_to],\\n safe96(_value, 'TimeLockedToken:: _transfer: uint96 overflow')\\n );\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Disable BABL token transfer until certain conditions are met\\n *\\n * @dev Override the _beforeTokenTransfer of ERC20 BABL tokens until certain conditions are met:\\n * Only allowing minting or transfers from Time Lock Registry and Rewards Distributor until transfers are allowed in the controller\\n * Transferring to owner allows re-issuance of funds through registry\\n *\\n * @param _from The address to send tokens from\\n * @param _to The address that will receive the tokens\\n * @param _value The amount of tokens to be transferred\\n */\\n\\n // Disable garden token transfers. Allow minting and burning.\\n function _beforeTokenTransfer(\\n address _from,\\n address _to,\\n uint256 _value\\n ) internal virtual override {\\n super._beforeTokenTransfer(_from, _to, _value);\\n _require(\\n _from == address(0) ||\\n _from == address(timeLockRegistry) ||\\n _from == address(rewardsDistributor) ||\\n _to == address(timeLockRegistry) ||\\n tokenTransfersEnabled,\\n Errors.BABL_TRANSFERS_DISABLED\\n );\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel and remove locked tokens due to non-completion of vesting period\\n * applied only by Time Lock Registry and specifically to Team or Advisors\\n *\\n * @dev Cancel distribution registration\\n * @param lockedAccount that should have its still locked distribution removed due to non-completion of its vesting period\\n */\\n function _cancelVestedTokensFromTimeLock(address lockedAccount) internal onlyTimeLockRegistry returns (uint256) {\\n require(distribution[lockedAccount] != 0, 'TimeLockedToken::cancelTokens:Not registered');\\n\\n // get an update on locked amount from distributions at this precise moment\\n uint256 loosingAmount = lockedBalance(lockedAccount);\\n\\n require(loosingAmount > 0, 'TimeLockedToken::cancelTokens:There are no more locked tokens');\\n require(\\n vestedToken[lockedAccount].teamOrAdvisor == true,\\n 'TimeLockedToken::cancelTokens:cannot cancel locked tokens to Investors'\\n );\\n\\n // set distribution mapping to 0\\n delete distribution[lockedAccount];\\n\\n // set tokenVested mapping to 0\\n delete vestedToken[lockedAccount];\\n\\n // transfer only locked tokens back to TimeLockRegistry Owner (msg.sender)\\n require(\\n transferFrom(lockedAccount, address(timeLockRegistry), loosingAmount),\\n 'TimeLockedToken::cancelTokens:Transfer failed'\\n );\\n\\n // emit cancel event\\n emit Cancel(lockedAccount, loosingAmount);\\n\\n return loosingAmount;\\n }\\n}\\n\",\"keccak256\":\"0xad214a3aa8fcc15e51df9d4f4523c54f2c3149c47765cc8c44b6f4f9510bec4c\",\"license\":\"Apache License\"},\"contracts/token/VoteToken.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {IVoteToken} from '../interfaces/IVoteToken.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Context} from '@openzeppelin/contracts/utils/Context.sol';\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\n\\n/**\\n * @title VoteToken\\n * @notice Custom token which tracks voting power for governance\\n * @dev This is an abstraction of a fork of the Compound governance contract\\n * VoteToken is used by BABL to allow tracking voting power\\n * Checkpoints are created every time state is changed which record voting power\\n * Inherits standard ERC20 behavior\\n */\\n\\nabstract contract VoteToken is Context, ERC20, Ownable, IVoteToken, ReentrancyGuard {\\n using SafeMath for uint256;\\n using Address for address;\\n\\n /* ============ Events ============ */\\n\\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\\n event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);\\n\\n /* ============ Modifiers ============ */\\n\\n /* ============ State Variables ============ */\\n\\n /// @notice The EIP-712 typehash for the contract's domain\\n bytes32 public constant DOMAIN_TYPEHASH =\\n keccak256('EIP712Domain(string name,uint256 chainId,address verifyingContract)');\\n\\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\\n bytes32 public constant DELEGATION_TYPEHASH =\\n keccak256('Delegation(address delegatee,uint256 nonce,uint256 expiry)');\\n\\n /// @dev A record of votes checkpoints for each account, by index\\n mapping(address => address) public delegates;\\n\\n /// @notice A checkpoint for marking number of votes from a given block\\n struct Checkpoint {\\n uint32 fromBlock;\\n uint96 votes;\\n }\\n\\n /// @notice A record of votes checkpoints for each account, by index\\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\\n\\n /// @notice The number of checkpoints for each account\\n mapping(address => uint32) public numCheckpoints;\\n\\n /// @notice A record of states for signing / validating signatures\\n mapping(address => uint256) public nonces;\\n\\n /* ============ Functions ============ */\\n\\n /* ============ Constructor ============ */\\n\\n constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {}\\n\\n /* ============ External Functions ============ */\\n\\n /* =========== Token related Gov Functions ====== */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Delegating votes from msg.sender to delegatee\\n *\\n * @notice Delegate votes from `msg.sender` to `delegatee`\\n * @param delegatee The address to delegate votes to\\n */\\n\\n function delegate(address delegatee) external override {\\n return _delegate(msg.sender, delegatee);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Delegate votes using signature to 'delegatee'\\n *\\n * @notice Delegates votes from signatory to `delegatee`\\n * @param delegatee The address to delegate votes to\\n * @param nonce The contract state required to match the signature\\n * @param expiry The time at which to expire the signature\\n * @param v The recovery byte of the signature\\n * @param r Half of the ECDSA signature pair\\n * @param s Half of the ECDSA signature pair\\n */\\n\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external override {\\n bytes32 domainSeparator =\\n keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name())), getChainId(), address(this)));\\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\\n bytes32 digest = keccak256(abi.encodePacked('\\\\x19\\\\x01', domainSeparator, structHash));\\n address signatory = ecrecover(digest, v, r, s);\\n require(signatory != address(0), 'VoteToken::delegateBySig: invalid signature');\\n require(nonce == nonces[signatory].add(1), 'VoteToken::delegateBySig: invalid nonce');\\n nonces[signatory]++;\\n require(block.timestamp <= expiry, 'VoteToken::delegateBySig: signature expired');\\n return _delegate(signatory, delegatee);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Check Delegate votes using signature to 'delegatee'\\n *\\n * @notice Get current voting power for an account\\n * @param account Account to get voting power for\\n * @return Voting power for an account\\n */\\n function getCurrentVotes(address account) external view virtual override returns (uint96) {\\n uint32 nCheckpoints = numCheckpoints[account];\\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Get voting power at a specific block for an account\\n *\\n * @param account Account to get voting power for\\n * @param blockNumber Block to get voting power at\\n * @return Voting power for an account at specific block\\n */\\n function getPriorVotes(address account, uint256 blockNumber) external view virtual override returns (uint96) {\\n require(blockNumber < block.number, 'BABLToken::getPriorVotes: not yet determined');\\n\\n uint32 nCheckpoints = numCheckpoints[account];\\n if (nCheckpoints == 0) {\\n return 0;\\n }\\n\\n // First check most recent balance\\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\\n return checkpoints[account][nCheckpoints - 1].votes;\\n }\\n\\n // Next check implicit zero balance\\n if (checkpoints[account][0].fromBlock > blockNumber) {\\n return 0;\\n }\\n\\n uint32 lower = 0;\\n uint32 upper = nCheckpoints - 1;\\n while (upper > lower) {\\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\\n Checkpoint memory cp = checkpoints[account][center];\\n if (cp.fromBlock == blockNumber) {\\n return cp.votes;\\n } else if (cp.fromBlock < blockNumber) {\\n lower = center;\\n } else {\\n upper = center - 1;\\n }\\n }\\n return checkpoints[account][lower].votes;\\n }\\n\\n function getMyDelegatee() external view override returns (address) {\\n return delegates[msg.sender];\\n }\\n\\n function getDelegatee(address account) external view override returns (address) {\\n return delegates[account];\\n }\\n\\n function getCheckpoints(address account, uint32 id)\\n external\\n view\\n override\\n returns (uint32 fromBlock, uint96 votes)\\n {\\n Checkpoint storage getCheckpoint = checkpoints[account][id];\\n return (getCheckpoint.fromBlock, getCheckpoint.votes);\\n }\\n\\n function getNumberOfCheckpoints(address account) external view override returns (uint32) {\\n return numCheckpoints[account];\\n }\\n\\n /* ============ Internal Only Function ============ */\\n\\n /**\\n * GOVERNANCE FUNCTION. Make a delegation\\n *\\n * @dev Internal function to delegate voting power to an account\\n * @param delegator The address of the account delegating votes from\\n * @param delegatee The address to delegate votes to\\n */\\n\\n function _delegate(address delegator, address delegatee) internal {\\n address currentDelegate = delegates[delegator];\\n uint96 delegatorBalance = safe96(_balanceOf(delegator), 'VoteToken::_delegate: uint96 overflow');\\n delegates[delegator] = delegatee;\\n\\n emit DelegateChanged(delegator, currentDelegate, delegatee);\\n\\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\\n }\\n\\n function _balanceOf(address account) internal view virtual returns (uint256) {\\n return balanceOf(account);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Move the delegates\\n *\\n * @dev Internal function to move delegates between accounts\\n * @param srcRep The address of the account delegating votes from\\n * @param dstRep The address of the account delegating votes to\\n * @param amount The voting power to move\\n */\\n function _moveDelegates(\\n address srcRep,\\n address dstRep,\\n uint96 amount\\n ) internal {\\n if (srcRep != dstRep && amount > 0) {\\n // It must not revert but do nothing in cases of address(0) being part of the move\\n // Sub voting amount to source in case it is not the zero address (e.g. transfers)\\n if (srcRep != address(0)) {\\n uint32 srcRepNum = numCheckpoints[srcRep];\\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\\n uint96 srcRepNew = sub96(srcRepOld, amount, 'VoteToken::_moveDelegates: vote amount underflows');\\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\\n }\\n if (dstRep != address(0)) {\\n // Add it to destination in case it is not the zero address (e.g. any transfer of tokens or delegations except a first mint to a specific address)\\n uint32 dstRepNum = numCheckpoints[dstRep];\\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\\n uint96 dstRepNew = add96(dstRepOld, amount, 'VoteToken::_moveDelegates: vote amount overflows');\\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\\n }\\n }\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Internal function to write a checkpoint for voting power\\n *\\n * @dev internal function to write a checkpoint for voting power\\n * @param delegatee The address of the account delegating votes to\\n * @param nCheckpoints The num checkpoint\\n * @param oldVotes The previous voting power\\n * @param newVotes The new voting power\\n */\\n function _writeCheckpoint(\\n address delegatee,\\n uint32 nCheckpoints,\\n uint96 oldVotes,\\n uint96 newVotes\\n ) internal {\\n uint32 blockNumber = safe32(block.number, 'VoteToken::_writeCheckpoint: block number exceeds 32 bits');\\n\\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\\n } else {\\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\\n numCheckpoints[delegatee] = nCheckpoints + 1;\\n }\\n\\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint32\\n *\\n * @dev internal function to convert from uint256 to uint32\\n */\\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\\n require(n < 2**32, errorMessage);\\n return uint32(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint96\\n *\\n * @dev internal function to convert from uint256 to uint96\\n */\\n function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) {\\n require(n < 2**96, errorMessage);\\n return uint96(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to add two uint96 numbers\\n *\\n * @dev internal safe math function to add two uint96 numbers\\n */\\n function add96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n uint96 c = a + b;\\n require(c >= a, errorMessage);\\n return c;\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to subtract two uint96 numbers\\n *\\n * @dev internal safe math function to subtract two uint96 numbers\\n */\\n function sub96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to get chain ID\\n *\\n * @dev internal function to get chain ID\\n */\\n function getChainId() internal pure returns (uint256) {\\n uint256 chainId;\\n assembly {\\n chainId := chainid()\\n }\\n return chainId;\\n }\\n}\\n\",\"keccak256\":\"0xca174dc6b9b5f780aaaf9c832961b7f552b8cd0b6b6f36e8691fa7226de49457\",\"license\":\"Apache License\"}},\"version\":1}", + "bytecode": "0x6080604052630784ce00600d556305a39a80600e5569d3c21bcecceda10000006012553480156200002f57600080fd5b5060405162004f5338038062004f53833981810160405260408110156200005557600080fd5b508051602091820151604080518082018252600f81526e426162796c6f6e2e46696e616e636560881b818601908152825180840190935260048352631090509360e21b9583019590955280519394929390928391839183918391620000be916003919062000469565b508051620000d490600490602084019062000469565b50506005805460ff19166012179055506000620000f0620001f8565b60058054610100600160a81b0319166101006001600160a01b03841690810291909117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350506001600655505060118054600160a01b60ff60a01b19909116179055504260158190556200018690630f099c00620001fc602090811b62002d9b17901c565b6013556200019f3369d3c21bcecceda10000006200025e565b620001c3630f099c0063ffffffff1642620001fc60201b62002d9b1790919060201c565b601455601080546001600160a01b039384166001600160a01b031991821617909155600f805492909316911617905562000515565b3390565b60008282018381101562000257576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b038216620002ba576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b620002c8600083836200036d565b620002e481600254620001fc60201b62002d9b1790919060201c565b6002556001600160a01b038216600090815260208181526040909120546200031791839062002d9b620001fc821b17901c565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b62000385838383620003fc60201b62002df51760201c565b620003fc6001600160a01b0384161580620003ad57506010546001600160a01b038581169116145b80620003c657506011546001600160a01b038581169116145b80620003df57506010546001600160a01b038481169116145b80620003f45750601154600160a01b900460ff165b603e62000401565b505050565b816200041257620004128162000416565b5050565b62461bcd60e51b6000908152602060045260076024526642414223000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620004a15760008555620004ec565b82601f10620004bc57805160ff1916838001178555620004ec565b82800160010185558215620004ec579182015b82811115620004ec578251825591602001919060010190620004cf565b50620004fa929150620004fe565b5090565b5b80821115620004fa5760008155600101620004ff565b614a2e80620005256000396000f3fe608060405234801561001057600080fd5b506004361061034c5760003560e01c806382e012b1116101bd578063b23ddce7116100f9578063d5e62855116100a2578063e7a324dc1161007c578063e7a324dc146109f8578063f1127ed814610a00578063f2fde38b14610a32578063f77c479114610a585761034c565b8063d5e62855146109ba578063d6a73a54146109c2578063dd62ed3e146109ca5761034c565b8063c7de902d116100d3578063c7de902d14610943578063d1f5c33b14610969578063d5abeb011461098f5761034c565b8063b23ddce71461087c578063b4b5ea57146108d6578063c3cda520146108fc5761034c565b8063962399e2116101665780639b4e735f116101405780639b4e735f146107f6578063a15d39d41461081c578063a457c2d714610824578063a9059cbb146108505761034c565b8063962399e2146107a257806398f1312e146107c85780639ae697bf146107d05761034c565b80638da5cb5b116101975780638da5cb5b1461078a578063937f2e331461079257806395d89b411461079a5761034c565b806382e012b1146106ee57806386cb9498146106f65780638cec2923146107445761034c565b806340c10f191161028c57806360caae5811610235578063715018a61161020f578063715018a61461067057806376ee403814610678578063782d6fe1146106805780637ecebe00146106c85761034c565b806360caae581461061c5780636fcfff451461062457806370a082311461064a5761034c565b8063587cde1e11610266578063587cde1e146105a85780635c19a95c146105ce5780635e0fac2e146105f65761034c565b806340c10f191461051757806342061268146105435780634f205087146105825761034c565b806323b872dd116102f9578063313ce567116102d3578063313ce567146104bd57806339509351146104db5780633dd5a83e146105075780633f2a55401461050f5761034c565b806323b872dd1461045c578063265e7bde1461049257806330b36cef146104b55761034c565b806318160ddd1161032a57806318160ddd1461042857806320606b7014610430578063238189a8146104385761034c565b806306fdde0314610351578063095ea7b3146103ce5780631523a3711461040e575b600080fd5b610359610a60565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561039357818101518382015260200161037b565b50505050905090810190601f1680156103c05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103fa600480360360408110156103e457600080fd5b506001600160a01b038135169060200135610af6565b604080519115158252519081900360200190f35b610416610d05565b60408051918252519081900360200190f35b610416610d0b565b610416610d11565b610440610d35565b604080516001600160a01b039092168252519081900360200190f35b6103fa6004803603606081101561047257600080fd5b506001600160a01b03813581169160208101359091169060400135610d44565b6103fa600480360360408110156104a857600080fd5b5080359060200135610dcb565b6104166110b8565b6104c56110be565b6040805160ff9092168252519081900360200190f35b6103fa600480360360408110156104f157600080fd5b506001600160a01b0381351690602001356110c7565b610440611245565b610440611254565b6103fa6004803603604081101561052d57600080fd5b506001600160a01b038135169060200135611263565b6105696004803603602081101561055957600080fd5b50356001600160a01b031661159e565b6040805163ffffffff9092168252519081900360200190f35b6104166004803603602081101561059857600080fd5b50356001600160a01b03166115c3565b610440600480360360208110156105be57600080fd5b50356001600160a01b0316611618565b6105f4600480360360208110156105e457600080fd5b50356001600160a01b0316611633565b005b6104166004803603602081101561060c57600080fd5b50356001600160a01b0316611640565b6104c561165d565b6105696004803603602081101561063a57600080fd5b50356001600160a01b0316611662565b6104166004803603602081101561066057600080fd5b50356001600160a01b031661167a565b6105f4611695565b610440611766565b6106ac6004803603604081101561069657600080fd5b506001600160a01b038135169060200135611782565b604080516001600160601b039092168252519081900360200190f35b610416600480360360208110156106de57600080fd5b50356001600160a01b03166119ad565b6105f46119bf565b61071c6004803603602081101561070c57600080fd5b50356001600160a01b0316611a63565b6040805194151585526020850193909352838301919091526060830152519081900360800190f35b6103fa600480360360c081101561075a57600080fd5b506001600160a01b0381351690602081013590604081013515159060608101359060808101359060a00135611a8e565b610440611d74565b6105f4611d88565b610359611e8f565b6103fa600480360360208110156107b857600080fd5b50356001600160a01b0316611ef0565b6104c561215a565b610416600480360360208110156107e657600080fd5b50356001600160a01b031661215f565b6104406004803603602081101561080c57600080fd5b50356001600160a01b031661223a565b610416612258565b6103fa6004803603604081101561083a57600080fd5b506001600160a01b03813516906020013561225e565b6103fa6004803603604081101561086657600080fd5b506001600160a01b038135169060200135612412565b6108ae6004803603604081101561089257600080fd5b5080356001600160a01b0316906020013563ffffffff1661242f565b6040805163ffffffff90931683526001600160601b0390911660208301528051918290030190f35b6106ac600480360360208110156108ec57600080fd5b50356001600160a01b0316612475565b6105f4600480360360c081101561091257600080fd5b506001600160a01b038135169060208101359060408101359060ff6060820135169060808101359060a001356124e7565b6104166004803603602081101561095957600080fd5b50356001600160a01b0316612797565b6103fa6004803603602081101561097f57600080fd5b50356001600160a01b031661288f565b610997612a9b565b604080516001600160601b03909316835260208301919091528051918290030190f35b6105f4612ad1565b610416612bd4565b610416600480360360408110156109e057600080fd5b506001600160a01b0381358116916020013516612bda565b610416612c05565b6108ae60048036036040811015610a1657600080fd5b5080356001600160a01b0316906020013563ffffffff16612c29565b6105f460048036036020811015610a4857600080fd5b50356001600160a01b0316612c5f565b610440612d8c565b60038054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610aec5780601f10610ac157610100808354040283529160200191610aec565b820191906000526020600020905b815481529060010190602001808311610acf57829003601f168201915b5050505050905090565b600060026006541415610b50576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026006556001600160a01b038316610b9a5760405162461bcd60e51b81526004018080602001828103825260388152602001806141236038913960400191505060405180910390fd5b6001600160a01b038316331415610be25760405162461bcd60e51b815260040180806020018281038252603a815260200180614773603a913960400191505060405180910390fd5b6000600019831415610bf75750600019610c1c565b610c198360405180606001604052806030815260200161401e60309139612dfa565b90505b6010546001600160a01b038581169116148015610c575750601054610c4b9033906001600160a01b0316612bda565b816001600160601b0316105b15610c9857601054610c9590610c779033906001600160a01b0316612bda565b60405180608001604052806047815260200161481860479139612dfa565b90505b610cac3385836001600160601b0316612e9d565b604080516001600160601b038316815290516001600160a01b0386169133917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259181900360200190a36001915050600160065592915050565b60155481565b60025490565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6010546001600160a01b031681565b6000610d51848484612f89565b610dc184610d5d61314f565b610dbc85604051806060016040528060288152602001614306602891396001600160a01b038a16600090815260016020526040812090610d9b61314f565b6001600160a01b031681526020810191909152604001600020549190613153565b612e9d565b5060019392505050565b6000610dd561314f565b6001600160a01b0316610de6611d74565b6001600160a01b031614610e41576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b601554610e5290630f099c00612d9b565b421015610e905760405162461bcd60e51b815260040180806020018281038252606381526020018061438e6063913960800191505060405180910390fd5b601354421015610ed15760405162461bcd60e51b81526004018080602001828103825260488152602001806145226048913960600191505060405180910390fd5b6012548311610f115760405162461bcd60e51b81526004018080602001828103825260508152602001806140d36050913960600191505060405180910390fd5b6000610f43610f3a6064610f34600560ff166012546131ad90919063ffffffff16565b90613206565b60125490612d9b565b905080841115610f845760405162461bcd60e51b81526004018080602001828103825260368152602001806142106036913960400191505060405180910390fd5b601254604080519182526020820186905280517fa626f93317e2474b716846a09cf0e28aacb96052643b252fe97704208fecf9b59281900390910190a1610fe3846040518060600160405280604081526020016147ad60409139612dfa565b6001600160601b03166012556000610fff426301e13380612d9b565b9050808410156110405760405162461bcd60e51b815260040180806020018281038252606081526020018061432e6060913960600191505060405180910390fd5b601354604080519182526020820186905280517f63abb52e09389994840613a4780aa50f65baa62888e3cdcfcb088ac2de0b7db59281900390910190a161109f8460405180608001604052806048815260200161408b60489139612dfa565b6001600160601b03166013555060019150505b92915050565b60145481565b60055460ff1690565b600060026006541415611121576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260065561113a826111343386612bda565b90612d9b565b61114333611640565b10158061115d57506010546001600160a01b038481169116145b6111985760405162461bcd60e51b815260040180806020018281038252603d8152602001806148af603d913960400191505060405180910390fd5b6001600160a01b0383166111dd5760405162461bcd60e51b81526004018080602001828103825260418152602001806142746041913960600191505060405180910390fd5b6001600160a01b0383163314156112255760405162461bcd60e51b81526004018080602001828103825260438152602001806149b66043913960600191505060405180910390fd5b6112383384610dbc856111343389612bda565b5060018060065592915050565b6010546001600160a01b031690565b6011546001600160a01b031681565b600061126d61314f565b6001600160a01b031661127e611d74565b6001600160a01b0316146112d9576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6012546112e883611134610d0b565b11156113255760405162461bcd60e51b815260040180806020018281038252602481526020018061447d6024913960400191505060405180910390fd5b60155461133690630f099c00612d9b565b4210156113745760405162461bcd60e51b81526004018080602001828103825260558152602001806148ec6055913960600191505060405180910390fd5b600082116113b35760405162461bcd60e51b81526004018080602001828103825260308152602001806142d66030913960400191505060405180910390fd5b6014544210156113f45760405162461bcd60e51b815260040180806020018281038252604481526020018061418c6044913960600191505060405180910390fd5b6001600160a01b0383166114395760405162461bcd60e51b81526004018080602001828103825260348152602001806144496034913960400191505060405180910390fd5b6001600160a01b0383163014156114815760405162461bcd60e51b815260040180806020018281038252603c815260200180613f6c603c913960400191505060405180910390fd5b61148f426301e13380612d9b565b60148190555060006114b98360405180606001604052806027815260200161469b60279139612dfa565b90506114d36064610f3460026114cd610d0b565b906131ad565b816001600160601b0316111561151a5760405162461bcd60e51b81526004018080602001828103825260388152602001806145e96038913960400191505060405180910390fd5b61152d84826001600160601b031661326d565b604080516001600160a01b03861681526001600160601b038316602082015281517f51c018f451551bf4e92356d59bc5f1fcd317ef0f884d97807cae6dd395da7fe0929181900390910190a16001600160a01b03808516600090815260076020526040812054610dc192168361335d565b6001600160a01b03811660009081526009602052604090205463ffffffff165b919050565b6010546000906001600160a01b0316331461160f5760405162461bcd60e51b8152600401808060200182810382526050815260200180613e9e6050913960600191505060405180910390fd5b6110b2826134f1565b6007602052600090815260409020546001600160a01b031681565b61163d338261370e565b50565b60006110b261164e8361215f565b6116578461167a565b906137d1565b600581565b60096020526000908152604090205463ffffffff1681565b6001600160a01b031660009081526020819052604090205490565b61169d61314f565b6001600160a01b03166116ae611d74565b6001600160a01b031614611709576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60055460405160009161010090046001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36005805474ffffffffffffffffffffffffffffffffffffffff0019169055565b336000908152600760205260409020546001600160a01b031690565b60004382106117c25760405162461bcd60e51b815260040180806020018281038252602c8152602001806146c2602c913960400191505060405180910390fd5b6001600160a01b03831660009081526009602052604090205463ffffffff16806117f05760009150506110b2565b6001600160a01b038416600090815260086020908152604080832063ffffffff60001986018116855292529091205416831061186d576001600160a01b03841660009081526008602090815260408083206000199490940163ffffffff168352929052205464010000000090046001600160601b031690506110b2565b6001600160a01b038416600090815260086020908152604080832083805290915290205463ffffffff168310156118a85760009150506110b2565b600060001982015b8163ffffffff168163ffffffff161115611967576000600263ffffffff848403166001600160a01b038916600090815260086020908152604080832094909304860363ffffffff8181168452948252918390208351808501909452549384168084526401000000009094046001600160601b031690830152925090871415611942576020015194506110b29350505050565b805163ffffffff1687111561195957819350611960565b6001820392505b50506118b0565b506001600160a01b038516600090815260086020908152604080832063ffffffff909416835292905220546001600160601b036401000000009091041691505092915050565b600a6020526000908152604090205481565b6119c761314f565b6001600160a01b03166119d8611d74565b6001600160a01b031614611a33576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b601180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b179055565b600c60205260009081526040902080546001820154600283015460039093015460ff90921692909184565b6010546000906001600160a01b03163314611ada5760405162461bcd60e51b8152600401808060200182810382526050815260200180613e9e6050913960600191505060405180910390fd5b85611ae43361167a565b1015611b37576040805162461bcd60e51b815260206004820152601460248201527f696e73756666696369656e742062616c616e6365000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038716611b92576040805162461bcd60e51b815260206004820152601660248201527f63616e6e6f74206265207a65726f206164647265737300000000000000000000604482015290519081900360640190fd5b6001600160a01b038716301415611bf0576040805162461bcd60e51b815260206004820152601760248201527f63616e6e6f74206265207468697320636f6e7472616374000000000000000000604482015290519081900360640190fd5b6010546001600160a01b0388811691161415611c3d5760405162461bcd60e51b815260040180806020018281038252602e815260200180614246602e913960400191505060405180910390fd5b6001600160a01b038716331415611c9b576040805162461bcd60e51b815260206004820152601e60248201527f746865206f776e65722063616e6e6f74206c6f636b757020697473656c660000604482015290519081900360640190fd5b6001600160a01b0387166000908152600b6020526040902054611cbe9087612d9b565b6001600160a01b0388166000908152600b6020908152604080832093909355600c905220805460ff1916861515178155600181018590556002810184905560038101839055611d0e338989612f89565b604080516001600160a01b038a1681526020810189905287151581830152606081018790526080810186905290517f7ec8d498ce0e4d11d52cf0588976b9a8b30679d7135f9e82de77e2e318a1ea409181900360a00190a1506001979650505050505050565b60055461010090046001600160a01b031690565b601054604080517f1e83409a00000000000000000000000000000000000000000000000000000000815233600482015290516000926001600160a01b031691631e83409a91602480830192602092919082900301818787803b158015611ded57600080fd5b505af1158015611e01573d6000803e3d6000fd5b505050506040513d6020811015611e1757600080fd5b5051336000908152600c602052604090205490915060ff16151560011415611e5157601054611e4f906001600160a01b031682610af6565b505b604080513381526020810183905281517f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4929181900390910190a150565b60048054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610aec5780601f10610ac157610100808354040283529160200191610aec565b6010546000906001600160a01b031615611fc457601060009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611f5257600080fd5b505afa158015611f66573d6000803e3d6000fd5b505050506040513d6020811015611f7c57600080fd5b50516001600160a01b03163314611fc45760405162461bcd60e51b815260040180806020018281038252605a815260200180613e17605a913960600191505060405180910390fd5b6001600160a01b03821661201f576040805162461bcd60e51b815260206004820152601660248201527f63616e6e6f74206265207a65726f206164647265737300000000000000000000604482015290519081900360640190fd5b6001600160a01b03821630141561207d576040805162461bcd60e51b815260206004820152601760248201527f63616e6e6f74206265207468697320636f6e7472616374000000000000000000604482015290519081900360640190fd5b6010546001600160a01b03838116911614156120e0576040805162461bcd60e51b815260206004820152601c60248201527f6d757374206265206e65772054696d654c6f636b526567697374727900000000604482015290519081900360640190fd5b601054604080516001600160a01b039283168152918416602083015280517f1b4fa7e35ece4dcbbb914f91d8c3539c828d43c0b8a700237373966a27a9693a9281900390910190a150601080546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff199091161790556001919050565b600281565b60008061216b83612797565b6001600160a01b0384166000908152600c602052604090206002015490915042108015906121a15750336001600160a01b038416145b80156121ab575080155b80156121d157506001600160a01b0383166000908152600c602052604090206002015415155b156121f0576001600160a01b0383166000908152600b60205260408120555b604080516001600160a01b03851681526020810183905281517febfb816221eaf798e256b970818c54755242a19e3e1a2b5b2060f9d22ecbf46d929181900390910190a192915050565b6001600160a01b039081166000908152600760205260409020541690565b60125481565b6000600260065414156122b8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026006556001600160a01b0383166123025760405162461bcd60e51b81526004018080602001828103825260418152602001806144a16041913960600191505060405180910390fd5b6001600160a01b03831633141561234a5760405162461bcd60e51b81526004018080602001828103825260438152602001806147306043913960600191505060405180910390fd5b816123553385612bda565b10156123925760405162461bcd60e51b8152600401808060200182810382526036815260200180613f366036913960400191505060405180910390fd5b6010546001600160a01b03848116911614156123df5760405162461bcd60e51b8152600401808060200182810382526050815260200180613fce6050913960600191505060405180910390fd5b6112383384610dbc856040518060600160405280602581526020016149666025913961240b338a612bda565b9190613153565b600061242661241f61314f565b8484612f89565b50600192915050565b6001600160a01b0391909116600090815260086020908152604080832063ffffffff9485168452909152902054908116916401000000009091046001600160601b031690565b6001600160a01b03811660009081526009602052604081205463ffffffff16806124a05760006124e0565b6001600160a01b0383166000908152600860209081526040808320600019850163ffffffff16845290915290205464010000000090046001600160601b03165b9392505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866612512610a60565b8051906020012061252161382e565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c08401526001600160a01b038b1660e084015261010083018a90526101208084018a905282518085039091018152610140840183528051908501207f19010000000000000000000000000000000000000000000000000000000000006101608501526101628401829052610182808501829052835180860390910181526101a285018085528151918701919091206000918290526101c2860180865281905260ff8b166101e287015261020286018a90526102228601899052935192965090949293909260019261024280840193601f198301929081900390910190855afa15801561266f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166126c15760405162461bcd60e51b815260040180806020018281038252602b8152602001806147ed602b913960400191505060405180910390fd5b6001600160a01b0381166000908152600a60205260409020546126e5906001612d9b565b89146127225760405162461bcd60e51b8152600401808060200182810382526027815260200180613dc06027913960400191505060405180910390fd5b6001600160a01b0381166000908152600a6020526040902080546001019055428810156127805760405162461bcd60e51b815260040180806020018281038252602b81526020018061498b602b913960400191505060405180910390fd5b61278a818b61370e565b505050505b505050505050565b6001600160a01b0381166000908152600b6020908152604080832054600c909252822060010154819042906127d0906301e13380612d9b565b1180156127dc57508115155b156127ea5791506115be9050565b6001600160a01b0384166000908152600c602052604090206002015442101580612812575081155b1561281f575060006124e0565b81156124e0576001600160a01b0384166000908152600c6020526040902060018101546002909101546128879161285691906137d1565b6001600160a01b0386166000908152600c6020526040902060020154610f349061288090426137d1565b85906131ad565b949350505050565b600061289961314f565b6001600160a01b03166128aa611d74565b6001600160a01b031614612905576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038216612960576040805162461bcd60e51b815260206004820152601660248201527f63616e6e6f74206265207a65726f206164647265737300000000000000000000604482015290519081900360640190fd5b6001600160a01b0382163014156129be576040805162461bcd60e51b815260206004820152601760248201527f63616e6e6f74206265207468697320636f6e7472616374000000000000000000604482015290519081900360640190fd5b6011546001600160a01b0383811691161415612a21576040805162461bcd60e51b815260206004820152601f60248201527f6d757374206265206e65772052657761726473204469737472696275746f7200604482015290519081900360640190fd5b601154604080516001600160a01b039283168152918416602083015280517fd8732c543edde4e60b54e1136459ee3a610f1243749765d9dbdbcf9fe76a7bd59281900390910190a150601180546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff199091161790556001919050565b6000806000612ac46012546040518060600160405280603d8152602001613d60603d9139612dfa565b6013549093509150509091565b612ad961314f565b6001600160a01b0316612aea611d74565b6001600160a01b031614612b45576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b601154600160a81b900460ff1615612ba4576040805162461bcd60e51b815260206004820152600e60248201527f4241424c206d75737420666c6f77000000000000000000000000000000000000604482015290519081900360640190fd5b601180547fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff16600160a81b179055565b60135481565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b600860209081526000928352604080842090915290825290205463ffffffff81169064010000000090046001600160601b031682565b612c6761314f565b6001600160a01b0316612c78611d74565b6001600160a01b031614612cd3576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116612d185760405162461bcd60e51b8152600401808060200182810382526026815260200180613eee6026913960400191505060405180910390fd5b6005546040516001600160a01b0380841692610100900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b039092166101000274ffffffffffffffffffffffffffffffffffffffff0019909216919091179055565b600f546001600160a01b031681565b6000828201838110156124e0576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b505050565b6000816c010000000000000000000000008410612e955760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612e5a578181015183820152602001612e42565b50505050905090810190601f168015612e875780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b509192915050565b6001600160a01b038316612ee25760405162461bcd60e51b81526004018080602001828103825260248152602001806146776024913960400191505060405180910390fd5b6001600160a01b038216612f275760405162461bcd60e51b8152600401808060200182810382526022815260200180613f146022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316612fce5760405162461bcd60e51b81526004018080602001828103825260428152602001806146ee6042913960600191505060405180910390fd5b6001600160a01b0382166130135760405162461bcd60e51b81526004018080602001828103825260408152602001806141d06040913960400191505060405180910390fd5b6001600160a01b03821630141561305b5760405162461bcd60e51b815260040180806020018281038252605081526020018061485f6050913960600191505060405180910390fd5b806130658461167a565b10156130a25760405162461bcd60e51b81526004018080602001828103825260318152602001806146466031913960400191505060405180910390fd5b806130ac84611640565b10156130e95760405162461bcd60e51b81526004018080602001828103825260408152602001806144e26040913960400191505060405180910390fd5b6130f4838383613832565b6001600160a01b0380841660009081526007602090815260408083205486851684529281902054815160608101909252602c808352612df59594851694919091169261314a92879290916143f190830139612dfa565b61335d565b3390565b600081848411156131a55760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612e5a578181015183820152602001612e42565b505050900390565b6000826131bc575060006110b2565b828202828482816131c957fe5b04146124e05760405162461bcd60e51b81526004018080602001828103825260218152602001806142b56021913960400191505060405180910390fd5b600080821161325c576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161326557fe5b049392505050565b6001600160a01b0382166132c8576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b6132d46000838361398d565b6002546132e19082612d9b565b6002556001600160a01b0382166000908152602081905260409020546133079082612d9b565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b816001600160a01b0316836001600160a01b03161415801561338857506000816001600160601b0316115b15612df5576001600160a01b03831615613441576001600160a01b03831660009081526009602052604081205463ffffffff1690816133c8576000613408565b6001600160a01b0385166000908152600860209081526040808320600019860163ffffffff16845290915290205464010000000090046001600160601b03165b9050600061342f828560405180606001604052806031815260200161415b60319139613a09565b905061343d86848484613a6e565b5050505b6001600160a01b03821615612df5576001600160a01b03821660009081526009602052604081205463ffffffff16908161347c5760006134bc565b6001600160a01b0384166000908152600860209081526040808320600019860163ffffffff16845290915290205464010000000090046001600160601b03165b905060006134e38285604051806060016040528060308152602001613de760309139613c2f565b905061278f85848484613a6e565b6010546000906001600160a01b0316331461353d5760405162461bcd60e51b8152600401808060200182810382526050815260200180613e9e6050913960600191505060405180910390fd5b6001600160a01b0382166000908152600b60205260409020546135915760405162461bcd60e51b815260040180806020018281038252602c81526020018061441d602c913960400191505060405180910390fd5b600061359c8361215f565b9050600081116135dd5760405162461bcd60e51b815260040180806020018281038252603d81526020018061404e603d913960400191505060405180910390fd5b6001600160a01b0383166000908152600c602052604090205460ff1615156001146136395760405162461bcd60e51b81526004018080602001828103825260468152602001806145a36046913960600191505060405180910390fd5b6001600160a01b038084166000908152600b60209081526040808320839055600c9091528120805460ff191681556001810182905560028101829055600301556010546136899185911683610d44565b6136c45760405162461bcd60e51b815260040180806020018281038252602d815260200180613e71602d913960400191505060405180910390fd5b604080516001600160a01b03851681526020810183905281517f27f83af92b39768b17fe0c8d6922452702717efb8626d97e7a754e0b27d4f6d2929181900390910190a192915050565b6001600160a01b038083166000908152600760205260408120549091169061375661373885613c99565b60405180606001604052806025815260200161494160259139612dfa565b6001600160a01b03858116600081815260076020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916898616908117909155905194955093928616927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a46137cb82848361335d565b50505050565b600082821115613828576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b4690565b6001600160a01b0383166138775760405162461bcd60e51b81526004018080602001828103825260258152602001806146216025913960400191505060405180910390fd5b6001600160a01b0382166138bc5760405162461bcd60e51b8152600401808060200182810382526023815260200180613d9d6023913960400191505060405180910390fd5b6138c783838361398d565b61390481604051806060016040528060268152602001613fa8602691396001600160a01b0386166000908152602081905260409020549190613153565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546139339082612d9b565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b613998838383612df5565b612df56001600160a01b03841615806139be57506010546001600160a01b038581169116145b806139d657506011546001600160a01b038581169116145b806139ee57506010546001600160a01b038481169116145b80613a025750601154600160a01b900460ff165b603e613ca4565b6000836001600160601b0316836001600160601b0316111582906131a55760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612e5a578181015183820152602001612e42565b6000613a924360405180606001604052806039815260200161456a60399139613cb6565b905060008463ffffffff16118015613adb57506001600160a01b038516600090815260086020908152604080832063ffffffff6000198901811685529252909120548282169116145b15613b3b576001600160a01b0385166000908152600860209081526040808320600019880163ffffffff168452909152902080546fffffffffffffffffffffffff0000000019166401000000006001600160601b03851602179055613bdb565b60408051808201825263ffffffff80841682526001600160601b0380861660208085019182526001600160a01b038b166000818152600883528781208c871682528352878120965187549451909516640100000000026fffffffffffffffffffffffff000000001995871663ffffffff19958616179590951694909417909555938252600990935292909220805460018801909316929091169190911790555b604080516001600160601b0380861682528416602082015281516001600160a01b038816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b6000838301826001600160601b038087169083161015613c905760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612e5a578181015183820152602001612e42565b50949350505050565b60006110b28261167a565b81613cb257613cb281613d0c565b5050565b6000816401000000008410612e955760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612e5a578181015183820152602001612e42565b62461bcd60e51b6000908152602060045260076024526642414223000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fdfe4241424c546f6b656e3a3a6d6178537570706c79416c6c6f7765643a206d6178537570706c79416c6c6f7765642065786365656473203936206269747345524332303a207472616e7366657220746f20746865207a65726f2061646472657373566f7465546f6b656e3a3a64656c656761746542795369673a20696e76616c6964206e6f6e6365566f7465546f6b656e3a3a5f6d6f766544656c6567617465733a20766f746520616d6f756e74206f766572666c6f777354696d654c6f636b6564546f6b656e3a3a206f6e6c7954696d654c6f636b4f776e65723a2063616e206f6e6c7920626520657865637574656420627920746865206f776e6572206f662054696d654c6f636b526567697374727954696d654c6f636b6564546f6b656e3a3a63616e63656c546f6b656e733a5472616e73666572206661696c656454696d654c6f636b6564546f6b656e3a3a206f6e6c7954696d654c6f636b52656769737472793a2063616e206f6e6c792062652065786563757465642062792054696d654c6f636b52656769737472794f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737354696d654c6f636b6564546f6b656e3a3a6465637265617365416c6c6f77616e63653a556e646572666c6f7720636f6e646974696f6e4241424c546f6b656e3a3a6d696e743a2063616e6e6f74206d696e7420746f207468652061646472657373206f66207468697320636f6e747261637445524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636554696d654c6f636b6564546f6b656e3a3a6465637265617365416c6c6f77616e63653a63616e6e6f7420646563726561736520616c6c6f77616e636520746f2074696d654c6f636b526567697374727954696d654c6f636b6564546f6b656e3a3a617070726f76653a20616d6f756e742065786365656473203936206269747354696d654c6f636b6564546f6b656e3a3a63616e63656c546f6b656e733a546865726520617265206e6f206d6f7265206c6f636b656420746f6b656e734241424c546f6b656e3a3a6368616e67654d6178537570706c793a206e6577206e65774d6178537570706c79416c6c6f7765644166746572206578636565647320393620626974734241424c546f6b656e3a3a6368616e67654d6178537570706c793a206368616e67654d6178537570706c792073686f756c6420626520686967686572207468616e2070726576696f75732076616c756554696d654c6f636b6564546f6b656e3a3a617070726f76653a207370656e6465722063616e6e6f74206265207a65726f2061646472657373566f7465546f6b656e3a3a5f6d6f766544656c6567617465733a20766f746520616d6f756e7420756e646572666c6f77734241424c546f6b656e3a3a6d696e743a206d696e74696e67206e6f7420616c6c6f776564207965742062656361757365206d696e74696e67416c6c6f776564416674657254696d654c6f636b6564546f6b656e3a3a205f7472616e736665723a2063616e6e6f74207472616e7366657220746f20746865207a65726f20616464726573734241424c546f6b656e3a3a6368616e67654d6178537570706c793a206578636565646564206f6620616c6c6f7765642035252063617063616e6e6f74206265207468652054696d654c6f636b526567697374727920636f6e747261637420697473656c6654696d654c6f636b6564546f6b656e3a3a696e637265617365416c6c6f77616e63653a5370656e6465722063616e6e6f74206265207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774241424c546f6b656e3a3a6d696e743a206d696e742073686f756c6420626520686967686572207468616e207a65726f45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654241424c546f6b656e3a3a6368616e67654d6178537570706c793a20746865206e65774d6178537570706c79416c6c6f77656441667465722073686f756c64206265206174206c656173742031207965617220696e20746865206675747572654241424c546f6b656e3a3a6368616e67654d6178537570706c793a2061206368616e6765206f6e206d6178537570706c79416c6c6f776564206e6f7420616c6c6f77656420756e74696c2038207965617273206166746572206465706c6f796d656e7454696d654c6f636b6564546f6b656e3a3a205f7472616e736665723a2075696e743936206f766572666c6f7754696d654c6f636b6564546f6b656e3a3a63616e63656c546f6b656e733a4e6f7420726567697374657265644241424c546f6b656e3a3a6d696e743a2063616e6e6f74207472616e7366657220746f20746865207a65726f20616464726573734241424c546f6b656e3a3a6d696e743a206d617820737570706c7920657863656564656454696d654c6f636b6564546f6b656e3a3a6465637265617365416c6c6f77616e63653a5370656e6465722063616e6e6f74206265207a65726f206164647265737354696d654c6f636b6564546f6b656e3a3a205f7472616e736665723a20617474656d7074696e6720746f207472616e73666572206c6f636b65642066756e64734241424c546f6b656e3a3a6368616e67654d6178537570706c793a2061206368616e6765206f6e206d6178537570706c79416c6c6f776564206e6f7420616c6c6f77656420796574566f7465546f6b656e3a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747354696d654c6f636b6564546f6b656e3a3a63616e63656c546f6b656e733a63616e6e6f742063616e63656c206c6f636b656420746f6b656e7320746f20496e766573746f72734241424c546f6b656e3a3a6d696e743a206578636565646564206d696e7420636170206f66203225206f6620746f74616c20737570706c7945524332303a207472616e736665722066726f6d20746865207a65726f206164647265737354696d654c6f636b6564546f6b656e3a3a205f7472616e736665723a20696e73756666696369656e742062616c616e636545524332303a20617070726f76652066726f6d20746865207a65726f20616464726573734241424c546f6b656e3a3a6d696e743a20616d6f756e74206578636565647320393620626974734241424c546f6b656e3a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e656454696d654c6f636b6564546f6b656e3a3a205f7472616e736665723a2063616e6e6f74207472616e736665722066726f6d20746865207a65726f206164647265737354696d654c6f636b6564546f6b656e3a3a6465637265617365416c6c6f77616e63653a5370656e6465722063616e6e6f7420626520746865206d73672e73656e64657254696d654c6f636b6564546f6b656e3a3a617070726f76653a207370656e6465722063616e6e6f7420626520746865206d73672e73656e6465724241424c546f6b656e3a3a6368616e67654d6178537570706c793a20706f74656e7469616c206d617820616d6f756e7420657863656564732039362062697473566f7465546f6b656e3a3a64656c656761746542795369673a20696e76616c6964207369676e617475726554696d654c6f636b6564546f6b656e3a3a617070726f76653a2063616e6e6f7420646563726561736520616c6c6f77616e636520746f2074696d656c6f636b726567697374727954696d654c6f636b6564546f6b656e3a3a205f7472616e736665723a20646f206e6f74207472616e7366657220746f6b656e7320746f2074686520746f6b656e20636f6e747261637420697473656c6654696d654c6f636b6564546f6b656e3a3a696e637265617365416c6c6f77616e63653a4e6f7420656e6f75676820756e6c6f636b656420746f6b656e734241424c546f6b656e3a3a6d696e743a206d696e74696e67206e6f7420616c6c6f776564206166746572207468652046495253545f45504f43485f4d494e542068617320706173736564203e3d2038207965617273566f7465546f6b656e3a3a5f64656c65676174653a2075696e743936206f766572666c6f7745524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f566f7465546f6b656e3a3a64656c656761746542795369673a207369676e6174757265206578706972656454696d654c6f636b6564546f6b656e3a3a696e637265617365416c6c6f77616e63653a5370656e6465722063616e6e6f7420626520746865206d73672e73656e646572a26469706673582212209afd2bbafaaa21285f1bb582288a23985c3f370073cab716bfb7bbd3a1ba560464736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061034c5760003560e01c806382e012b1116101bd578063b23ddce7116100f9578063d5e62855116100a2578063e7a324dc1161007c578063e7a324dc146109f8578063f1127ed814610a00578063f2fde38b14610a32578063f77c479114610a585761034c565b8063d5e62855146109ba578063d6a73a54146109c2578063dd62ed3e146109ca5761034c565b8063c7de902d116100d3578063c7de902d14610943578063d1f5c33b14610969578063d5abeb011461098f5761034c565b8063b23ddce71461087c578063b4b5ea57146108d6578063c3cda520146108fc5761034c565b8063962399e2116101665780639b4e735f116101405780639b4e735f146107f6578063a15d39d41461081c578063a457c2d714610824578063a9059cbb146108505761034c565b8063962399e2146107a257806398f1312e146107c85780639ae697bf146107d05761034c565b80638da5cb5b116101975780638da5cb5b1461078a578063937f2e331461079257806395d89b411461079a5761034c565b806382e012b1146106ee57806386cb9498146106f65780638cec2923146107445761034c565b806340c10f191161028c57806360caae5811610235578063715018a61161020f578063715018a61461067057806376ee403814610678578063782d6fe1146106805780637ecebe00146106c85761034c565b806360caae581461061c5780636fcfff451461062457806370a082311461064a5761034c565b8063587cde1e11610266578063587cde1e146105a85780635c19a95c146105ce5780635e0fac2e146105f65761034c565b806340c10f191461051757806342061268146105435780634f205087146105825761034c565b806323b872dd116102f9578063313ce567116102d3578063313ce567146104bd57806339509351146104db5780633dd5a83e146105075780633f2a55401461050f5761034c565b806323b872dd1461045c578063265e7bde1461049257806330b36cef146104b55761034c565b806318160ddd1161032a57806318160ddd1461042857806320606b7014610430578063238189a8146104385761034c565b806306fdde0314610351578063095ea7b3146103ce5780631523a3711461040e575b600080fd5b610359610a60565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561039357818101518382015260200161037b565b50505050905090810190601f1680156103c05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103fa600480360360408110156103e457600080fd5b506001600160a01b038135169060200135610af6565b604080519115158252519081900360200190f35b610416610d05565b60408051918252519081900360200190f35b610416610d0b565b610416610d11565b610440610d35565b604080516001600160a01b039092168252519081900360200190f35b6103fa6004803603606081101561047257600080fd5b506001600160a01b03813581169160208101359091169060400135610d44565b6103fa600480360360408110156104a857600080fd5b5080359060200135610dcb565b6104166110b8565b6104c56110be565b6040805160ff9092168252519081900360200190f35b6103fa600480360360408110156104f157600080fd5b506001600160a01b0381351690602001356110c7565b610440611245565b610440611254565b6103fa6004803603604081101561052d57600080fd5b506001600160a01b038135169060200135611263565b6105696004803603602081101561055957600080fd5b50356001600160a01b031661159e565b6040805163ffffffff9092168252519081900360200190f35b6104166004803603602081101561059857600080fd5b50356001600160a01b03166115c3565b610440600480360360208110156105be57600080fd5b50356001600160a01b0316611618565b6105f4600480360360208110156105e457600080fd5b50356001600160a01b0316611633565b005b6104166004803603602081101561060c57600080fd5b50356001600160a01b0316611640565b6104c561165d565b6105696004803603602081101561063a57600080fd5b50356001600160a01b0316611662565b6104166004803603602081101561066057600080fd5b50356001600160a01b031661167a565b6105f4611695565b610440611766565b6106ac6004803603604081101561069657600080fd5b506001600160a01b038135169060200135611782565b604080516001600160601b039092168252519081900360200190f35b610416600480360360208110156106de57600080fd5b50356001600160a01b03166119ad565b6105f46119bf565b61071c6004803603602081101561070c57600080fd5b50356001600160a01b0316611a63565b6040805194151585526020850193909352838301919091526060830152519081900360800190f35b6103fa600480360360c081101561075a57600080fd5b506001600160a01b0381351690602081013590604081013515159060608101359060808101359060a00135611a8e565b610440611d74565b6105f4611d88565b610359611e8f565b6103fa600480360360208110156107b857600080fd5b50356001600160a01b0316611ef0565b6104c561215a565b610416600480360360208110156107e657600080fd5b50356001600160a01b031661215f565b6104406004803603602081101561080c57600080fd5b50356001600160a01b031661223a565b610416612258565b6103fa6004803603604081101561083a57600080fd5b506001600160a01b03813516906020013561225e565b6103fa6004803603604081101561086657600080fd5b506001600160a01b038135169060200135612412565b6108ae6004803603604081101561089257600080fd5b5080356001600160a01b0316906020013563ffffffff1661242f565b6040805163ffffffff90931683526001600160601b0390911660208301528051918290030190f35b6106ac600480360360208110156108ec57600080fd5b50356001600160a01b0316612475565b6105f4600480360360c081101561091257600080fd5b506001600160a01b038135169060208101359060408101359060ff6060820135169060808101359060a001356124e7565b6104166004803603602081101561095957600080fd5b50356001600160a01b0316612797565b6103fa6004803603602081101561097f57600080fd5b50356001600160a01b031661288f565b610997612a9b565b604080516001600160601b03909316835260208301919091528051918290030190f35b6105f4612ad1565b610416612bd4565b610416600480360360408110156109e057600080fd5b506001600160a01b0381358116916020013516612bda565b610416612c05565b6108ae60048036036040811015610a1657600080fd5b5080356001600160a01b0316906020013563ffffffff16612c29565b6105f460048036036020811015610a4857600080fd5b50356001600160a01b0316612c5f565b610440612d8c565b60038054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610aec5780601f10610ac157610100808354040283529160200191610aec565b820191906000526020600020905b815481529060010190602001808311610acf57829003601f168201915b5050505050905090565b600060026006541415610b50576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026006556001600160a01b038316610b9a5760405162461bcd60e51b81526004018080602001828103825260388152602001806141236038913960400191505060405180910390fd5b6001600160a01b038316331415610be25760405162461bcd60e51b815260040180806020018281038252603a815260200180614773603a913960400191505060405180910390fd5b6000600019831415610bf75750600019610c1c565b610c198360405180606001604052806030815260200161401e60309139612dfa565b90505b6010546001600160a01b038581169116148015610c575750601054610c4b9033906001600160a01b0316612bda565b816001600160601b0316105b15610c9857601054610c9590610c779033906001600160a01b0316612bda565b60405180608001604052806047815260200161481860479139612dfa565b90505b610cac3385836001600160601b0316612e9d565b604080516001600160601b038316815290516001600160a01b0386169133917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259181900360200190a36001915050600160065592915050565b60155481565b60025490565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6010546001600160a01b031681565b6000610d51848484612f89565b610dc184610d5d61314f565b610dbc85604051806060016040528060288152602001614306602891396001600160a01b038a16600090815260016020526040812090610d9b61314f565b6001600160a01b031681526020810191909152604001600020549190613153565b612e9d565b5060019392505050565b6000610dd561314f565b6001600160a01b0316610de6611d74565b6001600160a01b031614610e41576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b601554610e5290630f099c00612d9b565b421015610e905760405162461bcd60e51b815260040180806020018281038252606381526020018061438e6063913960800191505060405180910390fd5b601354421015610ed15760405162461bcd60e51b81526004018080602001828103825260488152602001806145226048913960600191505060405180910390fd5b6012548311610f115760405162461bcd60e51b81526004018080602001828103825260508152602001806140d36050913960600191505060405180910390fd5b6000610f43610f3a6064610f34600560ff166012546131ad90919063ffffffff16565b90613206565b60125490612d9b565b905080841115610f845760405162461bcd60e51b81526004018080602001828103825260368152602001806142106036913960400191505060405180910390fd5b601254604080519182526020820186905280517fa626f93317e2474b716846a09cf0e28aacb96052643b252fe97704208fecf9b59281900390910190a1610fe3846040518060600160405280604081526020016147ad60409139612dfa565b6001600160601b03166012556000610fff426301e13380612d9b565b9050808410156110405760405162461bcd60e51b815260040180806020018281038252606081526020018061432e6060913960600191505060405180910390fd5b601354604080519182526020820186905280517f63abb52e09389994840613a4780aa50f65baa62888e3cdcfcb088ac2de0b7db59281900390910190a161109f8460405180608001604052806048815260200161408b60489139612dfa565b6001600160601b03166013555060019150505b92915050565b60145481565b60055460ff1690565b600060026006541415611121576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260065561113a826111343386612bda565b90612d9b565b61114333611640565b10158061115d57506010546001600160a01b038481169116145b6111985760405162461bcd60e51b815260040180806020018281038252603d8152602001806148af603d913960400191505060405180910390fd5b6001600160a01b0383166111dd5760405162461bcd60e51b81526004018080602001828103825260418152602001806142746041913960600191505060405180910390fd5b6001600160a01b0383163314156112255760405162461bcd60e51b81526004018080602001828103825260438152602001806149b66043913960600191505060405180910390fd5b6112383384610dbc856111343389612bda565b5060018060065592915050565b6010546001600160a01b031690565b6011546001600160a01b031681565b600061126d61314f565b6001600160a01b031661127e611d74565b6001600160a01b0316146112d9576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6012546112e883611134610d0b565b11156113255760405162461bcd60e51b815260040180806020018281038252602481526020018061447d6024913960400191505060405180910390fd5b60155461133690630f099c00612d9b565b4210156113745760405162461bcd60e51b81526004018080602001828103825260558152602001806148ec6055913960600191505060405180910390fd5b600082116113b35760405162461bcd60e51b81526004018080602001828103825260308152602001806142d66030913960400191505060405180910390fd5b6014544210156113f45760405162461bcd60e51b815260040180806020018281038252604481526020018061418c6044913960600191505060405180910390fd5b6001600160a01b0383166114395760405162461bcd60e51b81526004018080602001828103825260348152602001806144496034913960400191505060405180910390fd5b6001600160a01b0383163014156114815760405162461bcd60e51b815260040180806020018281038252603c815260200180613f6c603c913960400191505060405180910390fd5b61148f426301e13380612d9b565b60148190555060006114b98360405180606001604052806027815260200161469b60279139612dfa565b90506114d36064610f3460026114cd610d0b565b906131ad565b816001600160601b0316111561151a5760405162461bcd60e51b81526004018080602001828103825260388152602001806145e96038913960400191505060405180910390fd5b61152d84826001600160601b031661326d565b604080516001600160a01b03861681526001600160601b038316602082015281517f51c018f451551bf4e92356d59bc5f1fcd317ef0f884d97807cae6dd395da7fe0929181900390910190a16001600160a01b03808516600090815260076020526040812054610dc192168361335d565b6001600160a01b03811660009081526009602052604090205463ffffffff165b919050565b6010546000906001600160a01b0316331461160f5760405162461bcd60e51b8152600401808060200182810382526050815260200180613e9e6050913960600191505060405180910390fd5b6110b2826134f1565b6007602052600090815260409020546001600160a01b031681565b61163d338261370e565b50565b60006110b261164e8361215f565b6116578461167a565b906137d1565b600581565b60096020526000908152604090205463ffffffff1681565b6001600160a01b031660009081526020819052604090205490565b61169d61314f565b6001600160a01b03166116ae611d74565b6001600160a01b031614611709576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60055460405160009161010090046001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36005805474ffffffffffffffffffffffffffffffffffffffff0019169055565b336000908152600760205260409020546001600160a01b031690565b60004382106117c25760405162461bcd60e51b815260040180806020018281038252602c8152602001806146c2602c913960400191505060405180910390fd5b6001600160a01b03831660009081526009602052604090205463ffffffff16806117f05760009150506110b2565b6001600160a01b038416600090815260086020908152604080832063ffffffff60001986018116855292529091205416831061186d576001600160a01b03841660009081526008602090815260408083206000199490940163ffffffff168352929052205464010000000090046001600160601b031690506110b2565b6001600160a01b038416600090815260086020908152604080832083805290915290205463ffffffff168310156118a85760009150506110b2565b600060001982015b8163ffffffff168163ffffffff161115611967576000600263ffffffff848403166001600160a01b038916600090815260086020908152604080832094909304860363ffffffff8181168452948252918390208351808501909452549384168084526401000000009094046001600160601b031690830152925090871415611942576020015194506110b29350505050565b805163ffffffff1687111561195957819350611960565b6001820392505b50506118b0565b506001600160a01b038516600090815260086020908152604080832063ffffffff909416835292905220546001600160601b036401000000009091041691505092915050565b600a6020526000908152604090205481565b6119c761314f565b6001600160a01b03166119d8611d74565b6001600160a01b031614611a33576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b601180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b179055565b600c60205260009081526040902080546001820154600283015460039093015460ff90921692909184565b6010546000906001600160a01b03163314611ada5760405162461bcd60e51b8152600401808060200182810382526050815260200180613e9e6050913960600191505060405180910390fd5b85611ae43361167a565b1015611b37576040805162461bcd60e51b815260206004820152601460248201527f696e73756666696369656e742062616c616e6365000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038716611b92576040805162461bcd60e51b815260206004820152601660248201527f63616e6e6f74206265207a65726f206164647265737300000000000000000000604482015290519081900360640190fd5b6001600160a01b038716301415611bf0576040805162461bcd60e51b815260206004820152601760248201527f63616e6e6f74206265207468697320636f6e7472616374000000000000000000604482015290519081900360640190fd5b6010546001600160a01b0388811691161415611c3d5760405162461bcd60e51b815260040180806020018281038252602e815260200180614246602e913960400191505060405180910390fd5b6001600160a01b038716331415611c9b576040805162461bcd60e51b815260206004820152601e60248201527f746865206f776e65722063616e6e6f74206c6f636b757020697473656c660000604482015290519081900360640190fd5b6001600160a01b0387166000908152600b6020526040902054611cbe9087612d9b565b6001600160a01b0388166000908152600b6020908152604080832093909355600c905220805460ff1916861515178155600181018590556002810184905560038101839055611d0e338989612f89565b604080516001600160a01b038a1681526020810189905287151581830152606081018790526080810186905290517f7ec8d498ce0e4d11d52cf0588976b9a8b30679d7135f9e82de77e2e318a1ea409181900360a00190a1506001979650505050505050565b60055461010090046001600160a01b031690565b601054604080517f1e83409a00000000000000000000000000000000000000000000000000000000815233600482015290516000926001600160a01b031691631e83409a91602480830192602092919082900301818787803b158015611ded57600080fd5b505af1158015611e01573d6000803e3d6000fd5b505050506040513d6020811015611e1757600080fd5b5051336000908152600c602052604090205490915060ff16151560011415611e5157601054611e4f906001600160a01b031682610af6565b505b604080513381526020810183905281517f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4929181900390910190a150565b60048054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610aec5780601f10610ac157610100808354040283529160200191610aec565b6010546000906001600160a01b031615611fc457601060009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611f5257600080fd5b505afa158015611f66573d6000803e3d6000fd5b505050506040513d6020811015611f7c57600080fd5b50516001600160a01b03163314611fc45760405162461bcd60e51b815260040180806020018281038252605a815260200180613e17605a913960600191505060405180910390fd5b6001600160a01b03821661201f576040805162461bcd60e51b815260206004820152601660248201527f63616e6e6f74206265207a65726f206164647265737300000000000000000000604482015290519081900360640190fd5b6001600160a01b03821630141561207d576040805162461bcd60e51b815260206004820152601760248201527f63616e6e6f74206265207468697320636f6e7472616374000000000000000000604482015290519081900360640190fd5b6010546001600160a01b03838116911614156120e0576040805162461bcd60e51b815260206004820152601c60248201527f6d757374206265206e65772054696d654c6f636b526567697374727900000000604482015290519081900360640190fd5b601054604080516001600160a01b039283168152918416602083015280517f1b4fa7e35ece4dcbbb914f91d8c3539c828d43c0b8a700237373966a27a9693a9281900390910190a150601080546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff199091161790556001919050565b600281565b60008061216b83612797565b6001600160a01b0384166000908152600c602052604090206002015490915042108015906121a15750336001600160a01b038416145b80156121ab575080155b80156121d157506001600160a01b0383166000908152600c602052604090206002015415155b156121f0576001600160a01b0383166000908152600b60205260408120555b604080516001600160a01b03851681526020810183905281517febfb816221eaf798e256b970818c54755242a19e3e1a2b5b2060f9d22ecbf46d929181900390910190a192915050565b6001600160a01b039081166000908152600760205260409020541690565b60125481565b6000600260065414156122b8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026006556001600160a01b0383166123025760405162461bcd60e51b81526004018080602001828103825260418152602001806144a16041913960600191505060405180910390fd5b6001600160a01b03831633141561234a5760405162461bcd60e51b81526004018080602001828103825260438152602001806147306043913960600191505060405180910390fd5b816123553385612bda565b10156123925760405162461bcd60e51b8152600401808060200182810382526036815260200180613f366036913960400191505060405180910390fd5b6010546001600160a01b03848116911614156123df5760405162461bcd60e51b8152600401808060200182810382526050815260200180613fce6050913960600191505060405180910390fd5b6112383384610dbc856040518060600160405280602581526020016149666025913961240b338a612bda565b9190613153565b600061242661241f61314f565b8484612f89565b50600192915050565b6001600160a01b0391909116600090815260086020908152604080832063ffffffff9485168452909152902054908116916401000000009091046001600160601b031690565b6001600160a01b03811660009081526009602052604081205463ffffffff16806124a05760006124e0565b6001600160a01b0383166000908152600860209081526040808320600019850163ffffffff16845290915290205464010000000090046001600160601b03165b9392505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866612512610a60565b8051906020012061252161382e565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c08401526001600160a01b038b1660e084015261010083018a90526101208084018a905282518085039091018152610140840183528051908501207f19010000000000000000000000000000000000000000000000000000000000006101608501526101628401829052610182808501829052835180860390910181526101a285018085528151918701919091206000918290526101c2860180865281905260ff8b166101e287015261020286018a90526102228601899052935192965090949293909260019261024280840193601f198301929081900390910190855afa15801561266f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166126c15760405162461bcd60e51b815260040180806020018281038252602b8152602001806147ed602b913960400191505060405180910390fd5b6001600160a01b0381166000908152600a60205260409020546126e5906001612d9b565b89146127225760405162461bcd60e51b8152600401808060200182810382526027815260200180613dc06027913960400191505060405180910390fd5b6001600160a01b0381166000908152600a6020526040902080546001019055428810156127805760405162461bcd60e51b815260040180806020018281038252602b81526020018061498b602b913960400191505060405180910390fd5b61278a818b61370e565b505050505b505050505050565b6001600160a01b0381166000908152600b6020908152604080832054600c909252822060010154819042906127d0906301e13380612d9b565b1180156127dc57508115155b156127ea5791506115be9050565b6001600160a01b0384166000908152600c602052604090206002015442101580612812575081155b1561281f575060006124e0565b81156124e0576001600160a01b0384166000908152600c6020526040902060018101546002909101546128879161285691906137d1565b6001600160a01b0386166000908152600c6020526040902060020154610f349061288090426137d1565b85906131ad565b949350505050565b600061289961314f565b6001600160a01b03166128aa611d74565b6001600160a01b031614612905576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038216612960576040805162461bcd60e51b815260206004820152601660248201527f63616e6e6f74206265207a65726f206164647265737300000000000000000000604482015290519081900360640190fd5b6001600160a01b0382163014156129be576040805162461bcd60e51b815260206004820152601760248201527f63616e6e6f74206265207468697320636f6e7472616374000000000000000000604482015290519081900360640190fd5b6011546001600160a01b0383811691161415612a21576040805162461bcd60e51b815260206004820152601f60248201527f6d757374206265206e65772052657761726473204469737472696275746f7200604482015290519081900360640190fd5b601154604080516001600160a01b039283168152918416602083015280517fd8732c543edde4e60b54e1136459ee3a610f1243749765d9dbdbcf9fe76a7bd59281900390910190a150601180546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff199091161790556001919050565b6000806000612ac46012546040518060600160405280603d8152602001613d60603d9139612dfa565b6013549093509150509091565b612ad961314f565b6001600160a01b0316612aea611d74565b6001600160a01b031614612b45576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b601154600160a81b900460ff1615612ba4576040805162461bcd60e51b815260206004820152600e60248201527f4241424c206d75737420666c6f77000000000000000000000000000000000000604482015290519081900360640190fd5b601180547fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff16600160a81b179055565b60135481565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b600860209081526000928352604080842090915290825290205463ffffffff81169064010000000090046001600160601b031682565b612c6761314f565b6001600160a01b0316612c78611d74565b6001600160a01b031614612cd3576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116612d185760405162461bcd60e51b8152600401808060200182810382526026815260200180613eee6026913960400191505060405180910390fd5b6005546040516001600160a01b0380841692610100900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b039092166101000274ffffffffffffffffffffffffffffffffffffffff0019909216919091179055565b600f546001600160a01b031681565b6000828201838110156124e0576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b505050565b6000816c010000000000000000000000008410612e955760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612e5a578181015183820152602001612e42565b50505050905090810190601f168015612e875780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b509192915050565b6001600160a01b038316612ee25760405162461bcd60e51b81526004018080602001828103825260248152602001806146776024913960400191505060405180910390fd5b6001600160a01b038216612f275760405162461bcd60e51b8152600401808060200182810382526022815260200180613f146022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316612fce5760405162461bcd60e51b81526004018080602001828103825260428152602001806146ee6042913960600191505060405180910390fd5b6001600160a01b0382166130135760405162461bcd60e51b81526004018080602001828103825260408152602001806141d06040913960400191505060405180910390fd5b6001600160a01b03821630141561305b5760405162461bcd60e51b815260040180806020018281038252605081526020018061485f6050913960600191505060405180910390fd5b806130658461167a565b10156130a25760405162461bcd60e51b81526004018080602001828103825260318152602001806146466031913960400191505060405180910390fd5b806130ac84611640565b10156130e95760405162461bcd60e51b81526004018080602001828103825260408152602001806144e26040913960400191505060405180910390fd5b6130f4838383613832565b6001600160a01b0380841660009081526007602090815260408083205486851684529281902054815160608101909252602c808352612df59594851694919091169261314a92879290916143f190830139612dfa565b61335d565b3390565b600081848411156131a55760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612e5a578181015183820152602001612e42565b505050900390565b6000826131bc575060006110b2565b828202828482816131c957fe5b04146124e05760405162461bcd60e51b81526004018080602001828103825260218152602001806142b56021913960400191505060405180910390fd5b600080821161325c576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161326557fe5b049392505050565b6001600160a01b0382166132c8576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b6132d46000838361398d565b6002546132e19082612d9b565b6002556001600160a01b0382166000908152602081905260409020546133079082612d9b565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b816001600160a01b0316836001600160a01b03161415801561338857506000816001600160601b0316115b15612df5576001600160a01b03831615613441576001600160a01b03831660009081526009602052604081205463ffffffff1690816133c8576000613408565b6001600160a01b0385166000908152600860209081526040808320600019860163ffffffff16845290915290205464010000000090046001600160601b03165b9050600061342f828560405180606001604052806031815260200161415b60319139613a09565b905061343d86848484613a6e565b5050505b6001600160a01b03821615612df5576001600160a01b03821660009081526009602052604081205463ffffffff16908161347c5760006134bc565b6001600160a01b0384166000908152600860209081526040808320600019860163ffffffff16845290915290205464010000000090046001600160601b03165b905060006134e38285604051806060016040528060308152602001613de760309139613c2f565b905061278f85848484613a6e565b6010546000906001600160a01b0316331461353d5760405162461bcd60e51b8152600401808060200182810382526050815260200180613e9e6050913960600191505060405180910390fd5b6001600160a01b0382166000908152600b60205260409020546135915760405162461bcd60e51b815260040180806020018281038252602c81526020018061441d602c913960400191505060405180910390fd5b600061359c8361215f565b9050600081116135dd5760405162461bcd60e51b815260040180806020018281038252603d81526020018061404e603d913960400191505060405180910390fd5b6001600160a01b0383166000908152600c602052604090205460ff1615156001146136395760405162461bcd60e51b81526004018080602001828103825260468152602001806145a36046913960600191505060405180910390fd5b6001600160a01b038084166000908152600b60209081526040808320839055600c9091528120805460ff191681556001810182905560028101829055600301556010546136899185911683610d44565b6136c45760405162461bcd60e51b815260040180806020018281038252602d815260200180613e71602d913960400191505060405180910390fd5b604080516001600160a01b03851681526020810183905281517f27f83af92b39768b17fe0c8d6922452702717efb8626d97e7a754e0b27d4f6d2929181900390910190a192915050565b6001600160a01b038083166000908152600760205260408120549091169061375661373885613c99565b60405180606001604052806025815260200161494160259139612dfa565b6001600160a01b03858116600081815260076020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916898616908117909155905194955093928616927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a46137cb82848361335d565b50505050565b600082821115613828576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b4690565b6001600160a01b0383166138775760405162461bcd60e51b81526004018080602001828103825260258152602001806146216025913960400191505060405180910390fd5b6001600160a01b0382166138bc5760405162461bcd60e51b8152600401808060200182810382526023815260200180613d9d6023913960400191505060405180910390fd5b6138c783838361398d565b61390481604051806060016040528060268152602001613fa8602691396001600160a01b0386166000908152602081905260409020549190613153565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546139339082612d9b565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b613998838383612df5565b612df56001600160a01b03841615806139be57506010546001600160a01b038581169116145b806139d657506011546001600160a01b038581169116145b806139ee57506010546001600160a01b038481169116145b80613a025750601154600160a01b900460ff165b603e613ca4565b6000836001600160601b0316836001600160601b0316111582906131a55760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612e5a578181015183820152602001612e42565b6000613a924360405180606001604052806039815260200161456a60399139613cb6565b905060008463ffffffff16118015613adb57506001600160a01b038516600090815260086020908152604080832063ffffffff6000198901811685529252909120548282169116145b15613b3b576001600160a01b0385166000908152600860209081526040808320600019880163ffffffff168452909152902080546fffffffffffffffffffffffff0000000019166401000000006001600160601b03851602179055613bdb565b60408051808201825263ffffffff80841682526001600160601b0380861660208085019182526001600160a01b038b166000818152600883528781208c871682528352878120965187549451909516640100000000026fffffffffffffffffffffffff000000001995871663ffffffff19958616179590951694909417909555938252600990935292909220805460018801909316929091169190911790555b604080516001600160601b0380861682528416602082015281516001600160a01b038816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b6000838301826001600160601b038087169083161015613c905760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612e5a578181015183820152602001612e42565b50949350505050565b60006110b28261167a565b81613cb257613cb281613d0c565b5050565b6000816401000000008410612e955760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612e5a578181015183820152602001612e42565b62461bcd60e51b6000908152602060045260076024526642414223000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fdfe4241424c546f6b656e3a3a6d6178537570706c79416c6c6f7765643a206d6178537570706c79416c6c6f7765642065786365656473203936206269747345524332303a207472616e7366657220746f20746865207a65726f2061646472657373566f7465546f6b656e3a3a64656c656761746542795369673a20696e76616c6964206e6f6e6365566f7465546f6b656e3a3a5f6d6f766544656c6567617465733a20766f746520616d6f756e74206f766572666c6f777354696d654c6f636b6564546f6b656e3a3a206f6e6c7954696d654c6f636b4f776e65723a2063616e206f6e6c7920626520657865637574656420627920746865206f776e6572206f662054696d654c6f636b526567697374727954696d654c6f636b6564546f6b656e3a3a63616e63656c546f6b656e733a5472616e73666572206661696c656454696d654c6f636b6564546f6b656e3a3a206f6e6c7954696d654c6f636b52656769737472793a2063616e206f6e6c792062652065786563757465642062792054696d654c6f636b52656769737472794f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737354696d654c6f636b6564546f6b656e3a3a6465637265617365416c6c6f77616e63653a556e646572666c6f7720636f6e646974696f6e4241424c546f6b656e3a3a6d696e743a2063616e6e6f74206d696e7420746f207468652061646472657373206f66207468697320636f6e747261637445524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636554696d654c6f636b6564546f6b656e3a3a6465637265617365416c6c6f77616e63653a63616e6e6f7420646563726561736520616c6c6f77616e636520746f2074696d654c6f636b526567697374727954696d654c6f636b6564546f6b656e3a3a617070726f76653a20616d6f756e742065786365656473203936206269747354696d654c6f636b6564546f6b656e3a3a63616e63656c546f6b656e733a546865726520617265206e6f206d6f7265206c6f636b656420746f6b656e734241424c546f6b656e3a3a6368616e67654d6178537570706c793a206e6577206e65774d6178537570706c79416c6c6f7765644166746572206578636565647320393620626974734241424c546f6b656e3a3a6368616e67654d6178537570706c793a206368616e67654d6178537570706c792073686f756c6420626520686967686572207468616e2070726576696f75732076616c756554696d654c6f636b6564546f6b656e3a3a617070726f76653a207370656e6465722063616e6e6f74206265207a65726f2061646472657373566f7465546f6b656e3a3a5f6d6f766544656c6567617465733a20766f746520616d6f756e7420756e646572666c6f77734241424c546f6b656e3a3a6d696e743a206d696e74696e67206e6f7420616c6c6f776564207965742062656361757365206d696e74696e67416c6c6f776564416674657254696d654c6f636b6564546f6b656e3a3a205f7472616e736665723a2063616e6e6f74207472616e7366657220746f20746865207a65726f20616464726573734241424c546f6b656e3a3a6368616e67654d6178537570706c793a206578636565646564206f6620616c6c6f7765642035252063617063616e6e6f74206265207468652054696d654c6f636b526567697374727920636f6e747261637420697473656c6654696d654c6f636b6564546f6b656e3a3a696e637265617365416c6c6f77616e63653a5370656e6465722063616e6e6f74206265207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774241424c546f6b656e3a3a6d696e743a206d696e742073686f756c6420626520686967686572207468616e207a65726f45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654241424c546f6b656e3a3a6368616e67654d6178537570706c793a20746865206e65774d6178537570706c79416c6c6f77656441667465722073686f756c64206265206174206c656173742031207965617220696e20746865206675747572654241424c546f6b656e3a3a6368616e67654d6178537570706c793a2061206368616e6765206f6e206d6178537570706c79416c6c6f776564206e6f7420616c6c6f77656420756e74696c2038207965617273206166746572206465706c6f796d656e7454696d654c6f636b6564546f6b656e3a3a205f7472616e736665723a2075696e743936206f766572666c6f7754696d654c6f636b6564546f6b656e3a3a63616e63656c546f6b656e733a4e6f7420726567697374657265644241424c546f6b656e3a3a6d696e743a2063616e6e6f74207472616e7366657220746f20746865207a65726f20616464726573734241424c546f6b656e3a3a6d696e743a206d617820737570706c7920657863656564656454696d654c6f636b6564546f6b656e3a3a6465637265617365416c6c6f77616e63653a5370656e6465722063616e6e6f74206265207a65726f206164647265737354696d654c6f636b6564546f6b656e3a3a205f7472616e736665723a20617474656d7074696e6720746f207472616e73666572206c6f636b65642066756e64734241424c546f6b656e3a3a6368616e67654d6178537570706c793a2061206368616e6765206f6e206d6178537570706c79416c6c6f776564206e6f7420616c6c6f77656420796574566f7465546f6b656e3a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747354696d654c6f636b6564546f6b656e3a3a63616e63656c546f6b656e733a63616e6e6f742063616e63656c206c6f636b656420746f6b656e7320746f20496e766573746f72734241424c546f6b656e3a3a6d696e743a206578636565646564206d696e7420636170206f66203225206f6620746f74616c20737570706c7945524332303a207472616e736665722066726f6d20746865207a65726f206164647265737354696d654c6f636b6564546f6b656e3a3a205f7472616e736665723a20696e73756666696369656e742062616c616e636545524332303a20617070726f76652066726f6d20746865207a65726f20616464726573734241424c546f6b656e3a3a6d696e743a20616d6f756e74206578636565647320393620626974734241424c546f6b656e3a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e656454696d654c6f636b6564546f6b656e3a3a205f7472616e736665723a2063616e6e6f74207472616e736665722066726f6d20746865207a65726f206164647265737354696d654c6f636b6564546f6b656e3a3a6465637265617365416c6c6f77616e63653a5370656e6465722063616e6e6f7420626520746865206d73672e73656e64657254696d654c6f636b6564546f6b656e3a3a617070726f76653a207370656e6465722063616e6e6f7420626520746865206d73672e73656e6465724241424c546f6b656e3a3a6368616e67654d6178537570706c793a20706f74656e7469616c206d617820616d6f756e7420657863656564732039362062697473566f7465546f6b656e3a3a64656c656761746542795369673a20696e76616c6964207369676e617475726554696d654c6f636b6564546f6b656e3a3a617070726f76653a2063616e6e6f7420646563726561736520616c6c6f77616e636520746f2074696d656c6f636b726567697374727954696d654c6f636b6564546f6b656e3a3a205f7472616e736665723a20646f206e6f74207472616e7366657220746f6b656e7320746f2074686520746f6b656e20636f6e747261637420697473656c6654696d654c6f636b6564546f6b656e3a3a696e637265617365416c6c6f77616e63653a4e6f7420656e6f75676820756e6c6f636b656420746f6b656e734241424c546f6b656e3a3a6d696e743a206d696e74696e67206e6f7420616c6c6f776564206166746572207468652046495253545f45504f43485f4d494e542068617320706173736564203e3d2038207965617273566f7465546f6b656e3a3a5f64656c65676174653a2075696e743936206f766572666c6f7745524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f566f7465546f6b656e3a3a64656c656761746542795369673a207369676e6174757265206578706972656454696d654c6f636b6564546f6b656e3a3a696e637265617365416c6c6f77616e63653a5370656e6465722063616e6e6f7420626520746865206d73672e73656e646572a26469706673582212209afd2bbafaaa21285f1bb582288a23985c3f370073cab716bfb7bbd3a1ba560464736f6c63430007060033", "devdoc": { "details": "The BABLToken contract is ERC20 using 18 decimals as a standard Is Ownable to transfer ownership to Governor Alpha for Decentralized Governance It overrides the mint and maximum supply to control the timing and maximum cap allowed along the time.", "kind": "dev", @@ -1510,6 +1529,9 @@ "Claim(address,uint256)": { "notice": "An event that emitted when a claim of tokens are registered" }, + "LockedBalance(address,uint256)": { + "notice": "An event that emitted when a lockedBalance query is done" + }, "MaxSupplyAllowedAfterChanged(uint256,uint256)": { "notice": "An event that emitted when maxSupplyAllowedAfter changes" }, @@ -1636,7 +1658,7 @@ "storageLayout": { "storage": [ { - "astId": 4650, + "astId": 2258, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "_balances", "offset": 0, @@ -1644,7 +1666,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 4656, + "astId": 2264, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "_allowances", "offset": 0, @@ -1652,7 +1674,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 4658, + "astId": 2266, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "_totalSupply", "offset": 0, @@ -1660,7 +1682,7 @@ "type": "t_uint256" }, { - "astId": 4660, + "astId": 2268, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "_name", "offset": 0, @@ -1668,7 +1690,7 @@ "type": "t_string_storage" }, { - "astId": 4662, + "astId": 2270, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "_symbol", "offset": 0, @@ -1676,7 +1698,7 @@ "type": "t_string_storage" }, { - "astId": 4664, + "astId": 2272, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "_decimals", "offset": 0, @@ -1684,7 +1706,7 @@ "type": "t_uint8" }, { - "astId": 3848, + "astId": 1456, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "_owner", "offset": 1, @@ -1692,7 +1714,7 @@ "type": "t_address" }, { - "astId": 7995, + "astId": 5603, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "_status", "offset": 0, @@ -1700,7 +1722,7 @@ "type": "t_uint256" }, { - "astId": 39708, + "astId": 39581, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "delegates", "offset": 0, @@ -1708,15 +1730,15 @@ "type": "t_mapping(t_address,t_address)" }, { - "astId": 39720, + "astId": 39593, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "checkpoints", "offset": 0, "slot": "8", - "type": "t_mapping(t_address,t_mapping(t_uint32,t_struct(Checkpoint)39713_storage))" + "type": "t_mapping(t_address,t_mapping(t_uint32,t_struct(Checkpoint)39586_storage))" }, { - "astId": 39725, + "astId": 39598, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "numCheckpoints", "offset": 0, @@ -1724,7 +1746,7 @@ "type": "t_mapping(t_address,t_uint32)" }, { - "astId": 39730, + "astId": 39603, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "nonces", "offset": 0, @@ -1732,7 +1754,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 38636, + "astId": 38488, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "distribution", "offset": 0, @@ -1740,107 +1762,99 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 38650, + "astId": 38502, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "vestedToken", "offset": 0, "slot": "12", - "type": "t_mapping(t_address,t_struct(VestedToken)38645_storage)" + "type": "t_mapping(t_address,t_struct(VestedToken)38497_storage)" }, { - "astId": 38653, - "contract": "contracts/token/BABLToken.sol:BABLToken", - "label": "vestingCliff", - "offset": 0, - "slot": "13", - "type": "t_uint256" - }, - { - "astId": 38658, + "astId": 38507, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "teamVesting", "offset": 0, - "slot": "14", + "slot": "13", "type": "t_uint256" }, { - "astId": 38663, + "astId": 38512, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "investorVesting", "offset": 0, - "slot": "15", + "slot": "14", "type": "t_uint256" }, { - "astId": 38665, + "astId": 38514, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "controller", "offset": 0, - "slot": "16", - "type": "t_contract(IBabController)23675" + "slot": "15", + "type": "t_contract(IBabController)22767" }, { - "astId": 38667, + "astId": 38516, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "timeLockRegistry", "offset": 0, - "slot": "17", - "type": "t_contract(TimeLockRegistry)38523" + "slot": "16", + "type": "t_contract(TimeLockRegistry)38369" }, { - "astId": 38669, + "astId": 38518, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "rewardsDistributor", "offset": 0, - "slot": "18", - "type": "t_contract(RewardsDistributor)38064" + "slot": "17", + "type": "t_contract(RewardsDistributor)37812" }, { - "astId": 38671, + "astId": 38520, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "tokenTransfersEnabled", "offset": 20, - "slot": "18", + "slot": "17", "type": "t_bool" }, { - "astId": 38673, + "astId": 38522, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "tokenTransfersWereDisabled", "offset": 21, - "slot": "18", + "slot": "17", "type": "t_bool" }, { - "astId": 33674, + "astId": 33266, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "maxSupplyAllowed", "offset": 0, - "slot": "19", + "slot": "18", "type": "t_uint256" }, { - "astId": 33677, + "astId": 33269, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "maxSupplyAllowedAfter", "offset": 0, - "slot": "20", + "slot": "19", "type": "t_uint256" }, { - "astId": 33688, + "astId": 33280, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "mintingAllowedAfter", "offset": 0, - "slot": "21", + "slot": "20", "type": "t_uint256" }, { - "astId": 33691, + "astId": 33283, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "BABLTokenDeploymentTimestamp", "offset": 0, - "slot": "22", + "slot": "21", "type": "t_uint256" } ], @@ -1855,17 +1869,17 @@ "label": "bool", "numberOfBytes": "1" }, - "t_contract(IBabController)23675": { + "t_contract(IBabController)22767": { "encoding": "inplace", "label": "contract IBabController", "numberOfBytes": "20" }, - "t_contract(RewardsDistributor)38064": { + "t_contract(RewardsDistributor)37812": { "encoding": "inplace", "label": "contract RewardsDistributor", "numberOfBytes": "20" }, - "t_contract(TimeLockRegistry)38523": { + "t_contract(TimeLockRegistry)38369": { "encoding": "inplace", "label": "contract TimeLockRegistry", "numberOfBytes": "20" @@ -1884,19 +1898,19 @@ "numberOfBytes": "32", "value": "t_mapping(t_address,t_uint256)" }, - "t_mapping(t_address,t_mapping(t_uint32,t_struct(Checkpoint)39713_storage))": { + "t_mapping(t_address,t_mapping(t_uint32,t_struct(Checkpoint)39586_storage))": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => mapping(uint32 => struct VoteToken.Checkpoint))", "numberOfBytes": "32", - "value": "t_mapping(t_uint32,t_struct(Checkpoint)39713_storage)" + "value": "t_mapping(t_uint32,t_struct(Checkpoint)39586_storage)" }, - "t_mapping(t_address,t_struct(VestedToken)38645_storage)": { + "t_mapping(t_address,t_struct(VestedToken)38497_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct TimeLockedToken.VestedToken)", "numberOfBytes": "32", - "value": "t_struct(VestedToken)38645_storage" + "value": "t_struct(VestedToken)38497_storage" }, "t_mapping(t_address,t_uint256)": { "encoding": "mapping", @@ -1912,24 +1926,24 @@ "numberOfBytes": "32", "value": "t_uint32" }, - "t_mapping(t_uint32,t_struct(Checkpoint)39713_storage)": { + "t_mapping(t_uint32,t_struct(Checkpoint)39586_storage)": { "encoding": "mapping", "key": "t_uint32", "label": "mapping(uint32 => struct VoteToken.Checkpoint)", "numberOfBytes": "32", - "value": "t_struct(Checkpoint)39713_storage" + "value": "t_struct(Checkpoint)39586_storage" }, "t_string_storage": { "encoding": "bytes", "label": "string", "numberOfBytes": "32" }, - "t_struct(Checkpoint)39713_storage": { + "t_struct(Checkpoint)39586_storage": { "encoding": "inplace", "label": "struct VoteToken.Checkpoint", "members": [ { - "astId": 39710, + "astId": 39583, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "fromBlock", "offset": 0, @@ -1937,7 +1951,7 @@ "type": "t_uint32" }, { - "astId": 39712, + "astId": 39585, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "votes", "offset": 4, @@ -1947,12 +1961,12 @@ ], "numberOfBytes": "32" }, - "t_struct(VestedToken)38645_storage": { + "t_struct(VestedToken)38497_storage": { "encoding": "inplace", "label": "struct TimeLockedToken.VestedToken", "members": [ { - "astId": 38638, + "astId": 38490, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "teamOrAdvisor", "offset": 0, @@ -1960,7 +1974,7 @@ "type": "t_bool" }, { - "astId": 38640, + "astId": 38492, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "vestingBegin", "offset": 0, @@ -1968,7 +1982,7 @@ "type": "t_uint256" }, { - "astId": 38642, + "astId": 38494, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "vestingEnd", "offset": 0, @@ -1976,7 +1990,7 @@ "type": "t_uint256" }, { - "astId": 38644, + "astId": 38496, "contract": "contracts/token/BABLToken.sol:BABLToken", "label": "lastClaim", "offset": 0, diff --git a/deployments/artifacts/mainnet/BabController.json b/deployments/artifacts/mainnet/BabController.json index e07358423..cba2e77c8 100644 --- a/deployments/artifacts/mainnet/BabController.json +++ b/deployments/artifacts/mainnet/BabController.json @@ -1,5 +1,5 @@ { - "address": "0x28FdD1E736a96F8f7D938c20A3c22eD8Fc0209b3", + "address": "0xeb0CfB66E30F2015C8672DF996aF0fcde8CB318A", "abi": [ { "anonymous": false, @@ -134,6 +134,25 @@ "name": "GardenFactoryChanged", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_newGardenNFT", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_oldStrategyNFT", + "type": "address" + } + ], + "name": "GardenNFTChanged", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -188,10 +207,16 @@ { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_resesrveAsset", + "type": "address" + }, { "indexed": false, "internalType": "uint256", - "name": "_minRiskyPairLiquidityEth", + "name": "_newMinLiquidityReserve", "type": "uint256" } ], @@ -300,6 +325,25 @@ "name": "StrategyFactoryEdited", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_newStrategyNFT", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_oldStrategyNFT", + "type": "address" + } + ], + "name": "StrategyNFTChanged", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -319,6 +363,25 @@ "name": "TreasuryChanged", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_newUniswapFactory", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_oldUniswapFactory", + "type": "address" + } + ], + "name": "UniswapFactoryChanged", + "type": "event" + }, { "inputs": [], "name": "MAX_COOLDOWN_PERIOD", @@ -358,19 +421,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "UNISWAP_FACTORY", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "WETH", @@ -517,6 +567,11 @@ "internalType": "uint256[]", "name": "_gardenParams", "type": "uint256[]" + }, + { + "internalType": "uint256", + "name": "_initialContribution", + "type": "uint256" } ], "name": "createGarden", @@ -569,6 +624,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newGardenNFT", + "type": "address" + } + ], + "name": "editGardenNFT", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -615,13 +683,18 @@ }, { "inputs": [ + { + "internalType": "address", + "name": "_reserve", + "type": "address" + }, { "internalType": "uint256", - "name": "_minRiskyPairLiquidityEth", + "name": "_newMinLiquidityReserve", "type": "uint256" } ], - "name": "editLiquidityMinimum", + "name": "editLiquidityReserve", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -665,6 +738,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newStrategyNFT", + "type": "address" + } + ], + "name": "editStrategyNFT", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -678,6 +764,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newUniswapFactory", + "type": "address" + } + ], + "name": "editUniswapFactory", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "enableBABLMiningProgram", @@ -724,6 +823,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "gardenCreationIsOpen", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "gardenCreatorBonus", @@ -750,6 +862,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "gardenNFT", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "gardenTokensTransfersEnabled", @@ -949,19 +1074,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "getUniswapFactory", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "pure", - "type": "function" - }, { "inputs": [], "name": "initialize", @@ -1129,7 +1241,26 @@ }, { "inputs": [], - "name": "minRiskyPairLiquidityEth", + "name": "maxContributorsPerGarden", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "minLiquidityPerReserve", "outputs": [ { "internalType": "uint256", @@ -1140,6 +1271,13 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "openPublicGardenCreation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "owner", @@ -1329,6 +1467,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_newMax", + "type": "uint256" + } + ], + "name": "setMaxContributorsPerGarden", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -1412,6 +1563,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "strategyNFT", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -1438,6 +1602,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "uniswapFactory", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -1458,27 +1635,27 @@ "type": "function" } ], - "transactionHash": "0xa608642bfe3c96c3eb6249c66341c35bd82115953c87086cad0cd02ef7b12394", + "transactionHash": "0x58690789def17bd0c8abef4061a8dbc108f00424e7ae40cca71f329a8ff294b7", "receipt": { "to": null, - "from": "0x311FEE0d859FA936FaEd456758dCD8047C4fFEd7", - "contractAddress": "0x359899D971C6882454CA4807E63474FA4b56ce3B", - "transactionIndex": 21, - "gasUsed": "4190414", + "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", + "contractAddress": "0xeb0CfB66E30F2015C8672DF996aF0fcde8CB318A", + "transactionIndex": 132, + "gasUsed": "4721600", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xa7eeaa2202e9f48108ee199604222a18672ec2a2b656088cc7e76b78562c7e8d", - "transactionHash": "0xa608642bfe3c96c3eb6249c66341c35bd82115953c87086cad0cd02ef7b12394", + "blockHash": "0x9570a0bdca191104c1f967594500cc1e69c0ea84f913b8487559a72c8a9298c6", + "transactionHash": "0x58690789def17bd0c8abef4061a8dbc108f00424e7ae40cca71f329a8ff294b7", "logs": [], - "blockNumber": 8516136, - "cumulativeGasUsed": "6702606", + "blockNumber": 12451127, + "cumulativeGasUsed": "13195964", "status": 1, "byzantium": true }, "args": [], - "solcInputHash": "1cde26e1be086ba932a8865ced5ceef3", - "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"_integrationName\",\"type\":\"string\"}],\"name\":\"ControllerIntegrationAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_newIntegration\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"_integrationName\",\"type\":\"string\"}],\"name\":\"ControllerIntegrationEdited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"_integrationName\",\"type\":\"string\"}],\"name\":\"ControllerIntegrationRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint8\",\"name\":\"_kind\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"ControllerOperationSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newTradeIntegration\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_oldTradeIntegration\",\"type\":\"address\"}],\"name\":\"DefaultTradeIntegrationChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_factory\",\"type\":\"address\"}],\"name\":\"GardenAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_gardenFactory\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_oldGardenFactory\",\"type\":\"address\"}],\"name\":\"GardenFactoryChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"}],\"name\":\"GardenRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_gardenValuer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_oldGardenValuer\",\"type\":\"address\"}],\"name\":\"GardenValuerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_newIshtarGate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_oldIshtarGate\",\"type\":\"address\"}],\"name\":\"IshtarGateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minRiskyPairLiquidityEth\",\"type\":\"uint256\"}],\"name\":\"LiquidityMinimumEdited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_priceOracle\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_oldPriceOracle\",\"type\":\"address\"}],\"name\":\"PriceOracleChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_reserveAsset\",\"type\":\"address\"}],\"name\":\"ReserveAssetAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_reserveAsset\",\"type\":\"address\"}],\"name\":\"ReserveAssetRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_rewardsDistributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_oldRewardsDistributor\",\"type\":\"address\"}],\"name\":\"RewardsDistributorChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_strategyFactory\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_oldStrategyFactory\",\"type\":\"address\"}],\"name\":\"StrategyFactoryEdited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_newTreasury\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_oldTreasury\",\"type\":\"address\"}],\"name\":\"TreasuryChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MAX_COOLDOWN_PERIOD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_OPERATIONS\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_COOLDOWN_PERIOD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UNISWAP_FACTORY\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"}],\"name\":\"addIntegration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_keeper\",\"type\":\"address\"}],\"name\":\"addKeeper\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_keepers\",\"type\":\"address[]\"}],\"name\":\"addKeepers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_reserveAsset\",\"type\":\"address\"}],\"name\":\"addReserveAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"allowPublicGardens\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"assetWhitelist\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bablMiningProgramEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_reserveAsset\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_tokenURI\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_seed\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_gardenParams\",\"type\":\"uint256[]\"}],\"name\":\"createGarden\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"defaultTradeIntegration\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"}],\"name\":\"disableGarden\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newGardenFactory\",\"type\":\"address\"}],\"name\":\"editGardenFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_gardenValuer\",\"type\":\"address\"}],\"name\":\"editGardenValuer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"}],\"name\":\"editIntegration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ishtarGate\",\"type\":\"address\"}],\"name\":\"editIshtarGate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minRiskyPairLiquidityEth\",\"type\":\"uint256\"}],\"name\":\"editLiquidityMinimum\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_priceOracle\",\"type\":\"address\"}],\"name\":\"editPriceOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newRewardsDistributor\",\"type\":\"address\"}],\"name\":\"editRewardsDistributor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newStrategyFactory\",\"type\":\"address\"}],\"name\":\"editStrategyFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newTreasury\",\"type\":\"address\"}],\"name\":\"editTreasury\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"enableBABLMiningProgram\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"}],\"name\":\"enableGarden\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"enableGardenTokensTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"enabledOperations\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gardenCreatorBonus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gardenFactory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gardenTokensTransfersEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gardenValuer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"gardens\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBABLSharing\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGardens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"getIntegrationByName\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_nameHashP\",\"type\":\"bytes32\"}],\"name\":\"getIntegrationWithHash\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMaxCooldownPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinCooldownPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOperations\",\"outputs\":[{\"internalType\":\"address[20]\",\"name\":\"\",\"type\":\"address[20]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProfitSharing\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getReserveAssets\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getUniswapFactory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_contractAddress\",\"type\":\"address\"}],\"name\":\"isSystemContract\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"}],\"name\":\"isValidIntegration\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_keeper\",\"type\":\"address\"}],\"name\":\"isValidKeeper\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_reserveAsset\",\"type\":\"address\"}],\"name\":\"isValidReserveAsset\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ishtarGate\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"keeperList\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lpsBABLPercentage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lpsProfitPercentage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minRiskyPairLiquidityEth\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"priceOracle\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"protocolDepositGardenTokenFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"protocolManagementFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"protocolPerformanceFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"protocolWithdrawalGardenTokenFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"}],\"name\":\"removeGarden\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"removeIntegration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_keeper\",\"type\":\"address\"}],\"name\":\"removeKeeper\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_reserveAsset\",\"type\":\"address\"}],\"name\":\"removeReserveAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"reserveAssets\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardsDistributor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"setAllowPublicGardens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newDefaultTradeIntegation\",\"type\":\"address\"}],\"name\":\"setDefaultTradeIntegration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"_kind\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"_operation\",\"type\":\"address\"}],\"name\":\"setOperation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stewardsBABLPercentage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stewardsProfitPercentage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"strategistBABLPercentage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"strategistProfitPercentage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"strategyFactory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"validReserveAsset\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Protocol BabController is a smart contract used to deploy new gardens contracts and house the integrations and resources of the system.\",\"kind\":\"dev\",\"methods\":{\"addIntegration(string,address)\":{\"params\":{\"_integration\":\"Address of the integration contract to add\",\"_name\":\"Human readable string identifying the integration\"}},\"addKeeper(address)\":{\"params\":{\"_keeper\":\"Address of the keeper\"}},\"addKeepers(address[])\":{\"params\":{\"_keepers\":\"List with keeprs of the assets to whitelist\"}},\"addReserveAsset(address)\":{\"params\":{\"_reserveAsset\":\"Address of the reserve assset\"}},\"createGarden(address,string,string,string,uint256,uint256[])\":{\"params\":{\"_gardenParams\":\"Array of numeric garden params\",\"_name\":\"Name of the Garden\",\"_reserveAsset\":\"Reserve asset of the Garden. Initially just weth\",\"_seed\":\"Seed to regenerate the garden NFT\",\"_symbol\":\"Symbol of the Garden\",\"_tokenURI\":\"Garden NFT token URI\"}},\"disableGarden(address)\":{\"params\":{\"_garden\":\"Address of the garden\"}},\"editGardenFactory(address)\":{\"params\":{\"_newGardenFactory\":\"Address of the new garden factory\"}},\"editGardenValuer(address)\":{\"params\":{\"_gardenValuer\":\"Address of the new garden valuer\"}},\"editIntegration(string,address)\":{\"params\":{\"_integration\":\"Address of the integration contract to edit\",\"_name\":\"Human readable string identifying the integration\"}},\"editIshtarGate(address)\":{\"params\":{\"_ishtarGate\":\"Address of the new Ishtar Gate\"}},\"editLiquidityMinimum(uint256)\":{\"params\":{\"_minRiskyPairLiquidityEth\":\"Absolute min liquidity of an asset to grab price\"}},\"editPriceOracle(address)\":{\"params\":{\"_priceOracle\":\"Address of the new price oracle\"}},\"editRewardsDistributor(address)\":{\"params\":{\"_newRewardsDistributor\":\"Address of the new rewards distributor\"}},\"editStrategyFactory(address)\":{\"params\":{\"_newStrategyFactory\":\"Address of the new strategy factory\"}},\"editTreasury(address)\":{\"params\":{\"_newTreasury\":\"Address of the new protocol fee recipient\"}},\"enableGarden(address)\":{\"params\":{\"_garden\":\"Address of the garden\"}},\"getBABLSharing()\":{\"returns\":{\"_0\":\"Strategist, Stewards, Lps, creator bonus\"}},\"getIntegrationByName(string)\":{\"params\":{\"_name\":\"Human readable integration name\"},\"returns\":{\"_0\":\"Address of integration\"}},\"getIntegrationWithHash(bytes32)\":{\"params\":{\"_nameHashP\":\"Hash of human readable integration name\"},\"returns\":{\"_0\":\"Address of integration\"}},\"getProfitSharing()\":{\"returns\":{\"_0\":\"Strategist, Stewards, Lps, creator bonus\"}},\"isSystemContract(address)\":{\"params\":{\"_contractAddress\":\"The contract address to check\"}},\"isValidIntegration(string,address)\":{\"params\":{\"_name\":\"Human readable string identifying the integration\"},\"returns\":{\"_0\":\"Boolean indicating if valid\"}},\"removeGarden(address)\":{\"params\":{\"_garden\":\"Address of the Garden contract to remove\"}},\"removeIntegration(string)\":{\"params\":{\"_name\":\"Human readable string identifying the integration\"}},\"removeKeeper(address)\":{\"params\":{\"_keeper\":\"Address of the keeper\"}},\"removeReserveAsset(address)\":{\"params\":{\"_reserveAsset\":\"Address of the reserve asset to remove\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setDefaultTradeIntegration(address)\":{\"params\":{\"_newDefaultTradeIntegation\":\"Address of the new default trade integration\"}},\"setOperation(uint8,address)\":{\"params\":{\"_kind\":\"Operation kind\",\"_operation\":\"Address of the operation contract to set\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"title\":\"BabController\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addIntegration(string,address)\":{\"notice\":\"GOVERNANCE FUNCTION: Add a new integration to the registry\"},\"addKeeper(address)\":{\"notice\":\"PRIVILEGED FACTORY FUNCTION. Adds a new valid keeper to the list\"},\"addKeepers(address[])\":{\"notice\":\"PRIVILEGED FACTORY FUNCTION. Adds a list of assets to the whitelist\"},\"addReserveAsset(address)\":{\"notice\":\"PRIVILEGED FACTORY FUNCTION. Adds a new valid reserve asset for gardens\"},\"createGarden(address,string,string,string,uint256,uint256[])\":{\"notice\":\"Creates a Garden smart contract and registers the Garden with the controller.\"},\"disableGarden(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to disable a garden\"},\"editGardenFactory(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol garden factory\"},\"editGardenValuer(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to change the garden valuer\"},\"editIntegration(string,address)\":{\"notice\":\"GOVERNANCE FUNCTION: Edit an existing integration on the registry\"},\"editIshtarGate(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to change the Ishtar Gate Address\"},\"editLiquidityMinimum(uint256)\":{\"notice\":\"GOVERNANCE FUNCTION: Edits the minimum liquidity an asset must have on Uniswap\"},\"editPriceOracle(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to change the price oracle\"},\"editRewardsDistributor(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the rewards distributor\"},\"editStrategyFactory(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol strategy factory\"},\"editTreasury(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol fee recipient\"},\"enableBABLMiningProgram()\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Enable and starts the BABL Mining program by the Rewards Distributor Can only happen after public launch of the protocol.\"},\"enableGarden(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to enable a garden\"},\"enableGardenTokensTransfers()\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows transfers of ERC20 gardenTokens Can only happen after 2021 is finished.\"},\"getBABLSharing()\":{\"notice\":\"Returns the percentages of BABL Profit Sharing\"},\"getIntegrationByName(string)\":{\"notice\":\"Get the integration address associated with passed human readable name\"},\"getIntegrationWithHash(bytes32)\":{\"notice\":\"Get integration integration address associated with passed hashed name\"},\"getProfitSharing()\":{\"notice\":\"Returns the percentages of a strategy Profit Sharing\"},\"initialize()\":{\"notice\":\"Initializes the initial fee recipient on deployment.\"},\"isSystemContract(address)\":{\"notice\":\"Check if a contract address is a garden or one of the system contracts\"},\"isValidIntegration(string,address)\":{\"notice\":\"Check if integration name is valid\"},\"removeGarden(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a Garden\"},\"removeIntegration(string)\":{\"notice\":\"GOVERNANCE FUNCTION: Remove an existing integration on the registry\"},\"removeKeeper(address)\":{\"notice\":\"PRIVILEGED FACTORY FUNCTION. Removes a keeper\"},\"removeReserveAsset(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a reserve asset\"},\"setAllowPublicGardens()\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows transfers of ERC20 BABL Tokens Can only happen after the protocol is fully decentralized. PRIVILEGED GOVERNANCE FUNCTION. Allows public gardens\"},\"setDefaultTradeIntegration(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol default trde integration\"},\"setOperation(uint8,address)\":{\"notice\":\"GOVERNANCE FUNCTION: Edit an existing operation on the registry\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/BabController.sol\":\"BabController\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal initializer {\\n __Context_init_unchained();\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal initializer {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xb419e68addcb82ecda3ad3974b0d2db76435ce9b08435a04d5b119a0c5d45ea5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity >=0.4.24 <0.8.0;\\n\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || _isConstructor() || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /// @dev Returns true if and only if the function is running in the constructor\\n function _isConstructor() private view returns (bool) {\\n return !AddressUpgradeable.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xd8e4eb08dcc1d1860fb347ba5ffd595242b9a1b66d49a47f2b4cb51c3f35017e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 { size := extcodesize(account) }\\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, \\\"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, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfc5ea91fa9ceb1961023b2a6c978b902888c52b90847ac7813fe3b79524165f6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xbbf8a21b9a66c48d45ff771b8563c6df19ba451d63dfb8380a865c1e1f29d1a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () internal {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.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 using SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n // solhint-disable-next-line max-line-length\\n require((value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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 * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 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. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\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 { size := extcodesize(account) }\\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, \\\"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, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"contracts/BabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {OwnableUpgradeable} from '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';\\nimport {AddressUpgradeable} from '@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {RewardsDistributor} from './token/RewardsDistributor.sol';\\nimport {IGarden} from './interfaces/IGarden.sol';\\nimport {IGardenFactory} from './interfaces/IGardenFactory.sol';\\nimport {IStrategy} from './interfaces/IStrategy.sol';\\nimport {IIshtarGate} from './interfaces/IIshtarGate.sol';\\nimport {IIntegration} from './interfaces/IIntegration.sol';\\nimport {IBabController} from './interfaces/IBabController.sol';\\n\\nimport {AddressArrayUtils} from './lib/AddressArrayUtils.sol';\\n\\n/**\\n * @title BabController\\n * @author Babylon Finance Protocol\\n *\\n * BabController is a smart contract used to deploy new gardens contracts and house the\\n * integrations and resources of the system.\\n */\\ncontract BabController is OwnableUpgradeable, IBabController {\\n using AddressArrayUtils for address[];\\n using AddressUpgradeable for address;\\n using SafeMath for uint256;\\n\\n /* ============ Events ============ */\\n event GardenAdded(address indexed _garden, address indexed _factory);\\n event GardenRemoved(address indexed _garden);\\n\\n event ControllerIntegrationAdded(address _integration, string indexed _integrationName);\\n event ControllerIntegrationRemoved(address _integration, string indexed _integrationName);\\n event ControllerIntegrationEdited(address _newIntegration, string indexed _integrationName);\\n event ControllerOperationSet(uint8 indexed _kind, address _address);\\n event DefaultTradeIntegrationChanged(address indexed _newTradeIntegration, address _oldTradeIntegration);\\n\\n event ReserveAssetAdded(address indexed _reserveAsset);\\n event ReserveAssetRemoved(address indexed _reserveAsset);\\n event LiquidityMinimumEdited(uint256 _minRiskyPairLiquidityEth);\\n\\n event PriceOracleChanged(address indexed _priceOracle, address _oldPriceOracle);\\n event RewardsDistributorChanged(address indexed _rewardsDistributor, address _oldRewardsDistributor);\\n event TreasuryChanged(address _newTreasury, address _oldTreasury);\\n event IshtarGateChanged(address _newIshtarGate, address _oldIshtarGate);\\n event GardenValuerChanged(address indexed _gardenValuer, address _oldGardenValuer);\\n event GardenFactoryChanged(address indexed _gardenFactory, address _oldGardenFactory);\\n\\n event StrategyFactoryEdited(address indexed _strategyFactory, address _oldStrategyFactory);\\n\\n /* ============ Modifiers ============ */\\n\\n /* ============ State Variables ============ */\\n\\n address public constant UNISWAP_FACTORY = 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f;\\n address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\\n uint8 public constant MAX_OPERATIONS = 20;\\n\\n // List of enabled Communities\\n address[] public gardens;\\n address[] public reserveAssets;\\n address public override gardenValuer;\\n address public override priceOracle;\\n address public override gardenFactory;\\n address public override rewardsDistributor;\\n address public override ishtarGate;\\n address public override strategyFactory;\\n\\n // Mapping of integration name => integration address\\n mapping(bytes32 => address) private enabledIntegrations;\\n // Address of the default trade integration used by the protocol\\n address public override defaultTradeIntegration;\\n // Mapping of valid operations\\n address[MAX_OPERATIONS] public override enabledOperations;\\n\\n // Mappings to check whether address is valid Garden or Reserve Asset\\n mapping(address => bool) public override isGarden;\\n mapping(address => bool) public validReserveAsset;\\n\\n // Mapping to check whitelisted assets\\n mapping(address => bool) public assetWhitelist;\\n\\n // Mapping to check keepers\\n mapping(address => bool) public keeperList;\\n\\n // Recipient of protocol fees\\n address public override treasury;\\n\\n // Strategy cooldown period\\n uint256 public constant MIN_COOLDOWN_PERIOD = 6 hours;\\n uint256 public constant MAX_COOLDOWN_PERIOD = 7 days;\\n\\n // Strategy Profit Sharing\\n uint256 public strategistProfitPercentage; // (0.01% = 1e14, 1% = 1e16)\\n uint256 public stewardsProfitPercentage; // (0.01% = 1e14, 1% = 1e16)\\n uint256 public lpsProfitPercentage; //\\n\\n // Strategy BABL Rewards Sharing\\n uint256 public strategistBABLPercentage; // (0.01% = 1e14, 1% = 1e16)\\n uint256 public stewardsBABLPercentage; // (0.01% = 1e14, 1% = 1e16)\\n uint256 public lpsBABLPercentage; //\\n\\n uint256 public gardenCreatorBonus;\\n\\n // Assets\\n // Absolute Min liquidity of assets for risky gardens 1000 ETH\\n uint256 public override minRiskyPairLiquidityEth;\\n\\n // Enable Transfer of ERC20 gardenTokens\\n // Only members can transfer tokens until the protocol is fully decentralized\\n bool public override gardenTokensTransfersEnabled;\\n\\n // Enable and starts the BABL Mining program within Rewards Distributor contract\\n bool public override bablMiningProgramEnabled;\\n // Enable public gardens\\n bool public override allowPublicGardens;\\n\\n uint256 public override protocolPerformanceFee; // 5% (0.01% = 1e14, 1% = 1e16) on profits\\n uint256 public override protocolManagementFee; // 0.5% (0.01% = 1e14, 1% = 1e16)\\n uint256 public override protocolDepositGardenTokenFee; // 0 (0.01% = 1e14, 1% = 1e16)\\n uint256 public override protocolWithdrawalGardenTokenFee; // 0 (0.01% = 1e14, 1% = 1e16)\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Initializes the initial fee recipient on deployment.\\n */\\n function initialize() public {\\n OwnableUpgradeable.__Ownable_init();\\n\\n // vars init values has to be set in initialize due to how upgrade proxy pattern works\\n protocolManagementFee = 5e15; // 0.5% (0.01% = 1e14, 1% = 1e16)\\n protocolPerformanceFee = 5e16; // 5% (0.01% = 1e14, 1% = 1e16) on profits\\n protocolDepositGardenTokenFee = 0; // 0% (0.01% = 1e14, 1% = 1e16) on profits\\n protocolWithdrawalGardenTokenFee = 0; // 0% (0.01% = 1e14, 1% = 1e16) on profits\\n gardenTokensTransfersEnabled = false;\\n bablMiningProgramEnabled = false;\\n allowPublicGardens = false;\\n minRiskyPairLiquidityEth = 1000 * 1e18;\\n\\n strategistProfitPercentage = 10e16;\\n stewardsProfitPercentage = 5e16;\\n lpsProfitPercentage = 80e16;\\n\\n strategistBABLPercentage = 8e16;\\n stewardsBABLPercentage = 17e16;\\n lpsBABLPercentage = 75e16;\\n\\n gardenCreatorBonus = 15e16;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n // =========== Garden related Gov Functions ======\\n /**\\n * Creates a Garden smart contract and registers the Garden with the controller.\\n *\\n * @param _reserveAsset Reserve asset of the Garden. Initially just weth\\n * @param _name Name of the Garden\\n * @param _symbol Symbol of the Garden\\n * @param _gardenParams Array of numeric garden params\\n * @param _tokenURI Garden NFT token URI\\n * @param _seed Seed to regenerate the garden NFT\\n */\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable override returns (address) {\\n require(defaultTradeIntegration != address(0), 'Need a default trade integration');\\n require(enabledOperations.length > 0, 'Need operations enabled');\\n require(IIshtarGate(ishtarGate).canCreate(msg.sender), 'User does not have creation permissions');\\n address newGarden =\\n IGardenFactory(gardenFactory).createGarden{value: msg.value}(\\n _reserveAsset,\\n address(this),\\n msg.sender,\\n _name,\\n _symbol,\\n _tokenURI,\\n _seed,\\n _gardenParams\\n );\\n\\n require(!isGarden[newGarden], 'Garden already exists');\\n isGarden[newGarden] = true;\\n gardens.push(newGarden);\\n emit GardenAdded(newGarden, msg.sender);\\n return newGarden;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a Garden\\n *\\n * @param _garden Address of the Garden contract to remove\\n */\\n function removeGarden(address _garden) external override onlyOwner {\\n require(isGarden[_garden], 'Garden does not exist');\\n require(!IGarden(_garden).active(), 'The garden needs to be disabled.');\\n gardens = gardens.remove(_garden);\\n\\n delete isGarden[_garden];\\n\\n emit GardenRemoved(_garden);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to disable a garden\\n *\\n * @param _garden Address of the garden\\n */\\n function disableGarden(address _garden) external override onlyOwner {\\n require(isGarden[_garden], 'Garden does not exist');\\n IGarden garden = IGarden(_garden);\\n require(garden.active(), 'The garden needs to be active.');\\n garden.setActive(false);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to enable a garden\\n *\\n * @param _garden Address of the garden\\n */\\n function enableGarden(address _garden) external onlyOwner {\\n require(isGarden[_garden], 'Garden does not exist');\\n IGarden garden = IGarden(_garden);\\n require(!garden.active(), 'The garden needs to be disabled.');\\n garden.setActive(true);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows transfers of ERC20 gardenTokens\\n * Can only happen after 2021 is finished.\\n */\\n function enableGardenTokensTransfers() external override onlyOwner {\\n require(block.timestamp > 1641024000000, 'Transfers cannot be enabled yet');\\n gardenTokensTransfersEnabled = true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows transfers of ERC20 BABL Tokens\\n * Can only happen after the protocol is fully decentralized.\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows public gardens\\n */\\n function setAllowPublicGardens() external override onlyOwner {\\n allowPublicGardens = true;\\n }\\n\\n // =========== Protocol related Gov Functions ======\\n\\n /** PRIVILEGED GOVERNANCE FUNCTION. Enable and starts the BABL Mining program by the Rewards Distributor\\n * Can only happen after public launch of the protocol.\\n */\\n function enableBABLMiningProgram() external override onlyOwner {\\n if (bablMiningProgramEnabled == false) {\\n // Can only be activated once\\n bablMiningProgramEnabled = true;\\n RewardsDistributor(rewardsDistributor).startBABLRewards(); // Sets the timestamp\\n }\\n }\\n\\n /**\\n * PRIVILEGED FACTORY FUNCTION. Adds a new valid keeper to the list\\n *\\n * @param _keeper Address of the keeper\\n */\\n function addKeeper(address _keeper) external override onlyOwner {\\n keeperList[_keeper] = true;\\n }\\n\\n /**\\n * PRIVILEGED FACTORY FUNCTION. Removes a keeper\\n *\\n * @param _keeper Address of the keeper\\n */\\n function removeKeeper(address _keeper) external override onlyOwner {\\n require(keeperList[_keeper], 'Keeper is whitelisted');\\n delete keeperList[_keeper];\\n }\\n\\n /**\\n * PRIVILEGED FACTORY FUNCTION. Adds a list of assets to the whitelist\\n *\\n * @param _keepers List with keeprs of the assets to whitelist\\n */\\n function addKeepers(address[] memory _keepers) external override onlyOwner {\\n for (uint256 i = 0; i < _keepers.length; i++) {\\n keeperList[_keepers[i]] = true;\\n }\\n }\\n\\n /**\\n * PRIVILEGED FACTORY FUNCTION. Adds a new valid reserve asset for gardens\\n *\\n * @param _reserveAsset Address of the reserve assset\\n */\\n function addReserveAsset(address _reserveAsset) external override onlyOwner {\\n require(!validReserveAsset[_reserveAsset], 'Reserve asset already added');\\n validReserveAsset[_reserveAsset] = true;\\n reserveAssets.push(_reserveAsset);\\n emit ReserveAssetAdded(_reserveAsset);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a reserve asset\\n *\\n * @param _reserveAsset Address of the reserve asset to remove\\n */\\n function removeReserveAsset(address _reserveAsset) external override onlyOwner {\\n require(validReserveAsset[_reserveAsset], 'Reserve asset does not exist');\\n\\n reserveAssets = reserveAssets.remove(_reserveAsset);\\n\\n delete validReserveAsset[_reserveAsset];\\n\\n emit ReserveAssetRemoved(_reserveAsset);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to change the price oracle\\n *\\n * @param _priceOracle Address of the new price oracle\\n */\\n function editPriceOracle(address _priceOracle) external override onlyOwner {\\n require(_priceOracle != priceOracle, 'Price oracle already exists');\\n\\n require(_priceOracle != address(0), 'Price oracle must exist');\\n\\n address oldPriceOracle = priceOracle;\\n priceOracle = _priceOracle;\\n\\n emit PriceOracleChanged(_priceOracle, oldPriceOracle);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to change the Ishtar Gate Address\\n *\\n * @param _ishtarGate Address of the new Ishtar Gate\\n */\\n function editIshtarGate(address _ishtarGate) external override onlyOwner {\\n require(_ishtarGate != ishtarGate, 'Ishtar Gate already exists');\\n\\n require(_ishtarGate != address(0), 'Ishtar Gate oracle must exist');\\n\\n address oldIshtarGate = ishtarGate;\\n ishtarGate = _ishtarGate;\\n\\n emit IshtarGateChanged(_ishtarGate, oldIshtarGate);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to change the garden valuer\\n *\\n * @param _gardenValuer Address of the new garden valuer\\n */\\n function editGardenValuer(address _gardenValuer) external override onlyOwner {\\n require(_gardenValuer != gardenValuer, 'Garden Valuer already exists');\\n\\n require(_gardenValuer != address(0), 'Garden Valuer must exist');\\n\\n address oldGardenValuer = gardenValuer;\\n gardenValuer = _gardenValuer;\\n\\n emit GardenValuerChanged(_gardenValuer, oldGardenValuer);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol fee recipient\\n *\\n * @param _newTreasury Address of the new protocol fee recipient\\n */\\n function editTreasury(address _newTreasury) external override onlyOwner {\\n require(_newTreasury != address(0), 'Address must not be 0');\\n\\n address oldTreasury = treasury;\\n treasury = _newTreasury;\\n\\n emit TreasuryChanged(_newTreasury, oldTreasury);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the rewards distributor\\n *\\n * @param _newRewardsDistributor Address of the new rewards distributor\\n */\\n function editRewardsDistributor(address _newRewardsDistributor) external override onlyOwner {\\n require(_newRewardsDistributor != address(0), 'Address must not be 0');\\n\\n address oldRewardsDistributor = rewardsDistributor;\\n rewardsDistributor = _newRewardsDistributor;\\n\\n emit RewardsDistributorChanged(_newRewardsDistributor, oldRewardsDistributor);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol garden factory\\n *\\n * @param _newGardenFactory Address of the new garden factory\\n */\\n function editGardenFactory(address _newGardenFactory) external override onlyOwner {\\n require(_newGardenFactory != address(0), 'Address must not be 0');\\n\\n address oldGardenFactory = gardenFactory;\\n gardenFactory = _newGardenFactory;\\n\\n emit GardenFactoryChanged(_newGardenFactory, oldGardenFactory);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol strategy factory\\n *\\n * @param _newStrategyFactory Address of the new strategy factory\\n */\\n function editStrategyFactory(address _newStrategyFactory) external override onlyOwner {\\n require(_newStrategyFactory != address(0), 'Address must not be 0');\\n\\n address oldStrategyFactory = strategyFactory;\\n strategyFactory = _newStrategyFactory;\\n\\n emit StrategyFactoryEdited(_newStrategyFactory, oldStrategyFactory);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol default trde integration\\n *\\n * @param _newDefaultTradeIntegation Address of the new default trade integration\\n */\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external override onlyOwner {\\n require(_newDefaultTradeIntegation != address(0), 'Address must not be 0');\\n require(_newDefaultTradeIntegation != defaultTradeIntegration, 'Address must be different');\\n require(\\n enabledIntegrations[_nameHash(IIntegration(_newDefaultTradeIntegation).getName())] ==\\n _newDefaultTradeIntegation,\\n 'Integration needs to be valid'\\n );\\n address oldDefaultTradeIntegration = defaultTradeIntegration;\\n defaultTradeIntegration = _newDefaultTradeIntegation;\\n\\n emit DefaultTradeIntegrationChanged(_newDefaultTradeIntegation, oldDefaultTradeIntegration);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION: Add a new integration to the registry\\n *\\n * @param _name Human readable string identifying the integration\\n * @param _integration Address of the integration contract to add\\n */\\n function addIntegration(string memory _name, address _integration) public override onlyOwner {\\n bytes32 hashedName = _nameHash(_name);\\n require(enabledIntegrations[hashedName] == address(0), 'Integration exists already.');\\n require(_integration != address(0), 'Integration address must exist.');\\n\\n enabledIntegrations[hashedName] = _integration;\\n\\n emit ControllerIntegrationAdded(_integration, _name);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION: Edit an existing integration on the registry\\n *\\n * @param _name Human readable string identifying the integration\\n * @param _integration Address of the integration contract to edit\\n */\\n function editIntegration(string memory _name, address _integration) public override onlyOwner {\\n bytes32 hashedName = _nameHash(_name);\\n\\n require(enabledIntegrations[hashedName] != address(0), 'Integration does not exist.');\\n require(_integration != address(0), 'Integration address must exist.');\\n\\n enabledIntegrations[hashedName] = _integration;\\n\\n emit ControllerIntegrationEdited(_integration, _name);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION: Remove an existing integration on the registry\\n *\\n * @param _name Human readable string identifying the integration\\n */\\n function removeIntegration(string memory _name) external override onlyOwner {\\n bytes32 hashedName = _nameHash(_name);\\n require(enabledIntegrations[hashedName] != address(0), 'Integration does not exist.');\\n\\n address oldIntegration = enabledIntegrations[hashedName];\\n delete enabledIntegrations[hashedName];\\n\\n emit ControllerIntegrationRemoved(oldIntegration, _name);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION: Edit an existing operation on the registry\\n *\\n * @param _kind Operation kind\\n * @param _operation Address of the operation contract to set\\n */\\n function setOperation(uint8 _kind, address _operation) public override onlyOwner {\\n require(_kind < MAX_OPERATIONS, 'Max operations reached');\\n require(enabledOperations[_kind] != _operation, 'Operation already set');\\n require(_operation != address(0), 'Operation address must exist.');\\n enabledOperations[_kind] = _operation;\\n\\n emit ControllerOperationSet(_kind, _operation);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION: Edits the minimum liquidity an asset must have on Uniswap\\n *\\n * @param _minRiskyPairLiquidityEth Absolute min liquidity of an asset to grab price\\n */\\n function editLiquidityMinimum(uint256 _minRiskyPairLiquidityEth) public override onlyOwner {\\n require(_minRiskyPairLiquidityEth > 0, '_minRiskyPairLiquidityEth > 0');\\n minRiskyPairLiquidityEth = _minRiskyPairLiquidityEth;\\n\\n emit LiquidityMinimumEdited(_minRiskyPairLiquidityEth);\\n }\\n\\n /* ============ External Getter Functions ============ */\\n\\n function owner() public view override(IBabController, OwnableUpgradeable) returns (address) {\\n return OwnableUpgradeable.owner();\\n }\\n\\n function getUniswapFactory() external pure override returns (address) {\\n return UNISWAP_FACTORY;\\n }\\n\\n function getGardens() external view override returns (address[] memory) {\\n return gardens;\\n }\\n\\n function getOperations() external view override returns (address[20] memory) {\\n return enabledOperations;\\n }\\n\\n function getReserveAssets() external view returns (address[] memory) {\\n return reserveAssets;\\n }\\n\\n function getMinCooldownPeriod() external pure override returns (uint256) {\\n return MIN_COOLDOWN_PERIOD;\\n }\\n\\n function getMaxCooldownPeriod() external pure override returns (uint256) {\\n return MAX_COOLDOWN_PERIOD;\\n }\\n\\n function isValidReserveAsset(address _reserveAsset) external view override returns (bool) {\\n return validReserveAsset[_reserveAsset];\\n }\\n\\n function isValidKeeper(address _keeper) external view override returns (bool) {\\n return keeperList[_keeper];\\n }\\n\\n /**\\n * Returns the percentages of a strategy Profit Sharing\\n *\\n * @return Strategist, Stewards, Lps, creator bonus\\n */\\n function getProfitSharing()\\n external\\n view\\n override\\n returns (\\n uint256,\\n uint256,\\n uint256\\n )\\n {\\n return (strategistProfitPercentage, stewardsProfitPercentage, lpsProfitPercentage);\\n }\\n\\n /**\\n * Returns the percentages of BABL Profit Sharing\\n *\\n * @return Strategist, Stewards, Lps, creator bonus\\n */\\n function getBABLSharing()\\n external\\n view\\n override\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n )\\n {\\n return (strategistBABLPercentage, stewardsBABLPercentage, lpsBABLPercentage, gardenCreatorBonus);\\n }\\n\\n /**\\n * Get the integration address associated with passed human readable name\\n *\\n * @param _name Human readable integration name\\n *\\n * @return Address of integration\\n */\\n function getIntegrationByName(string memory _name) external view override returns (address) {\\n return enabledIntegrations[_nameHash(_name)];\\n }\\n\\n /**\\n * Get integration integration address associated with passed hashed name\\n *\\n * @param _nameHashP Hash of human readable integration name\\n *\\n * @return Address of integration\\n */\\n function getIntegrationWithHash(bytes32 _nameHashP) external view override returns (address) {\\n return enabledIntegrations[_nameHashP];\\n }\\n\\n /**\\n * Check if integration name is valid\\n *\\n * @param _name Human readable string identifying the integration\\n *\\n * @return Boolean indicating if valid\\n */\\n function isValidIntegration(string memory _name, address _integration) external view override returns (bool) {\\n return enabledIntegrations[_nameHash(_name)] == _integration;\\n }\\n\\n /**\\n * Check if a contract address is a garden or one of the system contracts\\n *\\n * @param _contractAddress The contract address to check\\n */\\n function isSystemContract(address _contractAddress) external view override returns (bool) {\\n return (isGarden[_contractAddress] ||\\n gardenValuer == _contractAddress ||\\n priceOracle == _contractAddress ||\\n owner() == _contractAddress ||\\n _contractAddress == address(this) ||\\n _isOperation(_contractAddress) ||\\n (isGarden[address(IStrategy(_contractAddress).garden())] &&\\n IGarden(IStrategy(_contractAddress).garden()).isStrategy(_contractAddress)));\\n }\\n\\n /* ============ Internal Only Function ============ */\\n\\n /**\\n * Hashes the string and returns a bytes32 value\\n */\\n function _nameHash(string memory _name) private pure returns (bytes32) {\\n return keccak256(bytes(_name));\\n }\\n\\n function _isOperation(address _address) private view returns (bool) {\\n for (uint8 i = 0; i < MAX_OPERATIONS; i++) {\\n if (_address == enabledOperations[i]) {\\n return true;\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0xbbae2272c093638a34542198f6081254d6cd7caedf93bc00b860e11ff50735b8\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityMinimum(uint256 _minRiskyPairLiquidityEth) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minRiskyPairLiquidityEth() external view returns (uint256);\\n\\n function getUniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0x57cf4ece98219f805a416e8c24728d30d9b37c4126d66785d2617b97e35ffae6\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function nftAddress() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategy(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function reenableEthForStrategies() external;\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x5e460136e0b45024ea1c1f32cde607f3ce75dd5b14cee34007d6bbd08beabc82\",\"license\":\"Apache License\"},\"contracts/interfaces/IGardenFactory.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IIntegration} from './IIntegration.sol';\\n\\n/**\\n * @title IGardenFactory\\n * @author Babylon Finance\\n *\\n * Interface for the garden factory\\n */\\ninterface IGardenFactory {\\n function createGarden(\\n address _reserveAsset,\\n address _controller,\\n address _creator,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable returns (address);\\n}\\n\",\"keccak256\":\"0x2c6f55bf6843e5baf2896cdb8088ea1f4a96fcc425ea0818e0238edc1036fbf8\",\"license\":\"Apache License\"},\"contracts/interfaces/IIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIntegration\\n * @author Babylon Finance\\n *\\n * Interface for protocol integrations\\n */\\ninterface IIntegration {\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xee03c9274ddf3257e3bfd2bb229fea3412c9105f178e64174f59efeafd53182c\",\"license\":\"Apache License\"},\"contracts/interfaces/IIshtarGate.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIshtarGate\\n * @author Babylon Finance\\n *\\n * Interface for interacting with the Gate Guestlist NFT\\n */\\ninterface IIshtarGate {\\n /* ============ Functions ============ */\\n\\n function setGardenAccess(\\n address _user,\\n address _garden,\\n uint8 _permission\\n ) external returns (uint256);\\n\\n function setCreatorPermissions(address _user, bool _canCreate) external returns (uint256);\\n\\n function grantGardenAccessBatch(\\n address _garden,\\n address[] calldata _users,\\n uint8[] calldata _perms\\n ) external returns (bool);\\n\\n function maxNumberOfInvites() external view returns (uint256);\\n\\n function tokenURI() external view returns (string memory);\\n\\n function setMaxNumberOfInvites(uint256 _maxNumberOfInvites) external;\\n\\n function updateGardenURI(string memory _tokenURI) external;\\n\\n function grantCreatorsInBatch(address[] calldata _users, bool[] calldata _perms) external returns (bool);\\n\\n function canCreate(address _user) external view returns (bool);\\n\\n function canJoinAGarden(address _garden, address _user) external view returns (bool);\\n\\n function canVoteInAGarden(address _garden, address _user) external view returns (bool);\\n\\n function canAddStrategiesInAGarden(address _garden, address _user) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x0731159ca37445441424ec07de68ac1347a6a3c4559eed6db7682a6018660d63\",\"license\":\"Apache License\"},\"contracts/interfaces/IRewardsDistributor.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IRewardsDistributor\\n * @author Babylon Finance\\n *\\n * Interface for the distribute rewards of the BABL Mining Program.\\n */\\n\\ninterface IRewardsDistributor {\\n // Structs\\n struct PrincipalPerTimestamp {\\n uint256 principal;\\n uint256 time;\\n uint256 timeListPointer;\\n }\\n\\n function protocolPrincipal() external view returns (uint256);\\n\\n function pid() external view returns (uint256);\\n\\n // solhint-disable-next-line\\n function EPOCH_DURATION() external pure returns (uint256);\\n\\n // solhint-disable-next-line\\n function START_TIME() external view returns (uint256);\\n\\n // solhint-disable-next-line\\n function Q1_REWARDS() external pure returns (uint256);\\n\\n // solhint-disable-next-line\\n function DECAY_RATE() external pure returns (uint256);\\n\\n function addProtocolPrincipal(uint256 _capital) external;\\n\\n function substractProtocolPrincipal(uint256 _capital) external;\\n\\n function getStrategyRewards(address _strategy) external returns (uint96);\\n\\n function sendTokensToContributor(address _to, uint96 _amount) external;\\n\\n function getRewards(\\n address _garden,\\n address _contributor,\\n address[] calldata _finalizedStrategies\\n ) external view returns (uint256, uint96);\\n\\n function getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) external view returns (uint256);\\n\\n /**\\n function getContributor(address _garden, address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256[] memory,\\n uint256\\n );\\n */\\n function updateGardenPower(address _garden, uint256 _pid) external;\\n\\n function setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw,\\n uint256 _pid\\n ) external;\\n\\n function tokenSupplyPerQuarter(uint256 quarter) external view returns (uint96);\\n\\n function checkProtocol(uint256 _time)\\n external\\n view\\n returns (\\n uint256 principal,\\n uint256 time,\\n uint256 quarterBelonging,\\n uint256 timeListPointer,\\n uint256 power\\n );\\n\\n function checkQuarter(uint256 _num)\\n external\\n view\\n returns (\\n uint256 quarterPrincipal,\\n uint256 quarterNumber,\\n uint256 quarterPower,\\n uint96 supplyPerQuarter\\n );\\n}\\n\",\"keccak256\":\"0xc68eb7826b0174d4f6dff50320abb2cd958a978d4537c57867dd828dc2798662\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital,\\n address _strategyNft\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function strategyNft() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x4396906e436eb68c96715e0a53ae1656ac5d7934ebdaeb58ec3c33953465bc39\",\"license\":\"Apache License\"},\"contracts/interfaces/IVoteToken.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface IVoteToken {\\n function delegate(address delegatee) external;\\n\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n function getCurrentVotes(address account) external view returns (uint96);\\n\\n function getPriorVotes(address account, uint256 blockNumber) external view returns (uint96);\\n\\n function getMyDelegatee() external view returns (address);\\n\\n function getDelegatee(address account) external view returns (address);\\n\\n function getCheckpoints(address account, uint32 id) external view returns (uint32 fromBlock, uint96 votes);\\n\\n function getNumberOfCheckpoints(address account) external view returns (uint32);\\n}\\n\\ninterface IVoteTokenWithERC20 is IVoteToken, IERC20 {}\\n\",\"keccak256\":\"0xd3d6174f81ce2c1678a536b2a486179f9a5a694849b334556aeb155b9b13f777\",\"license\":\"Apache License\"},\"contracts/lib/AddressArrayUtils.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n/**\\n * @title AddressArrayUtils\\n * @author Set Protocol\\n *\\n * Utility functions to handle Address Arrays\\n */\\nlibrary AddressArrayUtils {\\n /**\\n * Finds the index of the first occurrence of the given element.\\n * @param A The input array to search\\n * @param a The value to find\\n * @return Returns (index and isIn) for the first occurrence starting from index 0\\n */\\n function indexOf(address[] memory A, address a) internal pure returns (uint256, bool) {\\n uint256 length = A.length;\\n for (uint256 i = 0; i < length; i++) {\\n if (A[i] == a) {\\n return (i, true);\\n }\\n }\\n return (uint256(-1), false);\\n }\\n\\n /**\\n * Returns true if the value is present in the list. Uses indexOf internally.\\n * @param A The input array to search\\n * @param a The value to find\\n * @return Returns isIn for the first occurrence starting from index 0\\n */\\n function contains(address[] memory A, address a) internal pure returns (bool) {\\n (, bool isIn) = indexOf(A, a);\\n return isIn;\\n }\\n\\n /**\\n * Returns true if there are 2 elements that are the same in an array\\n * @param A The input array to search\\n * @return Returns boolean for the first occurrence of a duplicate\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n require(A.length > 0, 'A is empty');\\n\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n address current = A[i];\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (current == A[j]) {\\n return true;\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @param A The input array to search\\n * @param a The address to remove\\n * @return Returns the array with the object removed.\\n */\\n function remove(address[] memory A, address a) internal pure returns (address[] memory) {\\n (uint256 index, bool isIn) = indexOf(A, a);\\n if (!isIn) {\\n revert('Address not in array.');\\n } else {\\n (address[] memory _A, ) = pop(A, index);\\n return _A;\\n }\\n }\\n\\n /**\\n * Removes specified index from array\\n * @param A The input array to search\\n * @param index The index to remove\\n * @return Returns the new array and the removed entry\\n */\\n function pop(address[] memory A, uint256 index) internal pure returns (address[] memory, address) {\\n uint256 length = A.length;\\n require(index < A.length, 'Index must be < A length');\\n address[] memory newAddresses = new address[](length - 1);\\n for (uint256 i = 0; i < index; i++) {\\n newAddresses[i] = A[i];\\n }\\n for (uint256 j = index + 1; j < length; j++) {\\n newAddresses[j - 1] = A[j];\\n }\\n return (newAddresses, A[index]);\\n }\\n\\n /**\\n * Returns the combination of the two arrays\\n * @param A The first array\\n * @param B The second array\\n * @return Returns A extended by B\\n */\\n function extend(address[] memory A, address[] memory B) internal pure returns (address[] memory) {\\n uint256 aLength = A.length;\\n uint256 bLength = B.length;\\n address[] memory newAddresses = new address[](aLength + bLength);\\n for (uint256 i = 0; i < aLength; i++) {\\n newAddresses[i] = A[i];\\n }\\n for (uint256 j = 0; j < bLength; j++) {\\n newAddresses[aLength + j] = B[j];\\n }\\n return newAddresses;\\n }\\n}\\n\",\"keccak256\":\"0x409127cd8cadb573e5de48fd992efbd8b0f1e243d235abc3c5f2fa873195c16a\",\"license\":\"Apache License\"},\"contracts/lib/BabylonErrors.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n// solhint-disable\\n\\n/**\\n * @notice Forked from https://github.com/balancer-labs/balancer-core-v2/blob/master/contracts/lib/helpers/BalancerErrors.sol\\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 // 'BAB#{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 \\\"BAB#\\\" part is a known constant\\n // (0x42414223): 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(0x42414223000000, 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 // Max deposit limit needs to be under the limit\\n uint256 internal constant MAX_DEPOSIT_LIMIT = 0;\\n // Creator needs to deposit\\n uint256 internal constant MIN_CONTRIBUTION = 1;\\n // Min Garden token supply >= 0\\n uint256 internal constant MIN_TOKEN_SUPPLY = 2;\\n // Deposit hardlock needs to be at least 1 block\\n uint256 internal constant DEPOSIT_HARDLOCK = 3;\\n // Needs to be at least the minimum\\n uint256 internal constant MIN_LIQUIDITY = 4;\\n // _reserveAssetQuantity is not equal to msg.value\\n uint256 internal constant MSG_VALUE_DO_NOT_MATCH = 5;\\n // Withdrawal amount has to be equal or less than msg.sender balance\\n uint256 internal constant MSG_SENDER_TOKENS_DO_NOT_MATCH = 6;\\n // Tokens are staked\\n uint256 internal constant TOKENS_STAKED = 7;\\n // Balance too low\\n uint256 internal constant BALANCE_TOO_LOW = 8;\\n // msg.sender doesn't have enough tokens\\n uint256 internal constant MSG_SENDER_TOKENS_TOO_LOW = 9;\\n // There is an open redemption window already\\n uint256 internal constant REDEMPTION_OPENED_ALREADY = 10;\\n // Cannot request twice in the same window\\n uint256 internal constant ALREADY_REQUESTED = 11;\\n // Rewards and profits already claimed\\n uint256 internal constant ALREADY_CLAIMED = 12;\\n // Value have to be greater than zero\\n uint256 internal constant GREATER_THAN_ZERO = 13;\\n // Must be reserve asset\\n uint256 internal constant MUST_BE_RESERVE_ASSET = 14;\\n // Only contributors allowed\\n uint256 internal constant ONLY_CONTRIBUTOR = 15;\\n // Only controller allowed\\n uint256 internal constant ONLY_CONTROLLER = 16;\\n // Only creator allowed\\n uint256 internal constant ONLY_CREATOR = 17;\\n // Only keeper allowed\\n uint256 internal constant ONLY_KEEPER = 18;\\n // Fee is too high\\n uint256 internal constant FEE_TOO_HIGH = 19;\\n // Only strategy allowed\\n uint256 internal constant ONLY_STRATEGY = 20;\\n // Only active allowed\\n uint256 internal constant ONLY_ACTIVE = 21;\\n // Only inactive allowed\\n uint256 internal constant ONLY_INACTIVE = 22;\\n // Address should be not zero address\\n uint256 internal constant ADDRESS_IS_ZERO = 23;\\n // Not within range\\n uint256 internal constant NOT_IN_RANGE = 24;\\n // Value is too low\\n uint256 internal constant VALUE_TOO_LOW = 25;\\n // Value is too high\\n uint256 internal constant VALUE_TOO_HIGH = 26;\\n // Only strategy or protocol allowed\\n uint256 internal constant ONLY_STRATEGY_OR_CONTROLLER = 27;\\n // Normal withdraw possible\\n uint256 internal constant NORMAL_WITHDRAWAL_POSSIBLE = 28;\\n // User does not have permissions to join garden\\n uint256 internal constant USER_CANNOT_JOIN = 29;\\n // User does not have permissions to add strategies in garden\\n uint256 internal constant USER_CANNOT_ADD_STRATEGIES = 30;\\n // Only Protocol or garden\\n uint256 internal constant ONLY_PROTOCOL_OR_GARDEN = 31;\\n // Only Strategist\\n uint256 internal constant ONLY_STRATEGIST = 32;\\n // Only Integration\\n uint256 internal constant ONLY_INTEGRATION = 33;\\n // Only garden and data not set\\n uint256 internal constant ONLY_GARDEN_AND_DATA_NOT_SET = 34;\\n // Only active garden\\n uint256 internal constant ONLY_ACTIVE_GARDEN = 35;\\n // Contract is not a garden\\n uint256 internal constant NOT_A_GARDEN = 36;\\n // Not enough tokens\\n uint256 internal constant STRATEGIST_TOKENS_TOO_LOW = 37;\\n // Stake is too low\\n uint256 internal constant STAKE_HAS_TO_AT_LEAST_ONE = 38;\\n // Duration must be in range\\n uint256 internal constant DURATION_MUST_BE_IN_RANGE = 39;\\n // Max Capital Requested\\n uint256 internal constant MAX_CAPITAL_REQUESTED = 41;\\n // Votes are already resolved\\n uint256 internal constant VOTES_ALREADY_RESOLVED = 42;\\n // Voting window is closed\\n uint256 internal constant VOTING_WINDOW_IS_OVER = 43;\\n // Strategy needs to be active\\n uint256 internal constant STRATEGY_NEEDS_TO_BE_ACTIVE = 44;\\n // Max capital reached\\n uint256 internal constant MAX_CAPITAL_REACHED = 45;\\n // Capital is less then rebalance\\n uint256 internal constant CAPITAL_IS_LESS_THAN_REBALANCE = 46;\\n // Strategy is in cooldown period\\n uint256 internal constant STRATEGY_IN_COOLDOWN = 47;\\n // Strategy is not executed\\n uint256 internal constant STRATEGY_IS_NOT_EXECUTED = 48;\\n // Strategy is not over yet\\n uint256 internal constant STRATEGY_IS_NOT_OVER_YET = 49;\\n // Strategy is already finalized\\n uint256 internal constant STRATEGY_IS_ALREADY_FINALIZED = 50;\\n // No capital to unwind\\n uint256 internal constant STRATEGY_NO_CAPITAL_TO_UNWIND = 51;\\n // Strategy needs to be inactive\\n uint256 internal constant STRATEGY_NEEDS_TO_BE_INACTIVE = 52;\\n // Duration needs to be less\\n uint256 internal constant DURATION_NEEDS_TO_BE_LESS = 53;\\n // Can't sweep reserve asset\\n uint256 internal constant CANNOT_SWEEP_RESERVE_ASSET = 54;\\n // Voting window is opened\\n uint256 internal constant VOTING_WINDOW_IS_OPENED = 55;\\n // Strategy is executed\\n uint256 internal constant STRATEGY_IS_EXECUTED = 56;\\n // Min Rebalance Capital\\n uint256 internal constant MIN_REBALANCE_CAPITAL = 57;\\n // Not a valid strategy NFT\\n uint256 internal constant NOT_STRATEGY_NFT = 58;\\n // Garden Transfers Disabled\\n uint256 internal constant GARDEN_TRANSFERS_DISABLED = 59;\\n // Tokens are hardlocked\\n uint256 internal constant TOKENS_HARDLOCKED = 60;\\n // Max contributors reached\\n uint256 internal constant MAX_CONTRIBUTORS = 61;\\n // BABL Transfers Disabled\\n uint256 internal constant BABL_TRANSFERS_DISABLED = 62;\\n // Strategy duration range error\\n uint256 internal constant DURATION_RANGE = 63;\\n // Checks the min amount of voters\\n uint256 internal constant MIN_VOTERS_CHECK = 64;\\n // Ge contributor power error\\n uint256 internal constant GET_CONTRIBUTOR_POWER = 65;\\n // Not enough ETH set aside\\n uint256 internal constant NOT_ENOUGH_ETH = 66;\\n // Garden is already public\\n uint256 internal constant GARDEN_ALREADY_PUBLIC = 67;\\n // Withdrawal with penalty\\n uint256 internal constant WITHDRAWAL_WITH_PENALTY = 68;\\n // Withdrawal with penalty\\n uint256 internal constant ONLY_MINING_ACTIVE = 69;\\n // Overflow in supply\\n uint256 internal constant OVERFLOW_IN_SUPPLY = 70;\\n // Overflow in power\\n uint256 internal constant OVERFLOW_IN_POWER = 71;\\n // Not a system contract\\n uint256 internal constant NOT_A_SYSTEM_CONTRACT = 72;\\n // Strategy vs Garden mismatch\\n uint256 internal constant STRATEGY_GARDEN_MISMATCH = 73;\\n // Minimum quarters is 1\\n uint256 internal constant QUARTERS_MIN_1 = 74;\\n // Too many strategy operations\\n uint256 internal constant TOO_MANY_OPS = 75;\\n // Only operations\\n uint256 internal constant ONLY_OPERATION = 76;\\n // Strat params wrong length\\n uint256 internal constant STRAT_PARAMS_LENGTH = 77;\\n // Garden params wrong length\\n uint256 internal constant GARDEN_PARAMS_LENGTH = 78;\\n}\\n\",\"keccak256\":\"0xdbb485a596718830e08a89b785cddc69d0dc7f3f43a1a8a19268336f8d925067\",\"license\":\"Apache License\"},\"contracts/lib/Math.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n// Libraries\\nimport './SafeDecimalMath.sol';\\n\\n// https://docs.synthetix.io/contracts/source/libraries/math\\nlibrary Math {\\n using SafeMath for uint256;\\n using SafeDecimalMath for uint256;\\n\\n /**\\n * @dev Uses \\\"exponentiation by squaring\\\" algorithm where cost is 0(logN)\\n * vs 0(N) for naive repeated multiplication.\\n * Calculates x^n with x as fixed-point and n as regular unsigned int.\\n * Calculates to 18 digits of precision with SafeDecimalMath.unit()\\n */\\n function powDecimal(uint256 x, uint256 n) internal pure returns (uint256) {\\n // https://mpark.github.io/programming/2014/08/18/exponentiation-by-squaring/\\n\\n uint256 result = SafeDecimalMath.unit();\\n while (n > 0) {\\n if (n % 2 != 0) {\\n result = result.multiplyDecimal(x);\\n }\\n x = x.multiplyDecimal(x);\\n n /= 2;\\n }\\n return result;\\n }\\n\\n function abs(int256 x) internal pure returns (int256) {\\n return x >= 0 ? x : -x;\\n }\\n}\\n\",\"keccak256\":\"0xc2ff8055f98dd7253df98838d870391067d9c622a68f263c942616ca8122bd93\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"contracts/lib/Safe3296.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nlibrary Safe3296 {\\n using SafeMath for uint256;\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint32\\n *\\n * @dev internal function to convert from uint256 to uint32\\n */\\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\\n require(n < 2**32, errorMessage);\\n return uint32(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint96\\n *\\n * @dev internal function to convert from uint256 to uint96\\n */\\n function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) {\\n require(n < 2**96, errorMessage);\\n return uint96(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to add two uint96 numbers\\n *\\n * @dev internal safe math function to add two uint96 numbers\\n */\\n function add96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n uint96 c = a + b;\\n require(c >= a, errorMessage);\\n return c;\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to subtract two uint96 numbers\\n *\\n * @dev internal safe math function to subtract two uint96 numbers\\n */\\n function sub96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n}\\n\",\"keccak256\":\"0x9ebf0856ab07500c9a8250d1be4b578a3e0ff454da7de67e3ab5632a7e6903c3\",\"license\":\"Apache License\"},\"contracts/lib/SafeDecimalMath.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nlibrary SafeDecimalMath {\\n using SafeMath for uint256;\\n\\n /* Number of decimal places in the representations. */\\n uint8 public constant decimals = 18;\\n uint8 public constant highPrecisionDecimals = 27;\\n\\n /* The number representing 1.0. */\\n uint256 public constant UNIT = 10**uint256(decimals);\\n\\n /* The number representing 1.0 for higher fidelity numbers. */\\n uint256 public constant PRECISE_UNIT = 10**uint256(highPrecisionDecimals);\\n uint256 private constant UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR = 10**uint256(highPrecisionDecimals - decimals);\\n\\n /**\\n * @return Provides an interface to UNIT.\\n */\\n function unit() external pure returns (uint256) {\\n return UNIT;\\n }\\n\\n /**\\n * @return Provides an interface to PRECISE_UNIT.\\n */\\n function preciseUnit() external pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @return The result of multiplying x and y, interpreting the operands as fixed-point\\n * decimals.\\n *\\n * @dev A unit factor is divided out after the product of x and y is evaluated,\\n * so that product must be less than 2**256. As this is an integer division,\\n * the internal division always rounds down. This helps save on gas. Rounding\\n * is more expensive on gas.\\n */\\n function multiplyDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\\n /* Divide by UNIT to remove the extra factor introduced by the product. */\\n return x.mul(y) / UNIT;\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of the specified precision unit.\\n *\\n * @dev The operands should be in the form of a the specified unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function _multiplyDecimalRound(\\n uint256 x,\\n uint256 y,\\n uint256 precisionUnit\\n ) private pure returns (uint256) {\\n /* Divide by UNIT to remove the extra factor introduced by the product. */\\n uint256 quotientTimesTen = x.mul(y) / (precisionUnit / 10);\\n\\n if (quotientTimesTen % 10 >= 5) {\\n quotientTimesTen += 10;\\n }\\n\\n return quotientTimesTen / 10;\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of a precise unit.\\n *\\n * @dev The operands should be in the precise unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function multiplyDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _multiplyDecimalRound(x, y, PRECISE_UNIT);\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of a standard unit.\\n *\\n * @dev The operands should be in the standard unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function multiplyDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _multiplyDecimalRound(x, y, UNIT);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is a high\\n * precision decimal.\\n *\\n * @dev y is divided after the product of x and the standard precision unit\\n * is evaluated, so the product of x and UNIT must be less than 2**256. As\\n * this is an integer division, the result is always rounded down.\\n * This helps save on gas. Rounding is more expensive on gas.\\n */\\n function divideDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\\n /* Reintroduce the UNIT factor that will be divided out by y. */\\n return x.mul(UNIT).div(y);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * decimal in the precision unit specified in the parameter.\\n *\\n * @dev y is divided after the product of x and the specified precision unit\\n * is evaluated, so the product of x and the specified precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function _divideDecimalRound(\\n uint256 x,\\n uint256 y,\\n uint256 precisionUnit\\n ) private pure returns (uint256) {\\n uint256 resultTimesTen = x.mul(precisionUnit * 10).div(y);\\n\\n if (resultTimesTen % 10 >= 5) {\\n resultTimesTen += 10;\\n }\\n\\n return resultTimesTen / 10;\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * standard precision decimal.\\n *\\n * @dev y is divided after the product of x and the standard precision unit\\n * is evaluated, so the product of x and the standard precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function divideDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _divideDecimalRound(x, y, UNIT);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * high precision decimal.\\n *\\n * @dev y is divided after the product of x and the high precision unit\\n * is evaluated, so the product of x and the high precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function divideDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _divideDecimalRound(x, y, PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Convert a standard decimal representation to a high precision one.\\n */\\n function decimalToPreciseDecimal(uint256 i) internal pure returns (uint256) {\\n return i.mul(UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR);\\n }\\n\\n /**\\n * @dev Convert a high precision decimal to a standard decimal representation.\\n */\\n function preciseDecimalToDecimal(uint256 i) internal pure returns (uint256) {\\n uint256 quotientTimesTen = i / (UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR / 10);\\n\\n if (quotientTimesTen % 10 >= 5) {\\n quotientTimesTen += 10;\\n }\\n\\n return quotientTimesTen / 10;\\n }\\n}\\n\",\"keccak256\":\"0x1372be4fa0c5813417396f128f5aa45da1cd7679e2d247a8e17d1ba5f0141253\",\"license\":\"Apache License\"},\"contracts/token/RewardsDistributor.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {TimeLockedToken} from './TimeLockedToken.sol';\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\nimport {SafeDecimalMath} from '../lib/SafeDecimalMath.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\nimport {Math} from '../lib/Math.sol';\\nimport {Safe3296} from '../lib/Safe3296.sol';\\nimport {Errors, _require} from '../lib/BabylonErrors.sol';\\n\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {TimeLockedToken} from './TimeLockedToken.sol';\\nimport {IRewardsDistributor} from '../interfaces/IRewardsDistributor.sol';\\n\\n/**\\n * @title Rewards Distributor implementing the BABL Mining Program and other Rewards to Strategists and Stewards\\n * @author Babylon Finance\\n * Rewards Distributor contract is a smart contract used to calculate and distribute all the BABL rewards of the BABL Mining Program\\n * along the time reserved for executed strategies. It implements a supply curve to distribute 500K BABL along the time.\\n * The supply curve is designed to optimize the long-term sustainability of the protocol.\\n * The rewards are front-loaded but they last for more than 10 years, slowly decreasing quarter by quarter.\\n * For that, it houses the state of the protocol power along the time as each strategy power is compared to the whole protocol usage.\\n * Rewards Distributor also is responsible for the calculation and delivery of other rewards as bonuses to specific profiles\\n * which are actively contributing to the protocol growth and their communities (Garden creators, Strategists and Stewards).\\n */\\ncontract RewardsDistributor is Ownable, IRewardsDistributor {\\n using SafeMath for uint256;\\n using SafeMath for int256;\\n using PreciseUnitMath for uint256;\\n using PreciseUnitMath for int256;\\n using SafeDecimalMath for uint256;\\n using SafeDecimalMath for int256;\\n using Math for uint256;\\n using Math for int256;\\n using Safe3296 for uint256;\\n using Safe3296 for int256;\\n using Safe3296 for uint96;\\n using Safe3296 for uint32;\\n\\n /* ========== Events ========== */\\n\\n /* ============ Modifiers ============ */\\n /**\\n * Throws if the call is not from a valid strategy\\n */\\n modifier onlyStrategy {\\n _require(controller.isSystemContract(address(IStrategy(msg.sender).garden())), Errors.ONLY_STRATEGY);\\n _;\\n }\\n /**\\n * Throws if the call is not from a valid active garden\\n */\\n modifier onlyActiveGarden(address _garden, uint256 _pid) {\\n if (_pid != 0 || gardenPid[address(_garden)] > 1) {\\n // Enable deploying flow with security restrictions\\n _require(IBabController(controller).isSystemContract(address(_garden)), Errors.NOT_A_SYSTEM_CONTRACT);\\n _require(IBabController(controller).isGarden(address(_garden)), Errors.ONLY_ACTIVE_GARDEN);\\n }\\n _require(msg.sender == address(_garden), Errors.ONLY_ACTIVE_GARDEN);\\n _require(IGarden(_garden).active(), Errors.ONLY_ACTIVE_GARDEN);\\n _;\\n }\\n\\n /**\\n * Throws if the BABL Rewards mining program is not active\\n */\\n modifier onlyMiningActive() {\\n _require(IBabController(controller).bablMiningProgramEnabled(), Errors.ONLY_MINING_ACTIVE);\\n _;\\n }\\n /**\\n * Throws if the sender is not the controller\\n */\\n modifier onlyController() {\\n _require(IBabController(controller).isSystemContract(msg.sender), Errors.NOT_A_SYSTEM_CONTRACT);\\n _require(address(controller) == msg.sender, Errors.ONLY_CONTROLLER);\\n _;\\n }\\n\\n /* ============ Constants ============ */\\n // 500K BABL allocated to this BABL Mining Program, the first quarter is Q1_REWARDS\\n // and the following quarters will follow the supply curve using a decay rate\\n uint256 public constant override Q1_REWARDS = 53_571_428_571_428_600e6; // First quarter (epoch) BABL rewards\\n // 12% quarterly decay rate (each 90 days)\\n // (Rewards on Q1 = 1,12 * Rewards on Q2) being Q1= Quarter 1, Q2 = Quarter 2\\n uint256 public constant override DECAY_RATE = 12e16;\\n // Duration of its EPOCH in days // BABL & profits split from the protocol\\n uint256 public constant override EPOCH_DURATION = 90 days;\\n\\n // solhint-disable-next-line\\n uint256 public override START_TIME; // Starting time of the rewards distribution\\n\\n // solhint-disable-next-line\\n uint256 public immutable BABL_STRATEGIST_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable BABL_STEWARD_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable BABL_LP_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_STRATEGIST_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_STEWARD_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_LP_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_PROTOCOL_FEE;\\n // solhint-disable-next-line\\n uint256 public immutable CREATOR_BONUS;\\n\\n /* ============ Structs ============ */\\n\\n struct ProtocolPerTimestamp {\\n // Protocol allocation checkpoints per timestamp along the time\\n uint256 principal; // Protocol principal allocation\\n uint256 time; // Time of the checkpoint\\n uint256 quarterBelonging; // # Quarter checkpoint belonging since START_TIME\\n uint256 timeListPointer; // Pointer to the array of timestamps to enable the possibility of struct iteration\\n uint256 power; // Protocol power checkpoint (power is proportional to = principal * duration)\\n }\\n\\n struct ProtocolPerQuarter {\\n // Protocol allocation checkpoints per timestamp per each quarter along the time\\n uint256 quarterPrincipal; // Checkpoint to keep track on accumulated protocol principal per quarter\\n uint256 quarterNumber; // # Quarter since START_TIME\\n uint256 quarterPower; // Accumulated Protocol power for each quarter\\n uint96 supplyPerQuarter; // Supply per quarter\\n }\\n\\n struct GardenPowerByTimestamp {\\n // Garden allocation checkpoints per timestamp per each garden\\n uint256 principal; // Checkpoint to keep track on garden allocation\\n uint256 timestamp; // Checkpoint timestamps\\n uint256 power; // Garden power checkpoint (power is proportional to = principal * duration)\\n }\\n struct ContributorPerGarden {\\n // Checkpoints to keep track on the evolution of each contributor vs. each garden\\n uint256 lastDepositAt; // Last deposit timestamp of each contributor in each garden\\n uint256 initialDepositAt; // Checkpoint of the initial deposit\\n uint256[] timeListPointer; // Array of timestamps for each user in each garden\\n uint256 pid; // Garden contributor checkpoints counter to enable iteration\\n mapping(uint256 => TimestampContribution) tsContributions; // Sub-mapping all the contributor checkpoints\\n }\\n\\n struct TimestampContribution {\\n // Sub-mapping with all checkpoints for deposits and withdrawals of garden users\\n uint256 principal; // Principal of user in each garden\\n uint256 timestamp; // Checkpoint time\\n uint256 timePointer; // Pointer\\n uint256 power; // Contributor power per checkpoint\\n }\\n struct Checkpoints {\\n // Checkpoints for contributor power calculations where a certain window (from -> to) is queried\\n uint256 fromDepositAt; // First contributor checkpoint within the provided window\\n uint256 lastDepositAt; // Last contributor checkpoint within the provided window\\n uint256 gardenFromDepositAt; // First contributor checkpoint within the provided window\\n uint256 gardenLastDepositAt; // Last garden checkpoint within the provided window\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Instance of the Controller contract\\n IBabController public controller;\\n\\n // BABL Token contract\\n TimeLockedToken public babltoken;\\n\\n // Protocol total allocation points. Must be the sum of all allocation points (strategyPrincipal) in all strategy pools.\\n uint256 public override protocolPrincipal;\\n mapping(uint256 => ProtocolPerTimestamp) public protocolPerTimestamp; // Mapping of all protocol checkpoints\\n uint256[] public timeList; // Array of all protocol checkpoints\\n uint256 public override pid; // Initialization of the ID assigning timeListPointer to the checkpoint number\\n\\n mapping(uint256 => ProtocolPerQuarter) public protocolPerQuarter; // Mapping of the accumulated protocol per each active quarter\\n mapping(uint256 => bool) public isProtocolPerQuarter; // Check if the protocol per quarter data has been initialized\\n\\n // Strategy overhead control. Only used if each strategy has power overhead due to changes overtime\\n mapping(address => mapping(uint256 => uint256)) public rewardsPowerOverhead; // Overhead control to enable high level accuracy calculations for strategy rewards\\n // Contributor power control\\n mapping(address => mapping(address => ContributorPerGarden)) public contributorPerGarden; // Enable high level accuracy calculations\\n mapping(address => mapping(address => Checkpoints)) private checkpoints;\\n // Garden power control\\n mapping(address => mapping(uint256 => GardenPowerByTimestamp)) public gardenPowerByTimestamp;\\n mapping(address => uint256[]) public gardenTimelist;\\n mapping(address => uint256) public gardenPid;\\n\\n /* ============ Constructor ============ */\\n\\n constructor(TimeLockedToken _bablToken, IBabController _controller) {\\n require(address(_bablToken) != address(0), 'Token needs to exist');\\n require(address(_controller) != address(0), 'Controller needs to exist');\\n babltoken = _bablToken;\\n controller = _controller;\\n\\n (BABL_STRATEGIST_SHARE, BABL_STEWARD_SHARE, BABL_LP_SHARE, CREATOR_BONUS) = controller.getBABLSharing();\\n (PROFIT_STRATEGIST_SHARE, PROFIT_STEWARD_SHARE, PROFIT_LP_SHARE) = controller.getProfitSharing();\\n PROFIT_PROTOCOL_FEE = controller.protocolPerformanceFee();\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Function that adds the capital received to the total principal of the protocol per timestamp\\n * @param _capital Amount of capital in WETH\\n */\\n function addProtocolPrincipal(uint256 _capital) external override onlyStrategy onlyMiningActive {\\n IStrategy strategy = IStrategy(msg.sender);\\n if (strategy.enteredAt() >= START_TIME) {\\n // onlyMiningActive control, it does not create a checkpoint if the strategy is not part of the Mining Program\\n _updateProtocolPrincipal(address(strategy), _capital, true);\\n }\\n }\\n\\n /**\\n * Function that removes the capital received to the total principal of the protocol per timestamp\\n * @param _capital Amount of capital in WETH\\n */\\n function substractProtocolPrincipal(uint256 _capital) external override onlyStrategy onlyMiningActive {\\n IStrategy strategy = IStrategy(msg.sender);\\n if (strategy.enteredAt() >= START_TIME) {\\n // onlyMiningActive control, it does not create a checkpoint if the strategy is not part of the Mining Program\\n _updateProtocolPrincipal(address(strategy), _capital, false);\\n }\\n }\\n\\n /**\\n * Gets the total amount of rewards for a given strategy\\n * @param _strategy Strategy to check\\n */\\n function getStrategyRewards(address _strategy) external view override returns (uint96) {\\n IStrategy strategy = IStrategy(_strategy);\\n _require(strategy.exitedAt() != 0, Errors.STRATEGY_IS_NOT_OVER_YET);\\n if ((strategy.enteredAt() >= START_TIME) && (START_TIME != 0)) {\\n // We avoid gas consuming once a strategy got its BABL rewards during its finalization\\n uint256 rewards = strategy.strategyRewards();\\n if (rewards != 0) {\\n return Safe3296.safe96(rewards, 'overflow 96 bits');\\n }\\n // If the calculation was not done earlier we go for it\\n (uint256 numQuarters, uint256 startingQuarter) =\\n _getRewardsWindow(strategy.executedAt(), strategy.exitedAt());\\n uint256 bablRewards = 0;\\n if (numQuarters <= 1) {\\n bablRewards = _getStrategyRewardsOneQuarter(_strategy, startingQuarter); // Proportional supply till that moment within the same epoch\\n _require(\\n bablRewards <= protocolPerQuarter[startingQuarter].supplyPerQuarter,\\n Errors.OVERFLOW_IN_SUPPLY\\n );\\n _require(\\n strategy.capitalAllocated().mul(strategy.exitedAt().sub(strategy.executedAt())).sub(\\n strategy.rewardsTotalOverhead()\\n ) <= protocolPerQuarter[startingQuarter].quarterPower,\\n Errors.OVERFLOW_IN_POWER\\n );\\n } else {\\n // The strategy takes longer than one quarter / epoch\\n // We need to calculate the strategy vs. protocol power ratio per each quarter\\n uint256[] memory strategyPower = new uint256[](numQuarters); // Strategy power in each Epoch\\n uint256[] memory protocolPower = new uint256[](numQuarters); // Protocol power in each Epoch\\n for (uint256 i = 0; i <= numQuarters.sub(1); i++) {\\n uint256 slotEnding = START_TIME.add(startingQuarter.add(i).mul(EPOCH_DURATION)); // Initialization timestamp at the end of the first slot where the strategy starts its execution\\n\\n // We iterate all the quarters where the strategy was active\\n uint256 percentage = 1e18;\\n if (strategy.executedAt().add(EPOCH_DURATION) > slotEnding) {\\n // We are in the first quarter of the strategy\\n\\n strategyPower[i] = strategy.capitalAllocated().mul(slotEnding.sub(strategy.executedAt())).sub(\\n rewardsPowerOverhead[address(strategy)][_getQuarter(strategy.executedAt())]\\n );\\n } else if (\\n strategy.executedAt() < slotEnding.sub(EPOCH_DURATION) && slotEnding < strategy.exitedAt()\\n ) {\\n // We are in an intermediate quarter different from starting or ending quarters\\n strategyPower[i] = strategy\\n .capitalAllocated()\\n .mul(slotEnding.sub(slotEnding.sub(EPOCH_DURATION)))\\n .sub(rewardsPowerOverhead[address(strategy)][_getQuarter(slotEnding.sub(45 days))]);\\n } else {\\n // We are in the last quarter of the strategy\\n percentage = block.timestamp.sub(slotEnding.sub(EPOCH_DURATION)).preciseDiv(\\n slotEnding.sub(slotEnding.sub(EPOCH_DURATION))\\n );\\n\\n strategyPower[i] = strategy\\n .capitalAllocated()\\n .mul(strategy.exitedAt().sub(slotEnding.sub(EPOCH_DURATION)))\\n .sub(rewardsPowerOverhead[address(strategy)][_getQuarter(strategy.exitedAt())]);\\n }\\n protocolPower[i] = protocolPerQuarter[startingQuarter.add(i)].quarterPower;\\n\\n _require(strategyPower[i] <= protocolPower[i], Errors.OVERFLOW_IN_POWER);\\n\\n bablRewards = bablRewards.add(\\n strategyPower[i]\\n .preciseDiv(protocolPower[i])\\n .preciseMul(uint256(protocolPerQuarter[startingQuarter.add(i)].supplyPerQuarter))\\n .preciseMul(percentage)\\n );\\n }\\n }\\n\\n // Babl rewards will be proportional to the total return (profit) with a max cap of x2\\n uint256 percentageMul = strategy.capitalReturned().preciseDiv(strategy.capitalAllocated());\\n if (percentageMul > 2e18) percentageMul = 2e18;\\n bablRewards = bablRewards.preciseMul(percentageMul);\\n return Safe3296.safe96(bablRewards, 'overflow 96 bits');\\n } else {\\n return 0;\\n }\\n }\\n\\n /**\\n * Sends BABL tokens rewards to a contributor after a claim is requested to the protocol.\\n * @param _to Address to send the tokens to\\n * @param _amount Amount of tokens to send the address to\\n */\\n function sendTokensToContributor(address _to, uint96 _amount) external override onlyMiningActive {\\n _require(controller.isSystemContract(msg.sender), Errors.NOT_A_SYSTEM_CONTRACT);\\n _safeBABLTransfer(_to, _amount);\\n }\\n\\n /**\\n * Starts BABL Rewards Mining Program from the controller.\\n */\\n function startBABLRewards() external onlyController {\\n if (START_TIME == 0) {\\n // It can only be activated once to avoid overriding START_TIME\\n START_TIME = block.timestamp;\\n }\\n }\\n\\n /**\\n * Calculates the profits and BABL that a contributor should receive from a series of finalized strategies\\n * @param _garden Garden to which the strategies and the user must belong to\\n * @param _contributor Address of the contributor to check\\n * @param _finalizedStrategies List of addresses of the finalized strategies to check\\n */\\n function getRewards(\\n address _garden,\\n address _contributor,\\n address[] calldata _finalizedStrategies\\n ) external view override returns (uint256, uint96) {\\n uint256 contributorTotalProfits = 0;\\n uint256 bablTotalRewards = 0;\\n for (uint256 i = 0; i < _finalizedStrategies.length; i++) {\\n (uint256 strategyProfits, uint256 strategyBABL) =\\n _getStrategyProfitsAndBABL(_garden, _finalizedStrategies[i], _contributor);\\n contributorTotalProfits = contributorTotalProfits.add(strategyProfits);\\n bablTotalRewards = bablTotalRewards.add(strategyBABL);\\n }\\n\\n return (contributorTotalProfits, Safe3296.safe96(bablTotalRewards, 'R28'));\\n }\\n\\n /* ========== View functions ========== */\\n\\n /**\\n * Gets the contributor power from one timestamp to the other\\n * @param _garden Address of the garden where the contributor belongs to\\n * @param _contributor Address if the contributor\\n * @param _from Initial timestamp\\n * @param _to End timestamp\\n * @return uint256 Contributor power during that period\\n */\\n function getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) external view override returns (uint256) {\\n return _getContributorPower(_garden, _contributor, _from, _to);\\n }\\n\\n function updateGardenPower(address _garden, uint256 _pid) external override onlyActiveGarden(_garden, _pid) {\\n _updateGardenPower(_garden);\\n }\\n\\n function setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw,\\n uint256 _pid\\n ) external override onlyActiveGarden(_garden, _pid) {\\n _setContributorTimestampParams(_garden, _contributor, _previousBalance, _depositOrWithdraw);\\n }\\n\\n function tokenSupplyPerQuarter(uint256 quarter) external pure override returns (uint96) {\\n return _tokenSupplyPerQuarter(quarter);\\n }\\n\\n function checkProtocol(uint256 _time)\\n external\\n view\\n override\\n returns (\\n uint256 principal,\\n uint256 time,\\n uint256 quarterBelonging,\\n uint256 timeListPointer,\\n uint256 power\\n )\\n {\\n return (\\n protocolPerTimestamp[_time].principal,\\n protocolPerTimestamp[_time].time,\\n protocolPerTimestamp[_time].quarterBelonging,\\n protocolPerTimestamp[_time].timeListPointer,\\n protocolPerTimestamp[_time].power\\n );\\n }\\n\\n function checkQuarter(uint256 _num)\\n external\\n view\\n override\\n returns (\\n uint256 quarterPrincipal,\\n uint256 quarterNumber,\\n uint256 quarterPower,\\n uint96 supplyPerQuarter\\n )\\n {\\n return (\\n protocolPerQuarter[_num].quarterPrincipal,\\n protocolPerQuarter[_num].quarterNumber,\\n protocolPerQuarter[_num].quarterPower,\\n protocolPerQuarter[_num].supplyPerQuarter\\n );\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n function _updateProtocolPrincipal(\\n address _strategy,\\n uint256 _capital,\\n bool _addOrSubstract\\n ) internal {\\n IStrategy strategy = IStrategy(_strategy);\\n ProtocolPerTimestamp storage protocolCheckpoint = protocolPerTimestamp[block.timestamp];\\n if (_addOrSubstract == false) {\\n // Substract\\n protocolPrincipal = protocolPrincipal.sub(_capital);\\n } else {\\n protocolPrincipal = protocolPrincipal.add(_capital);\\n }\\n protocolCheckpoint.principal = protocolPrincipal;\\n protocolCheckpoint.time = block.timestamp;\\n protocolCheckpoint.quarterBelonging = _getQuarter(block.timestamp);\\n protocolCheckpoint.timeListPointer = pid;\\n if (pid == 0) {\\n // The very first strategy of all strategies in the mining program\\n protocolCheckpoint.power = 0;\\n } else {\\n // Any other strategy different from the very first one (will have an antecesor)\\n protocolCheckpoint.power = protocolPerTimestamp[timeList[pid.sub(1)]].power.add(\\n protocolCheckpoint.time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time).mul(\\n protocolPerTimestamp[timeList[pid.sub(1)]].principal\\n )\\n );\\n }\\n timeList.push(block.timestamp); // Register of added strategies timestamps in the array for iteration\\n // Here we control the accumulated protocol power per each quarter\\n // Create the quarter checkpoint in case the checkpoint is the first in the epoch\\n _addProtocolPerQuarter(block.timestamp);\\n // We update the rewards overhead if any\\n _updatePowerOverhead(strategy, _capital);\\n pid++;\\n }\\n\\n function _getStrategyProfitsAndBABL(\\n address _garden,\\n address _strategy,\\n address _contributor\\n ) private view returns (uint256, uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n _require(address(strategy.garden()) == _garden, Errors.STRATEGY_GARDEN_MISMATCH);\\n uint256 contributorProfits = 0;\\n uint256 contributorBABL = 0;\\n // We get the state of the strategy in terms of profit and distance from expected to accurately calculate profits and rewards\\n (bool profit, uint256 profitValue, bool distance, uint256 distanceValue) =\\n _getStrategyRewardsContext(address(strategy));\\n\\n (, uint256 initialDepositAt, uint256 claimedAt, , , ) = IGarden(_garden).getContributor(_contributor);\\n // Positive strategies not yet claimed\\n if (\\n strategy.exitedAt() > claimedAt &&\\n strategy.executedAt() >= initialDepositAt &&\\n address(strategy.garden()) == _garden\\n ) {\\n uint256 contributorPower =\\n _getContributorPower(address(_garden), _contributor, strategy.executedAt(), strategy.exitedAt());\\n // If strategy returned money we give out the profits\\n if (profit == true) {\\n // We reserve 5% of profits for performance fees\\n profitValue = profitValue.sub(profitValue.multiplyDecimal(PROFIT_PROTOCOL_FEE));\\n }\\n // Get strategist rewards in case the contributor is also the strategist of the strategy\\n contributorBABL = contributorBABL.add(\\n _getStrategyStrategistBabl(\\n address(strategy),\\n _contributor,\\n profit,\\n profitValue,\\n distance,\\n distanceValue\\n )\\n );\\n\\n contributorProfits = contributorProfits.add(\\n _getStrategyStrategistProfits(address(strategy), _contributor, profit, profitValue)\\n );\\n\\n // Get steward rewards\\n contributorBABL = contributorBABL.add(\\n _getStrategyStewardBabl(address(strategy), _contributor, profit, profitValue, distance, distanceValue)\\n );\\n\\n contributorProfits = contributorProfits.add(\\n _getStrategyStewardProfits(\\n address(strategy),\\n _contributor,\\n profit,\\n profitValue,\\n distance,\\n distanceValue\\n )\\n );\\n\\n // Get LP rewards\\n\\n contributorBABL = contributorBABL.add(\\n uint256(strategy.strategyRewards()).multiplyDecimal(BABL_LP_SHARE).preciseMul(\\n contributorPower.preciseDiv(strategy.capitalAllocated())\\n )\\n );\\n\\n // Get a multiplier bonus in case the contributor is the garden creator\\n if (_contributor == IGarden(_garden).creator()) {\\n contributorBABL = contributorBABL.add(contributorBABL.multiplyDecimal(CREATOR_BONUS));\\n }\\n }\\n return (contributorProfits, contributorBABL);\\n }\\n\\n function _getStrategyRewardsContext(address _strategy)\\n private\\n view\\n returns (\\n bool,\\n uint256,\\n bool,\\n uint256\\n )\\n {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 returned = strategy.capitalReturned();\\n uint256 expected =\\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\\n uint256 allocated = strategy.capitalAllocated();\\n bool profit;\\n bool distance;\\n uint256 profitValue;\\n uint256 distanceValue;\\n if (returned > allocated && returned >= expected) {\\n // The strategy went equal or above expectations\\n profit = true; // positive\\n distance = true; // positive\\n profitValue = returned.sub(allocated);\\n distanceValue = returned.sub(expected);\\n } else if (returned >= allocated && returned < expected) {\\n // The strategy went worse than expected but with some profits\\n profit = true; // positive or zero profits\\n distance = false; // negative vs expected return (got less than expected)\\n profitValue = returned.sub(allocated);\\n distanceValue = expected.sub(returned);\\n } else if (returned < allocated && returned < expected) {\\n // Negative profits - bad investments has penalties\\n profit = false; // negative - loosing capital\\n distance = false; // negative vs expected return (got less than expected)\\n profitValue = allocated.sub(returned); // Negative number, there were no profits at all\\n distanceValue = expected.sub(returned);\\n }\\n\\n return (profit, profitValue, distance, distanceValue);\\n }\\n\\n function _getStrategyStewardBabl(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256, /* _profitValue */\\n bool _distance,\\n uint256 _distanceValue\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 strategyRewards = strategy.strategyRewards();\\n int256 userVotes = strategy.getUserVotes(_contributor);\\n uint256 bablCap;\\n uint256 expected =\\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\\n\\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\\n uint256 babl = 0;\\n if (userVotes > 0 && _profit == true && _distance == true) {\\n // Voting in favor of the execution of the strategy with profits and positive distance\\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\\n uint256(userVotes).preciseDiv(strategy.totalPositiveVotes())\\n );\\n } else if (userVotes > 0 && _profit == true && _distance == false) {\\n // Voting in favor positive profits but below expected return\\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\\n uint256(userVotes).preciseDiv(strategy.totalPositiveVotes())\\n );\\n babl = babl.sub(babl.preciseMul(_distanceValue.preciseDiv(expected))); // We discount the error of expected return vs real returns\\n } else if (userVotes > 0 && _profit == false) {\\n // Voting in favor of a non profitable strategy get nothing\\n babl = 0;\\n } else if (userVotes < 0 && _distance == false) {\\n // Voting against a strategy that got results below expected return provides rewards to the voter (helping the protocol to only have good strategies)\\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\\n uint256(Math.abs(userVotes)).preciseDiv(strategy.totalNegativeVotes())\\n );\\n\\n bablCap = babl.mul(2); // Max cap\\n babl = babl.add(babl.preciseMul(_distanceValue.preciseDiv(expected))); // We add a bonus inverse to the error of expected return vs real returns\\n\\n if (babl > bablCap) babl = bablCap; // We limit 2x by a Cap\\n } else if (userVotes < 0 && _distance == true) {\\n babl = 0;\\n }\\n return babl;\\n }\\n\\n function _getStrategyStewardProfits(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256 _profitValue,\\n bool _distance,\\n uint256 /* _distanceValue */\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\\n uint256 profits = 0;\\n int256 userVotes = strategy.getUserVotes(_contributor);\\n if (_profit == true) {\\n if (userVotes > 0) {\\n profits = _profitValue.multiplyDecimal(PROFIT_STEWARD_SHARE).preciseMul(uint256(userVotes)).preciseDiv(\\n strategy.totalPositiveVotes()\\n );\\n } else if ((userVotes < 0) && _distance == false) {\\n profits = _profitValue\\n .multiplyDecimal(PROFIT_STEWARD_SHARE)\\n .preciseMul(uint256(Math.abs(userVotes)))\\n .preciseDiv(strategy.totalNegativeVotes());\\n } else if ((userVotes < 0) && _distance == true) {\\n // Voted against a very profit strategy above expected returns, get no profit at all\\n profits = 0;\\n }\\n } else profits = 0; // No profits at all\\n\\n return profits;\\n }\\n\\n function _getStrategyStrategistBabl(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256, /* _profitValue */\\n bool _distance,\\n uint256 /* _distanceValue */\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 strategyRewards = strategy.strategyRewards();\\n uint256 babl;\\n uint256 bablCap;\\n uint256 expected =\\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\\n if (strategy.strategist() == _contributor) {\\n babl = strategyRewards.multiplyDecimal(BABL_STRATEGIST_SHARE); // Standard calculation to be ponderated\\n if (_profit == true && _distance == true) {\\n // Strategy with equal or higher profits than expected\\n bablCap = babl.mul(2); // Max cap\\n // The more the results are close to the expected the more bonus will get (limited by a x2 cap)\\n babl = babl.add(babl.preciseMul(expected.preciseDiv(strategy.capitalReturned())));\\n if (babl > bablCap) babl = bablCap; // We limit 2x by a Cap\\n } else if (_profit == true && _distance == false) {\\n //under expectations\\n // The more the results are close to the expected the less penalization it might have\\n babl = babl.sub(babl.sub(babl.preciseMul(strategy.capitalReturned().preciseDiv(expected))));\\n } else {\\n // No positive profit\\n return 0;\\n }\\n } else {\\n return 0;\\n }\\n\\n return babl;\\n }\\n\\n function _getStrategyStrategistProfits(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256 _profitValue\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\\n uint256 profits;\\n if (_profit == true) {\\n if (strategy.strategist() == _contributor) {\\n // If the contributor was the strategist of the strategy\\n profits = _profitValue.multiplyDecimal(PROFIT_STRATEGIST_SHARE);\\n }\\n } else profits = 0; // No profits at all\\n\\n return profits;\\n }\\n\\n function _addProtocolPerQuarter(uint256 _time) private onlyMiningActive {\\n ProtocolPerQuarter storage protocolCheckpoint = protocolPerQuarter[_getQuarter(_time)];\\n\\n if (!isProtocolPerQuarter[_getQuarter(_time).sub(1)]) {\\n // The quarter is not yet initialized then we create it\\n protocolCheckpoint.quarterNumber = _getQuarter(_time);\\n if (pid == 0) {\\n // The first strategy added in the first epoch\\n protocolCheckpoint.quarterPower = 0;\\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\\n } else {\\n // Each time a new epoch starts with either a new strategy execution or finalization\\n // We just take the proportional power for this quarter from previous checkpoint\\n uint256 powerToSplit =\\n protocolPerTimestamp[_time].power.sub(protocolPerTimestamp[timeList[pid.sub(1)]].power);\\n if (protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging == _getQuarter(_time).sub(1)) {\\n // There were no intermediate epochs without checkpoints\\n // We re-initialize the protocol power counting for this new quarter\\n protocolCheckpoint.quarterPower = powerToSplit\\n .mul(_time.sub(START_TIME.add(_getQuarter(_time).mul(EPOCH_DURATION).sub(EPOCH_DURATION))))\\n .div(_time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time));\\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\\n\\n protocolPerQuarter[_getQuarter(_time).sub(1)].quarterPower = protocolPerQuarter[\\n _getQuarter(_time).sub(1)\\n ]\\n .quarterPower\\n .add(powerToSplit.sub(protocolCheckpoint.quarterPower));\\n } else {\\n // There were intermediate epochs without checkpoints - we need to create their protocolPerQuarter's and update the last one\\n // We have to update all the quarters including where the previous checkpoint is and the one were we are now\\n for (\\n uint256 i = 0;\\n i <= _getQuarter(_time).sub(protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging);\\n i++\\n ) {\\n ProtocolPerQuarter storage newCheckpoint =\\n protocolPerQuarter[protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i)];\\n uint256 slotEnding =\\n START_TIME.add(\\n protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i).mul(EPOCH_DURATION)\\n );\\n if (i == 0) {\\n // We are in the first quarter to update, we add the corresponding part\\n\\n newCheckpoint.quarterPower = newCheckpoint.quarterPower.add(\\n powerToSplit.mul(slotEnding.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)).div(\\n _time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)\\n )\\n );\\n newCheckpoint.quarterPrincipal = protocolPerTimestamp[timeList[pid.sub(1)]].principal;\\n } else if (\\n i < _getQuarter(_time).sub(protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging)\\n ) {\\n // We are in an intermediate quarter\\n newCheckpoint.quarterPower = powerToSplit.mul(EPOCH_DURATION).div(\\n _time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)\\n );\\n newCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(\\n protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i)\\n );\\n newCheckpoint.quarterNumber = protocolPerTimestamp[timeList[pid.sub(1)]]\\n .quarterBelonging\\n .add(i);\\n newCheckpoint.quarterPrincipal = protocolPerTimestamp[timeList[pid.sub(1)]].principal;\\n } else {\\n // We are in the last quarter of the strategy\\n protocolCheckpoint.quarterPower = powerToSplit\\n .mul(\\n _time.sub(START_TIME.add(_getQuarter(_time).mul(EPOCH_DURATION).sub(EPOCH_DURATION)))\\n )\\n .div(_time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time));\\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\\n protocolCheckpoint.quarterNumber = _getQuarter(_time);\\n protocolCheckpoint.quarterPrincipal = protocolPrincipal;\\n }\\n }\\n }\\n }\\n isProtocolPerQuarter[_getQuarter(_time).sub(1)] = true;\\n } else {\\n // Quarter checkpoint already created, it must have been filled with general info\\n // We update the power of the quarter by adding the new difference between last quarter checkpoint and this checkpoint\\n protocolCheckpoint.quarterPower = protocolCheckpoint.quarterPower.add(\\n protocolPerTimestamp[_time].power.sub(protocolPerTimestamp[timeList[pid.sub(1)]].power)\\n );\\n }\\n protocolCheckpoint.quarterPrincipal = protocolPrincipal;\\n }\\n\\n function _updatePowerOverhead(IStrategy _strategy, uint256 _capital) private onlyMiningActive {\\n if (_strategy.updatedAt() != 0) {\\n // There will be overhead after the first execution not before\\n if (_getQuarter(block.timestamp) == _getQuarter(_strategy.updatedAt())) {\\n // The overhead will remain within the same epoch\\n rewardsPowerOverhead[address(_strategy)][_getQuarter(block.timestamp)] = rewardsPowerOverhead[\\n address(_strategy)\\n ][_getQuarter(block.timestamp)]\\n .add(_capital.mul(block.timestamp.sub(_strategy.updatedAt())));\\n } else {\\n // We need to iterate since last update of the strategy capital\\n (uint256 numQuarters, uint256 startingQuarter) =\\n _getRewardsWindow(_strategy.updatedAt(), block.timestamp);\\n uint256 overheadPerQuarter = _capital.mul(block.timestamp.sub(_strategy.updatedAt())).div(numQuarters);\\n for (uint256 i = 0; i <= numQuarters.sub(1); i++) {\\n rewardsPowerOverhead[address(_strategy)][startingQuarter.add(i)] = rewardsPowerOverhead[\\n address(_strategy)\\n ][startingQuarter.add(i)]\\n .add(overheadPerQuarter);\\n }\\n }\\n }\\n }\\n\\n function _getStrategyRewardsOneQuarter(address _strategy, uint256 _startingQuarter)\\n private\\n view\\n onlyMiningActive\\n returns (uint256)\\n {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 strategyOverTime =\\n strategy.capitalAllocated().mul(strategy.exitedAt().sub(strategy.executedAt())).sub(\\n strategy.rewardsTotalOverhead()\\n );\\n return\\n strategyOverTime\\n .preciseDiv(protocolPerQuarter[_startingQuarter].quarterPower)\\n .preciseMul(uint256(protocolPerQuarter[_startingQuarter].supplyPerQuarter))\\n .mul(strategy.exitedAt().sub(_startingQuarter))\\n .div(block.timestamp.sub(_startingQuarter));\\n }\\n\\n // Safe BABL transfer function, just in case if rounding error causes DistributorRewards to not have enough BABL.\\n function _safeBABLTransfer(address _to, uint96 _amount) private onlyMiningActive {\\n uint256 bablBal = babltoken.balanceOf(address(this));\\n if (_amount > bablBal) {\\n SafeERC20.safeTransfer(babltoken, _to, bablBal);\\n } else {\\n SafeERC20.safeTransfer(babltoken, _to, _amount);\\n }\\n }\\n\\n /**\\n * Gets the contributor power from one timestamp to the other\\n * @param _contributor Address if the contributor\\n * @param _from Initial timestamp\\n * @param _to End timestamp\\n * @return uint256 Contributor power during that period\\n */\\n\\n function _getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) private view returns (uint256) {\\n _require(_to >= IGarden(_garden).gardenInitializedAt() && _to >= _from, Errors.GET_CONTRIBUTOR_POWER);\\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][address(_contributor)];\\n Checkpoints memory powerCheckpoints = checkpoints[address(_garden)][address(_contributor)];\\n\\n if (contributor.initialDepositAt == 0 || contributor.initialDepositAt > _to) {\\n return 0;\\n } else {\\n if (_from <= IGarden(_garden).gardenInitializedAt()) {\\n // Avoid division by zero in case of _from parameter is not passed\\n _from = IGarden(_garden).gardenInitializedAt();\\n }\\n // Find closest point to _from and _to either contributor and garden checkpoints at their left\\n\\n (powerCheckpoints.fromDepositAt, powerCheckpoints.lastDepositAt) = _locateCheckpointsContributor(\\n _garden,\\n _contributor,\\n _from,\\n _to\\n );\\n (powerCheckpoints.gardenFromDepositAt, powerCheckpoints.gardenLastDepositAt) = _locateCheckpointsGarden(\\n _garden,\\n _from,\\n _to\\n );\\n\\n _require(\\n powerCheckpoints.fromDepositAt <= powerCheckpoints.lastDepositAt &&\\n powerCheckpoints.gardenFromDepositAt <= powerCheckpoints.gardenLastDepositAt,\\n Errors.GET_CONTRIBUTOR_POWER\\n );\\n uint256 contributorPower;\\n uint256 gardenPower;\\n\\n // \\\"FROM power calculations\\\" PART\\n // Avoid underflows\\n\\n if (_from < powerCheckpoints.fromDepositAt) {\\n // Contributor still has no power but _from is later than the start of the garden\\n contributorPower = 0;\\n } else if (_from > powerCheckpoints.fromDepositAt) {\\n contributorPower = contributor.tsContributions[powerCheckpoints.fromDepositAt].power.add(\\n (_from.sub(powerCheckpoints.fromDepositAt)).mul(\\n contributor.tsContributions[powerCheckpoints.fromDepositAt].principal\\n )\\n );\\n } else {\\n // _from == fromDepositAt\\n contributorPower = contributor.tsContributions[powerCheckpoints.fromDepositAt].power;\\n }\\n gardenPower = gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenFromDepositAt].power.add(\\n (_from.sub(powerCheckpoints.gardenFromDepositAt)).mul(\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenFromDepositAt].principal\\n )\\n );\\n // \\\"TO power calculations\\\" PART\\n // We go for accurate power calculations avoiding overflows\\n _require(contributorPower <= gardenPower, Errors.GET_CONTRIBUTOR_POWER);\\n if (_from == _to) {\\n // Requested a specific checkpoint calculation (no slot)\\n if (gardenPower == 0) {\\n return 0;\\n } else {\\n return contributorPower.preciseDiv(gardenPower);\\n }\\n // Not a checkpoint anymore but a slot\\n } else if (_to < powerCheckpoints.lastDepositAt) {\\n // contributor has not deposited yet\\n return 0;\\n } else if (\\n _to == powerCheckpoints.lastDepositAt &&\\n powerCheckpoints.fromDepositAt == powerCheckpoints.lastDepositAt\\n ) {\\n // no more contributor checkpoints in the slot\\n gardenPower = (\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].power.add(\\n (_to.sub(powerCheckpoints.gardenLastDepositAt)).mul(\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].principal\\n )\\n )\\n )\\n .sub(gardenPower);\\n _require(contributorPower <= gardenPower, Errors.GET_CONTRIBUTOR_POWER);\\n return contributorPower.preciseDiv(gardenPower);\\n } else {\\n contributorPower = (\\n contributor.tsContributions[powerCheckpoints.lastDepositAt].power.add(\\n (_to.sub(powerCheckpoints.lastDepositAt)).mul(\\n contributor.tsContributions[powerCheckpoints.lastDepositAt].principal\\n )\\n )\\n )\\n .sub(contributorPower);\\n\\n gardenPower = (\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].power.add(\\n (_to.sub(powerCheckpoints.gardenLastDepositAt)).mul(\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].principal\\n )\\n )\\n )\\n .sub(gardenPower);\\n _require(contributorPower <= gardenPower, Errors.GET_CONTRIBUTOR_POWER);\\n\\n return contributorPower.preciseDiv(gardenPower);\\n }\\n }\\n }\\n\\n function _locateCheckpointsContributor(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) private view returns (uint256, uint256) {\\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][address(_contributor)];\\n\\n uint256 lastDepositAt = contributor.timeListPointer[contributor.timeListPointer.length.sub(1)]; // Initialized with lastDeposit\\n uint256 fromDepositAt = contributor.timeListPointer[0]; // Initialized with initialDeposit\\n\\n if (lastDepositAt > _to || fromDepositAt < _from) {\\n // We go to find the closest deposits of the contributor to _from and _to\\n for (uint256 i = 0; i <= contributor.timeListPointer.length.sub(1); i++) {\\n if (contributor.timeListPointer[i] <= _to) {\\n lastDepositAt = contributor.timeListPointer[i];\\n }\\n if (contributor.timeListPointer[i] <= _from) {\\n fromDepositAt = contributor.timeListPointer[i];\\n }\\n }\\n }\\n return (fromDepositAt, lastDepositAt);\\n }\\n\\n function _locateCheckpointsGarden(\\n address _garden,\\n uint256 _from,\\n uint256 _to\\n ) private view returns (uint256, uint256) {\\n uint256 gardenLastCheckpoint = gardenTimelist[address(_garden)].length.sub(1);\\n uint256 gardenLastDepositAt = gardenTimelist[address(_garden)][gardenLastCheckpoint]; // Initialized to the last garden checkpoint\\n uint256 gardenFromDepositAt = gardenTimelist[address(_garden)][0]; // Initialized to the first garden checkpoint\\n\\n if (gardenLastDepositAt > _to || gardenFromDepositAt < _from) {\\n // We go for the closest timestamp of garden to _to and _from\\n for (uint256 i = 0; i <= gardenLastCheckpoint; i++) {\\n uint256 gardenTime = gardenTimelist[address(_garden)][i];\\n if (gardenTime <= _to) {\\n gardenLastDepositAt = gardenTime;\\n }\\n if (gardenTime <= _from) {\\n gardenFromDepositAt = gardenTime;\\n }\\n }\\n }\\n return (gardenFromDepositAt, gardenLastDepositAt);\\n }\\n\\n /**\\n * Function that keeps checkpoints of the garden power (deposits and withdrawals) per timestamp\\n */\\n function _updateGardenPower(address _garden) private {\\n IGarden garden = IGarden(_garden);\\n GardenPowerByTimestamp storage gardenTimestamp = gardenPowerByTimestamp[address(garden)][block.timestamp];\\n gardenTimestamp.principal = IERC20(address(IGarden(_garden))).totalSupply();\\n\\n gardenTimestamp.timestamp = block.timestamp;\\n\\n if (gardenPid[address(_garden)] == 0) {\\n // The very first deposit of all contributors in the mining program\\n gardenTimestamp.power = 0;\\n } else {\\n // Any other deposit different from the very first one (will have an antecesor)\\n gardenTimestamp.power = gardenPowerByTimestamp[address(garden)][\\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\\n ]\\n .power\\n .add(\\n gardenTimestamp\\n .timestamp\\n .sub(\\n gardenPowerByTimestamp[address(garden)][\\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\\n ]\\n .timestamp\\n )\\n .mul(\\n gardenPowerByTimestamp[address(garden)][\\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\\n ]\\n .principal\\n )\\n );\\n }\\n\\n gardenTimelist[address(garden)].push(block.timestamp); // Register of deposit timestamps in the array for iteration\\n gardenPid[address(garden)]++;\\n }\\n\\n /**\\n * Updates contributor timestamps params\\n */\\n function _setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw\\n ) private {\\n // We make checkpoints around contributor deposits to avoid fast loans and give the right rewards afterwards\\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][_contributor];\\n\\n contributor.tsContributions[block.timestamp].principal = IERC20(address(IGarden(_garden))).balanceOf(\\n address(_contributor)\\n );\\n\\n contributor.tsContributions[block.timestamp].timestamp = block.timestamp;\\n\\n contributor.tsContributions[block.timestamp].timePointer = contributor.pid;\\n\\n if (contributor.pid == 0) {\\n // The very first deposit\\n contributor.tsContributions[block.timestamp].power = 0;\\n } else {\\n // Any other deposits or withdrawals different from the very first one (will have an antecesor)\\n contributor.tsContributions[block.timestamp].power = contributor.tsContributions[contributor.lastDepositAt]\\n .power\\n .add(\\n (block.timestamp.sub(contributor.lastDepositAt)).mul(\\n contributor.tsContributions[contributor.lastDepositAt].principal\\n )\\n );\\n }\\n if (_depositOrWithdraw == true) {\\n // Deposit\\n if (_previousBalance == 0 || contributor.initialDepositAt == 0) {\\n contributor.initialDepositAt = block.timestamp;\\n }\\n contributor.lastDepositAt = block.timestamp;\\n } else {\\n // Withdrawals\\n if (IERC20(address(IGarden(_garden))).balanceOf(address(_contributor)) == 0) {\\n contributor.lastDepositAt = 0;\\n contributor.initialDepositAt = 0;\\n delete contributor.timeListPointer;\\n }\\n }\\n\\n contributor.timeListPointer.push(block.timestamp);\\n contributor.pid++;\\n }\\n\\n function _tokenSupplyPerQuarter(uint256 quarter) internal pure returns (uint96) {\\n _require(quarter >= 1, Errors.QUARTERS_MIN_1);\\n if (quarter >= 513) {\\n return 0;\\n } else {\\n uint256 firstFactor = (SafeDecimalMath.unit().add(DECAY_RATE)).powDecimal(quarter.sub(1));\\n uint256 supplyForQuarter = Q1_REWARDS.divideDecimal(firstFactor);\\n return Safe3296.safe96(supplyForQuarter, 'overflow 96 bits');\\n }\\n }\\n\\n function _getQuarter(uint256 _now) internal view returns (uint256) {\\n uint256 quarter = (_now.sub(START_TIME).preciseDivCeil(EPOCH_DURATION)).div(1e18);\\n return quarter.add(1);\\n }\\n\\n function _getRewardsWindow(uint256 _from, uint256 _to) internal view returns (uint256, uint256) {\\n uint256 quarters = (_to.sub(_from).preciseDivCeil(EPOCH_DURATION)).div(1e18);\\n uint256 startingQuarter = (_from.sub(START_TIME).preciseDivCeil(EPOCH_DURATION)).div(1e18);\\n return (quarters.add(1), startingQuarter.add(1));\\n }\\n}\\n\",\"keccak256\":\"0xdc467d640df88763a8c4eefbdb54b636673a9f663751902bd9517152f855b001\",\"license\":\"Apache License\"},\"contracts/token/TimeLockRegistry.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\nimport {TimeLockedToken} from './TimeLockedToken.sol';\\n\\n/**\\n * @title TimeLockRegistry\\n * @notice Register Lockups for TimeLocked ERC20 Token BABL (e.g. vesting)\\n * @author Babylon Finance\\n * @dev This contract allows owner to register distributions for a TimeLockedToken\\n *\\n * To register a distribution, register method should be called by the owner.\\n * claim() should be called only by the BABL Token smartcontract (modifier onlyBABLToken)\\n * when any account registered to receive tokens make its own claim\\n * If case of a mistake, owner can cancel registration before the claim is done by the account\\n *\\n * Note this contract address must be setup in the TimeLockedToken's contract pointing\\n * to interact with (e.g. setTimeLockRegistry() function)\\n */\\n\\ncontract TimeLockRegistry is Ownable {\\n using SafeMath for uint256;\\n using Address for address;\\n\\n /* ============ Events ============ */\\n\\n event Register(address receiver, uint256 distribution);\\n event Cancel(address receiver, uint256 distribution);\\n event Claim(address account, uint256 distribution);\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlyBABLToken() {\\n require(msg.sender == address(token), 'only BABL Token');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // time locked token\\n TimeLockedToken public token;\\n\\n /// @notice The profile of each token owner under vesting conditions and its special conditions\\n /**\\n * @param team Indicates whether or not is a Team member (true = team member / advisor, false = private investor)\\n * @param vestingBegin When the vesting begins for such token owner\\n * @param vestingEnd When the vesting ends for such token owner\\n * @param lastClaim When the last claim was done\\n */\\n struct TokenVested {\\n bool team;\\n bool cliff;\\n uint256 vestingBegin;\\n uint256 vestingEnd;\\n uint256 lastClaim;\\n }\\n\\n /// @notice A record of token owners under vesting conditions for each account, by index\\n mapping(address => TokenVested) public tokenVested;\\n\\n // mapping from token owners under vesting conditions to BABL due amount (e.g. SAFT addresses, team members, advisors)\\n mapping(address => uint256) public registeredDistributions;\\n\\n // vesting for Team Members\\n uint256 private teamVesting = 365 days * 4;\\n\\n // vesting for Investors and Advisors\\n uint256 private investorVesting = 365 days * 3;\\n\\n /* ============ Functions ============ */\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * @notice Construct a new Time Lock Registry and gives ownership to sender\\n * @param _token TimeLockedToken contract to use in this registry\\n */\\n constructor(TimeLockedToken _token) {\\n token = _token;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /* =========== Token related Gov Functions ====== */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Register new account under vesting conditions (Team, Advisors, Investors e.g. SAFT purchaser)\\n *\\n * @notice Register new account under vesting conditions (Team, Advisors, Investors e.g. SAFT purchaser)\\n * @param receiver Address belonging vesting conditions\\n * @param distribution Tokens amount that receiver is due to get\\n * @return Whether or not the registration succeeded\\n */\\n function register(\\n address receiver,\\n uint256 distribution,\\n bool investorType,\\n uint256 vestingStartingDate\\n ) external onlyOwner returns (bool) {\\n require(receiver != address(0), 'TimeLockRegistry::register: cannot register the zero address');\\n require(\\n receiver != address(this),\\n 'TimeLockRegistry::register: Time Lock Registry contract cannot be an investor'\\n );\\n require(distribution != 0, 'TimeLockRegistry::register: Distribution = 0');\\n require(\\n registeredDistributions[receiver] == 0,\\n 'TimeLockRegistry::register:Distribution for this address is already registered'\\n );\\n require(block.timestamp >= 1614553200, 'Cannot register earlier than March 2021'); // 1614553200 is UNIX TIME of 2021 March the 1st\\n\\n // register distribution\\n registeredDistributions[receiver] = distribution;\\n\\n // register token vested conditions\\n TokenVested storage newTokenVested = tokenVested[receiver];\\n newTokenVested.team = investorType;\\n newTokenVested.vestingBegin = vestingStartingDate;\\n\\n if (newTokenVested.team == true) {\\n newTokenVested.vestingEnd = vestingStartingDate.add(teamVesting);\\n } else {\\n newTokenVested.vestingEnd = vestingStartingDate.add(investorVesting);\\n }\\n newTokenVested.lastClaim = vestingStartingDate;\\n\\n tokenVested[receiver] = newTokenVested;\\n // TODO CHECK IF ALLOWANCE AS OF TODAY IS THE FINAL MODEL\\n // IN CASE OF A DIRECT MINT TO TIME LOCK REGISTRY ADDRESS THE TOKEN TRANSFER MIGHT BE UPDATED\\n // transfer tokens from owner who might have enough allowance of tokens by BABL Token owner\\n SafeERC20.safeTransferFrom(token, msg.sender, address(this), distribution);\\n\\n // emit register event\\n emit Register(receiver, distribution);\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel distribution registration in case of mistake and before a claim is done\\n *\\n * @notice Cancel distribution registration\\n * @dev A claim has not to be done earlier\\n * @param receiver Address that should have it's distribution removed\\n * @return Whether or not it succeeded\\n */\\n function cancelRegistration(address receiver) external onlyOwner returns (bool) {\\n require(registeredDistributions[receiver] != 0, 'Not registered');\\n\\n // get amount from distributions\\n uint256 amount = registeredDistributions[receiver];\\n\\n // set distribution mapping to 0\\n delete registeredDistributions[receiver];\\n\\n // set tokenVested mapping to 0\\n delete tokenVested[receiver];\\n\\n // TODO CHECK THE PROCESS ADDRESS(THIS) VS. OWNER\\n // transfer tokens back to owner\\n SafeERC20.safeTransfer(token, msg.sender, amount);\\n\\n // emit cancel event\\n emit Cancel(receiver, amount);\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel distribution registration in case of mistake and before a claim is done\\n *\\n * @notice Cancel already delivered tokens. It might only apply when non-completion of vesting period of Team members or Advisors\\n * @dev An automatic override allowance is granted during the claim process\\n * @param account Address that should have it's distribution removed\\n * @return Whether or not it succeeded\\n */\\n function cancelDeliveredTokens(address account) external onlyOwner returns (bool) {\\n uint256 loosingAmount = token.cancelVestedTokens(account);\\n\\n // emit cancel event\\n emit Cancel(account, loosingAmount);\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Recover tokens in Time Lock Registry smartcontract address by the owner\\n *\\n * @notice Send tokens from smartcontract address to the owner.\\n * It might only apply after a cancellation of vested tokens\\n * @param amount Amount to be recovered by the owner of the Time Lock Registry smartcontract from its balance\\n * @return Whether or not it succeeded\\n */\\n function transferToOwner(uint256 amount) external onlyOwner returns (bool) {\\n SafeERC20.safeTransfer(token, msg.sender, amount);\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Claim locked tokens by the registered account\\n *\\n * @notice Claim tokens due amount.\\n * @dev Claim is done by the user in the TimeLocked contract and the contract is the only allowed to call\\n * this function on behalf of the user to make the claim\\n * @return The amount of tokens registered and delivered after the claim\\n */\\n function claim(address _receiver) external onlyBABLToken returns (uint256) {\\n require(registeredDistributions[_receiver] != 0, 'Not registered');\\n\\n // get amount from distributions\\n uint256 amount = registeredDistributions[_receiver];\\n tokenVested[_receiver].lastClaim = block.timestamp;\\n\\n // set distribution mapping to 0\\n delete registeredDistributions[_receiver];\\n\\n // register lockup in TimeLockedToken\\n\\n // this will transfer funds from this contract and lock them for sender\\n token.registerLockup(\\n _receiver,\\n amount,\\n tokenVested[_receiver].team,\\n tokenVested[_receiver].vestingBegin,\\n tokenVested[_receiver].vestingEnd,\\n tokenVested[_receiver].lastClaim\\n );\\n\\n // set tokenVested mapping to 0\\n delete tokenVested[_receiver];\\n\\n // emit claim event\\n emit Claim(_receiver, amount);\\n\\n return amount;\\n }\\n\\n /* ============ Getter Functions ============ */\\n\\n function checkVesting(address address_)\\n external\\n view\\n returns (\\n bool team,\\n uint256 start,\\n uint256 end,\\n uint256 last\\n )\\n {\\n return (\\n tokenVested[address_].team,\\n tokenVested[address_].vestingBegin,\\n tokenVested[address_].vestingEnd,\\n tokenVested[address_].lastClaim\\n );\\n }\\n\\n function checkRegisteredDistribution(address address_) external view returns (uint256 amount) {\\n return registeredDistributions[address_];\\n }\\n}\\n\",\"keccak256\":\"0x97084d9e4d2804b0234c06e6e9e07343477d726ca8af07f2e3d91fba2ccbda76\",\"license\":\"Apache License\"},\"contracts/token/TimeLockedToken.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {TimeLockRegistry} from './TimeLockRegistry.sol';\\nimport {RewardsDistributor} from './RewardsDistributor.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {VoteToken} from './VoteToken.sol';\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {Errors, _require} from '../lib/BabylonErrors.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\n\\n/**\\n * @title TimeLockedToken\\n * @notice Time Locked ERC20 Token\\n * @author Babylon Finance\\n * @dev Contract which gives the ability to time-lock tokens specially for vesting purposes usage\\n *\\n * By overriding the balanceOf() and transfer() functions in ERC20,\\n * an account can show its full, post-distribution balance and use it for voting power\\n * but only transfer or spend up to an allowed amount\\n *\\n * A portion of previously non-spendable tokens are allowed to be transferred\\n * along the time depending on each vesting conditions, and after all epochs have passed, the full\\n * account balance is unlocked. In case on non-completion vesting period, only the Time Lock Registry can cancel\\n * the delivery of the pending tokens and only can cancel the remaining locked ones.\\n */\\n\\nabstract contract TimeLockedToken is VoteToken {\\n using SafeMath for uint256;\\n\\n /* ============ Events ============ */\\n\\n /// @notice An event that emitted when a new lockout ocurr\\n event NewLockout(\\n address account,\\n uint256 tokenslocked,\\n bool isTeamOrAdvisor,\\n uint256 startingVesting,\\n uint256 endingVesting\\n );\\n\\n /// @notice An event that emitted when a new Time Lock is registered\\n event NewTimeLockRegistration(address previousAddress, address newAddress);\\n\\n /// @notice An event that emitted when a new Rewards Distributor is registered\\n event NewRewardsDistributorRegistration(address previousAddress, address newAddress);\\n\\n /// @notice An event that emitted when a cancellation of Lock tokens is registered\\n event Cancel(address account, uint256 amount);\\n\\n /// @notice An event that emitted when a claim of tokens are registered\\n event Claim(address _receiver, uint256 amount);\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlyTimeLockRegistry() {\\n require(\\n msg.sender == address(timeLockRegistry),\\n 'TimeLockedToken:: onlyTimeLockRegistry: can only be executed by TimeLockRegistry'\\n );\\n _;\\n }\\n\\n modifier onlyTimeLockOwner() {\\n if (address(timeLockRegistry) != address(0)) {\\n require(\\n msg.sender == Ownable(timeLockRegistry).owner(),\\n 'TimeLockedToken:: onlyTimeLockOwner: can only be executed by the owner of TimeLockRegistry'\\n );\\n }\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // represents total distribution for locked balances\\n mapping(address => uint256) distribution;\\n\\n /// @notice The profile of each token owner under its particular vesting conditions\\n /**\\n * @param team Indicates whether or not is a Team member or Advisor (true = team member/advisor, false = private investor)\\n * @param vestingBegin When the vesting begins for such token owner\\n * @param vestingEnd When the vesting ends for such token owner\\n * @param lastClaim When the last claim was done\\n */\\n struct VestedToken {\\n bool teamOrAdvisor;\\n uint256 vestingBegin;\\n uint256 vestingEnd;\\n uint256 lastClaim;\\n }\\n\\n /// @notice A record of token owners under vesting conditions for each account, by index\\n mapping(address => VestedToken) public vestedToken;\\n\\n // vesting Cliff for Team Members and Advisors\\n uint256 private vestingCliff = 365 days;\\n\\n // vesting duration for Team Members and Advisors\\n uint256 private teamVesting = 365 days * 4;\\n\\n // vesting duration for Investors\\n uint256 private investorVesting = 365 days * 3;\\n\\n // address of Time Lock Registry contract\\n IBabController public controller;\\n\\n // address of Time Lock Registry contract\\n TimeLockRegistry public timeLockRegistry;\\n\\n // address of Rewards Distriburor contract\\n RewardsDistributor public rewardsDistributor;\\n\\n // Enable Transfer of ERC20 BABL Tokens\\n // Only Minting or transfers from/to TimeLockRegistry and Rewards Distributor can transfer tokens until the protocol is fully decentralized\\n bool private tokenTransfersEnabled;\\n bool private tokenTransfersWereDisabled;\\n\\n /* ============ Functions ============ */\\n\\n /* ============ Constructor ============ */\\n\\n constructor(string memory _name, string memory _symbol) VoteToken(_name, _symbol) {\\n tokenTransfersEnabled = true;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /* =========== Token related Gov Functions ====== */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Disables transfers of ERC20 BABL Tokens\\n */\\n function disableTokensTransfers() external onlyOwner {\\n require(!tokenTransfersWereDisabled, 'BABL must flow');\\n tokenTransfersEnabled = false;\\n tokenTransfersWereDisabled = true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows transfers of ERC20 BABL Tokens\\n * Can only happen after the protocol is fully decentralized.\\n */\\n function enableTokensTransfers() external onlyOwner {\\n tokenTransfersEnabled = true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Set the Time Lock Registry contract to control token vesting conditions\\n *\\n * @notice Set the Time Lock Registry contract to control token vesting conditions\\n * @param newTimeLockRegistry Address of TimeLockRegistry contract\\n */\\n function setTimeLockRegistry(TimeLockRegistry newTimeLockRegistry) external onlyTimeLockOwner returns (bool) {\\n require(address(newTimeLockRegistry) != address(0), 'cannot be zero address');\\n require(address(newTimeLockRegistry) != address(this), 'cannot be this contract');\\n require(address(newTimeLockRegistry) != address(timeLockRegistry), 'must be new TimeLockRegistry');\\n emit NewTimeLockRegistration(address(timeLockRegistry), address(newTimeLockRegistry));\\n\\n timeLockRegistry = newTimeLockRegistry;\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Set the Rewards Distributor contract to control either BABL Mining or profit rewards\\n *\\n * @notice Set the Rewards Distriburor contract to control both types of rewards (profit and BABL Mining program)\\n * @param newRewardsDistributor Address of Rewards Distributor contract\\n */\\n function setRewardsDistributor(RewardsDistributor newRewardsDistributor) external onlyOwner returns (bool) {\\n require(address(newRewardsDistributor) != address(0), 'cannot be zero address');\\n require(address(newRewardsDistributor) != address(this), 'cannot be this contract');\\n require(address(newRewardsDistributor) != address(rewardsDistributor), 'must be new Rewards Distributor');\\n emit NewRewardsDistributorRegistration(address(rewardsDistributor), address(newRewardsDistributor));\\n\\n rewardsDistributor = newRewardsDistributor;\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Register new token lockup conditions for vested tokens defined only by Time Lock Registry\\n *\\n * @notice Tokens are completely delivered during the registration however lockup conditions apply for vested tokens\\n * locking them according to the distribution epoch periods and the type of recipient (Team, Advisor, Investor)\\n * Emits a transfer event showing a transfer to the recipient\\n * Only the registry can call this function\\n * @param _receiver Address to receive the tokens\\n * @param _amount Tokens to be transferred\\n * @param _profile True if is a Team Member or Advisor\\n * @param _vestingBegin Unix Time when the vesting for that particular address\\n * @param _vestingEnd Unix Time when the vesting for that particular address\\n * @param _lastClaim Unix Time when the claim was done from that particular address\\n *\\n */\\n function registerLockup(\\n address _receiver,\\n uint256 _amount,\\n bool _profile,\\n uint256 _vestingBegin,\\n uint256 _vestingEnd,\\n uint256 _lastClaim\\n ) external onlyTimeLockRegistry returns (bool) {\\n require(balanceOf(msg.sender) >= _amount, 'insufficient balance');\\n require(_receiver != address(0), 'cannot be zero address');\\n require(_receiver != address(this), 'cannot be this contract');\\n require(_receiver != address(timeLockRegistry), 'cannot be the TimeLockRegistry contract itself');\\n require(_receiver != msg.sender, 'the owner cannot lockup itself');\\n\\n // update amount of locked distribution\\n distribution[_receiver] = distribution[_receiver].add(_amount);\\n\\n VestedToken storage newVestedToken = vestedToken[_receiver];\\n\\n newVestedToken.teamOrAdvisor = _profile;\\n newVestedToken.vestingBegin = _vestingBegin;\\n newVestedToken.vestingEnd = _vestingEnd;\\n newVestedToken.lastClaim = _lastClaim;\\n\\n // transfer tokens to the recipient\\n _transfer(msg.sender, _receiver, _amount);\\n emit NewLockout(_receiver, _amount, _profile, _vestingBegin, _vestingEnd);\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel and remove locked tokens due to non-completion of vesting period\\n * applied only by Time Lock Registry and specifically to Team or Advisors as it does not apply to investors.\\n *\\n * @dev Cancel distribution registration\\n * @param lockedAccount that should have its still locked distribution removed due to non-completion of its vesting period\\n */\\n function cancelVestedTokens(address lockedAccount) external onlyTimeLockRegistry returns (uint256) {\\n return _cancelVestedTokensFromTimeLock(lockedAccount);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Each token owner can claim its own specific tokens with its own specific vesting conditions from the Time Lock Registry\\n *\\n * @dev Claim msg.sender tokens (if any available in the registry)\\n */\\n function claimMyTokens() external {\\n // claim msg.sender tokens from timeLockRegistry\\n uint256 amount = timeLockRegistry.claim(msg.sender);\\n // After a proper claim, locked tokens of Team and Advisors profiles are under restricted special vesting conditions so they automatic grant\\n // rights to the Time Lock Registry to only retire locked tokens if non-compliance vesting conditions take places along the vesting periods.\\n // It does not apply to Investors under vesting (their locked tokens cannot be removed).\\n if (vestedToken[msg.sender].teamOrAdvisor == true) {\\n approve(address(timeLockRegistry), amount);\\n }\\n // emit claim event\\n emit Claim(msg.sender, amount);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Get unlocked balance for an account\\n *\\n * @notice Get unlocked balance for an account\\n * @param account Account to check\\n * @return Amount that is unlocked and available eg. to transfer\\n */\\n function unlockedBalance(address account) public returns (uint256) {\\n // totalBalance - lockedBalance\\n return balanceOf(account).sub(lockedBalance(account));\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. View the locked balance for an account\\n *\\n * @notice View locked balance for an account\\n * @param account Account to check\\n * @return Amount locked in the time of checking\\n */\\n\\n function viewLockedBalance(address account) public view returns (uint256) {\\n // distribution of locked tokens\\n // get amount from distributions\\n\\n uint256 amount = distribution[account];\\n uint256 lockedAmount = amount;\\n\\n // Team and investors cannot transfer tokens in the first year\\n if (vestedToken[account].vestingBegin.add(365 days) > block.timestamp) {\\n return lockedAmount;\\n }\\n\\n // in case of vesting has passed, all tokens are now available\\n if (block.timestamp >= vestedToken[account].vestingEnd) {\\n lockedAmount = 0;\\n } else {\\n // in case of still under vesting period, locked tokens are recalculated\\n lockedAmount = amount.mul(vestedToken[account].vestingEnd - block.timestamp).div(\\n vestedToken[account].vestingEnd - vestedToken[account].vestingBegin\\n );\\n }\\n return lockedAmount;\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Get locked balance for an account\\n *\\n * @notice Get locked balance for an account\\n * @param account Account to check\\n * @return Amount locked in the time of checking\\n */\\n function lockedBalance(address account) public returns (uint256) {\\n // get amount from distributions locked tokens (if any)\\n\\n uint256 lockedAmount = viewLockedBalance(account);\\n\\n // in case of vesting has passed, all tokens are now available so we set mapping to 0\\n if (block.timestamp >= vestedToken[account].vestingEnd && msg.sender == account && lockedAmount == 0) {\\n delete distribution[account];\\n } else if (msg.sender == account) {\\n vestedToken[msg.sender].lastClaim = block.timestamp;\\n }\\n return lockedAmount;\\n }\\n\\n /**\\n * PUBLIC FUNCTION. Get the address of Time Lock Registry\\n *\\n * @notice Get the address of Time Lock Registry\\n * @return Address of the Time Lock Registry\\n */\\n function getTimeLockRegistry() external view returns (address) {\\n return address(timeLockRegistry);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the Approval of allowances of ERC20 with special conditions for vesting\\n *\\n * @notice Override of \\\"Approve\\\" function to allow the `spender` to transfer up to `amount` from `src`\\n * @dev This will overwrite the approval amount for `spender` except in the case of spender is Time Lock Registry\\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\\n * @param spender The address of the account which may transfer tokens\\n * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\\n * @return Whether or not the approval succeeded\\n */\\n function approve(address spender, uint256 rawAmount) public override nonReentrant returns (bool) {\\n require(spender != address(0), 'TimeLockedToken::approve: spender cannot be zero address');\\n require(spender != msg.sender, 'TimeLockedToken::approve: spender cannot be the msg.sender');\\n\\n uint96 amount;\\n if (rawAmount == uint256(-1)) {\\n amount = uint96(-1);\\n } else {\\n amount = safe96(rawAmount, 'TimeLockedToken::approve: amount exceeds 96 bits');\\n }\\n\\n // There is no option to decreaseAllowance to timeLockRegistry in case of vested tokens\\n if ((spender == address(timeLockRegistry)) && (amount < allowance(msg.sender, address(timeLockRegistry)))) {\\n amount = safe96(\\n allowance(msg.sender, address(timeLockRegistry)),\\n 'TimeLockedToken::approve: cannot decrease allowance to timelockregistry'\\n );\\n }\\n _approve(msg.sender, spender, amount);\\n emit Approval(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the Increase of allowances of ERC20 with special conditions for vesting\\n *\\n * @notice Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * @dev This is an override with respect to the fulfillment of vesting conditions along the way\\n * However an user can increase allowance many times, it will never be able to transfer locked tokens during vesting period\\n * @return Whether or not the increaseAllowance succeeded\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public override nonReentrant returns (bool) {\\n require(\\n unlockedBalance(msg.sender) >= addedValue,\\n 'TimeLockedToken::increaseAllowance:Not enough unlocked tokens'\\n );\\n require(spender != address(0), 'TimeLockedToken::increaseAllowance:Spender cannot be zero address');\\n require(spender != msg.sender, 'TimeLockedToken::increaseAllowance:Spender cannot be the msg.sender');\\n _approve(msg.sender, spender, allowance(msg.sender, spender).add(addedValue));\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the decrease of allowances of ERC20 with special conditions for vesting\\n *\\n * @notice Atomically decrease the allowance granted to `spender` by the caller.\\n *\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n * This is an override with respect to the fulfillment of vesting conditions along the way\\n * An user cannot decrease the allowance to the Time Lock Registry who is in charge of vesting conditions\\n * @return Whether or not the decreaseAllowance succeeded\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public override nonReentrant returns (bool) {\\n require(spender != address(0), 'TimeLockedToken::decreaseAllowance:Spender cannot be zero address');\\n require(spender != msg.sender, 'TimeLockedToken::decreaseAllowance:Spender cannot be the msg.sender');\\n require(\\n allowance(msg.sender, spender) >= subtractedValue,\\n 'TimeLockedToken::decreaseAllowance:Underflow condition'\\n );\\n\\n // There is no option to decreaseAllowance to timeLockRegistry in case of vested tokens\\n require(\\n address(spender) != address(timeLockRegistry),\\n 'TimeLockedToken::decreaseAllowance:cannot decrease allowance to timeLockRegistry'\\n );\\n\\n _approve(\\n msg.sender,\\n spender,\\n allowance(msg.sender, spender).sub(subtractedValue, 'ERC20: decreased allowance below zero')\\n );\\n return true;\\n }\\n\\n /* ============ Internal Only Function ============ */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the _transfer of ERC20 BABL tokens only allowing the transfer of unlocked tokens\\n *\\n * @dev Transfer function which includes only unlocked tokens\\n * Locked tokens can always be transfered back to the returns address\\n * Transferring to owner allows re-issuance of funds through registry\\n *\\n * @param _from The address to send tokens from\\n * @param _to The address that will receive the tokens\\n * @param _value The amount of tokens to be transferred\\n */\\n function _transfer(\\n address _from,\\n address _to,\\n uint256 _value\\n ) internal override {\\n require(_from != address(0), 'TimeLockedToken:: _transfer: cannot transfer from the zero address');\\n require(_to != address(0), 'TimeLockedToken:: _transfer: cannot transfer to the zero address');\\n require(\\n _to != address(this),\\n 'TimeLockedToken:: _transfer: do not transfer tokens to the token contract itself'\\n );\\n\\n require(balanceOf(_from) >= _value, 'TimeLockedToken:: _transfer: insufficient balance');\\n\\n // check if enough unlocked balance to transfer\\n require(unlockedBalance(_from) >= _value, 'TimeLockedToken:: _transfer: attempting to transfer locked funds');\\n super._transfer(_from, _to, _value);\\n // voting power\\n _moveDelegates(\\n delegates[_from],\\n delegates[_to],\\n safe96(_value, 'TimeLockedToken:: _transfer: uint96 overflow')\\n );\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Disable BABL token transfer until certain conditions are met\\n *\\n * @dev Override the _beforeTokenTransfer of ERC20 BABL tokens until certain conditions are met:\\n * Only allowing minting or transfers from Time Lock Registry and Rewards Distributor until transfers are allowed in the controller\\n * Transferring to owner allows re-issuance of funds through registry\\n *\\n * @param _from The address to send tokens from\\n * @param _to The address that will receive the tokens\\n * @param _value The amount of tokens to be transferred\\n */\\n\\n // Disable garden token transfers. Allow minting and burning.\\n function _beforeTokenTransfer(\\n address _from,\\n address _to,\\n uint256 _value\\n ) internal virtual override {\\n super._beforeTokenTransfer(_from, _to, _value);\\n _require(\\n _from == address(0) ||\\n _from == address(timeLockRegistry) ||\\n _from == address(rewardsDistributor) ||\\n _to == address(timeLockRegistry) ||\\n tokenTransfersEnabled,\\n Errors.BABL_TRANSFERS_DISABLED\\n );\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel and remove locked tokens due to non-completion of vesting period\\n * applied only by Time Lock Registry and specifically to Team or Advisors\\n *\\n * @dev Cancel distribution registration\\n * @param lockedAccount that should have its still locked distribution removed due to non-completion of its vesting period\\n */\\n function _cancelVestedTokensFromTimeLock(address lockedAccount) internal onlyTimeLockRegistry returns (uint256) {\\n require(distribution[lockedAccount] != 0, 'TimeLockedToken::cancelTokens:Not registered');\\n\\n // get an update on locked amount from distributions at this precise moment\\n uint256 loosingAmount = lockedBalance(lockedAccount);\\n\\n require(loosingAmount > 0, 'TimeLockedToken::cancelTokens:There are no more locked tokens');\\n require(\\n vestedToken[lockedAccount].teamOrAdvisor == true,\\n 'TimeLockedToken::cancelTokens:cannot cancel locked tokens to Investors'\\n );\\n\\n // set distribution mapping to 0\\n delete distribution[lockedAccount];\\n\\n // set tokenVested mapping to 0\\n delete vestedToken[lockedAccount];\\n\\n // transfer only locked tokens back to TimeLockRegistry Owner (msg.sender)\\n require(\\n transferFrom(lockedAccount, address(timeLockRegistry), loosingAmount),\\n 'TimeLockedToken::cancelTokens:Transfer failed'\\n );\\n\\n // emit cancel event\\n emit Cancel(lockedAccount, loosingAmount);\\n\\n return loosingAmount;\\n }\\n}\\n\",\"keccak256\":\"0x2a828aee1f8f7ef1a0b5e982ecca7c92ea79c09a8073777f8bd1096ed0e14ea3\",\"license\":\"Apache License\"},\"contracts/token/VoteToken.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\n\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {IVoteToken} from '../interfaces/IVoteToken.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Context} from '@openzeppelin/contracts/utils/Context.sol';\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\n\\n/**\\n * @title VoteToken\\n * @notice Custom token which tracks voting power for governance\\n * @dev This is an abstraction of a fork of the Compound governance contract\\n * VoteToken is used by BABL to allow tracking voting power\\n * Checkpoints are created every time state is changed which record voting power\\n * Inherits standard ERC20 behavior\\n */\\n\\nabstract contract VoteToken is Context, ERC20, Ownable, IVoteToken, ReentrancyGuard {\\n using SafeMath for uint256;\\n using Address for address;\\n\\n /* ============ Events ============ */\\n\\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\\n event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);\\n\\n /* ============ Modifiers ============ */\\n\\n /* ============ State Variables ============ */\\n\\n /// @notice The EIP-712 typehash for the contract's domain\\n bytes32 public constant DOMAIN_TYPEHASH =\\n keccak256('EIP712Domain(string name,uint256 chainId,address verifyingContract)');\\n\\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\\n bytes32 public constant DELEGATION_TYPEHASH =\\n keccak256('Delegation(address delegatee,uint256 nonce,uint256 expiry)');\\n\\n /// @dev A record of votes checkpoints for each account, by index\\n mapping(address => address) public delegates;\\n\\n /// @notice A checkpoint for marking number of votes from a given block\\n struct Checkpoint {\\n uint32 fromBlock;\\n uint96 votes;\\n }\\n\\n /// @notice A record of votes checkpoints for each account, by index\\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\\n\\n /// @notice The number of checkpoints for each account\\n mapping(address => uint32) public numCheckpoints;\\n\\n /// @notice A record of states for signing / validating signatures\\n mapping(address => uint256) public nonces;\\n\\n /* ============ Functions ============ */\\n\\n /* ============ Constructor ============ */\\n\\n constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {}\\n\\n /* ============ External Functions ============ */\\n\\n /* =========== Token related Gov Functions ====== */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Delegating votes from msg.sender to delegatee\\n *\\n * @notice Delegate votes from `msg.sender` to `delegatee`\\n * @param delegatee The address to delegate votes to\\n */\\n\\n function delegate(address delegatee) external override {\\n return _delegate(msg.sender, delegatee);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Delegate votes using signature to 'delegatee'\\n *\\n * @notice Delegates votes from signatory to `delegatee`\\n * @param delegatee The address to delegate votes to\\n * @param nonce The contract state required to match the signature\\n * @param expiry The time at which to expire the signature\\n * @param v The recovery byte of the signature\\n * @param r Half of the ECDSA signature pair\\n * @param s Half of the ECDSA signature pair\\n */\\n\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external override {\\n bytes32 domainSeparator =\\n keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name())), getChainId(), address(this)));\\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\\n bytes32 digest = keccak256(abi.encodePacked('\\\\x19\\\\x01', domainSeparator, structHash));\\n address signatory = ecrecover(digest, v, r, s);\\n require(signatory != address(0), 'VoteToken::delegateBySig: invalid signature');\\n require(nonce == nonces[signatory] + 1, 'VoteToken::delegateBySig: invalid nonce');\\n nonces[signatory]++;\\n require(block.timestamp <= expiry, 'VoteToken::delegateBySig: signature expired');\\n return _delegate(signatory, delegatee);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Check Delegate votes using signature to 'delegatee'\\n *\\n * @notice Get current voting power for an account\\n * @param account Account to get voting power for\\n * @return Voting power for an account\\n */\\n function getCurrentVotes(address account) external view virtual override returns (uint96) {\\n uint32 nCheckpoints = numCheckpoints[account];\\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Get voting power at a specific block for an account\\n *\\n * @param account Account to get voting power for\\n * @param blockNumber Block to get voting power at\\n * @return Voting power for an account at specific block\\n */\\n function getPriorVotes(address account, uint256 blockNumber) external view virtual override returns (uint96) {\\n require(blockNumber < block.number, 'BABLToken::getPriorVotes: not yet determined');\\n\\n uint32 nCheckpoints = numCheckpoints[account];\\n if (nCheckpoints == 0) {\\n return 0;\\n }\\n\\n // First check most recent balance\\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\\n return checkpoints[account][nCheckpoints - 1].votes;\\n }\\n\\n // Next check implicit zero balance\\n if (checkpoints[account][0].fromBlock > blockNumber) {\\n return 0;\\n }\\n\\n uint32 lower = 0;\\n uint32 upper = nCheckpoints - 1;\\n while (upper > lower) {\\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\\n Checkpoint memory cp = checkpoints[account][center];\\n if (cp.fromBlock == blockNumber) {\\n return cp.votes;\\n } else if (cp.fromBlock < blockNumber) {\\n lower = center;\\n } else {\\n upper = center - 1;\\n }\\n }\\n return checkpoints[account][lower].votes;\\n }\\n\\n function getMyDelegatee() external view override returns (address) {\\n return delegates[msg.sender];\\n }\\n\\n function getDelegatee(address account) external view override returns (address) {\\n return delegates[account];\\n }\\n\\n function getCheckpoints(address account, uint32 id)\\n external\\n view\\n override\\n returns (uint32 fromBlock, uint96 votes)\\n {\\n Checkpoint storage getCheckpoint = checkpoints[account][id];\\n return (getCheckpoint.fromBlock, getCheckpoint.votes);\\n }\\n\\n function getNumberOfCheckpoints(address account) external view override returns (uint32) {\\n return numCheckpoints[account];\\n }\\n\\n /* ============ Internal Only Function ============ */\\n\\n /**\\n * GOVERNANCE FUNCTION. Make a delegation\\n *\\n * @dev Internal function to delegate voting power to an account\\n * @param delegator The address of the account delegating votes from\\n * @param delegatee The address to delegate votes to\\n */\\n\\n function _delegate(address delegator, address delegatee) internal {\\n address currentDelegate = delegates[delegator];\\n uint96 delegatorBalance = safe96(_balanceOf(delegator), 'VoteToken::_delegate: uint96 overflow');\\n delegates[delegator] = delegatee;\\n\\n emit DelegateChanged(delegator, currentDelegate, delegatee);\\n\\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\\n }\\n\\n function _balanceOf(address account) internal view virtual returns (uint256) {\\n return balanceOf(account);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Move the delegates\\n *\\n * @dev Internal function to move delegates between accounts\\n * @param srcRep The address of the account delegating votes from\\n * @param dstRep The address of the account delegating votes to\\n * @param amount The voting power to move\\n */\\n function _moveDelegates(\\n address srcRep,\\n address dstRep,\\n uint96 amount\\n ) internal {\\n if (srcRep != dstRep && amount > 0) {\\n // It must not revert but do nothing in cases of address(0) being part of the move\\n // Sub voting amount to source in case it is not the zero address (e.g. transfers)\\n if (srcRep != address(0)) {\\n uint32 srcRepNum = numCheckpoints[srcRep];\\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\\n uint96 srcRepNew = sub96(srcRepOld, amount, 'VoteToken::_moveDelegates: vote amount underflows');\\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\\n }\\n if (dstRep != address(0)) {\\n // Add it to destination in case it is not the zero address (e.g. any transfer of tokens or delegations except a first mint to a specific address)\\n uint32 dstRepNum = numCheckpoints[dstRep];\\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\\n uint96 dstRepNew = add96(dstRepOld, amount, 'VoteToken::_moveDelegates: vote amount overflows');\\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\\n }\\n }\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Internal function to write a checkpoint for voting power\\n *\\n * @dev internal function to write a checkpoint for voting power\\n * @param delegatee The address of the account delegating votes to\\n * @param nCheckpoints The num checkpoint\\n * @param oldVotes The previous voting power\\n * @param newVotes The new voting power\\n */\\n function _writeCheckpoint(\\n address delegatee,\\n uint32 nCheckpoints,\\n uint96 oldVotes,\\n uint96 newVotes\\n ) internal {\\n uint32 blockNumber = safe32(block.number, 'VoteToken::_writeCheckpoint: block number exceeds 32 bits');\\n\\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\\n } else {\\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\\n numCheckpoints[delegatee] = nCheckpoints + 1;\\n }\\n\\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint32\\n *\\n * @dev internal function to convert from uint256 to uint32\\n */\\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\\n require(n < 2**32, errorMessage);\\n return uint32(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint96\\n *\\n * @dev internal function to convert from uint256 to uint96\\n */\\n function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) {\\n require(n < 2**96, errorMessage);\\n return uint96(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to add two uint96 numbers\\n *\\n * @dev internal safe math function to add two uint96 numbers\\n */\\n function add96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n uint96 c = a + b;\\n require(c >= a, errorMessage);\\n return c;\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to subtract two uint96 numbers\\n *\\n * @dev internal safe math function to subtract two uint96 numbers\\n */\\n function sub96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to get chain ID\\n *\\n * @dev internal function to get chain ID\\n */\\n function getChainId() internal pure returns (uint256) {\\n uint256 chainId;\\n assembly {\\n chainId := chainid()\\n }\\n return chainId;\\n }\\n}\\n\",\"keccak256\":\"0x594b8ba6deb5c071f512773cdfcc892166d1f701d4fcd8c8b4b3517fe8125089\",\"license\":\"Apache License\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50614ae6806100206000396000f3fe60806040526004361061053d5760003560e01c806369685513116102af578063b0ecdf8011610179578063d276cbdc116100d6578063f2fde38b1161008a578063f56e895d1161006f578063f56e895d14611555578063f948e50a1461156a578063f979cdd9146115b85761053d565b8063f2fde38b14611464578063f4330b49146114975761053d565b8063e973f4e9116100bb578063e973f4e9146113c3578063f04ec547146113f6578063f142c3bc146114295761053d565b8063d276cbdc14611372578063daec2a1a146113ae5761053d565b8063c74c0fac1161012d578063c8ed947f11610112578063c8ed947f14611333578063c9f7f2ed14611348578063cfd180191461135d5761053d565b8063c74c0fac14611309578063c80aad631461131e5761053d565b8063bc0922831161015e578063bc0922831461123e578063bc819ea614611271578063c2d38e79146112d65761053d565b8063b0ecdf8014610fee578063bbe4f535146110215761053d565b806388e8dc75116102275780639e18eb39116101db578063a65b9947116101c0578063a65b994714610ef3578063ad5c464814610fa6578063ad9d791d14610fbb5761053d565b80639e18eb3914610eb45780639ef3571014610ede5761053d565b80638da5cb5b1161020c5780638da5cb5b14610e575780638e20fb0714610e6c578063974f572814610e815761053d565b806388e8dc7514610e0f5780638d78fb7914610e425761053d565b80637f80e05b1161027e57806385d5d0361161026357806385d5d03614610d94578063867b6efa14610dc757806386f2bc8114610dfa5761053d565b80637f80e05b14610d6a5780638129fc1c14610d7f5761053d565b80636968551314610cf85780636b2fb67814610d2b578063715018a614610d405780637c4f0a3614610d555761053d565b806334514b141161040b57806350d9f37f116103685780635dc2803a1161031c5780636176605e116103015780636176605e14610c1b57806361b73ae614610c3057806361d027b314610ce35761053d565b80635dc2803a14610bbd5780635e192de614610be85761053d565b80635435ed8b1161034d5780635435ed8b14610b60578063556d1a0914610b93578063568c081314610ba85761053d565b806350d9f37f14610b3657806352aeec7714610b4b5761053d565b80633e6dfa36116103bf5780634032b72b116103a45780634032b72b14610abb578063411137c314610aee5780634a44ff4414610b215761053d565b80633e6dfa3614610a915780633f2a554014610aa65761053d565b806336c148b7116103f057806336c148b714610a3d57806337973e5f14610a52578063393bfe4914610a7c5761053d565b806334514b14146109f5578063364d118114610a0a5761053d565b806322c7fa8f116104b95780632e0519cf1161046d57806330944c621161045257806330944c621461091b5780633137547714610930578063314a83c9146109455761053d565b80632e0519cf1461082a5780633040a2fb1461085d5761053d565b80632630c12f1161049e5780632630c12f146107eb578063294d237c146108005780632b9db0bf146108155761053d565b806322c7fa8f14610791578063259072e1146107c45761053d565b806317a25714116105105780631a728b0c116104f55780631a728b0c1461067f5780631bdbf0ac146106a957806320104198146107675761053d565b806317a257141461063757806318b9e2521461064c5761053d565b8063067967291461054257806313bc6d4b1461058857806314ae9f2e146105cf57806314f45ca814610604575b600080fd5b34801561054e57600080fd5b5061056c6004803603602081101561056557600080fd5b50356115eb565b604080516001600160a01b039092168252519081900360200190f35b34801561059457600080fd5b506105bb600480360360208110156105ab57600080fd5b50356001600160a01b0316611609565b604080519115158252519081900360200190f35b3480156105db57600080fd5b50610602600480360360208110156105f257600080fd5b50356001600160a01b0316611828565b005b34801561061057600080fd5b506106026004803603602081101561062757600080fd5b50356001600160a01b0316611918565b34801561064357600080fd5b50610602611b07565b34801561065857600080fd5b506106026004803603602081101561066f57600080fd5b50356001600160a01b0316611b7c565b34801561068b57600080fd5b50610602600480360360208110156106a257600080fd5b5035611dcd565b3480156106b557600080fd5b50610602600480360360408110156106cc57600080fd5b8101906020810181356401000000008111156106e757600080fd5b8201836020820111156106f957600080fd5b8035906020019184600183028401116401000000008311171561071b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b03169150611ebf9050565b34801561077357600080fd5b5061056c6004803603602081101561078a57600080fd5b50356120b7565b34801561079d57600080fd5b50610602600480360360208110156107b457600080fd5b50356001600160a01b03166120d7565b3480156107d057600080fd5b506107d9612257565b60408051918252519081900360200190f35b3480156107f757600080fd5b5061056c61225d565b34801561080c57600080fd5b5061056c61226c565b34801561082157600080fd5b506107d961227b565b34801561083657600080fd5b5061083f612281565b60408051938452602084019290925282820152519081900360600190f35b34801561086957600080fd5b506106026004803603604081101561088057600080fd5b81019060208101813564010000000081111561089b57600080fd5b8201836020820111156108ad57600080fd5b803590602001918460018302840111640100000000831117156108cf57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b0316915061228f9050565b34801561092757600080fd5b506105bb612486565b34801561093c57600080fd5b506107d9612494565b34801561095157600080fd5b506106026004803603602081101561096857600080fd5b81019060208101813564010000000081111561098357600080fd5b82018360208201111561099557600080fd5b803590602001918460208302840111640100000000831117156109b757600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061249a945050505050565b348015610a0157600080fd5b506107d9612558565b348015610a1657600080fd5b506105bb60048036036020811015610a2d57600080fd5b50356001600160a01b031661255e565b348015610a4957600080fd5b50610602612573565b348015610a5e57600080fd5b5061056c60048036036020811015610a7557600080fd5b503561263e565b348015610a8857600080fd5b506105bb612668565b348015610a9d57600080fd5b5061056c612671565b348015610ab257600080fd5b5061056c612689565b348015610ac757600080fd5b5061060260048036036020811015610ade57600080fd5b50356001600160a01b0316612698565b348015610afa57600080fd5b506105bb60048036036020811015610b1157600080fd5b50356001600160a01b031661271e565b348015610b2d57600080fd5b506107d961273c565b348015610b4257600080fd5b506107d9612742565b348015610b5757600080fd5b50610602612748565b348015610b6c57600080fd5b5061060260048036036020811015610b8357600080fd5b50356001600160a01b0316612842565b348015610b9f57600080fd5b506107d9612b5f565b348015610bb457600080fd5b506107d9612b66565b348015610bc957600080fd5b50610bd2612b6c565b6040805160ff9092168252519081900360200190f35b348015610bf457600080fd5b506105bb60048036036020811015610c0b57600080fd5b50356001600160a01b0316612b71565b348015610c2757600080fd5b5061056c612b86565b348015610c3c57600080fd5b5061060260048036036020811015610c5357600080fd5b810190602081018135640100000000811115610c6e57600080fd5b820183602082011115610c8057600080fd5b80359060200191846001830284011164010000000083111715610ca257600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612b95945050505050565b348015610cef57600080fd5b5061056c612d34565b348015610d0457600080fd5b5061060260048036036020811015610d1b57600080fd5b50356001600160a01b0316612d43565b348015610d3757600080fd5b506107d9612e55565b348015610d4c57600080fd5b50610602612e5b565b348015610d6157600080fd5b506107d9612f07565b348015610d7657600080fd5b506105bb612f0d565b348015610d8b57600080fd5b50610602612f1c565b348015610da057600080fd5b5061060260048036036020811015610db757600080fd5b50356001600160a01b0316612fac565b348015610dd357600080fd5b5061060260048036036020811015610dea57600080fd5b50356001600160a01b03166130be565b348015610e0657600080fd5b506107d96131d3565b348015610e1b57600080fd5b5061060260048036036020811015610e3257600080fd5b50356001600160a01b03166131d9565b348015610e4e57600080fd5b506107d9613371565b348015610e6357600080fd5b5061056c613377565b348015610e7857600080fd5b506107d9613386565b348015610e8d57600080fd5b5061060260048036036020811015610ea457600080fd5b50356001600160a01b031661338d565b348015610ec057600080fd5b5061056c60048036036020811015610ed757600080fd5b503561355d565b348015610eea57600080fd5b5061056c61356d565b348015610eff57600080fd5b5061056c60048036036020811015610f1657600080fd5b810190602081018135640100000000811115610f3157600080fd5b820183602082011115610f4357600080fd5b80359060200191846001830284011164010000000083111715610f6557600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061357c945050505050565b348015610fb257600080fd5b5061056c6135ab565b348015610fc757600080fd5b506105bb60048036036020811015610fde57600080fd5b50356001600160a01b03166135c3565b348015610ffa57600080fd5b506105bb6004803603602081101561101157600080fd5b50356001600160a01b03166135d8565b61056c600480360360c081101561103757600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561106257600080fd5b82018360208201111561107457600080fd5b8035906020019184600183028401116401000000008311171561109657600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156110e957600080fd5b8201836020820111156110fb57600080fd5b8035906020019184600183028401116401000000008311171561111d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561117057600080fd5b82018360208201111561118257600080fd5b803590602001918460018302840111640100000000831117156111a457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929584359590949093506040810192506020013590506401000000008111156111ff57600080fd5b82018360208201111561121157600080fd5b8035906020019184602083028401116401000000008311171561123357600080fd5b5090925090506135ed565b34801561124a57600080fd5b506106026004803603602081101561126157600080fd5b50356001600160a01b0316613a4c565b34801561127d57600080fd5b50611286613bc9565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156112c25781810151838201526020016112aa565b505050509050019250505060405180910390f35b3480156112e257600080fd5b50610602600480360360208110156112f957600080fd5b50356001600160a01b0316613c2b565b34801561131557600080fd5b5061056c613da8565b34801561132a57600080fd5b5061056c613dc0565b34801561133f57600080fd5b5061056c613dcf565b34801561135457600080fd5b506107d9613dde565b34801561136957600080fd5b506107d9613de4565b34801561137e57600080fd5b506106026004803603604081101561139557600080fd5b50803560ff1690602001356001600160a01b0316613dea565b3480156113ba57600080fd5b50611286613fe3565b3480156113cf57600080fd5b50610602600480360360208110156113e657600080fd5b50356001600160a01b0316614043565b34801561140257600080fd5b506106026004803603602081101561141957600080fd5b50356001600160a01b0316614155565b34801561143557600080fd5b5061143e6142b1565b604080519485526020850193909352838301919091526060830152519081900360800190f35b34801561147057600080fd5b506106026004803603602081101561148757600080fd5b50356001600160a01b03166142c3565b3480156114a357600080fd5b506105bb600480360360408110156114ba57600080fd5b8101906020810181356401000000008111156114d557600080fd5b8201836020820111156114e757600080fd5b8035906020019184600183028401116401000000008311171561150957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b031691506143c69050565b34801561156157600080fd5b506107d9614401565b34801561157657600080fd5b5061157f614407565b604051808261028080838360005b838110156115a557818101518382015260200161158d565b5050505090500191505060405180910390f35b3480156115c457600080fd5b506105bb600480360360208110156115db57600080fd5b50356001600160a01b0316614447565b6000818152606d60205260409020546001600160a01b03165b919050565b6001600160a01b03811660009081526083602052604081205460ff168061163d57506067546001600160a01b038381169116145b8061165557506068546001600160a01b038381169116145b806116785750816001600160a01b031661166d613377565b6001600160a01b0316145b8061168b57506001600160a01b03821630145b8061169a575061169a82614465565b80611822575060836000836001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156116dd57600080fd5b505afa1580156116f1573d6000803e3d6000fd5b505050506040513d602081101561170757600080fd5b50516001600160a01b0316815260208101919091526040016000205460ff1680156118225750816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b15801561176657600080fd5b505afa15801561177a573d6000803e3d6000fd5b505050506040513d602081101561179057600080fd5b5051604080517f2e8ebaae0000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015291519190921691632e8ebaae916024808301926020929190829003018186803b1580156117f557600080fd5b505afa158015611809573d6000803e3d6000fd5b505050506040513d602081101561181f57600080fd5b50515b92915050565b6118306144b5565b6001600160a01b0316611841613377565b6001600160a01b03161461188a576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526086602052604090205460ff166118f7576040805162461bcd60e51b815260206004820152601560248201527f4b65657065722069732077686974656c69737465640000000000000000000000604482015290519081900360640190fd5b6001600160a01b03166000908152608660205260409020805460ff19169055565b6119206144b5565b6001600160a01b0316611931613377565b6001600160a01b03161461197a576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526083602052604090205460ff166119e7576040805162461bcd60e51b815260206004820152601560248201527f47617264656e20646f6573206e6f742065786973740000000000000000000000604482015290519081900360640190fd5b6000819050806001600160a01b03166302fb0c5e6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a2557600080fd5b505afa158015611a39573d6000803e3d6000fd5b505050506040513d6020811015611a4f57600080fd5b505115611aa3576040805162461bcd60e51b815260206004820181905260248201527f5468652067617264656e206e6565647320746f2062652064697361626c65642e604482015290519081900360640190fd5b6040805163567619c560e11b81526001600482015290516001600160a01b0383169163acec338a91602480830192600092919082900301818387803b158015611aeb57600080fd5b505af1158015611aff573d6000803e3d6000fd5b505050505050565b611b0f6144b5565b6001600160a01b0316611b20613377565b6001600160a01b031614611b69576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6090805462ff0000191662010000179055565b611b846144b5565b6001600160a01b0316611b95613377565b6001600160a01b031614611bde576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526083602052604090205460ff16611c4b576040805162461bcd60e51b815260206004820152601560248201527f47617264656e20646f6573206e6f742065786973740000000000000000000000604482015290519081900360640190fd5b806001600160a01b03166302fb0c5e6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c8457600080fd5b505afa158015611c98573d6000803e3d6000fd5b505050506040513d6020811015611cae57600080fd5b505115611d02576040805162461bcd60e51b815260206004820181905260248201527f5468652067617264656e206e6565647320746f2062652064697361626c65642e604482015290519081900360640190fd5b611d6f816065805480602002602001604051908101604052809291908181526020018280548015611d5c57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611d3e575b50505050506144b990919063ffffffff16565b8051611d839160659160209091019061497c565b506001600160a01b038116600081815260836020526040808220805460ff19169055517fb52dedfe431c6250e847edee5dca0a14cfaad5c6626218f99bd60c8ad9939a9f9190a250565b611dd56144b5565b6001600160a01b0316611de6613377565b6001600160a01b031614611e2f576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b60008111611e84576040805162461bcd60e51b815260206004820152601d60248201527f5f6d696e5269736b79506169724c6971756964697479457468203e2030000000604482015290519081900360640190fd5b608f8190556040805182815290517fd185121c491c4f63a5cf58aae9a74e23ff52192077a480cb9850f51a69d16bbf9181900360200190a150565b611ec76144b5565b6001600160a01b0316611ed8613377565b6001600160a01b031614611f21576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6000611f2c83614536565b6000818152606d60205260409020549091506001600160a01b031615611f99576040805162461bcd60e51b815260206004820152601b60248201527f496e746567726174696f6e2065786973747320616c72656164792e0000000000604482015290519081900360640190fd5b6001600160a01b038216611ff4576040805162461bcd60e51b815260206004820152601f60248201527f496e746567726174696f6e2061646472657373206d7573742065786973742e00604482015290519081900360640190fd5b6000818152606d602090815260409182902080546001600160a01b0319166001600160a01b0386161790559051845185928291908401908083835b6020831061204e5780518252601f19909201916020918201910161202f565b51815160209384036101000a6000190180199092169116179052604080519290940182900382206001600160a01b038916835293519395507ffda47fb8c9da07a420b19d406f4c50352dfa9f6513a950bb282baf8cb9b9050594509083900301919050a2505050565b606f81601481106120c757600080fd5b01546001600160a01b0316905081565b6120df6144b5565b6001600160a01b03166120f0613377565b6001600160a01b031614612139576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b606b546001600160a01b038281169116141561219c576040805162461bcd60e51b815260206004820152601a60248201527f497368746172204761746520616c726561647920657869737473000000000000604482015290519081900360640190fd5b6001600160a01b0381166121f7576040805162461bcd60e51b815260206004820152601d60248201527f4973687461722047617465206f7261636c65206d757374206578697374000000604482015290519081900360640190fd5b606b80546001600160a01b038381166001600160a01b03198316811790935560408051938452911660208301819052815190927f9d8291abf2224012a00e3e6cb815777395423c95684705c6a799205e926f38d492908290030190a15050565b60945481565b6068546001600160a01b031681565b6067546001600160a01b031681565b608d5481565b608854608954608a54909192565b6122976144b5565b6001600160a01b03166122a8613377565b6001600160a01b0316146122f1576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b60006122fc83614536565b6000818152606d60205260409020549091506001600160a01b0316612368576040805162461bcd60e51b815260206004820152601b60248201527f496e746567726174696f6e20646f6573206e6f742065786973742e0000000000604482015290519081900360640190fd5b6001600160a01b0382166123c3576040805162461bcd60e51b815260206004820152601f60248201527f496e746567726174696f6e2061646472657373206d7573742065786973742e00604482015290519081900360640190fd5b6000818152606d602090815260409182902080546001600160a01b0319166001600160a01b0386161790559051845185928291908401908083835b6020831061241d5780518252601f1990920191602091820191016123fe565b51815160209384036101000a6000190180199092169116179052604080519290940182900382206001600160a01b038916835293519395507f10af83bc70c2a73aefcd7156f6f80519861b0d2657dee2b4b8a8123e70f4b99f94509083900301919050a2505050565b609054610100900460ff1681565b60925481565b6124a26144b5565b6001600160a01b03166124b3613377565b6001600160a01b0316146124fc576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b60005b81518110156125545760016086600084848151811061251a57fe5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790556001016124ff565b5050565b608f5481565b60836020526000908152604090205460ff1681565b61257b6144b5565b6001600160a01b031661258c613377565b6001600160a01b0316146125d5576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b65017e14a71000421161262f576040805162461bcd60e51b815260206004820152601f60248201527f5472616e73666572732063616e6e6f7420626520656e61626c65642079657400604482015290519081900360640190fd5b6090805460ff19166001179055565b6066818154811061264e57600080fd5b6000918252602090912001546001600160a01b0316905081565b60905460ff1681565b735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f90565b606a546001600160a01b031681565b6126a06144b5565b6001600160a01b03166126b1613377565b6001600160a01b0316146126fa576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6001600160a01b03166000908152608660205260409020805460ff19166001179055565b6001600160a01b031660009081526086602052604090205460ff1690565b608c5481565b60935481565b6127506144b5565b6001600160a01b0316612761613377565b6001600160a01b0316146127aa576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b609054610100900460ff16612840576090805461ff001916610100179055606a54604080517f79fc904f00000000000000000000000000000000000000000000000000000000815290516001600160a01b03909216916379fc904f9160048082019260009290919082900301818387803b15801561282757600080fd5b505af115801561283b573d6000803e3d6000fd5b505050505b565b61284a6144b5565b6001600160a01b031661285b613377565b6001600160a01b0316146128a4576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6001600160a01b0381166128f7576040805162461bcd60e51b8152602060048201526015602482015274041646472657373206d757374206e6f74206265203605c1b604482015290519081900360640190fd5b606e546001600160a01b038281169116141561295a576040805162461bcd60e51b815260206004820152601960248201527f41646472657373206d75737420626520646966666572656e7400000000000000604482015290519081900360640190fd5b806001600160a01b0316606d6000612a96846001600160a01b03166317d7de7c6040518163ffffffff1660e01b815260040160006040518083038186803b1580156129a457600080fd5b505afa1580156129b8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156129e157600080fd5b8101908080516040519392919084640100000000821115612a0157600080fd5b908301906020820185811115612a1657600080fd5b8251640100000000811182820188101715612a3057600080fd5b82525081516020918201929091019080838360005b83811015612a5d578181015183820152602001612a45565b50505050905090810190601f168015612a8a5780820380516001836020036101000a031916815260200191505b50604052505050614536565b81526020810191909152604001600020546001600160a01b031614612b02576040805162461bcd60e51b815260206004820152601d60248201527f496e746567726174696f6e206e6565647320746f2062652076616c6964000000604482015290519081900360640190fd5b606e80546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917f7c0554a0d606bbd6266e57a40fdb3702f32d1a564d5d06f05ed977ace613dd349181900360200190a25050565b62093a8081565b60915481565b601481565b60866020526000908152604090205460ff1681565b606e546001600160a01b031681565b612b9d6144b5565b6001600160a01b0316612bae613377565b6001600160a01b031614612bf7576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6000612c0282614536565b6000818152606d60205260409020549091506001600160a01b0316612c6e576040805162461bcd60e51b815260206004820152601b60248201527f496e746567726174696f6e20646f6573206e6f742065786973742e0000000000604482015290519081900360640190fd5b6000818152606d602090815260409182902080546001600160a01b03198116909155915184516001600160a01b039093169285928291908401908083835b60208310612ccb5780518252601f199092019160209182019101612cac565b51815160209384036101000a6000190180199092169116179052604080519290940182900382206001600160a01b038816835293519395507ffc3fbb608ec9e619ead57ddfa31f2ab35c888b67f6471b74dce69c035eed445b94509083900301919050a2505050565b6087546001600160a01b031681565b612d4b6144b5565b6001600160a01b0316612d5c613377565b6001600160a01b031614612da5576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6001600160a01b038116612df8576040805162461bcd60e51b8152602060048201526015602482015274041646472657373206d757374206e6f74206265203605c1b604482015290519081900360640190fd5b606c80546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917f57c1ea229271e944c7d975557caf535c1c974708de760613121827217db4ce8f9181900360200190a25050565b61546090565b612e636144b5565b6001600160a01b0316612e74613377565b6001600160a01b031614612ebd576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380546001600160a01b0319169055565b60885481565b60905462010000900460ff1681565b612f24614541565b6611c37937e0800060925566b1a2bc2ec500006091819055600060938190556094556090805462ffffff19169055683635c9adc5dea00000608f5567016345785d8a0000608855608955670b1a2bc2ec500000608a5567011c37937e080000608b5567025bf6196bd10000608c55670a688906bd8b0000608d55670214e8348c4f0000608e55565b612fb46144b5565b6001600160a01b0316612fc5613377565b6001600160a01b03161461300e576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6001600160a01b038116613061576040805162461bcd60e51b8152602060048201526015602482015274041646472657373206d757374206e6f74206265203605c1b604482015290519081900360640190fd5b606a80546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917f52cd8e0a7f86e9df123b3357ab2ee1c4cd0f5ac84ca8c98d93beb2679b2bb8069181900360200190a25050565b6130c66144b5565b6001600160a01b03166130d7613377565b6001600160a01b031614613120576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6001600160a01b038116613173576040805162461bcd60e51b8152602060048201526015602482015274041646472657373206d757374206e6f74206265203605c1b604482015290519081900360640190fd5b608780546001600160a01b038381166001600160a01b03198316811790935560408051938452911660208301819052815190927f8c3aa5f43a388513435861bf27dfad7829cd248696fed367c62d441f6295449692908290030190a15050565b608e5481565b6131e16144b5565b6001600160a01b03166131f2613377565b6001600160a01b03161461323b576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526084602052604090205460ff166132a8576040805162461bcd60e51b815260206004820152601c60248201527f5265736572766520617373657420646f6573206e6f7420657869737400000000604482015290519081900360640190fd5b613313816066805480602002602001604051908101604052809291908181526020018280548015611d5c576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311611d3e5750505050506144b990919063ffffffff16565b80516133279160669160209091019061497c565b506001600160a01b038116600081815260846020526040808220805460ff19169055517f2a4ae73bc76175e864e83c9843f11cf15a1bfcfa73152fb96d133416efee48ed9190a250565b608a5481565b60006133816145f3565b905090565b62093a8090565b6133956144b5565b6001600160a01b03166133a6613377565b6001600160a01b0316146133ef576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526083602052604090205460ff1661345c576040805162461bcd60e51b815260206004820152601560248201527f47617264656e20646f6573206e6f742065786973740000000000000000000000604482015290519081900360640190fd5b6000819050806001600160a01b03166302fb0c5e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561349a57600080fd5b505afa1580156134ae573d6000803e3d6000fd5b505050506040513d60208110156134c457600080fd5b5051613517576040805162461bcd60e51b815260206004820152601e60248201527f5468652067617264656e206e6565647320746f206265206163746976652e0000604482015290519081900360640190fd5b6040805163567619c560e11b815260006004820181905291516001600160a01b0384169263acec338a926024808201939182900301818387803b158015611aeb57600080fd5b6065818154811061264e57600080fd5b606c546001600160a01b031681565b6000606d600061358b84614536565b81526020810191909152604001600020546001600160a01b031692915050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b60856020526000908152604090205460ff1681565b60846020526000908152604090205460ff1681565b606e546000906001600160a01b031661364d576040805162461bcd60e51b815260206004820181905260248201527f4e65656420612064656661756c7420747261646520696e746567726174696f6e604482015290519081900360640190fd5b606b54604080517f7804a5dc00000000000000000000000000000000000000000000000000000000815233600482015290516001600160a01b0390921691637804a5dc91602480820192602092909190829003018186803b1580156136b157600080fd5b505afa1580156136c5573d6000803e3d6000fd5b505050506040513d60208110156136db57600080fd5b50516137185760405162461bcd60e51b8152600401808060200182810382526027815260200180614a8a6027913960400191505060405180910390fd5b6000606960009054906101000a90046001600160a01b03166001600160a01b031663ec3f059a348b30338d8d8d8d8d8d6040518b63ffffffff1660e01b8152600401808a6001600160a01b03168152602001896001600160a01b03168152602001886001600160a01b031681526020018060200180602001806020018781526020018060200185810385528b818151815260200191508051906020019080838360005b838110156137d35781810151838201526020016137bb565b50505050905090810190601f1680156138005780820380516001836020036101000a031916815260200191505b5085810384528a5181528a516020918201918c019080838360005b8381101561383357818101518382015260200161381b565b50505050905090810190601f1680156138605780820380516001836020036101000a031916815260200191505b5085810383528951815289516020918201918b019080838360005b8381101561389357818101518382015260200161387b565b50505050905090810190601f1680156138c05780820380516001836020036101000a031916815260200191505b508581038252878782818152602001925060200280828437600081840152601f19601f8201169050808301925050509d50505050505050505050505050506020604051808303818588803b15801561391757600080fd5b505af115801561392b573d6000803e3d6000fd5b50505050506040513d602081101561394257600080fd5b50516001600160a01b03811660009081526083602052604090205490915060ff16156139b5576040805162461bcd60e51b815260206004820152601560248201527f47617264656e20616c7265616479206578697374730000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116600081815260836020526040808220805460ff1916600190811790915560658054918201815583527f8ff97419363ffd7000167f130ef7168fbea05faf9251824ca5043f113cc6a7c70180546001600160a01b03191684179055513392917f3f9c315348eaae54d760380967a68b458af53312321328f584799f93283dc1de91a398975050505050505050565b613a546144b5565b6001600160a01b0316613a65613377565b6001600160a01b031614613aae576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6067546001600160a01b0382811691161415613b11576040805162461bcd60e51b815260206004820152601c60248201527f47617264656e2056616c75657220616c72656164792065786973747300000000604482015290519081900360640190fd5b6001600160a01b038116613b6c576040805162461bcd60e51b815260206004820152601860248201527f47617264656e2056616c756572206d7573742065786973740000000000000000604482015290519081900360640190fd5b606780546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917fb89b871cab0fe1b2d8c7cc3e16640ef9a9bf67f031e44947331820e025bf69479181900360200190a25050565b60606066805480602002602001604051908101604052809291908181526020018280548015613c2157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613c03575b5050505050905090565b613c336144b5565b6001600160a01b0316613c44613377565b6001600160a01b031614613c8d576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6068546001600160a01b0382811691161415613cf0576040805162461bcd60e51b815260206004820152601b60248201527f5072696365206f7261636c6520616c7265616479206578697374730000000000604482015290519081900360640190fd5b6001600160a01b038116613d4b576040805162461bcd60e51b815260206004820152601760248201527f5072696365206f7261636c65206d757374206578697374000000000000000000604482015290519081900360640190fd5b606880546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917f40bddd72ea96b80dae14e3d13e8ce2c4ecd2500d88c6c0004d24a00deab28f9c9181900360200190a25050565b735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f81565b6069546001600160a01b031681565b606b546001600160a01b031681565b60895481565b608b5481565b613df26144b5565b6001600160a01b0316613e03613377565b6001600160a01b031614613e4c576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b601460ff831610613ea4576040805162461bcd60e51b815260206004820152601660248201527f4d6178206f7065726174696f6e73207265616368656400000000000000000000604482015290519081900360640190fd5b806001600160a01b0316606f8360ff1660148110613ebe57fe5b01546001600160a01b03161415613f1c576040805162461bcd60e51b815260206004820152601560248201527f4f7065726174696f6e20616c7265616479207365740000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116613f77576040805162461bcd60e51b815260206004820152601d60248201527f4f7065726174696f6e2061646472657373206d7573742065786973742e000000604482015290519081900360640190fd5b80606f8360ff1660148110613f8857fe5b0180546001600160a01b039283166001600160a01b03199091161790556040805191831682525160ff8416917f2dc23b4bb2132388a8a9f2d4a7ec650d42dcd4c1c63e6495756fa25e8ecc6abd919081900360200190a25050565b60606065805480602002602001604051908101604052809291908181526020018280548015613c21576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311613c03575050505050905090565b61404b6144b5565b6001600160a01b031661405c613377565b6001600160a01b0316146140a5576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6001600160a01b0381166140f8576040805162461bcd60e51b8152602060048201526015602482015274041646472657373206d757374206e6f74206265203605c1b604482015290519081900360640190fd5b606980546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917f1e3307b8b00f4ec731298a869e9665a2662abd65a0e3fe9dd01fd53c35b0ae939181900360200190a25050565b61415d6144b5565b6001600160a01b031661416e613377565b6001600160a01b0316146141b7576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526084602052604090205460ff1615614225576040805162461bcd60e51b815260206004820152601b60248201527f5265736572766520617373657420616c72656164792061646465640000000000604482015290519081900360640190fd5b6001600160a01b038116600081815260846020526040808220805460ff1916600190811790915560668054918201815583527f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e943540180546001600160a01b03191684179055517f9fef46e320a4767c320315d2f597ee79c1e17c3c3330d026764d6a7dac8fcd5c9190a250565b608b54608c54608d54608e5490919293565b6142cb6144b5565b6001600160a01b03166142dc613377565b6001600160a01b031614614325576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6001600160a01b03811661436a5760405162461bcd60e51b8152600401808060200182810382526026815260200180614a166026913960400191505060405180910390fd5b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b6000816001600160a01b0316606d60006143df86614536565b81526020810191909152604001600020546001600160a01b0316149392505050565b61546081565b61440f6149e1565b60408051610280810191829052606f80546001600160a01b031682529091601490607060208501808311613c03575050505050905090565b6001600160a01b031660009081526084602052604090205460ff1690565b6000805b601460ff821610156144ac57606f8160ff166014811061448557fe5b01546001600160a01b03848116911614156144a4576001915050611604565b600101614469565b50600092915050565b3390565b60606000806144c88585614602565b915091508061451e576040805162461bcd60e51b815260206004820152601560248201527f41646472657373206e6f7420696e2061727261792e0000000000000000000000604482015290519081900360640190fd5b600061452a8684614668565b50935061182292505050565b805160209091012090565b600054610100900460ff168061455a575061455a6147cc565b80614568575060005460ff16155b6145a35760405162461bcd60e51b815260040180806020018281038252602e815260200180614a3c602e913960400191505060405180910390fd5b600054610100900460ff161580156145ce576000805460ff1961ff0019909116610100171660011790555b6145d66147dd565b6145de61487d565b80156145f0576000805461ff00191690555b50565b6033546001600160a01b031690565b81516000908190815b8181101561465557846001600160a01b031686828151811061462957fe5b60200260200101516001600160a01b0316141561464d579250600191506146619050565b60010161460b565b50600019600092509250505b9250929050565b81516060906000908084106146c4576040805162461bcd60e51b815260206004820152601860248201527f496e646578206d757374206265203c2041206c656e6774680000000000000000604482015290519081900360640190fd5b60006001820367ffffffffffffffff811180156146e057600080fd5b5060405190808252806020026020018201604052801561470a578160200160208202803683370190505b50905060005b858110156147585786818151811061472457fe5b602002602001015182828151811061473857fe5b6001600160a01b0390921660209283029190910190910152600101614710565b50600185015b828110156147a95786818151811061477257fe5b602002602001015182600183038151811061478957fe5b6001600160a01b039092166020928302919091019091015260010161475e565b50808686815181106147b757fe5b60200260200101519350935050509250929050565b60006147d730614976565b15905090565b600054610100900460ff16806147f657506147f66147cc565b80614804575060005460ff16155b61483f5760405162461bcd60e51b815260040180806020018281038252602e815260200180614a3c602e913960400191505060405180910390fd5b600054610100900460ff161580156145de576000805460ff1961ff00199091166101001716600117905580156145f0576000805461ff001916905550565b600054610100900460ff168061489657506148966147cc565b806148a4575060005460ff16155b6148df5760405162461bcd60e51b815260040180806020018281038252602e815260200180614a3c602e913960400191505060405180910390fd5b600054610100900460ff1615801561490a576000805460ff1961ff0019909116610100171660011790555b60006149146144b5565b603380546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35080156145f0576000805461ff001916905550565b3b151590565b8280548282559060005260206000209081019282156149d1579160200282015b828111156149d157825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019061499c565b506149dd929150614a00565b5090565b6040518061028001604052806014906020820280368337509192915050565b5b808211156149dd5760008155600101614a0156fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65644f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725573657220646f6573206e6f742068617665206372656174696f6e207065726d697373696f6e73a2646970667358221220bbec11fb7ccdd3f55e0f7582e46f76d7f8b2358f4066418ba062213295d8837964736f6c63430007060033", - "deployedBytecode": "0x60806040526004361061053d5760003560e01c806369685513116102af578063b0ecdf8011610179578063d276cbdc116100d6578063f2fde38b1161008a578063f56e895d1161006f578063f56e895d14611555578063f948e50a1461156a578063f979cdd9146115b85761053d565b8063f2fde38b14611464578063f4330b49146114975761053d565b8063e973f4e9116100bb578063e973f4e9146113c3578063f04ec547146113f6578063f142c3bc146114295761053d565b8063d276cbdc14611372578063daec2a1a146113ae5761053d565b8063c74c0fac1161012d578063c8ed947f11610112578063c8ed947f14611333578063c9f7f2ed14611348578063cfd180191461135d5761053d565b8063c74c0fac14611309578063c80aad631461131e5761053d565b8063bc0922831161015e578063bc0922831461123e578063bc819ea614611271578063c2d38e79146112d65761053d565b8063b0ecdf8014610fee578063bbe4f535146110215761053d565b806388e8dc75116102275780639e18eb39116101db578063a65b9947116101c0578063a65b994714610ef3578063ad5c464814610fa6578063ad9d791d14610fbb5761053d565b80639e18eb3914610eb45780639ef3571014610ede5761053d565b80638da5cb5b1161020c5780638da5cb5b14610e575780638e20fb0714610e6c578063974f572814610e815761053d565b806388e8dc7514610e0f5780638d78fb7914610e425761053d565b80637f80e05b1161027e57806385d5d0361161026357806385d5d03614610d94578063867b6efa14610dc757806386f2bc8114610dfa5761053d565b80637f80e05b14610d6a5780638129fc1c14610d7f5761053d565b80636968551314610cf85780636b2fb67814610d2b578063715018a614610d405780637c4f0a3614610d555761053d565b806334514b141161040b57806350d9f37f116103685780635dc2803a1161031c5780636176605e116103015780636176605e14610c1b57806361b73ae614610c3057806361d027b314610ce35761053d565b80635dc2803a14610bbd5780635e192de614610be85761053d565b80635435ed8b1161034d5780635435ed8b14610b60578063556d1a0914610b93578063568c081314610ba85761053d565b806350d9f37f14610b3657806352aeec7714610b4b5761053d565b80633e6dfa36116103bf5780634032b72b116103a45780634032b72b14610abb578063411137c314610aee5780634a44ff4414610b215761053d565b80633e6dfa3614610a915780633f2a554014610aa65761053d565b806336c148b7116103f057806336c148b714610a3d57806337973e5f14610a52578063393bfe4914610a7c5761053d565b806334514b14146109f5578063364d118114610a0a5761053d565b806322c7fa8f116104b95780632e0519cf1161046d57806330944c621161045257806330944c621461091b5780633137547714610930578063314a83c9146109455761053d565b80632e0519cf1461082a5780633040a2fb1461085d5761053d565b80632630c12f1161049e5780632630c12f146107eb578063294d237c146108005780632b9db0bf146108155761053d565b806322c7fa8f14610791578063259072e1146107c45761053d565b806317a25714116105105780631a728b0c116104f55780631a728b0c1461067f5780631bdbf0ac146106a957806320104198146107675761053d565b806317a257141461063757806318b9e2521461064c5761053d565b8063067967291461054257806313bc6d4b1461058857806314ae9f2e146105cf57806314f45ca814610604575b600080fd5b34801561054e57600080fd5b5061056c6004803603602081101561056557600080fd5b50356115eb565b604080516001600160a01b039092168252519081900360200190f35b34801561059457600080fd5b506105bb600480360360208110156105ab57600080fd5b50356001600160a01b0316611609565b604080519115158252519081900360200190f35b3480156105db57600080fd5b50610602600480360360208110156105f257600080fd5b50356001600160a01b0316611828565b005b34801561061057600080fd5b506106026004803603602081101561062757600080fd5b50356001600160a01b0316611918565b34801561064357600080fd5b50610602611b07565b34801561065857600080fd5b506106026004803603602081101561066f57600080fd5b50356001600160a01b0316611b7c565b34801561068b57600080fd5b50610602600480360360208110156106a257600080fd5b5035611dcd565b3480156106b557600080fd5b50610602600480360360408110156106cc57600080fd5b8101906020810181356401000000008111156106e757600080fd5b8201836020820111156106f957600080fd5b8035906020019184600183028401116401000000008311171561071b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b03169150611ebf9050565b34801561077357600080fd5b5061056c6004803603602081101561078a57600080fd5b50356120b7565b34801561079d57600080fd5b50610602600480360360208110156107b457600080fd5b50356001600160a01b03166120d7565b3480156107d057600080fd5b506107d9612257565b60408051918252519081900360200190f35b3480156107f757600080fd5b5061056c61225d565b34801561080c57600080fd5b5061056c61226c565b34801561082157600080fd5b506107d961227b565b34801561083657600080fd5b5061083f612281565b60408051938452602084019290925282820152519081900360600190f35b34801561086957600080fd5b506106026004803603604081101561088057600080fd5b81019060208101813564010000000081111561089b57600080fd5b8201836020820111156108ad57600080fd5b803590602001918460018302840111640100000000831117156108cf57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b0316915061228f9050565b34801561092757600080fd5b506105bb612486565b34801561093c57600080fd5b506107d9612494565b34801561095157600080fd5b506106026004803603602081101561096857600080fd5b81019060208101813564010000000081111561098357600080fd5b82018360208201111561099557600080fd5b803590602001918460208302840111640100000000831117156109b757600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061249a945050505050565b348015610a0157600080fd5b506107d9612558565b348015610a1657600080fd5b506105bb60048036036020811015610a2d57600080fd5b50356001600160a01b031661255e565b348015610a4957600080fd5b50610602612573565b348015610a5e57600080fd5b5061056c60048036036020811015610a7557600080fd5b503561263e565b348015610a8857600080fd5b506105bb612668565b348015610a9d57600080fd5b5061056c612671565b348015610ab257600080fd5b5061056c612689565b348015610ac757600080fd5b5061060260048036036020811015610ade57600080fd5b50356001600160a01b0316612698565b348015610afa57600080fd5b506105bb60048036036020811015610b1157600080fd5b50356001600160a01b031661271e565b348015610b2d57600080fd5b506107d961273c565b348015610b4257600080fd5b506107d9612742565b348015610b5757600080fd5b50610602612748565b348015610b6c57600080fd5b5061060260048036036020811015610b8357600080fd5b50356001600160a01b0316612842565b348015610b9f57600080fd5b506107d9612b5f565b348015610bb457600080fd5b506107d9612b66565b348015610bc957600080fd5b50610bd2612b6c565b6040805160ff9092168252519081900360200190f35b348015610bf457600080fd5b506105bb60048036036020811015610c0b57600080fd5b50356001600160a01b0316612b71565b348015610c2757600080fd5b5061056c612b86565b348015610c3c57600080fd5b5061060260048036036020811015610c5357600080fd5b810190602081018135640100000000811115610c6e57600080fd5b820183602082011115610c8057600080fd5b80359060200191846001830284011164010000000083111715610ca257600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612b95945050505050565b348015610cef57600080fd5b5061056c612d34565b348015610d0457600080fd5b5061060260048036036020811015610d1b57600080fd5b50356001600160a01b0316612d43565b348015610d3757600080fd5b506107d9612e55565b348015610d4c57600080fd5b50610602612e5b565b348015610d6157600080fd5b506107d9612f07565b348015610d7657600080fd5b506105bb612f0d565b348015610d8b57600080fd5b50610602612f1c565b348015610da057600080fd5b5061060260048036036020811015610db757600080fd5b50356001600160a01b0316612fac565b348015610dd357600080fd5b5061060260048036036020811015610dea57600080fd5b50356001600160a01b03166130be565b348015610e0657600080fd5b506107d96131d3565b348015610e1b57600080fd5b5061060260048036036020811015610e3257600080fd5b50356001600160a01b03166131d9565b348015610e4e57600080fd5b506107d9613371565b348015610e6357600080fd5b5061056c613377565b348015610e7857600080fd5b506107d9613386565b348015610e8d57600080fd5b5061060260048036036020811015610ea457600080fd5b50356001600160a01b031661338d565b348015610ec057600080fd5b5061056c60048036036020811015610ed757600080fd5b503561355d565b348015610eea57600080fd5b5061056c61356d565b348015610eff57600080fd5b5061056c60048036036020811015610f1657600080fd5b810190602081018135640100000000811115610f3157600080fd5b820183602082011115610f4357600080fd5b80359060200191846001830284011164010000000083111715610f6557600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061357c945050505050565b348015610fb257600080fd5b5061056c6135ab565b348015610fc757600080fd5b506105bb60048036036020811015610fde57600080fd5b50356001600160a01b03166135c3565b348015610ffa57600080fd5b506105bb6004803603602081101561101157600080fd5b50356001600160a01b03166135d8565b61056c600480360360c081101561103757600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561106257600080fd5b82018360208201111561107457600080fd5b8035906020019184600183028401116401000000008311171561109657600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156110e957600080fd5b8201836020820111156110fb57600080fd5b8035906020019184600183028401116401000000008311171561111d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561117057600080fd5b82018360208201111561118257600080fd5b803590602001918460018302840111640100000000831117156111a457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929584359590949093506040810192506020013590506401000000008111156111ff57600080fd5b82018360208201111561121157600080fd5b8035906020019184602083028401116401000000008311171561123357600080fd5b5090925090506135ed565b34801561124a57600080fd5b506106026004803603602081101561126157600080fd5b50356001600160a01b0316613a4c565b34801561127d57600080fd5b50611286613bc9565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156112c25781810151838201526020016112aa565b505050509050019250505060405180910390f35b3480156112e257600080fd5b50610602600480360360208110156112f957600080fd5b50356001600160a01b0316613c2b565b34801561131557600080fd5b5061056c613da8565b34801561132a57600080fd5b5061056c613dc0565b34801561133f57600080fd5b5061056c613dcf565b34801561135457600080fd5b506107d9613dde565b34801561136957600080fd5b506107d9613de4565b34801561137e57600080fd5b506106026004803603604081101561139557600080fd5b50803560ff1690602001356001600160a01b0316613dea565b3480156113ba57600080fd5b50611286613fe3565b3480156113cf57600080fd5b50610602600480360360208110156113e657600080fd5b50356001600160a01b0316614043565b34801561140257600080fd5b506106026004803603602081101561141957600080fd5b50356001600160a01b0316614155565b34801561143557600080fd5b5061143e6142b1565b604080519485526020850193909352838301919091526060830152519081900360800190f35b34801561147057600080fd5b506106026004803603602081101561148757600080fd5b50356001600160a01b03166142c3565b3480156114a357600080fd5b506105bb600480360360408110156114ba57600080fd5b8101906020810181356401000000008111156114d557600080fd5b8201836020820111156114e757600080fd5b8035906020019184600183028401116401000000008311171561150957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b031691506143c69050565b34801561156157600080fd5b506107d9614401565b34801561157657600080fd5b5061157f614407565b604051808261028080838360005b838110156115a557818101518382015260200161158d565b5050505090500191505060405180910390f35b3480156115c457600080fd5b506105bb600480360360208110156115db57600080fd5b50356001600160a01b0316614447565b6000818152606d60205260409020546001600160a01b03165b919050565b6001600160a01b03811660009081526083602052604081205460ff168061163d57506067546001600160a01b038381169116145b8061165557506068546001600160a01b038381169116145b806116785750816001600160a01b031661166d613377565b6001600160a01b0316145b8061168b57506001600160a01b03821630145b8061169a575061169a82614465565b80611822575060836000836001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156116dd57600080fd5b505afa1580156116f1573d6000803e3d6000fd5b505050506040513d602081101561170757600080fd5b50516001600160a01b0316815260208101919091526040016000205460ff1680156118225750816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b15801561176657600080fd5b505afa15801561177a573d6000803e3d6000fd5b505050506040513d602081101561179057600080fd5b5051604080517f2e8ebaae0000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015291519190921691632e8ebaae916024808301926020929190829003018186803b1580156117f557600080fd5b505afa158015611809573d6000803e3d6000fd5b505050506040513d602081101561181f57600080fd5b50515b92915050565b6118306144b5565b6001600160a01b0316611841613377565b6001600160a01b03161461188a576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526086602052604090205460ff166118f7576040805162461bcd60e51b815260206004820152601560248201527f4b65657065722069732077686974656c69737465640000000000000000000000604482015290519081900360640190fd5b6001600160a01b03166000908152608660205260409020805460ff19169055565b6119206144b5565b6001600160a01b0316611931613377565b6001600160a01b03161461197a576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526083602052604090205460ff166119e7576040805162461bcd60e51b815260206004820152601560248201527f47617264656e20646f6573206e6f742065786973740000000000000000000000604482015290519081900360640190fd5b6000819050806001600160a01b03166302fb0c5e6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a2557600080fd5b505afa158015611a39573d6000803e3d6000fd5b505050506040513d6020811015611a4f57600080fd5b505115611aa3576040805162461bcd60e51b815260206004820181905260248201527f5468652067617264656e206e6565647320746f2062652064697361626c65642e604482015290519081900360640190fd5b6040805163567619c560e11b81526001600482015290516001600160a01b0383169163acec338a91602480830192600092919082900301818387803b158015611aeb57600080fd5b505af1158015611aff573d6000803e3d6000fd5b505050505050565b611b0f6144b5565b6001600160a01b0316611b20613377565b6001600160a01b031614611b69576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6090805462ff0000191662010000179055565b611b846144b5565b6001600160a01b0316611b95613377565b6001600160a01b031614611bde576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526083602052604090205460ff16611c4b576040805162461bcd60e51b815260206004820152601560248201527f47617264656e20646f6573206e6f742065786973740000000000000000000000604482015290519081900360640190fd5b806001600160a01b03166302fb0c5e6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c8457600080fd5b505afa158015611c98573d6000803e3d6000fd5b505050506040513d6020811015611cae57600080fd5b505115611d02576040805162461bcd60e51b815260206004820181905260248201527f5468652067617264656e206e6565647320746f2062652064697361626c65642e604482015290519081900360640190fd5b611d6f816065805480602002602001604051908101604052809291908181526020018280548015611d5c57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611d3e575b50505050506144b990919063ffffffff16565b8051611d839160659160209091019061497c565b506001600160a01b038116600081815260836020526040808220805460ff19169055517fb52dedfe431c6250e847edee5dca0a14cfaad5c6626218f99bd60c8ad9939a9f9190a250565b611dd56144b5565b6001600160a01b0316611de6613377565b6001600160a01b031614611e2f576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b60008111611e84576040805162461bcd60e51b815260206004820152601d60248201527f5f6d696e5269736b79506169724c6971756964697479457468203e2030000000604482015290519081900360640190fd5b608f8190556040805182815290517fd185121c491c4f63a5cf58aae9a74e23ff52192077a480cb9850f51a69d16bbf9181900360200190a150565b611ec76144b5565b6001600160a01b0316611ed8613377565b6001600160a01b031614611f21576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6000611f2c83614536565b6000818152606d60205260409020549091506001600160a01b031615611f99576040805162461bcd60e51b815260206004820152601b60248201527f496e746567726174696f6e2065786973747320616c72656164792e0000000000604482015290519081900360640190fd5b6001600160a01b038216611ff4576040805162461bcd60e51b815260206004820152601f60248201527f496e746567726174696f6e2061646472657373206d7573742065786973742e00604482015290519081900360640190fd5b6000818152606d602090815260409182902080546001600160a01b0319166001600160a01b0386161790559051845185928291908401908083835b6020831061204e5780518252601f19909201916020918201910161202f565b51815160209384036101000a6000190180199092169116179052604080519290940182900382206001600160a01b038916835293519395507ffda47fb8c9da07a420b19d406f4c50352dfa9f6513a950bb282baf8cb9b9050594509083900301919050a2505050565b606f81601481106120c757600080fd5b01546001600160a01b0316905081565b6120df6144b5565b6001600160a01b03166120f0613377565b6001600160a01b031614612139576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b606b546001600160a01b038281169116141561219c576040805162461bcd60e51b815260206004820152601a60248201527f497368746172204761746520616c726561647920657869737473000000000000604482015290519081900360640190fd5b6001600160a01b0381166121f7576040805162461bcd60e51b815260206004820152601d60248201527f4973687461722047617465206f7261636c65206d757374206578697374000000604482015290519081900360640190fd5b606b80546001600160a01b038381166001600160a01b03198316811790935560408051938452911660208301819052815190927f9d8291abf2224012a00e3e6cb815777395423c95684705c6a799205e926f38d492908290030190a15050565b60945481565b6068546001600160a01b031681565b6067546001600160a01b031681565b608d5481565b608854608954608a54909192565b6122976144b5565b6001600160a01b03166122a8613377565b6001600160a01b0316146122f1576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b60006122fc83614536565b6000818152606d60205260409020549091506001600160a01b0316612368576040805162461bcd60e51b815260206004820152601b60248201527f496e746567726174696f6e20646f6573206e6f742065786973742e0000000000604482015290519081900360640190fd5b6001600160a01b0382166123c3576040805162461bcd60e51b815260206004820152601f60248201527f496e746567726174696f6e2061646472657373206d7573742065786973742e00604482015290519081900360640190fd5b6000818152606d602090815260409182902080546001600160a01b0319166001600160a01b0386161790559051845185928291908401908083835b6020831061241d5780518252601f1990920191602091820191016123fe565b51815160209384036101000a6000190180199092169116179052604080519290940182900382206001600160a01b038916835293519395507f10af83bc70c2a73aefcd7156f6f80519861b0d2657dee2b4b8a8123e70f4b99f94509083900301919050a2505050565b609054610100900460ff1681565b60925481565b6124a26144b5565b6001600160a01b03166124b3613377565b6001600160a01b0316146124fc576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b60005b81518110156125545760016086600084848151811061251a57fe5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790556001016124ff565b5050565b608f5481565b60836020526000908152604090205460ff1681565b61257b6144b5565b6001600160a01b031661258c613377565b6001600160a01b0316146125d5576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b65017e14a71000421161262f576040805162461bcd60e51b815260206004820152601f60248201527f5472616e73666572732063616e6e6f7420626520656e61626c65642079657400604482015290519081900360640190fd5b6090805460ff19166001179055565b6066818154811061264e57600080fd5b6000918252602090912001546001600160a01b0316905081565b60905460ff1681565b735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f90565b606a546001600160a01b031681565b6126a06144b5565b6001600160a01b03166126b1613377565b6001600160a01b0316146126fa576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6001600160a01b03166000908152608660205260409020805460ff19166001179055565b6001600160a01b031660009081526086602052604090205460ff1690565b608c5481565b60935481565b6127506144b5565b6001600160a01b0316612761613377565b6001600160a01b0316146127aa576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b609054610100900460ff16612840576090805461ff001916610100179055606a54604080517f79fc904f00000000000000000000000000000000000000000000000000000000815290516001600160a01b03909216916379fc904f9160048082019260009290919082900301818387803b15801561282757600080fd5b505af115801561283b573d6000803e3d6000fd5b505050505b565b61284a6144b5565b6001600160a01b031661285b613377565b6001600160a01b0316146128a4576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6001600160a01b0381166128f7576040805162461bcd60e51b8152602060048201526015602482015274041646472657373206d757374206e6f74206265203605c1b604482015290519081900360640190fd5b606e546001600160a01b038281169116141561295a576040805162461bcd60e51b815260206004820152601960248201527f41646472657373206d75737420626520646966666572656e7400000000000000604482015290519081900360640190fd5b806001600160a01b0316606d6000612a96846001600160a01b03166317d7de7c6040518163ffffffff1660e01b815260040160006040518083038186803b1580156129a457600080fd5b505afa1580156129b8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156129e157600080fd5b8101908080516040519392919084640100000000821115612a0157600080fd5b908301906020820185811115612a1657600080fd5b8251640100000000811182820188101715612a3057600080fd5b82525081516020918201929091019080838360005b83811015612a5d578181015183820152602001612a45565b50505050905090810190601f168015612a8a5780820380516001836020036101000a031916815260200191505b50604052505050614536565b81526020810191909152604001600020546001600160a01b031614612b02576040805162461bcd60e51b815260206004820152601d60248201527f496e746567726174696f6e206e6565647320746f2062652076616c6964000000604482015290519081900360640190fd5b606e80546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917f7c0554a0d606bbd6266e57a40fdb3702f32d1a564d5d06f05ed977ace613dd349181900360200190a25050565b62093a8081565b60915481565b601481565b60866020526000908152604090205460ff1681565b606e546001600160a01b031681565b612b9d6144b5565b6001600160a01b0316612bae613377565b6001600160a01b031614612bf7576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6000612c0282614536565b6000818152606d60205260409020549091506001600160a01b0316612c6e576040805162461bcd60e51b815260206004820152601b60248201527f496e746567726174696f6e20646f6573206e6f742065786973742e0000000000604482015290519081900360640190fd5b6000818152606d602090815260409182902080546001600160a01b03198116909155915184516001600160a01b039093169285928291908401908083835b60208310612ccb5780518252601f199092019160209182019101612cac565b51815160209384036101000a6000190180199092169116179052604080519290940182900382206001600160a01b038816835293519395507ffc3fbb608ec9e619ead57ddfa31f2ab35c888b67f6471b74dce69c035eed445b94509083900301919050a2505050565b6087546001600160a01b031681565b612d4b6144b5565b6001600160a01b0316612d5c613377565b6001600160a01b031614612da5576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6001600160a01b038116612df8576040805162461bcd60e51b8152602060048201526015602482015274041646472657373206d757374206e6f74206265203605c1b604482015290519081900360640190fd5b606c80546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917f57c1ea229271e944c7d975557caf535c1c974708de760613121827217db4ce8f9181900360200190a25050565b61546090565b612e636144b5565b6001600160a01b0316612e74613377565b6001600160a01b031614612ebd576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380546001600160a01b0319169055565b60885481565b60905462010000900460ff1681565b612f24614541565b6611c37937e0800060925566b1a2bc2ec500006091819055600060938190556094556090805462ffffff19169055683635c9adc5dea00000608f5567016345785d8a0000608855608955670b1a2bc2ec500000608a5567011c37937e080000608b5567025bf6196bd10000608c55670a688906bd8b0000608d55670214e8348c4f0000608e55565b612fb46144b5565b6001600160a01b0316612fc5613377565b6001600160a01b03161461300e576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6001600160a01b038116613061576040805162461bcd60e51b8152602060048201526015602482015274041646472657373206d757374206e6f74206265203605c1b604482015290519081900360640190fd5b606a80546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917f52cd8e0a7f86e9df123b3357ab2ee1c4cd0f5ac84ca8c98d93beb2679b2bb8069181900360200190a25050565b6130c66144b5565b6001600160a01b03166130d7613377565b6001600160a01b031614613120576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6001600160a01b038116613173576040805162461bcd60e51b8152602060048201526015602482015274041646472657373206d757374206e6f74206265203605c1b604482015290519081900360640190fd5b608780546001600160a01b038381166001600160a01b03198316811790935560408051938452911660208301819052815190927f8c3aa5f43a388513435861bf27dfad7829cd248696fed367c62d441f6295449692908290030190a15050565b608e5481565b6131e16144b5565b6001600160a01b03166131f2613377565b6001600160a01b03161461323b576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526084602052604090205460ff166132a8576040805162461bcd60e51b815260206004820152601c60248201527f5265736572766520617373657420646f6573206e6f7420657869737400000000604482015290519081900360640190fd5b613313816066805480602002602001604051908101604052809291908181526020018280548015611d5c576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311611d3e5750505050506144b990919063ffffffff16565b80516133279160669160209091019061497c565b506001600160a01b038116600081815260846020526040808220805460ff19169055517f2a4ae73bc76175e864e83c9843f11cf15a1bfcfa73152fb96d133416efee48ed9190a250565b608a5481565b60006133816145f3565b905090565b62093a8090565b6133956144b5565b6001600160a01b03166133a6613377565b6001600160a01b0316146133ef576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526083602052604090205460ff1661345c576040805162461bcd60e51b815260206004820152601560248201527f47617264656e20646f6573206e6f742065786973740000000000000000000000604482015290519081900360640190fd5b6000819050806001600160a01b03166302fb0c5e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561349a57600080fd5b505afa1580156134ae573d6000803e3d6000fd5b505050506040513d60208110156134c457600080fd5b5051613517576040805162461bcd60e51b815260206004820152601e60248201527f5468652067617264656e206e6565647320746f206265206163746976652e0000604482015290519081900360640190fd5b6040805163567619c560e11b815260006004820181905291516001600160a01b0384169263acec338a926024808201939182900301818387803b158015611aeb57600080fd5b6065818154811061264e57600080fd5b606c546001600160a01b031681565b6000606d600061358b84614536565b81526020810191909152604001600020546001600160a01b031692915050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b60856020526000908152604090205460ff1681565b60846020526000908152604090205460ff1681565b606e546000906001600160a01b031661364d576040805162461bcd60e51b815260206004820181905260248201527f4e65656420612064656661756c7420747261646520696e746567726174696f6e604482015290519081900360640190fd5b606b54604080517f7804a5dc00000000000000000000000000000000000000000000000000000000815233600482015290516001600160a01b0390921691637804a5dc91602480820192602092909190829003018186803b1580156136b157600080fd5b505afa1580156136c5573d6000803e3d6000fd5b505050506040513d60208110156136db57600080fd5b50516137185760405162461bcd60e51b8152600401808060200182810382526027815260200180614a8a6027913960400191505060405180910390fd5b6000606960009054906101000a90046001600160a01b03166001600160a01b031663ec3f059a348b30338d8d8d8d8d8d6040518b63ffffffff1660e01b8152600401808a6001600160a01b03168152602001896001600160a01b03168152602001886001600160a01b031681526020018060200180602001806020018781526020018060200185810385528b818151815260200191508051906020019080838360005b838110156137d35781810151838201526020016137bb565b50505050905090810190601f1680156138005780820380516001836020036101000a031916815260200191505b5085810384528a5181528a516020918201918c019080838360005b8381101561383357818101518382015260200161381b565b50505050905090810190601f1680156138605780820380516001836020036101000a031916815260200191505b5085810383528951815289516020918201918b019080838360005b8381101561389357818101518382015260200161387b565b50505050905090810190601f1680156138c05780820380516001836020036101000a031916815260200191505b508581038252878782818152602001925060200280828437600081840152601f19601f8201169050808301925050509d50505050505050505050505050506020604051808303818588803b15801561391757600080fd5b505af115801561392b573d6000803e3d6000fd5b50505050506040513d602081101561394257600080fd5b50516001600160a01b03811660009081526083602052604090205490915060ff16156139b5576040805162461bcd60e51b815260206004820152601560248201527f47617264656e20616c7265616479206578697374730000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116600081815260836020526040808220805460ff1916600190811790915560658054918201815583527f8ff97419363ffd7000167f130ef7168fbea05faf9251824ca5043f113cc6a7c70180546001600160a01b03191684179055513392917f3f9c315348eaae54d760380967a68b458af53312321328f584799f93283dc1de91a398975050505050505050565b613a546144b5565b6001600160a01b0316613a65613377565b6001600160a01b031614613aae576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6067546001600160a01b0382811691161415613b11576040805162461bcd60e51b815260206004820152601c60248201527f47617264656e2056616c75657220616c72656164792065786973747300000000604482015290519081900360640190fd5b6001600160a01b038116613b6c576040805162461bcd60e51b815260206004820152601860248201527f47617264656e2056616c756572206d7573742065786973740000000000000000604482015290519081900360640190fd5b606780546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917fb89b871cab0fe1b2d8c7cc3e16640ef9a9bf67f031e44947331820e025bf69479181900360200190a25050565b60606066805480602002602001604051908101604052809291908181526020018280548015613c2157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613c03575b5050505050905090565b613c336144b5565b6001600160a01b0316613c44613377565b6001600160a01b031614613c8d576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6068546001600160a01b0382811691161415613cf0576040805162461bcd60e51b815260206004820152601b60248201527f5072696365206f7261636c6520616c7265616479206578697374730000000000604482015290519081900360640190fd5b6001600160a01b038116613d4b576040805162461bcd60e51b815260206004820152601760248201527f5072696365206f7261636c65206d757374206578697374000000000000000000604482015290519081900360640190fd5b606880546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917f40bddd72ea96b80dae14e3d13e8ce2c4ecd2500d88c6c0004d24a00deab28f9c9181900360200190a25050565b735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f81565b6069546001600160a01b031681565b606b546001600160a01b031681565b60895481565b608b5481565b613df26144b5565b6001600160a01b0316613e03613377565b6001600160a01b031614613e4c576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b601460ff831610613ea4576040805162461bcd60e51b815260206004820152601660248201527f4d6178206f7065726174696f6e73207265616368656400000000000000000000604482015290519081900360640190fd5b806001600160a01b0316606f8360ff1660148110613ebe57fe5b01546001600160a01b03161415613f1c576040805162461bcd60e51b815260206004820152601560248201527f4f7065726174696f6e20616c7265616479207365740000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116613f77576040805162461bcd60e51b815260206004820152601d60248201527f4f7065726174696f6e2061646472657373206d7573742065786973742e000000604482015290519081900360640190fd5b80606f8360ff1660148110613f8857fe5b0180546001600160a01b039283166001600160a01b03199091161790556040805191831682525160ff8416917f2dc23b4bb2132388a8a9f2d4a7ec650d42dcd4c1c63e6495756fa25e8ecc6abd919081900360200190a25050565b60606065805480602002602001604051908101604052809291908181526020018280548015613c21576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311613c03575050505050905090565b61404b6144b5565b6001600160a01b031661405c613377565b6001600160a01b0316146140a5576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6001600160a01b0381166140f8576040805162461bcd60e51b8152602060048201526015602482015274041646472657373206d757374206e6f74206265203605c1b604482015290519081900360640190fd5b606980546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917f1e3307b8b00f4ec731298a869e9665a2662abd65a0e3fe9dd01fd53c35b0ae939181900360200190a25050565b61415d6144b5565b6001600160a01b031661416e613377565b6001600160a01b0316146141b7576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526084602052604090205460ff1615614225576040805162461bcd60e51b815260206004820152601b60248201527f5265736572766520617373657420616c72656164792061646465640000000000604482015290519081900360640190fd5b6001600160a01b038116600081815260846020526040808220805460ff1916600190811790915560668054918201815583527f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e943540180546001600160a01b03191684179055517f9fef46e320a4767c320315d2f597ee79c1e17c3c3330d026764d6a7dac8fcd5c9190a250565b608b54608c54608d54608e5490919293565b6142cb6144b5565b6001600160a01b03166142dc613377565b6001600160a01b031614614325576040805162461bcd60e51b81526020600482018190526024820152600080516020614a6a833981519152604482015290519081900360640190fd5b6001600160a01b03811661436a5760405162461bcd60e51b8152600401808060200182810382526026815260200180614a166026913960400191505060405180910390fd5b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b6000816001600160a01b0316606d60006143df86614536565b81526020810191909152604001600020546001600160a01b0316149392505050565b61546081565b61440f6149e1565b60408051610280810191829052606f80546001600160a01b031682529091601490607060208501808311613c03575050505050905090565b6001600160a01b031660009081526084602052604090205460ff1690565b6000805b601460ff821610156144ac57606f8160ff166014811061448557fe5b01546001600160a01b03848116911614156144a4576001915050611604565b600101614469565b50600092915050565b3390565b60606000806144c88585614602565b915091508061451e576040805162461bcd60e51b815260206004820152601560248201527f41646472657373206e6f7420696e2061727261792e0000000000000000000000604482015290519081900360640190fd5b600061452a8684614668565b50935061182292505050565b805160209091012090565b600054610100900460ff168061455a575061455a6147cc565b80614568575060005460ff16155b6145a35760405162461bcd60e51b815260040180806020018281038252602e815260200180614a3c602e913960400191505060405180910390fd5b600054610100900460ff161580156145ce576000805460ff1961ff0019909116610100171660011790555b6145d66147dd565b6145de61487d565b80156145f0576000805461ff00191690555b50565b6033546001600160a01b031690565b81516000908190815b8181101561465557846001600160a01b031686828151811061462957fe5b60200260200101516001600160a01b0316141561464d579250600191506146619050565b60010161460b565b50600019600092509250505b9250929050565b81516060906000908084106146c4576040805162461bcd60e51b815260206004820152601860248201527f496e646578206d757374206265203c2041206c656e6774680000000000000000604482015290519081900360640190fd5b60006001820367ffffffffffffffff811180156146e057600080fd5b5060405190808252806020026020018201604052801561470a578160200160208202803683370190505b50905060005b858110156147585786818151811061472457fe5b602002602001015182828151811061473857fe5b6001600160a01b0390921660209283029190910190910152600101614710565b50600185015b828110156147a95786818151811061477257fe5b602002602001015182600183038151811061478957fe5b6001600160a01b039092166020928302919091019091015260010161475e565b50808686815181106147b757fe5b60200260200101519350935050509250929050565b60006147d730614976565b15905090565b600054610100900460ff16806147f657506147f66147cc565b80614804575060005460ff16155b61483f5760405162461bcd60e51b815260040180806020018281038252602e815260200180614a3c602e913960400191505060405180910390fd5b600054610100900460ff161580156145de576000805460ff1961ff00199091166101001716600117905580156145f0576000805461ff001916905550565b600054610100900460ff168061489657506148966147cc565b806148a4575060005460ff16155b6148df5760405162461bcd60e51b815260040180806020018281038252602e815260200180614a3c602e913960400191505060405180910390fd5b600054610100900460ff1615801561490a576000805460ff1961ff0019909116610100171660011790555b60006149146144b5565b603380546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35080156145f0576000805461ff001916905550565b3b151590565b8280548282559060005260206000209081019282156149d1579160200282015b828111156149d157825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019061499c565b506149dd929150614a00565b5090565b6040518061028001604052806014906020820280368337509192915050565b5b808211156149dd5760008155600101614a0156fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65644f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725573657220646f6573206e6f742068617665206372656174696f6e207065726d697373696f6e73a2646970667358221220bbec11fb7ccdd3f55e0f7582e46f76d7f8b2358f4066418ba062213295d8837964736f6c63430007060033", + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"_integrationName\",\"type\":\"string\"}],\"name\":\"ControllerIntegrationAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_newIntegration\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"_integrationName\",\"type\":\"string\"}],\"name\":\"ControllerIntegrationEdited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"_integrationName\",\"type\":\"string\"}],\"name\":\"ControllerIntegrationRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint8\",\"name\":\"_kind\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"ControllerOperationSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newTradeIntegration\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_oldTradeIntegration\",\"type\":\"address\"}],\"name\":\"DefaultTradeIntegrationChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_factory\",\"type\":\"address\"}],\"name\":\"GardenAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_gardenFactory\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_oldGardenFactory\",\"type\":\"address\"}],\"name\":\"GardenFactoryChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newGardenNFT\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_oldStrategyNFT\",\"type\":\"address\"}],\"name\":\"GardenNFTChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"}],\"name\":\"GardenRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_gardenValuer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_oldGardenValuer\",\"type\":\"address\"}],\"name\":\"GardenValuerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_newIshtarGate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_oldIshtarGate\",\"type\":\"address\"}],\"name\":\"IshtarGateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_resesrveAsset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newMinLiquidityReserve\",\"type\":\"uint256\"}],\"name\":\"LiquidityMinimumEdited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_priceOracle\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_oldPriceOracle\",\"type\":\"address\"}],\"name\":\"PriceOracleChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_reserveAsset\",\"type\":\"address\"}],\"name\":\"ReserveAssetAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_reserveAsset\",\"type\":\"address\"}],\"name\":\"ReserveAssetRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_rewardsDistributor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_oldRewardsDistributor\",\"type\":\"address\"}],\"name\":\"RewardsDistributorChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_strategyFactory\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_oldStrategyFactory\",\"type\":\"address\"}],\"name\":\"StrategyFactoryEdited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newStrategyNFT\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_oldStrategyNFT\",\"type\":\"address\"}],\"name\":\"StrategyNFTChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_newTreasury\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_oldTreasury\",\"type\":\"address\"}],\"name\":\"TreasuryChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_newUniswapFactory\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_oldUniswapFactory\",\"type\":\"address\"}],\"name\":\"UniswapFactoryChanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MAX_COOLDOWN_PERIOD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_OPERATIONS\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_COOLDOWN_PERIOD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"}],\"name\":\"addIntegration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_keeper\",\"type\":\"address\"}],\"name\":\"addKeeper\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_keepers\",\"type\":\"address[]\"}],\"name\":\"addKeepers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_reserveAsset\",\"type\":\"address\"}],\"name\":\"addReserveAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"allowPublicGardens\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"assetWhitelist\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bablMiningProgramEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_reserveAsset\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_tokenURI\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_seed\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_gardenParams\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_initialContribution\",\"type\":\"uint256\"}],\"name\":\"createGarden\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"defaultTradeIntegration\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"}],\"name\":\"disableGarden\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newGardenFactory\",\"type\":\"address\"}],\"name\":\"editGardenFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newGardenNFT\",\"type\":\"address\"}],\"name\":\"editGardenNFT\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_gardenValuer\",\"type\":\"address\"}],\"name\":\"editGardenValuer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"}],\"name\":\"editIntegration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ishtarGate\",\"type\":\"address\"}],\"name\":\"editIshtarGate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_newMinLiquidityReserve\",\"type\":\"uint256\"}],\"name\":\"editLiquidityReserve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_priceOracle\",\"type\":\"address\"}],\"name\":\"editPriceOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newRewardsDistributor\",\"type\":\"address\"}],\"name\":\"editRewardsDistributor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newStrategyFactory\",\"type\":\"address\"}],\"name\":\"editStrategyFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newStrategyNFT\",\"type\":\"address\"}],\"name\":\"editStrategyNFT\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newTreasury\",\"type\":\"address\"}],\"name\":\"editTreasury\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newUniswapFactory\",\"type\":\"address\"}],\"name\":\"editUniswapFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"enableBABLMiningProgram\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"}],\"name\":\"enableGarden\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"enableGardenTokensTransfers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"enabledOperations\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gardenCreationIsOpen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gardenCreatorBonus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gardenFactory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gardenNFT\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gardenTokensTransfersEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gardenValuer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"gardens\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBABLSharing\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGardens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"getIntegrationByName\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_nameHashP\",\"type\":\"bytes32\"}],\"name\":\"getIntegrationWithHash\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMaxCooldownPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinCooldownPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOperations\",\"outputs\":[{\"internalType\":\"address[20]\",\"name\":\"\",\"type\":\"address[20]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getProfitSharing\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getReserveAssets\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_contractAddress\",\"type\":\"address\"}],\"name\":\"isSystemContract\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"}],\"name\":\"isValidIntegration\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_keeper\",\"type\":\"address\"}],\"name\":\"isValidKeeper\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_reserveAsset\",\"type\":\"address\"}],\"name\":\"isValidReserveAsset\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ishtarGate\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"keeperList\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lpsBABLPercentage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lpsProfitPercentage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxContributorsPerGarden\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"minLiquidityPerReserve\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"openPublicGardenCreation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"priceOracle\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"protocolDepositGardenTokenFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"protocolManagementFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"protocolPerformanceFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"protocolWithdrawalGardenTokenFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"}],\"name\":\"removeGarden\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"}],\"name\":\"removeIntegration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_keeper\",\"type\":\"address\"}],\"name\":\"removeKeeper\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_reserveAsset\",\"type\":\"address\"}],\"name\":\"removeReserveAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"reserveAssets\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardsDistributor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"setAllowPublicGardens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newDefaultTradeIntegation\",\"type\":\"address\"}],\"name\":\"setDefaultTradeIntegration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newMax\",\"type\":\"uint256\"}],\"name\":\"setMaxContributorsPerGarden\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"_kind\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"_operation\",\"type\":\"address\"}],\"name\":\"setOperation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stewardsBABLPercentage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stewardsProfitPercentage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"strategistBABLPercentage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"strategistProfitPercentage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"strategyFactory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"strategyNFT\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"uniswapFactory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"validReserveAsset\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Protocol BabController is a smart contract used to deploy new gardens contracts and house the integrations and resources of the system.\",\"kind\":\"dev\",\"methods\":{\"addIntegration(string,address)\":{\"params\":{\"_integration\":\"Address of the integration contract to add\",\"_name\":\"Human readable string identifying the integration\"}},\"addKeeper(address)\":{\"params\":{\"_keeper\":\"Address of the keeper\"}},\"addKeepers(address[])\":{\"params\":{\"_keepers\":\"List with keeprs of the assets to whitelist\"}},\"addReserveAsset(address)\":{\"params\":{\"_reserveAsset\":\"Address of the reserve assset\"}},\"createGarden(address,string,string,string,uint256,uint256[],uint256)\":{\"params\":{\"_gardenParams\":\"Array of numeric garden params\",\"_initialContribution\":\"Initial contribution by the gardener\",\"_name\":\"Name of the Garden\",\"_reserveAsset\":\"Reserve asset of the Garden. Initially just weth\",\"_seed\":\"Seed to regenerate the garden NFT\",\"_symbol\":\"Symbol of the Garden\",\"_tokenURI\":\"Garden NFT token URI\"}},\"disableGarden(address)\":{\"params\":{\"_garden\":\"Address of the garden\"}},\"editGardenFactory(address)\":{\"params\":{\"_newGardenFactory\":\"Address of the new garden factory\"}},\"editGardenNFT(address)\":{\"params\":{\"_newGardenNFT\":\"Address of the new garden NFT\"}},\"editGardenValuer(address)\":{\"params\":{\"_gardenValuer\":\"Address of the new garden valuer\"}},\"editIntegration(string,address)\":{\"params\":{\"_integration\":\"Address of the integration contract to edit\",\"_name\":\"Human readable string identifying the integration\"}},\"editIshtarGate(address)\":{\"params\":{\"_ishtarGate\":\"Address of the new Ishtar Gate\"}},\"editLiquidityReserve(address,uint256)\":{\"params\":{\"_newMinLiquidityReserve\":\"Absolute min liquidity of an asset to grab price\",\"_reserve\":\"Address of the reserve to edit\"}},\"editPriceOracle(address)\":{\"params\":{\"_priceOracle\":\"Address of the new price oracle\"}},\"editRewardsDistributor(address)\":{\"params\":{\"_newRewardsDistributor\":\"Address of the new rewards distributor\"}},\"editStrategyFactory(address)\":{\"params\":{\"_newStrategyFactory\":\"Address of the new strategy factory\"}},\"editStrategyNFT(address)\":{\"params\":{\"_newStrategyNFT\":\"Address of the new strategy NFT\"}},\"editTreasury(address)\":{\"params\":{\"_newTreasury\":\"Address of the new protocol fee recipient\"}},\"editUniswapFactory(address)\":{\"params\":{\"_newUniswapFactory\":\"Address of the new uniswap factory\"}},\"enableGarden(address)\":{\"params\":{\"_garden\":\"Address of the garden\"}},\"getBABLSharing()\":{\"returns\":{\"_0\":\"Strategist, Stewards, Lps, creator bonus\"}},\"getIntegrationByName(string)\":{\"params\":{\"_name\":\"Human readable integration name\"},\"returns\":{\"_0\":\"Address of integration\"}},\"getIntegrationWithHash(bytes32)\":{\"params\":{\"_nameHashP\":\"Hash of human readable integration name\"},\"returns\":{\"_0\":\"Address of integration\"}},\"getProfitSharing()\":{\"returns\":{\"_0\":\"Strategist, Stewards, Lps, creator bonus\"}},\"isSystemContract(address)\":{\"params\":{\"_contractAddress\":\"The contract address to check\"}},\"isValidIntegration(string,address)\":{\"params\":{\"_name\":\"Human readable string identifying the integration\"},\"returns\":{\"_0\":\"Boolean indicating if valid\"}},\"removeGarden(address)\":{\"params\":{\"_garden\":\"Address of the Garden contract to remove\"}},\"removeIntegration(string)\":{\"params\":{\"_name\":\"Human readable string identifying the integration\"}},\"removeKeeper(address)\":{\"params\":{\"_keeper\":\"Address of the keeper\"}},\"removeReserveAsset(address)\":{\"params\":{\"_reserveAsset\":\"Address of the reserve asset to remove\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setDefaultTradeIntegration(address)\":{\"params\":{\"_newDefaultTradeIntegation\":\"Address of the new default trade integration\"}},\"setOperation(uint8,address)\":{\"params\":{\"_kind\":\"Operation kind\",\"_operation\":\"Address of the operation contract to set\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"title\":\"BabController\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addIntegration(string,address)\":{\"notice\":\"GOVERNANCE FUNCTION: Add a new integration to the registry\"},\"addKeeper(address)\":{\"notice\":\"PRIVILEGED FACTORY FUNCTION. Adds a new valid keeper to the list\"},\"addKeepers(address[])\":{\"notice\":\"PRIVILEGED FACTORY FUNCTION. Adds a list of assets to the whitelist\"},\"addReserveAsset(address)\":{\"notice\":\"PRIVILEGED FACTORY FUNCTION. Adds a new valid reserve asset for gardens\"},\"createGarden(address,string,string,string,uint256,uint256[],uint256)\":{\"notice\":\"Creates a Garden smart contract and registers the Garden with the controller. If asset is not WETH, the creator needs to approve the controller\"},\"disableGarden(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to disable a garden\"},\"editGardenFactory(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol garden factory\"},\"editGardenNFT(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol garden NFT\"},\"editGardenValuer(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to change the garden valuer\"},\"editIntegration(string,address)\":{\"notice\":\"GOVERNANCE FUNCTION: Edit an existing integration on the registry\"},\"editIshtarGate(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to change the Ishtar Gate Address\"},\"editLiquidityReserve(address,uint256)\":{\"notice\":\"GOVERNANCE FUNCTION: Edits the minimum liquidity an asset must have on Uniswap\"},\"editPriceOracle(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to change the price oracle\"},\"editRewardsDistributor(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the rewards distributor\"},\"editStrategyFactory(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol strategy factory\"},\"editStrategyNFT(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol strategy NFT\"},\"editTreasury(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol fee recipient\"},\"editUniswapFactory(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol uniswaps factory\"},\"enableBABLMiningProgram()\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Enable and starts the BABL Mining program by the Rewards Distributor Can only happen after public launch of the protocol.\"},\"enableGarden(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to enable a garden\"},\"enableGardenTokensTransfers()\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows transfers of ERC20 gardenTokens Can only happen after 2021 is finished.\"},\"getBABLSharing()\":{\"notice\":\"Returns the percentages of BABL Profit Sharing\"},\"getIntegrationByName(string)\":{\"notice\":\"Get the integration address associated with passed human readable name\"},\"getIntegrationWithHash(bytes32)\":{\"notice\":\"Get integration integration address associated with passed hashed name\"},\"getProfitSharing()\":{\"notice\":\"Returns the percentages of a strategy Profit Sharing\"},\"initialize()\":{\"notice\":\"Initializes the initial fee recipient on deployment.\"},\"isSystemContract(address)\":{\"notice\":\"Check if a contract address is a garden or one of the system contracts\"},\"isValidIntegration(string,address)\":{\"notice\":\"Check if integration name is valid\"},\"openPublicGardenCreation()\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to enable public creation of gardens\"},\"removeGarden(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a Garden\"},\"removeIntegration(string)\":{\"notice\":\"GOVERNANCE FUNCTION: Remove an existing integration on the registry\"},\"removeKeeper(address)\":{\"notice\":\"PRIVILEGED FACTORY FUNCTION. Removes a keeper\"},\"removeReserveAsset(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a reserve asset\"},\"setAllowPublicGardens()\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows public gardens\"},\"setDefaultTradeIntegration(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol default trde integration\"},\"setMaxContributorsPerGarden(uint256)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Change the max number of contributors for new Gardens since the change\"},\"setOperation(uint8,address)\":{\"notice\":\"GOVERNANCE FUNCTION: Edit an existing operation on the registry\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/BabController.sol\":\"BabController\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal initializer {\\n __Context_init_unchained();\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal initializer {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xb419e68addcb82ecda3ad3974b0d2db76435ce9b08435a04d5b119a0c5d45ea5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity >=0.4.24 <0.8.0;\\n\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || _isConstructor() || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /// @dev Returns true if and only if the function is running in the constructor\\n function _isConstructor() private view returns (bool) {\\n return !AddressUpgradeable.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xd8e4eb08dcc1d1860fb347ba5ffd595242b9a1b66d49a47f2b4cb51c3f35017e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 { size := extcodesize(account) }\\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, \\\"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, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfc5ea91fa9ceb1961023b2a6c978b902888c52b90847ac7813fe3b79524165f6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xbbf8a21b9a66c48d45ff771b8563c6df19ba451d63dfb8380a865c1e1f29d1a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () internal {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.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 using SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n // solhint-disable-next-line max-line-length\\n require((value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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 * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 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. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\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 { size := extcodesize(account) }\\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, \\\"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, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"contracts/BabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {OwnableUpgradeable} from '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';\\nimport {AddressUpgradeable} from '@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\nimport {RewardsDistributor} from './token/RewardsDistributor.sol';\\nimport {IGarden} from './interfaces/IGarden.sol';\\nimport {IGardenFactory} from './interfaces/IGardenFactory.sol';\\nimport {IStrategy} from './interfaces/IStrategy.sol';\\nimport {IIshtarGate} from './interfaces/IIshtarGate.sol';\\nimport {IIntegration} from './interfaces/IIntegration.sol';\\nimport {IBabController} from './interfaces/IBabController.sol';\\n\\nimport {AddressArrayUtils} from './lib/AddressArrayUtils.sol';\\n\\n/**\\n * @title BabController\\n * @author Babylon Finance Protocol\\n *\\n * BabController is a smart contract used to deploy new gardens contracts and house the\\n * integrations and resources of the system.\\n */\\ncontract BabController is OwnableUpgradeable, IBabController {\\n using AddressArrayUtils for address[];\\n using AddressUpgradeable for address;\\n using SafeMath for uint256;\\n\\n /* ============ Events ============ */\\n event GardenAdded(address indexed _garden, address indexed _factory);\\n event GardenRemoved(address indexed _garden);\\n\\n event ControllerIntegrationAdded(address _integration, string indexed _integrationName);\\n event ControllerIntegrationRemoved(address _integration, string indexed _integrationName);\\n event ControllerIntegrationEdited(address _newIntegration, string indexed _integrationName);\\n event ControllerOperationSet(uint8 indexed _kind, address _address);\\n event DefaultTradeIntegrationChanged(address indexed _newTradeIntegration, address _oldTradeIntegration);\\n\\n event ReserveAssetAdded(address indexed _reserveAsset);\\n event ReserveAssetRemoved(address indexed _reserveAsset);\\n event LiquidityMinimumEdited(address indexed _resesrveAsset, uint256 _newMinLiquidityReserve);\\n\\n event PriceOracleChanged(address indexed _priceOracle, address _oldPriceOracle);\\n event RewardsDistributorChanged(address indexed _rewardsDistributor, address _oldRewardsDistributor);\\n event TreasuryChanged(address _newTreasury, address _oldTreasury);\\n event IshtarGateChanged(address _newIshtarGate, address _oldIshtarGate);\\n event GardenValuerChanged(address indexed _gardenValuer, address _oldGardenValuer);\\n event GardenFactoryChanged(address indexed _gardenFactory, address _oldGardenFactory);\\n event UniswapFactoryChanged(address indexed _newUniswapFactory, address _oldUniswapFactory);\\n event GardenNFTChanged(address indexed _newGardenNFT, address _oldStrategyNFT);\\n event StrategyNFTChanged(address indexed _newStrategyNFT, address _oldStrategyNFT);\\n\\n event StrategyFactoryEdited(address indexed _strategyFactory, address _oldStrategyFactory);\\n\\n /* ============ Modifiers ============ */\\n\\n /* ============ State Variables ============ */\\n\\n address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\\n uint8 public constant MAX_OPERATIONS = 20;\\n\\n // List of enabled Communities\\n address[] public gardens;\\n address[] public reserveAssets;\\n address public override uniswapFactory;\\n address public override gardenValuer;\\n address public override priceOracle;\\n address public override gardenFactory;\\n address public override rewardsDistributor;\\n address public override ishtarGate;\\n address public override strategyFactory;\\n address public override gardenNFT;\\n address public override strategyNFT;\\n\\n // Mapping of integration name => integration address\\n mapping(bytes32 => address) private enabledIntegrations;\\n // Address of the default trade integration used by the protocol\\n address public override defaultTradeIntegration;\\n // Mapping of valid operations\\n address[MAX_OPERATIONS] public override enabledOperations;\\n\\n // Mappings to check whether address is valid Garden or Reserve Asset\\n mapping(address => bool) public override isGarden;\\n mapping(address => bool) public validReserveAsset;\\n\\n // Mapping to check whitelisted assets\\n mapping(address => bool) public assetWhitelist;\\n\\n // Mapping to check keepers\\n mapping(address => bool) public keeperList;\\n\\n // Mapping of minimum liquidity per reserve asset\\n mapping(address => uint256) public override minLiquidityPerReserve;\\n\\n // Recipient of protocol fees\\n address public override treasury;\\n\\n // Strategy cooldown period\\n uint256 public constant MIN_COOLDOWN_PERIOD = 6 hours;\\n uint256 public constant MAX_COOLDOWN_PERIOD = 7 days;\\n\\n // Strategy Profit Sharing\\n uint256 public strategistProfitPercentage; // (0.01% = 1e14, 1% = 1e16)\\n uint256 public stewardsProfitPercentage; // (0.01% = 1e14, 1% = 1e16)\\n uint256 public lpsProfitPercentage; //\\n\\n // Strategy BABL Rewards Sharing\\n uint256 public strategistBABLPercentage; // (0.01% = 1e14, 1% = 1e16)\\n uint256 public stewardsBABLPercentage; // (0.01% = 1e14, 1% = 1e16)\\n uint256 public lpsBABLPercentage; //\\n\\n uint256 public gardenCreatorBonus;\\n\\n // Assets\\n\\n // Enable Transfer of ERC20 gardenTokens\\n // Only members can transfer tokens until the protocol is fully decentralized\\n bool public override gardenTokensTransfersEnabled;\\n\\n // Enable and starts the BABL Mining program within Rewards Distributor contract\\n bool public override bablMiningProgramEnabled;\\n // Enable public gardens\\n bool public override allowPublicGardens;\\n\\n uint256 public override protocolPerformanceFee; // 5% (0.01% = 1e14, 1% = 1e16) on profits\\n uint256 public override protocolManagementFee; // 0.5% (0.01% = 1e14, 1% = 1e16)\\n uint256 public override protocolDepositGardenTokenFee; // 0 (0.01% = 1e14, 1% = 1e16)\\n uint256 public override protocolWithdrawalGardenTokenFee; // 0 (0.01% = 1e14, 1% = 1e16)\\n\\n // Maximum number of contributors per garden\\n uint256 public override maxContributorsPerGarden;\\n\\n // Enable garden creations to be fully open to the public (no need of Ishtar gate anymore)\\n bool public override gardenCreationIsOpen;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Initializes the initial fee recipient on deployment.\\n */\\n function initialize() public {\\n OwnableUpgradeable.__Ownable_init();\\n\\n // vars init values has to be set in initialize due to how upgrade proxy pattern works\\n protocolManagementFee = 5e15; // 0.5% (0.01% = 1e14, 1% = 1e16)\\n protocolPerformanceFee = 5e16; // 5% (0.01% = 1e14, 1% = 1e16) on profits\\n protocolDepositGardenTokenFee = 0; // 0% (0.01% = 1e14, 1% = 1e16) on profits\\n protocolWithdrawalGardenTokenFee = 0; // 0% (0.01% = 1e14, 1% = 1e16) on profits\\n gardenTokensTransfersEnabled = false;\\n bablMiningProgramEnabled = false;\\n allowPublicGardens = false;\\n\\n uniswapFactory = 0x1F98431c8aD98523631AE4a59f267346ea31F984;\\n\\n strategistProfitPercentage = 10e16;\\n stewardsProfitPercentage = 5e16;\\n lpsProfitPercentage = 80e16;\\n\\n strategistBABLPercentage = 8e16;\\n stewardsBABLPercentage = 17e16;\\n lpsBABLPercentage = 75e16;\\n\\n gardenCreatorBonus = 15e16;\\n maxContributorsPerGarden = 100;\\n gardenCreationIsOpen = false;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n // =========== Garden related Gov Functions ======\\n /**\\n * Creates a Garden smart contract and registers the Garden with the controller.\\n *\\n * If asset is not WETH, the creator needs to approve the controller\\n * @param _reserveAsset Reserve asset of the Garden. Initially just weth\\n * @param _name Name of the Garden\\n * @param _symbol Symbol of the Garden\\n * @param _gardenParams Array of numeric garden params\\n * @param _tokenURI Garden NFT token URI\\n * @param _seed Seed to regenerate the garden NFT\\n * @param _initialContribution Initial contribution by the gardener\\n */\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable override returns (address) {\\n require(defaultTradeIntegration != address(0), 'Need a default trade integration');\\n require(enabledOperations.length > 0, 'Need operations enabled');\\n require(\\n IIshtarGate(ishtarGate).canCreate(msg.sender) || gardenCreationIsOpen,\\n 'User does not have creation permissions'\\n );\\n address newGarden =\\n IGardenFactory(gardenFactory).createGarden(\\n _reserveAsset,\\n msg.sender,\\n _name,\\n _symbol,\\n _tokenURI,\\n _seed,\\n _gardenParams,\\n _initialContribution\\n );\\n if (_reserveAsset != WETH || msg.value == 0) {\\n IERC20(_reserveAsset).transferFrom(msg.sender, address(this), _initialContribution);\\n IERC20(_reserveAsset).approve(newGarden, _initialContribution);\\n }\\n require(!isGarden[newGarden], 'Garden already exists');\\n isGarden[newGarden] = true;\\n gardens.push(newGarden);\\n IGarden(newGarden).deposit{value: msg.value}(_initialContribution, _initialContribution, msg.sender);\\n emit GardenAdded(newGarden, msg.sender);\\n return newGarden;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a Garden\\n *\\n * @param _garden Address of the Garden contract to remove\\n */\\n function removeGarden(address _garden) external override onlyOwner {\\n require(isGarden[_garden], 'Garden does not exist');\\n require(!IGarden(_garden).active(), 'The garden needs to be disabled.');\\n gardens = gardens.remove(_garden);\\n\\n delete isGarden[_garden];\\n\\n emit GardenRemoved(_garden);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to disable a garden\\n *\\n * @param _garden Address of the garden\\n */\\n function disableGarden(address _garden) external override onlyOwner {\\n require(isGarden[_garden], 'Garden does not exist');\\n IGarden garden = IGarden(_garden);\\n require(garden.active(), 'The garden needs to be active.');\\n garden.setActive(false);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to enable a garden\\n *\\n * @param _garden Address of the garden\\n */\\n function enableGarden(address _garden) external onlyOwner {\\n require(isGarden[_garden], 'Garden does not exist');\\n IGarden garden = IGarden(_garden);\\n require(!garden.active(), 'The garden needs to be disabled.');\\n garden.setActive(true);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to enable public creation of gardens\\n *\\n */\\n function openPublicGardenCreation() external override onlyOwner {\\n require(!gardenCreationIsOpen, 'Garden creation is already open to the public');\\n gardenCreationIsOpen = true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows transfers of ERC20 gardenTokens\\n * Can only happen after 2021 is finished.\\n */\\n function enableGardenTokensTransfers() external override onlyOwner {\\n require(block.timestamp > 1641024000000, 'Transfers cannot be enabled yet');\\n gardenTokensTransfersEnabled = true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows public gardens\\n */\\n function setAllowPublicGardens() external override onlyOwner {\\n allowPublicGardens = true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Change the max number of contributors for new Gardens since the change\\n */\\n function setMaxContributorsPerGarden(uint256 _newMax) external override onlyOwner {\\n require(_newMax >= 1, 'Contributors cannot be less than 1 per garden');\\n maxContributorsPerGarden = _newMax;\\n }\\n\\n // =========== Protocol related Gov Functions ======\\n\\n /** PRIVILEGED GOVERNANCE FUNCTION. Enable and starts the BABL Mining program by the Rewards Distributor\\n * Can only happen after public launch of the protocol.\\n */\\n function enableBABLMiningProgram() external override onlyOwner {\\n if (bablMiningProgramEnabled == false) {\\n // Can only be activated once\\n bablMiningProgramEnabled = true;\\n RewardsDistributor(rewardsDistributor).startBABLRewards(); // Sets the timestamp\\n }\\n }\\n\\n /**\\n * PRIVILEGED FACTORY FUNCTION. Adds a new valid keeper to the list\\n *\\n * @param _keeper Address of the keeper\\n */\\n function addKeeper(address _keeper) external override onlyOwner {\\n keeperList[_keeper] = true;\\n }\\n\\n /**\\n * PRIVILEGED FACTORY FUNCTION. Removes a keeper\\n *\\n * @param _keeper Address of the keeper\\n */\\n function removeKeeper(address _keeper) external override onlyOwner {\\n require(keeperList[_keeper], 'Keeper is whitelisted');\\n delete keeperList[_keeper];\\n }\\n\\n /**\\n * PRIVILEGED FACTORY FUNCTION. Adds a list of assets to the whitelist\\n *\\n * @param _keepers List with keeprs of the assets to whitelist\\n */\\n function addKeepers(address[] memory _keepers) external override onlyOwner {\\n for (uint256 i = 0; i < _keepers.length; i++) {\\n keeperList[_keepers[i]] = true;\\n }\\n }\\n\\n /**\\n * PRIVILEGED FACTORY FUNCTION. Adds a new valid reserve asset for gardens\\n *\\n * @param _reserveAsset Address of the reserve assset\\n */\\n function addReserveAsset(address _reserveAsset) external override onlyOwner {\\n require(!validReserveAsset[_reserveAsset], 'Reserve asset already added');\\n // TODO: check decimals reserve asset\\n validReserveAsset[_reserveAsset] = true;\\n reserveAssets.push(_reserveAsset);\\n emit ReserveAssetAdded(_reserveAsset);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a reserve asset\\n *\\n * @param _reserveAsset Address of the reserve asset to remove\\n */\\n function removeReserveAsset(address _reserveAsset) external override onlyOwner {\\n require(validReserveAsset[_reserveAsset], 'Reserve asset does not exist');\\n\\n reserveAssets = reserveAssets.remove(_reserveAsset);\\n\\n delete validReserveAsset[_reserveAsset];\\n\\n emit ReserveAssetRemoved(_reserveAsset);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to change the price oracle\\n *\\n * @param _priceOracle Address of the new price oracle\\n */\\n function editPriceOracle(address _priceOracle) external override onlyOwner {\\n require(_priceOracle != priceOracle, 'Price oracle already exists');\\n\\n require(_priceOracle != address(0), 'Price oracle must exist');\\n\\n address oldPriceOracle = priceOracle;\\n priceOracle = _priceOracle;\\n\\n emit PriceOracleChanged(_priceOracle, oldPriceOracle);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to change the Ishtar Gate Address\\n *\\n * @param _ishtarGate Address of the new Ishtar Gate\\n */\\n function editIshtarGate(address _ishtarGate) external override onlyOwner {\\n require(_ishtarGate != ishtarGate, 'Ishtar Gate already exists');\\n\\n require(_ishtarGate != address(0), 'Ishtar Gate oracle must exist');\\n\\n address oldIshtarGate = ishtarGate;\\n ishtarGate = _ishtarGate;\\n\\n emit IshtarGateChanged(_ishtarGate, oldIshtarGate);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to change the garden valuer\\n *\\n * @param _gardenValuer Address of the new garden valuer\\n */\\n function editGardenValuer(address _gardenValuer) external override onlyOwner {\\n require(_gardenValuer != gardenValuer, 'Garden Valuer already exists');\\n\\n require(_gardenValuer != address(0), 'Garden Valuer must exist');\\n\\n address oldGardenValuer = gardenValuer;\\n gardenValuer = _gardenValuer;\\n\\n emit GardenValuerChanged(_gardenValuer, oldGardenValuer);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol fee recipient\\n *\\n * @param _newTreasury Address of the new protocol fee recipient\\n */\\n function editTreasury(address _newTreasury) external override onlyOwner {\\n require(_newTreasury != address(0), 'Address must not be 0');\\n\\n address oldTreasury = treasury;\\n treasury = _newTreasury;\\n\\n emit TreasuryChanged(_newTreasury, oldTreasury);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the rewards distributor\\n *\\n * @param _newRewardsDistributor Address of the new rewards distributor\\n */\\n function editRewardsDistributor(address _newRewardsDistributor) external override onlyOwner {\\n require(_newRewardsDistributor != address(0), 'Address must not be 0');\\n\\n address oldRewardsDistributor = rewardsDistributor;\\n rewardsDistributor = _newRewardsDistributor;\\n\\n emit RewardsDistributorChanged(_newRewardsDistributor, oldRewardsDistributor);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol garden factory\\n *\\n * @param _newGardenFactory Address of the new garden factory\\n */\\n function editGardenFactory(address _newGardenFactory) external override onlyOwner {\\n require(_newGardenFactory != address(0), 'Address must not be 0');\\n\\n address oldGardenFactory = gardenFactory;\\n gardenFactory = _newGardenFactory;\\n\\n emit GardenFactoryChanged(_newGardenFactory, oldGardenFactory);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol garden NFT\\n *\\n * @param _newGardenNFT Address of the new garden NFT\\n */\\n function editGardenNFT(address _newGardenNFT) external override onlyOwner {\\n require(_newGardenNFT != address(0), 'Address must not be 0');\\n\\n address oldGardenNFT = gardenNFT;\\n gardenNFT = _newGardenNFT;\\n\\n emit GardenNFTChanged(_newGardenNFT, oldGardenNFT);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol strategy NFT\\n *\\n * @param _newStrategyNFT Address of the new strategy NFT\\n */\\n function editStrategyNFT(address _newStrategyNFT) external override onlyOwner {\\n require(_newStrategyNFT != address(0), 'Address must not be 0');\\n\\n address oldStrategyNFT = strategyNFT;\\n strategyNFT = _newStrategyNFT;\\n\\n emit StrategyNFTChanged(_newStrategyNFT, oldStrategyNFT);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol uniswaps factory\\n *\\n * @param _newUniswapFactory Address of the new uniswap factory\\n */\\n function editUniswapFactory(address _newUniswapFactory) external override onlyOwner {\\n require(_newUniswapFactory != address(0), 'Address must not be 0');\\n\\n address oldUniswapFactory = uniswapFactory;\\n uniswapFactory = _newUniswapFactory;\\n\\n emit UniswapFactoryChanged(_newUniswapFactory, oldUniswapFactory);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol strategy factory\\n *\\n * @param _newStrategyFactory Address of the new strategy factory\\n */\\n function editStrategyFactory(address _newStrategyFactory) external override onlyOwner {\\n require(_newStrategyFactory != address(0), 'Address must not be 0');\\n\\n address oldStrategyFactory = strategyFactory;\\n strategyFactory = _newStrategyFactory;\\n\\n emit StrategyFactoryEdited(_newStrategyFactory, oldStrategyFactory);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol default trde integration\\n *\\n * @param _newDefaultTradeIntegation Address of the new default trade integration\\n */\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external override onlyOwner {\\n require(_newDefaultTradeIntegation != address(0), 'Address must not be 0');\\n require(_newDefaultTradeIntegation != defaultTradeIntegration, 'Address must be different');\\n require(\\n enabledIntegrations[_nameHash(IIntegration(_newDefaultTradeIntegation).getName())] ==\\n _newDefaultTradeIntegation,\\n 'Integration needs to be valid'\\n );\\n address oldDefaultTradeIntegration = defaultTradeIntegration;\\n defaultTradeIntegration = _newDefaultTradeIntegation;\\n\\n emit DefaultTradeIntegrationChanged(_newDefaultTradeIntegation, oldDefaultTradeIntegration);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION: Add a new integration to the registry\\n *\\n * @param _name Human readable string identifying the integration\\n * @param _integration Address of the integration contract to add\\n */\\n function addIntegration(string memory _name, address _integration) public override onlyOwner {\\n bytes32 hashedName = _nameHash(_name);\\n require(enabledIntegrations[hashedName] == address(0), 'Integration exists already.');\\n require(_integration != address(0), 'Integration address must exist.');\\n\\n enabledIntegrations[hashedName] = _integration;\\n\\n emit ControllerIntegrationAdded(_integration, _name);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION: Edit an existing integration on the registry\\n *\\n * @param _name Human readable string identifying the integration\\n * @param _integration Address of the integration contract to edit\\n */\\n function editIntegration(string memory _name, address _integration) public override onlyOwner {\\n bytes32 hashedName = _nameHash(_name);\\n\\n require(enabledIntegrations[hashedName] != address(0), 'Integration does not exist.');\\n require(_integration != address(0), 'Integration address must exist.');\\n\\n enabledIntegrations[hashedName] = _integration;\\n\\n emit ControllerIntegrationEdited(_integration, _name);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION: Remove an existing integration on the registry\\n *\\n * @param _name Human readable string identifying the integration\\n */\\n function removeIntegration(string memory _name) external override onlyOwner {\\n bytes32 hashedName = _nameHash(_name);\\n require(enabledIntegrations[hashedName] != address(0), 'Integration does not exist.');\\n\\n address oldIntegration = enabledIntegrations[hashedName];\\n delete enabledIntegrations[hashedName];\\n\\n emit ControllerIntegrationRemoved(oldIntegration, _name);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION: Edit an existing operation on the registry\\n *\\n * @param _kind Operation kind\\n * @param _operation Address of the operation contract to set\\n */\\n function setOperation(uint8 _kind, address _operation) public override onlyOwner {\\n require(_kind < MAX_OPERATIONS, 'Max operations reached');\\n require(enabledOperations[_kind] != _operation, 'Operation already set');\\n require(_operation != address(0), 'Operation address must exist.');\\n enabledOperations[_kind] = _operation;\\n\\n emit ControllerOperationSet(_kind, _operation);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION: Edits the minimum liquidity an asset must have on Uniswap\\n *\\n * @param _reserve Address of the reserve to edit\\n * @param _newMinLiquidityReserve Absolute min liquidity of an asset to grab price\\n */\\n function editLiquidityReserve(address _reserve, uint256 _newMinLiquidityReserve) public override onlyOwner {\\n require(_newMinLiquidityReserve > 0, '_minRiskyPairLiquidityEth > 0');\\n require(validReserveAsset[_reserve], 'Needs to be a valid reserve');\\n minLiquidityPerReserve[_reserve] = _newMinLiquidityReserve;\\n\\n emit LiquidityMinimumEdited(_reserve, _newMinLiquidityReserve);\\n }\\n\\n /* ============ External Getter Functions ============ */\\n\\n function owner() public view override(IBabController, OwnableUpgradeable) returns (address) {\\n return OwnableUpgradeable.owner();\\n }\\n\\n function getGardens() external view override returns (address[] memory) {\\n return gardens;\\n }\\n\\n function getOperations() external view override returns (address[20] memory) {\\n return enabledOperations;\\n }\\n\\n function getReserveAssets() external view returns (address[] memory) {\\n return reserveAssets;\\n }\\n\\n function getMinCooldownPeriod() external pure override returns (uint256) {\\n return MIN_COOLDOWN_PERIOD;\\n }\\n\\n function getMaxCooldownPeriod() external pure override returns (uint256) {\\n return MAX_COOLDOWN_PERIOD;\\n }\\n\\n function isValidReserveAsset(address _reserveAsset) external view override returns (bool) {\\n return validReserveAsset[_reserveAsset];\\n }\\n\\n function isValidKeeper(address _keeper) external view override returns (bool) {\\n return keeperList[_keeper];\\n }\\n\\n /**\\n * Returns the percentages of a strategy Profit Sharing\\n *\\n * @return Strategist, Stewards, Lps, creator bonus\\n */\\n function getProfitSharing()\\n external\\n view\\n override\\n returns (\\n uint256,\\n uint256,\\n uint256\\n )\\n {\\n return (strategistProfitPercentage, stewardsProfitPercentage, lpsProfitPercentage);\\n }\\n\\n /**\\n * Returns the percentages of BABL Profit Sharing\\n *\\n * @return Strategist, Stewards, Lps, creator bonus\\n */\\n function getBABLSharing()\\n external\\n view\\n override\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n )\\n {\\n return (strategistBABLPercentage, stewardsBABLPercentage, lpsBABLPercentage, gardenCreatorBonus);\\n }\\n\\n /**\\n * Get the integration address associated with passed human readable name\\n *\\n * @param _name Human readable integration name\\n *\\n * @return Address of integration\\n */\\n function getIntegrationByName(string memory _name) external view override returns (address) {\\n return enabledIntegrations[_nameHash(_name)];\\n }\\n\\n /**\\n * Get integration integration address associated with passed hashed name\\n *\\n * @param _nameHashP Hash of human readable integration name\\n *\\n * @return Address of integration\\n */\\n function getIntegrationWithHash(bytes32 _nameHashP) external view override returns (address) {\\n return enabledIntegrations[_nameHashP];\\n }\\n\\n /**\\n * Check if integration name is valid\\n *\\n * @param _name Human readable string identifying the integration\\n *\\n * @return Boolean indicating if valid\\n */\\n function isValidIntegration(string memory _name, address _integration) external view override returns (bool) {\\n return enabledIntegrations[_nameHash(_name)] == _integration;\\n }\\n\\n /**\\n * Check if a contract address is a garden or one of the system contracts\\n *\\n * @param _contractAddress The contract address to check\\n */\\n function isSystemContract(address _contractAddress) external view override returns (bool) {\\n return (isGarden[_contractAddress] ||\\n gardenValuer == _contractAddress ||\\n priceOracle == _contractAddress ||\\n gardenFactory == _contractAddress ||\\n strategyFactory == _contractAddress ||\\n rewardsDistributor == _contractAddress ||\\n owner() == _contractAddress ||\\n _contractAddress == address(this) ||\\n _isOperation(_contractAddress) ||\\n (isGarden[address(IStrategy(_contractAddress).garden())] &&\\n IGarden(IStrategy(_contractAddress).garden()).isStrategyActiveInGarden(_contractAddress)));\\n }\\n\\n /* ============ Internal Only Function ============ */\\n\\n /**\\n * Hashes the string and returns a bytes32 value\\n */\\n function _nameHash(string memory _name) private pure returns (bytes32) {\\n return keccak256(bytes(_name));\\n }\\n\\n function _isOperation(address _address) private view returns (bool) {\\n for (uint8 i = 0; i < MAX_OPERATIONS; i++) {\\n if (_address == enabledOperations[i]) {\\n return true;\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x4fa82b5f58fb02f7a3e47db0eb1732ab53709ce0c92ce54bb30f7a1c350742a2\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editGardenNFT(address _newGardenNFT) external;\\n\\n function editStrategyNFT(address _newStrategyNFT) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function editUniswapFactory(address _newUniswapFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\\n\\n function maxContributorsPerGarden() external view returns (uint256);\\n\\n function gardenCreationIsOpen() external view returns (bool);\\n\\n function openPublicGardenCreation() external;\\n\\n function setMaxContributorsPerGarden(uint256 _newMax) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function gardenNFT() external view returns (address);\\n\\n function strategyNFT() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\\n\\n function uniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0xdee5a27301c24f507d312f32249487fa9b0a756062a7e479405a1d1ee9ee7bb8\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function isGardenStrategy(address _strategy) external view returns (bool);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategyActiveInGarden(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to,\\n bool _withPenalty\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x88f1786ffee23e386aaa1735177912e1b5a7cdd440dafe52fb139fe50fd621b4\",\"license\":\"Apache License\"},\"contracts/interfaces/IGardenFactory.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IIntegration} from './IIntegration.sol';\\n\\n/**\\n * @title IGardenFactory\\n * @author Babylon Finance\\n *\\n * Interface for the garden factory\\n */\\ninterface IGardenFactory {\\n function createGarden(\\n address _reserveAsset,\\n address _creator,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external returns (address);\\n}\\n\",\"keccak256\":\"0x02b610c9190d50e1d940e44e3d23c143fb1e8a6fea7fabf32deea75a85398f83\",\"license\":\"Apache License\"},\"contracts/interfaces/IIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIntegration\\n * @author Babylon Finance\\n *\\n * Interface for protocol integrations\\n */\\ninterface IIntegration {\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xee03c9274ddf3257e3bfd2bb229fea3412c9105f178e64174f59efeafd53182c\",\"license\":\"Apache License\"},\"contracts/interfaces/IIshtarGate.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIshtarGate\\n * @author Babylon Finance\\n *\\n * Interface for interacting with the Gate Guestlist NFT\\n */\\ninterface IIshtarGate {\\n /* ============ Functions ============ */\\n\\n function setGardenAccess(\\n address _user,\\n address _garden,\\n uint8 _permission\\n ) external returns (uint256);\\n\\n function setCreatorPermissions(address _user, bool _canCreate) external returns (uint256);\\n\\n function grantGardenAccessBatch(\\n address _garden,\\n address[] calldata _users,\\n uint8[] calldata _perms\\n ) external returns (bool);\\n\\n function maxNumberOfInvites() external view returns (uint256);\\n\\n function tokenURI() external view returns (string memory);\\n\\n function setMaxNumberOfInvites(uint256 _maxNumberOfInvites) external;\\n\\n function updateGardenURI(string memory _tokenURI) external;\\n\\n function grantCreatorsInBatch(address[] calldata _users, bool[] calldata _perms) external returns (bool);\\n\\n function canCreate(address _user) external view returns (bool);\\n\\n function canJoinAGarden(address _garden, address _user) external view returns (bool);\\n\\n function canVoteInAGarden(address _garden, address _user) external view returns (bool);\\n\\n function canAddStrategiesInAGarden(address _garden, address _user) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x0731159ca37445441424ec07de68ac1347a6a3c4559eed6db7682a6018660d63\",\"license\":\"Apache License\"},\"contracts/interfaces/IPriceOracle.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol IPriceOracle)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPriceOracle\\n * @author Babylon Finance\\n *\\n * Interface for interacting with PriceOracle\\n */\\ninterface IPriceOracle {\\n /* ============ Functions ============ */\\n\\n function getPrice(address _assetOne, address _assetTwo) external view returns (uint256);\\n\\n function updateAdapters(address _assetOne, address _assetTwo) external;\\n}\\n\",\"keccak256\":\"0xa22e0e5e166f6f6714553b736ee921b916c37bc5b557042bf6042cc010d2a041\",\"license\":\"Apache License\"},\"contracts/interfaces/IRewardsDistributor.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IRewardsDistributor\\n * @author Babylon Finance\\n *\\n * Interface for the distribute rewards of the BABL Mining Program.\\n */\\n\\ninterface IRewardsDistributor {\\n // Structs\\n struct PrincipalPerTimestamp {\\n uint256 principal;\\n uint256 time;\\n uint256 timeListPointer;\\n }\\n\\n function protocolPrincipal() external view returns (uint256);\\n\\n function pid() external view returns (uint256);\\n\\n // solhint-disable-next-line\\n function EPOCH_DURATION() external pure returns (uint256);\\n\\n // solhint-disable-next-line\\n function START_TIME() external view returns (uint256);\\n\\n // solhint-disable-next-line\\n function Q1_REWARDS() external pure returns (uint256);\\n\\n // solhint-disable-next-line\\n function DECAY_RATE() external pure returns (uint256);\\n\\n function addProtocolPrincipal(uint256 _capital) external;\\n\\n function substractProtocolPrincipal(uint256 _capital) external;\\n\\n function getStrategyRewards(address _strategy) external returns (uint96);\\n\\n function sendTokensToContributor(address _to, uint96 _amount) external;\\n\\n function getRewards(\\n address _garden,\\n address _contributor,\\n address[] calldata _finalizedStrategies\\n ) external view returns (uint256, uint96);\\n\\n function getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) external view returns (uint256);\\n\\n /**\\n function getContributor(address _garden, address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256[] memory,\\n uint256\\n );\\n */\\n function updateGardenPower(address _garden, uint256 _pid) external;\\n\\n function setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw,\\n uint256 _pid\\n ) external;\\n\\n function tokenSupplyPerQuarter(uint256 quarter) external view returns (uint96);\\n\\n function checkProtocol(uint256 _time)\\n external\\n view\\n returns (\\n uint256 principal,\\n uint256 time,\\n uint256 quarterBelonging,\\n uint256 timeListPointer,\\n uint256 power\\n );\\n\\n function checkQuarter(uint256 _num)\\n external\\n view\\n returns (\\n uint256 quarterPrincipal,\\n uint256 quarterNumber,\\n uint256 quarterPower,\\n uint96 supplyPerQuarter\\n );\\n}\\n\",\"keccak256\":\"0xc68eb7826b0174d4f6dff50320abb2cd958a978d4537c57867dd828dc2798662\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n address,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x850597ec9a68eb86f31f13b6b77d3b31350b4ed3d0019dedfbd3550ad1a1d9e2\",\"license\":\"Apache License\"},\"contracts/interfaces/IVoteToken.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface IVoteToken {\\n function delegate(address delegatee) external;\\n\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n function getCurrentVotes(address account) external view returns (uint96);\\n\\n function getPriorVotes(address account, uint256 blockNumber) external view returns (uint96);\\n\\n function getMyDelegatee() external view returns (address);\\n\\n function getDelegatee(address account) external view returns (address);\\n\\n function getCheckpoints(address account, uint32 id) external view returns (uint32 fromBlock, uint96 votes);\\n\\n function getNumberOfCheckpoints(address account) external view returns (uint32);\\n}\\n\\ninterface IVoteTokenWithERC20 is IVoteToken, IERC20 {}\\n\",\"keccak256\":\"0xd3d6174f81ce2c1678a536b2a486179f9a5a694849b334556aeb155b9b13f777\",\"license\":\"Apache License\"},\"contracts/lib/AddressArrayUtils.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n/**\\n * @title AddressArrayUtils\\n * @author Set Protocol\\n *\\n * Utility functions to handle Address Arrays\\n */\\nlibrary AddressArrayUtils {\\n /**\\n * Finds the index of the first occurrence of the given element.\\n * @param A The input array to search\\n * @param a The value to find\\n * @return Returns (index and isIn) for the first occurrence starting from index 0\\n */\\n function indexOf(address[] memory A, address a) internal pure returns (uint256, bool) {\\n uint256 length = A.length;\\n for (uint256 i = 0; i < length; i++) {\\n if (A[i] == a) {\\n return (i, true);\\n }\\n }\\n return (uint256(-1), false);\\n }\\n\\n /**\\n * Returns true if the value is present in the list. Uses indexOf internally.\\n * @param A The input array to search\\n * @param a The value to find\\n * @return Returns isIn for the first occurrence starting from index 0\\n */\\n function contains(address[] memory A, address a) internal pure returns (bool) {\\n (, bool isIn) = indexOf(A, a);\\n return isIn;\\n }\\n\\n /**\\n * Returns true if there are 2 elements that are the same in an array\\n * @param A The input array to search\\n * @return Returns boolean for the first occurrence of a duplicate\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n require(A.length > 0, 'A is empty');\\n\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n address current = A[i];\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (current == A[j]) {\\n return true;\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @param A The input array to search\\n * @param a The address to remove\\n * @return Returns the array with the object removed.\\n */\\n function remove(address[] memory A, address a) internal pure returns (address[] memory) {\\n (uint256 index, bool isIn) = indexOf(A, a);\\n if (!isIn) {\\n revert('Address not in array.');\\n } else {\\n (address[] memory _A, ) = pop(A, index);\\n return _A;\\n }\\n }\\n\\n /**\\n * Removes specified index from array\\n * @param A The input array to search\\n * @param index The index to remove\\n * @return Returns the new array and the removed entry\\n */\\n function pop(address[] memory A, uint256 index) internal pure returns (address[] memory, address) {\\n uint256 length = A.length;\\n require(index < A.length, 'Index must be < A length');\\n address[] memory newAddresses = new address[](length - 1);\\n for (uint256 i = 0; i < index; i++) {\\n newAddresses[i] = A[i];\\n }\\n for (uint256 j = index + 1; j < length; j++) {\\n newAddresses[j - 1] = A[j];\\n }\\n return (newAddresses, A[index]);\\n }\\n\\n /**\\n * Returns the combination of the two arrays\\n * @param A The first array\\n * @param B The second array\\n * @return Returns A extended by B\\n */\\n function extend(address[] memory A, address[] memory B) internal pure returns (address[] memory) {\\n uint256 aLength = A.length;\\n uint256 bLength = B.length;\\n address[] memory newAddresses = new address[](aLength + bLength);\\n for (uint256 i = 0; i < aLength; i++) {\\n newAddresses[i] = A[i];\\n }\\n for (uint256 j = 0; j < bLength; j++) {\\n newAddresses[aLength + j] = B[j];\\n }\\n return newAddresses;\\n }\\n}\\n\",\"keccak256\":\"0x409127cd8cadb573e5de48fd992efbd8b0f1e243d235abc3c5f2fa873195c16a\",\"license\":\"Apache License\"},\"contracts/lib/BabylonErrors.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n// solhint-disable\\n\\n/**\\n * @notice Forked from https://github.com/balancer-labs/balancer-core-v2/blob/master/contracts/lib/helpers/BalancerErrors.sol\\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 // 'BAB#{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 \\\"BAB#\\\" part is a known constant\\n // (0x42414223): 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(0x42414223000000, 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 // Max deposit limit needs to be under the limit\\n uint256 internal constant MAX_DEPOSIT_LIMIT = 0;\\n // Creator needs to deposit\\n uint256 internal constant MIN_CONTRIBUTION = 1;\\n // Min Garden token supply >= 0\\n uint256 internal constant MIN_TOKEN_SUPPLY = 2;\\n // Deposit hardlock needs to be at least 1 block\\n uint256 internal constant DEPOSIT_HARDLOCK = 3;\\n // Needs to be at least the minimum\\n uint256 internal constant MIN_LIQUIDITY = 4;\\n // _reserveAssetQuantity is not equal to msg.value\\n uint256 internal constant MSG_VALUE_DO_NOT_MATCH = 5;\\n // Withdrawal amount has to be equal or less than msg.sender balance\\n uint256 internal constant MSG_SENDER_TOKENS_DO_NOT_MATCH = 6;\\n // Tokens are staked\\n uint256 internal constant TOKENS_STAKED = 7;\\n // Balance too low\\n uint256 internal constant BALANCE_TOO_LOW = 8;\\n // msg.sender doesn't have enough tokens\\n uint256 internal constant MSG_SENDER_TOKENS_TOO_LOW = 9;\\n // There is an open redemption window already\\n uint256 internal constant REDEMPTION_OPENED_ALREADY = 10;\\n // Cannot request twice in the same window\\n uint256 internal constant ALREADY_REQUESTED = 11;\\n // Rewards and profits already claimed\\n uint256 internal constant ALREADY_CLAIMED = 12;\\n // Value have to be greater than zero\\n uint256 internal constant GREATER_THAN_ZERO = 13;\\n // Must be reserve asset\\n uint256 internal constant MUST_BE_RESERVE_ASSET = 14;\\n // Only contributors allowed\\n uint256 internal constant ONLY_CONTRIBUTOR = 15;\\n // Only controller allowed\\n uint256 internal constant ONLY_CONTROLLER = 16;\\n // Only creator allowed\\n uint256 internal constant ONLY_CREATOR = 17;\\n // Only keeper allowed\\n uint256 internal constant ONLY_KEEPER = 18;\\n // Fee is too high\\n uint256 internal constant FEE_TOO_HIGH = 19;\\n // Only strategy allowed\\n uint256 internal constant ONLY_STRATEGY = 20;\\n // Only active allowed\\n uint256 internal constant ONLY_ACTIVE = 21;\\n // Only inactive allowed\\n uint256 internal constant ONLY_INACTIVE = 22;\\n // Address should be not zero address\\n uint256 internal constant ADDRESS_IS_ZERO = 23;\\n // Not within range\\n uint256 internal constant NOT_IN_RANGE = 24;\\n // Value is too low\\n uint256 internal constant VALUE_TOO_LOW = 25;\\n // Value is too high\\n uint256 internal constant VALUE_TOO_HIGH = 26;\\n // Only strategy or protocol allowed\\n uint256 internal constant ONLY_STRATEGY_OR_CONTROLLER = 27;\\n // Normal withdraw possible\\n uint256 internal constant NORMAL_WITHDRAWAL_POSSIBLE = 28;\\n // User does not have permissions to join garden\\n uint256 internal constant USER_CANNOT_JOIN = 29;\\n // User does not have permissions to add strategies in garden\\n uint256 internal constant USER_CANNOT_ADD_STRATEGIES = 30;\\n // Only Protocol or garden\\n uint256 internal constant ONLY_PROTOCOL_OR_GARDEN = 31;\\n // Only Strategist\\n uint256 internal constant ONLY_STRATEGIST = 32;\\n // Only Integration\\n uint256 internal constant ONLY_INTEGRATION = 33;\\n // Only garden and data not set\\n uint256 internal constant ONLY_GARDEN_AND_DATA_NOT_SET = 34;\\n // Only active garden\\n uint256 internal constant ONLY_ACTIVE_GARDEN = 35;\\n // Contract is not a garden\\n uint256 internal constant NOT_A_GARDEN = 36;\\n // Not enough tokens\\n uint256 internal constant STRATEGIST_TOKENS_TOO_LOW = 37;\\n // Stake is too low\\n uint256 internal constant STAKE_HAS_TO_AT_LEAST_ONE = 38;\\n // Duration must be in range\\n uint256 internal constant DURATION_MUST_BE_IN_RANGE = 39;\\n // Max Capital Requested\\n uint256 internal constant MAX_CAPITAL_REQUESTED = 41;\\n // Votes are already resolved\\n uint256 internal constant VOTES_ALREADY_RESOLVED = 42;\\n // Voting window is closed\\n uint256 internal constant VOTING_WINDOW_IS_OVER = 43;\\n // Strategy needs to be active\\n uint256 internal constant STRATEGY_NEEDS_TO_BE_ACTIVE = 44;\\n // Max capital reached\\n uint256 internal constant MAX_CAPITAL_REACHED = 45;\\n // Capital is less then rebalance\\n uint256 internal constant CAPITAL_IS_LESS_THAN_REBALANCE = 46;\\n // Strategy is in cooldown period\\n uint256 internal constant STRATEGY_IN_COOLDOWN = 47;\\n // Strategy is not executed\\n uint256 internal constant STRATEGY_IS_NOT_EXECUTED = 48;\\n // Strategy is not over yet\\n uint256 internal constant STRATEGY_IS_NOT_OVER_YET = 49;\\n // Strategy is already finalized\\n uint256 internal constant STRATEGY_IS_ALREADY_FINALIZED = 50;\\n // No capital to unwind\\n uint256 internal constant STRATEGY_NO_CAPITAL_TO_UNWIND = 51;\\n // Strategy needs to be inactive\\n uint256 internal constant STRATEGY_NEEDS_TO_BE_INACTIVE = 52;\\n // Duration needs to be less\\n uint256 internal constant DURATION_NEEDS_TO_BE_LESS = 53;\\n // Can't sweep reserve asset\\n uint256 internal constant CANNOT_SWEEP_RESERVE_ASSET = 54;\\n // Voting window is opened\\n uint256 internal constant VOTING_WINDOW_IS_OPENED = 55;\\n // Strategy is executed\\n uint256 internal constant STRATEGY_IS_EXECUTED = 56;\\n // Min Rebalance Capital\\n uint256 internal constant MIN_REBALANCE_CAPITAL = 57;\\n // Not a valid strategy NFT\\n uint256 internal constant NOT_STRATEGY_NFT = 58;\\n // Garden Transfers Disabled\\n uint256 internal constant GARDEN_TRANSFERS_DISABLED = 59;\\n // Tokens are hardlocked\\n uint256 internal constant TOKENS_HARDLOCKED = 60;\\n // Max contributors reached\\n uint256 internal constant MAX_CONTRIBUTORS = 61;\\n // BABL Transfers Disabled\\n uint256 internal constant BABL_TRANSFERS_DISABLED = 62;\\n // Strategy duration range error\\n uint256 internal constant DURATION_RANGE = 63;\\n // Checks the min amount of voters\\n uint256 internal constant MIN_VOTERS_CHECK = 64;\\n // Ge contributor power error\\n uint256 internal constant CONTRIBUTOR_POWER_CHECK_WINDOW = 65;\\n // Not enough reserve set aside\\n uint256 internal constant NOT_ENOUGH_RESERVE = 66;\\n // Garden is already public\\n uint256 internal constant GARDEN_ALREADY_PUBLIC = 67;\\n // Withdrawal with penalty\\n uint256 internal constant WITHDRAWAL_WITH_PENALTY = 68;\\n // Withdrawal with penalty\\n uint256 internal constant ONLY_MINING_ACTIVE = 69;\\n // Overflow in supply\\n uint256 internal constant OVERFLOW_IN_SUPPLY = 70;\\n // Overflow in power\\n uint256 internal constant OVERFLOW_IN_POWER = 71;\\n // Not a system contract\\n uint256 internal constant NOT_A_SYSTEM_CONTRACT = 72;\\n // Strategy vs Garden mismatch\\n uint256 internal constant STRATEGY_GARDEN_MISMATCH = 73;\\n // Minimum quarters is 1\\n uint256 internal constant QUARTERS_MIN_1 = 74;\\n // Too many strategy operations\\n uint256 internal constant TOO_MANY_OPS = 75;\\n // Only operations\\n uint256 internal constant ONLY_OPERATION = 76;\\n // Strat params wrong length\\n uint256 internal constant STRAT_PARAMS_LENGTH = 77;\\n // Garden params wrong length\\n uint256 internal constant GARDEN_PARAMS_LENGTH = 78;\\n // Token names too long\\n uint256 internal constant NAME_TOO_LONG = 79;\\n // Contributor power overflows over garden power\\n uint256 internal constant CONTRIBUTOR_POWER_OVERFLOW = 80;\\n // Contributor power window out of bounds\\n uint256 internal constant CONTRIBUTOR_POWER_CHECK_DEPOSITS = 81;\\n}\\n\",\"keccak256\":\"0x9c9c2ea9026fe9033762f7221e2d5a91ed6b5f64cc14558b89fbd975cfb2d7b7\",\"license\":\"Apache License\"},\"contracts/lib/Math.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n// Libraries\\nimport './SafeDecimalMath.sol';\\n\\n// https://docs.synthetix.io/contracts/source/libraries/math\\nlibrary Math {\\n using SafeMath for uint256;\\n using SafeDecimalMath for uint256;\\n\\n /**\\n * @dev Uses \\\"exponentiation by squaring\\\" algorithm where cost is 0(logN)\\n * vs 0(N) for naive repeated multiplication.\\n * Calculates x^n with x as fixed-point and n as regular unsigned int.\\n * Calculates to 18 digits of precision with SafeDecimalMath.unit()\\n */\\n function powDecimal(uint256 x, uint256 n) internal pure returns (uint256) {\\n // https://mpark.github.io/programming/2014/08/18/exponentiation-by-squaring/\\n\\n uint256 result = SafeDecimalMath.unit();\\n while (n > 0) {\\n if (n % 2 != 0) {\\n result = result.multiplyDecimal(x);\\n }\\n x = x.multiplyDecimal(x);\\n n /= 2;\\n }\\n return result;\\n }\\n\\n function abs(int256 x) internal pure returns (int256) {\\n return x >= 0 ? x : -x;\\n }\\n}\\n\",\"keccak256\":\"0xc2ff8055f98dd7253df98838d870391067d9c622a68f263c942616ca8122bd93\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"contracts/lib/Safe3296.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nlibrary Safe3296 {\\n using SafeMath for uint256;\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint32\\n *\\n * @dev internal function to convert from uint256 to uint32\\n */\\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\\n require(n < 2**32, errorMessage);\\n return uint32(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint96\\n *\\n * @dev internal function to convert from uint256 to uint96\\n */\\n function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) {\\n require(n < 2**96, errorMessage);\\n return uint96(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to add two uint96 numbers\\n *\\n * @dev internal safe math function to add two uint96 numbers\\n */\\n function add96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n uint96 c = a + b;\\n require(c >= a, errorMessage);\\n return c;\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to subtract two uint96 numbers\\n *\\n * @dev internal safe math function to subtract two uint96 numbers\\n */\\n function sub96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n}\\n\",\"keccak256\":\"0x9ebf0856ab07500c9a8250d1be4b578a3e0ff454da7de67e3ab5632a7e6903c3\",\"license\":\"Apache License\"},\"contracts/lib/SafeDecimalMath.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nlibrary SafeDecimalMath {\\n using SafeMath for uint256;\\n\\n /* Number of decimal places in the representations. */\\n uint8 public constant decimals = 18;\\n uint8 public constant highPrecisionDecimals = 27;\\n\\n /* The number representing 1.0. */\\n uint256 public constant UNIT = 10**uint256(decimals);\\n\\n /* The number representing 1.0 for higher fidelity numbers. */\\n uint256 public constant PRECISE_UNIT = 10**uint256(highPrecisionDecimals);\\n uint256 private constant UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR = 10**uint256(highPrecisionDecimals - decimals);\\n\\n /**\\n * @return Provides an interface to UNIT.\\n */\\n function unit() external pure returns (uint256) {\\n return UNIT;\\n }\\n\\n /**\\n * @return Provides an interface to PRECISE_UNIT.\\n */\\n function preciseUnit() external pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @return The result of multiplying x and y, interpreting the operands as fixed-point\\n * decimals.\\n *\\n * @dev A unit factor is divided out after the product of x and y is evaluated,\\n * so that product must be less than 2**256. As this is an integer division,\\n * the internal division always rounds down. This helps save on gas. Rounding\\n * is more expensive on gas.\\n */\\n function multiplyDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\\n /* Divide by UNIT to remove the extra factor introduced by the product. */\\n return x.mul(y) / UNIT;\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of the specified precision unit.\\n *\\n * @dev The operands should be in the form of a the specified unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function _multiplyDecimalRound(\\n uint256 x,\\n uint256 y,\\n uint256 precisionUnit\\n ) private pure returns (uint256) {\\n /* Divide by UNIT to remove the extra factor introduced by the product. */\\n uint256 quotientTimesTen = x.mul(y) / (precisionUnit / 10);\\n\\n if (quotientTimesTen % 10 >= 5) {\\n quotientTimesTen += 10;\\n }\\n\\n return quotientTimesTen / 10;\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of a precise unit.\\n *\\n * @dev The operands should be in the precise unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function multiplyDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _multiplyDecimalRound(x, y, PRECISE_UNIT);\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of a standard unit.\\n *\\n * @dev The operands should be in the standard unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function multiplyDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _multiplyDecimalRound(x, y, UNIT);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is a high\\n * precision decimal.\\n *\\n * @dev y is divided after the product of x and the standard precision unit\\n * is evaluated, so the product of x and UNIT must be less than 2**256. As\\n * this is an integer division, the result is always rounded down.\\n * This helps save on gas. Rounding is more expensive on gas.\\n */\\n function divideDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\\n /* Reintroduce the UNIT factor that will be divided out by y. */\\n return x.mul(UNIT).div(y);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * decimal in the precision unit specified in the parameter.\\n *\\n * @dev y is divided after the product of x and the specified precision unit\\n * is evaluated, so the product of x and the specified precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function _divideDecimalRound(\\n uint256 x,\\n uint256 y,\\n uint256 precisionUnit\\n ) private pure returns (uint256) {\\n uint256 resultTimesTen = x.mul(precisionUnit * 10).div(y);\\n\\n if (resultTimesTen % 10 >= 5) {\\n resultTimesTen += 10;\\n }\\n\\n return resultTimesTen / 10;\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * standard precision decimal.\\n *\\n * @dev y is divided after the product of x and the standard precision unit\\n * is evaluated, so the product of x and the standard precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function divideDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _divideDecimalRound(x, y, UNIT);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * high precision decimal.\\n *\\n * @dev y is divided after the product of x and the high precision unit\\n * is evaluated, so the product of x and the high precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function divideDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _divideDecimalRound(x, y, PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Convert a standard decimal representation to a high precision one.\\n */\\n function decimalToPreciseDecimal(uint256 i) internal pure returns (uint256) {\\n return i.mul(UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR);\\n }\\n\\n /**\\n * @dev Convert a high precision decimal to a standard decimal representation.\\n */\\n function preciseDecimalToDecimal(uint256 i) internal pure returns (uint256) {\\n uint256 quotientTimesTen = i / (UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR / 10);\\n\\n if (quotientTimesTen % 10 >= 5) {\\n quotientTimesTen += 10;\\n }\\n\\n return quotientTimesTen / 10;\\n }\\n}\\n\",\"keccak256\":\"0x1372be4fa0c5813417396f128f5aa45da1cd7679e2d247a8e17d1ba5f0141253\",\"license\":\"Apache License\"},\"contracts/token/RewardsDistributor.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {TimeLockedToken} from './TimeLockedToken.sol';\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\nimport {SafeDecimalMath} from '../lib/SafeDecimalMath.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\nimport {Math} from '../lib/Math.sol';\\nimport {Safe3296} from '../lib/Safe3296.sol';\\nimport {Errors, _require} from '../lib/BabylonErrors.sol';\\n\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {TimeLockedToken} from './TimeLockedToken.sol';\\nimport {IRewardsDistributor} from '../interfaces/IRewardsDistributor.sol';\\nimport {IPriceOracle} from '../interfaces/IPriceOracle.sol';\\n\\n/**\\n * @title Rewards Distributor implementing the BABL Mining Program and other Rewards to Strategists and Stewards\\n * @author Babylon Finance\\n * Rewards Distributor contract is a smart contract used to calculate and distribute all the BABL rewards of the BABL Mining Program\\n * along the time reserved for executed strategies. It implements a supply curve to distribute 500K BABL along the time.\\n * The supply curve is designed to optimize the long-term sustainability of the protocol.\\n * The rewards are front-loaded but they last for more than 10 years, slowly decreasing quarter by quarter.\\n * For that, it houses the state of the protocol power along the time as each strategy power is compared to the whole protocol usage.\\n * Rewards Distributor also is responsible for the calculation and delivery of other rewards as bonuses to specific profiles\\n * which are actively contributing to the protocol growth and their communities (Garden creators, Strategists and Stewards).\\n */\\ncontract RewardsDistributor is Ownable, IRewardsDistributor {\\n using SafeMath for uint256;\\n using SafeMath for int256;\\n using PreciseUnitMath for uint256;\\n using PreciseUnitMath for int256;\\n using SafeDecimalMath for uint256;\\n using SafeDecimalMath for int256;\\n using Math for uint256;\\n using Math for int256;\\n using Safe3296 for uint256;\\n using Safe3296 for int256;\\n using Safe3296 for uint96;\\n using Safe3296 for uint32;\\n\\n /* ========== Events ========== */\\n\\n /* ============ Modifiers ============ */\\n /**\\n * Throws if the call is not from a valid strategy\\n */\\n modifier onlyStrategy {\\n _require(controller.isSystemContract(address(IStrategy(msg.sender).garden())), Errors.ONLY_STRATEGY);\\n _;\\n }\\n /**\\n * Throws if the call is not from a valid active garden\\n */\\n modifier onlyActiveGarden(address _garden, uint256 _pid) {\\n if (_pid != 0 || gardenPid[address(_garden)] > 1) {\\n // Enable deploying flow with security restrictions\\n _require(IBabController(controller).isSystemContract(address(_garden)), Errors.NOT_A_SYSTEM_CONTRACT);\\n _require(IBabController(controller).isGarden(address(_garden)), Errors.ONLY_ACTIVE_GARDEN);\\n }\\n _require(msg.sender == address(_garden), Errors.ONLY_ACTIVE_GARDEN);\\n _require(IGarden(_garden).active(), Errors.ONLY_ACTIVE_GARDEN);\\n _;\\n }\\n\\n /**\\n * Throws if the BABL Rewards mining program is not active\\n */\\n modifier onlyMiningActive() {\\n _require(IBabController(controller).bablMiningProgramEnabled(), Errors.ONLY_MINING_ACTIVE);\\n _;\\n }\\n /**\\n * Throws if the sender is not the controller\\n */\\n modifier onlyController() {\\n _require(IBabController(controller).isSystemContract(msg.sender), Errors.NOT_A_SYSTEM_CONTRACT);\\n _require(address(controller) == msg.sender, Errors.ONLY_CONTROLLER);\\n _;\\n }\\n\\n /* ============ Constants ============ */\\n // 500K BABL allocated to this BABL Mining Program, the first quarter is Q1_REWARDS\\n // and the following quarters will follow the supply curve using a decay rate\\n uint256 public constant override Q1_REWARDS = 53_571_428_571_428_600e6; // First quarter (epoch) BABL rewards\\n // 12% quarterly decay rate (each 90 days)\\n // (Rewards on Q1 = 1,12 * Rewards on Q2) being Q1= Quarter 1, Q2 = Quarter 2\\n uint256 public constant override DECAY_RATE = 12e16;\\n // Duration of its EPOCH in days // BABL & profits split from the protocol\\n uint256 public constant override EPOCH_DURATION = 90 days;\\n\\n // solhint-disable-next-line\\n uint256 public override START_TIME; // Starting time of the rewards distribution\\n\\n // solhint-disable-next-line\\n uint256 public immutable BABL_STRATEGIST_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable BABL_STEWARD_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable BABL_LP_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_STRATEGIST_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_STEWARD_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_LP_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_PROTOCOL_FEE;\\n // solhint-disable-next-line\\n uint256 public immutable CREATOR_BONUS;\\n\\n // DAI normalize asset\\n address private constant DAI = 0x6B175474E89094C44Da98b954EedeAC495271d0F;\\n\\n /* ============ Structs ============ */\\n\\n struct ProtocolPerTimestamp {\\n // Protocol allocation checkpoints per timestamp along the time\\n uint256 principal; // Protocol principal allocation in normalized asset (DAI)\\n uint256 time; // Time of the checkpoint\\n uint256 quarterBelonging; // # Quarter checkpoint belonging since START_TIME\\n uint256 timeListPointer; // Pointer to the array of timestamps to enable the possibility of struct iteration\\n uint256 power; // Protocol power checkpoint (power is proportional to = principal * duration)\\n }\\n\\n struct ProtocolPerQuarter {\\n // Protocol allocation checkpoints per timestamp per each quarter along the time\\n uint256 quarterPrincipal; // Checkpoint to keep track on accumulated protocol principal per quarter in normalized asset (DAI)\\n uint256 quarterNumber; // # Quarter since START_TIME\\n uint256 quarterPower; // Accumulated Protocol power for each quarter\\n uint96 supplyPerQuarter; // Supply per quarter\\n }\\n\\n struct GardenPowerByTimestamp {\\n // Garden allocation checkpoints per timestamp per each garden\\n uint256 supply; // Checkpoint to keep track on garden supply\\n uint256 timestamp; // Checkpoint timestamps\\n uint256 power; // Garden power checkpoint (power is proportional to = principal * duration)\\n }\\n struct ContributorPerGarden {\\n // Checkpoints to keep track on the evolution of each contributor vs. each garden\\n uint256 lastDepositAt; // Last deposit timestamp of each contributor in each garden\\n uint256 initialDepositAt; // Checkpoint of the initial deposit\\n uint256[] timeListPointer; // Array of timestamps for each user in each garden\\n uint256 pid; // Garden contributor checkpoints counter to enable iteration\\n mapping(uint256 => TimestampContribution) tsContributions; // Sub-mapping all the contributor checkpoints\\n }\\n\\n struct TimestampContribution {\\n // Sub-mapping with all checkpoints for deposits and withdrawals of garden users\\n uint256 supply; // Garden token balance of user in each garden along the time\\n uint256 timestamp; // Checkpoint time\\n uint256 timePointer; // Pointer\\n uint256 power; // Contributor power per checkpoint\\n }\\n struct Checkpoints {\\n // Checkpoints for contributor power calculations where a certain window (from -> to) is queried\\n uint256 fromDepositAt; // First contributor checkpoint within the provided window\\n uint256 lastDepositAt; // Last contributor checkpoint within the provided window\\n uint256 gardenFromDepositAt; // First contributor checkpoint within the provided window\\n uint256 gardenLastDepositAt; // Last garden checkpoint within the provided window\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Instance of the Controller contract\\n IBabController public controller;\\n\\n // BABL Token contract\\n TimeLockedToken public babltoken;\\n\\n // Protocol total allocation points. Must be the sum of all allocation points (strategyPrincipal) in all strategy pools.\\n uint256 public override protocolPrincipal;\\n mapping(uint256 => ProtocolPerTimestamp) public protocolPerTimestamp; // Mapping of all protocol checkpoints\\n uint256[] public timeList; // Array of all protocol checkpoints\\n uint256 public override pid; // Initialization of the ID assigning timeListPointer to the checkpoint number\\n\\n mapping(uint256 => ProtocolPerQuarter) public protocolPerQuarter; // Mapping of the accumulated protocol per each active quarter\\n mapping(uint256 => bool) public isProtocolPerQuarter; // Check if the protocol per quarter data has been initialized\\n\\n // Strategy overhead control. Only used if each strategy has power overhead due to changes overtime\\n mapping(address => mapping(uint256 => uint256)) public rewardsPowerOverhead; // Overhead control to enable high level accuracy calculations for strategy rewards\\n // Contributor power control\\n mapping(address => mapping(address => ContributorPerGarden)) public contributorPerGarden; // Enable high level accuracy calculations\\n mapping(address => mapping(address => Checkpoints)) private checkpoints;\\n // Garden power control\\n mapping(address => mapping(uint256 => GardenPowerByTimestamp)) public gardenPowerByTimestamp;\\n mapping(address => uint256[]) public gardenTimelist;\\n mapping(address => uint256) public gardenPid;\\n\\n /* ============ Constructor ============ */\\n\\n constructor(TimeLockedToken _bablToken, IBabController _controller) {\\n require(address(_bablToken) != address(0), 'Token needs to exist');\\n require(address(_controller) != address(0), 'Controller needs to exist');\\n babltoken = _bablToken;\\n controller = _controller;\\n\\n (BABL_STRATEGIST_SHARE, BABL_STEWARD_SHARE, BABL_LP_SHARE, CREATOR_BONUS) = controller.getBABLSharing();\\n (PROFIT_STRATEGIST_SHARE, PROFIT_STEWARD_SHARE, PROFIT_LP_SHARE) = controller.getProfitSharing();\\n PROFIT_PROTOCOL_FEE = controller.protocolPerformanceFee();\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Function that adds the capital received to the total principal of the protocol per timestamp\\n * @param _capital Amount of capital in any type of asset to be normalized into DAI\\n */\\n function addProtocolPrincipal(uint256 _capital) external override onlyStrategy onlyMiningActive {\\n IStrategy strategy = IStrategy(msg.sender);\\n if (strategy.enteredAt() >= START_TIME) {\\n // onlyMiningActive control, it does not create a checkpoint if the strategy is not part of the Mining Program\\n _updateProtocolPrincipal(address(strategy), _capital, true);\\n }\\n }\\n\\n /**\\n * Function that removes the capital received to the total principal of the protocol per timestamp\\n * @param _capital Amount of capital in any type of asset to be normalized into DAI\\n */\\n function substractProtocolPrincipal(uint256 _capital) external override onlyStrategy onlyMiningActive {\\n IStrategy strategy = IStrategy(msg.sender);\\n if (strategy.enteredAt() >= START_TIME) {\\n // onlyMiningActive control, it does not create a checkpoint if the strategy is not part of the Mining Program\\n _updateProtocolPrincipal(address(strategy), _capital, false);\\n }\\n }\\n\\n /**\\n * Gets the total amount of rewards for a given strategy\\n * @param _strategy Strategy to check\\n */\\n function getStrategyRewards(address _strategy) external view override returns (uint96) {\\n IStrategy strategy = IStrategy(_strategy);\\n _require(strategy.exitedAt() != 0, Errors.STRATEGY_IS_NOT_OVER_YET);\\n IPriceOracle oracle = IPriceOracle(IBabController(controller).priceOracle());\\n uint256 pricePerTokenUnit = oracle.getPrice(IGarden(strategy.garden()).reserveAsset(), DAI);\\n uint256 allocated = strategy.capitalAllocated().preciseMul(pricePerTokenUnit);\\n uint256 returned = strategy.capitalReturned().preciseMul(pricePerTokenUnit);\\n if ((strategy.enteredAt() >= START_TIME) && (START_TIME != 0)) {\\n // We avoid gas consuming once a strategy got its BABL rewards during its finalization\\n uint256 rewards = strategy.strategyRewards();\\n if (rewards != 0) {\\n return Safe3296.safe96(rewards, 'overflow 96 bits');\\n }\\n // If the calculation was not done earlier we go for it\\n (uint256 numQuarters, uint256 startingQuarter) =\\n _getRewardsWindow(strategy.executedAt(), strategy.exitedAt());\\n uint256 bablRewards = 0;\\n if (numQuarters <= 1) {\\n bablRewards = _getStrategyRewardsOneQuarter(_strategy, allocated, startingQuarter); // Proportional supply till that moment within the same epoch\\n _require(\\n bablRewards <= protocolPerQuarter[startingQuarter].supplyPerQuarter,\\n Errors.OVERFLOW_IN_SUPPLY\\n );\\n _require(\\n allocated.mul(strategy.exitedAt().sub(strategy.executedAt())).sub(\\n strategy.rewardsTotalOverhead()\\n ) <= protocolPerQuarter[startingQuarter].quarterPower,\\n Errors.OVERFLOW_IN_POWER\\n );\\n } else {\\n bablRewards = _getStrategyRewardsSomeQuarters(_strategy, allocated, startingQuarter, numQuarters);\\n }\\n\\n // Babl rewards will be proportional to the total return (profit) with a max cap of x2\\n uint256 percentageMul = returned.preciseDiv(allocated);\\n if (percentageMul > 2e18) percentageMul = 2e18;\\n bablRewards = bablRewards.preciseMul(percentageMul);\\n return Safe3296.safe96(bablRewards, 'overflow 96 bits');\\n } else {\\n return 0;\\n }\\n }\\n\\n /**\\n * Sends BABL tokens rewards to a contributor after a claim is requested to the protocol.\\n * @param _to Address to send the tokens to\\n * @param _amount Amount of tokens to send the address to\\n */\\n function sendTokensToContributor(address _to, uint96 _amount) external override onlyMiningActive {\\n _require(controller.isSystemContract(msg.sender), Errors.NOT_A_SYSTEM_CONTRACT);\\n _safeBABLTransfer(_to, _amount);\\n }\\n\\n /**\\n * Starts BABL Rewards Mining Program from the controller.\\n */\\n function startBABLRewards() external onlyController {\\n if (START_TIME == 0) {\\n // It can only be activated once to avoid overriding START_TIME\\n START_TIME = block.timestamp;\\n }\\n }\\n\\n /**\\n * Function that set each contributor timestamp per garden\\n * @param _garden Address of the garden the contributor belongs to\\n * @param _contributor Address of the contributor\\n * @param _previousBalance Previous balance of the contributor\\n * @param _depositOrWithdraw If the timestamp is a deposit (true) or a withdraw (false)\\n * @param _pid The pid # of the Garden timestamps\\n */\\n function setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw,\\n uint256 _pid\\n ) external override onlyActiveGarden(_garden, _pid) {\\n _setContributorTimestampParams(_garden, _contributor, _previousBalance, _depositOrWithdraw);\\n }\\n\\n /**\\n * Function that set each garden timestamp\\n * @param _garden Address of the garden\\n * @param _pid The pid # of the Garden timestamp\\n */\\n function updateGardenPower(address _garden, uint256 _pid) external override onlyActiveGarden(_garden, _pid) {\\n _updateGardenPower(_garden);\\n }\\n\\n /* ========== View functions ========== */\\n\\n /**\\n * Calculates the profits and BABL that a contributor should receive from a series of finalized strategies\\n * @param _garden Garden to which the strategies and the user must belong to\\n * @param _contributor Address of the contributor to check\\n * @param _finalizedStrategies List of addresses of the finalized strategies to check\\n */\\n function getRewards(\\n address _garden,\\n address _contributor,\\n address[] calldata _finalizedStrategies\\n ) external view override returns (uint256, uint96) {\\n uint256 contributorTotalProfits = 0;\\n uint256 bablTotalRewards = 0;\\n _require(IBabController(controller).isGarden(address(_garden)), Errors.ONLY_ACTIVE_GARDEN);\\n for (uint256 i = 0; i < _finalizedStrategies.length; i++) {\\n (uint256 strategyProfits, uint256 strategyBABL) =\\n _getStrategyProfitsAndBABL(_garden, _finalizedStrategies[i], _contributor);\\n contributorTotalProfits = contributorTotalProfits.add(strategyProfits);\\n bablTotalRewards = bablTotalRewards.add(strategyBABL);\\n }\\n\\n return (contributorTotalProfits, Safe3296.safe96(bablTotalRewards, 'R28'));\\n }\\n\\n /**\\n * Gets the contributor power from one timestamp to the other\\n * @param _garden Address of the garden where the contributor belongs to\\n * @param _contributor Address if the contributor\\n * @param _from Initial timestamp\\n * @param _to End timestamp\\n * @return uint256 Contributor power during that period\\n */\\n function getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) external view override returns (uint256) {\\n return _getContributorPower(_garden, _contributor, _from, _to);\\n }\\n\\n /**\\n * Calculates the BABL rewards supply for each quarter\\n * @param _quarter Number of the epoch (quarter)\\n */\\n function tokenSupplyPerQuarter(uint256 _quarter) external pure override returns (uint96) {\\n return _tokenSupplyPerQuarter(_quarter);\\n }\\n\\n /**\\n * Check the protocol state in a certain timestamp\\n * @param time Timestamp\\n */\\n function checkProtocol(uint256 _time)\\n external\\n view\\n override\\n returns (\\n uint256 principal,\\n uint256 time,\\n uint256 quarterBelonging,\\n uint256 timeListPointer,\\n uint256 power\\n )\\n {\\n return (\\n protocolPerTimestamp[_time].principal,\\n protocolPerTimestamp[_time].time,\\n protocolPerTimestamp[_time].quarterBelonging,\\n protocolPerTimestamp[_time].timeListPointer,\\n protocolPerTimestamp[_time].power\\n );\\n }\\n\\n /**\\n * Check the quarter state for a specific quarter\\n * @param _num Number of quarter\\n */\\n function checkQuarter(uint256 _num)\\n external\\n view\\n override\\n returns (\\n uint256 quarterPrincipal,\\n uint256 quarterNumber,\\n uint256 quarterPower,\\n uint96 supplyPerQuarter\\n )\\n {\\n return (\\n protocolPerQuarter[_num].quarterPrincipal,\\n protocolPerQuarter[_num].quarterNumber,\\n protocolPerQuarter[_num].quarterPower,\\n protocolPerQuarter[_num].supplyPerQuarter\\n );\\n }\\n\\n /* ============ Internal Functions ============ */\\n /**\\n * Update the protocol principal checkpoints\\n * @param _strategy Strategy which is adding/removing principal\\n * @param _capital Capital to update\\n * @param _addOrSubstract Adding (true) or removing (false)\\n */\\n\\n function _updateProtocolPrincipal(\\n address _strategy,\\n uint256 _capital,\\n bool _addOrSubstract\\n ) internal {\\n IStrategy strategy = IStrategy(_strategy);\\n // Normalizing into DAI\\n IPriceOracle oracle = IPriceOracle(IBabController(controller).priceOracle());\\n uint256 pricePerTokenUnit = oracle.getPrice(IGarden(strategy.garden()).reserveAsset(), DAI);\\n _capital = _capital.preciseMul(pricePerTokenUnit);\\n ProtocolPerTimestamp storage protocolCheckpoint = protocolPerTimestamp[block.timestamp];\\n if (_addOrSubstract == false) {\\n // Substract\\n protocolPrincipal = protocolPrincipal.sub(_capital);\\n } else {\\n protocolPrincipal = protocolPrincipal.add(_capital);\\n }\\n protocolCheckpoint.principal = protocolPrincipal;\\n protocolCheckpoint.time = block.timestamp;\\n protocolCheckpoint.quarterBelonging = _getQuarter(block.timestamp);\\n protocolCheckpoint.timeListPointer = pid;\\n if (pid == 0) {\\n // The very first strategy of all strategies in the mining program\\n protocolCheckpoint.power = 0;\\n } else {\\n // Any other strategy different from the very first one (will have an antecesor)\\n protocolCheckpoint.power = protocolPerTimestamp[timeList[pid.sub(1)]].power.add(\\n protocolCheckpoint.time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time).mul(\\n protocolPerTimestamp[timeList[pid.sub(1)]].principal\\n )\\n );\\n }\\n timeList.push(block.timestamp); // Register of added strategies timestamps in the array for iteration\\n // Here we control the accumulated protocol power per each quarter\\n // Create the quarter checkpoint in case the checkpoint is the first in the epoch\\n _addProtocolPerQuarter(block.timestamp);\\n // We update the rewards overhead if any in normalized DAI\\n _updatePowerOverhead(strategy, _capital);\\n pid++;\\n }\\n\\n /**\\n * Get the rewards for a specific contributor activately contributing in strategies of a specific garden\\n * @param _garden Garden address responsible of the strategies to calculate rewards\\n * @param _strategy Strategy address\\n * @param _contributor Contributor address\\n */\\n function _getStrategyProfitsAndBABL(\\n address _garden,\\n address _strategy,\\n address _contributor\\n ) private view returns (uint256, uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n _require(address(strategy.garden()) == _garden, Errors.STRATEGY_GARDEN_MISMATCH);\\n _require(IGarden(_garden).isGardenStrategy(_strategy), Errors.STRATEGY_GARDEN_MISMATCH);\\n uint256 contributorProfits = 0;\\n uint256 contributorBABL = 0;\\n // We get the state of the strategy in terms of profit and distance from expected to accurately calculate profits and rewards\\n (bool profit, uint256 profitValue, bool distance, uint256 distanceValue) =\\n _getStrategyRewardsContext(address(strategy));\\n\\n (, uint256 initialDepositAt, uint256 claimedAt, , , ) = IGarden(_garden).getContributor(_contributor);\\n // Positive strategies not yet claimed\\n if (\\n strategy.exitedAt() > claimedAt &&\\n strategy.executedAt() >= initialDepositAt &&\\n address(strategy.garden()) == _garden\\n ) {\\n uint256 contributorPower =\\n _getContributorPower(address(_garden), _contributor, strategy.executedAt(), strategy.exitedAt());\\n // If strategy returned money we give out the profits\\n if (profit == true) {\\n // We reserve 5% of profits for performance fees\\n profitValue = profitValue.sub(profitValue.multiplyDecimal(PROFIT_PROTOCOL_FEE));\\n }\\n // Get strategist rewards in case the contributor is also the strategist of the strategy\\n contributorBABL = contributorBABL.add(\\n _getStrategyStrategistBabl(\\n address(strategy),\\n _contributor,\\n profit,\\n profitValue,\\n distance,\\n distanceValue\\n )\\n );\\n\\n contributorProfits = contributorProfits.add(\\n _getStrategyStrategistProfits(address(strategy), _contributor, profit, profitValue)\\n );\\n\\n // Get steward rewards\\n contributorBABL = contributorBABL.add(\\n _getStrategyStewardBabl(address(strategy), _contributor, profit, profitValue, distance, distanceValue)\\n );\\n\\n contributorProfits = contributorProfits.add(\\n _getStrategyStewardProfits(\\n address(strategy),\\n _contributor,\\n profit,\\n profitValue,\\n distance,\\n distanceValue\\n )\\n );\\n\\n // Get LP rewards\\n\\n contributorBABL = contributorBABL.add(\\n uint256(strategy.strategyRewards()).multiplyDecimal(BABL_LP_SHARE).preciseMul(\\n contributorPower.preciseDiv(strategy.capitalAllocated())\\n )\\n );\\n\\n // Get a multiplier bonus in case the contributor is the garden creator\\n if (_contributor == IGarden(_garden).creator()) {\\n contributorBABL = contributorBABL.add(contributorBABL.multiplyDecimal(CREATOR_BONUS));\\n }\\n }\\n return (contributorProfits, contributorBABL);\\n }\\n\\n /**\\n * Get the context of a specific address depending on their expected returns, capital allocated and capital returned\\n * @param _strategy Strategy address\\n */\\n function _getStrategyRewardsContext(address _strategy)\\n private\\n view\\n returns (\\n bool,\\n uint256,\\n bool,\\n uint256\\n )\\n {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 returned = strategy.capitalReturned();\\n uint256 expected =\\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\\n uint256 allocated = strategy.capitalAllocated();\\n bool profit;\\n bool distance;\\n uint256 profitValue;\\n uint256 distanceValue;\\n if (returned > allocated && returned >= expected) {\\n // The strategy went equal or above expectations\\n profit = true; // positive\\n distance = true; // positive\\n profitValue = returned.sub(allocated);\\n distanceValue = returned.sub(expected);\\n } else if (returned >= allocated && returned < expected) {\\n // The strategy went worse than expected but with some profits\\n profit = true; // positive or zero profits\\n distance = false; // negative vs expected return (got less than expected)\\n profitValue = returned.sub(allocated);\\n distanceValue = expected.sub(returned);\\n } else if (returned < allocated && returned < expected) {\\n // Negative profits - bad investments has penalties\\n profit = false; // negative - loosing capital\\n distance = false; // negative vs expected return (got less than expected)\\n profitValue = allocated.sub(returned); // Negative number, there were no profits at all\\n distanceValue = expected.sub(returned);\\n }\\n\\n return (profit, profitValue, distance, distanceValue);\\n }\\n\\n /**\\n * Get the BABL rewards (Mining program) for a Steward profile\\n * @param _strategy Strategy address\\n * @param _contributor Contributor address\\n * @param _profit Whether or not the strategy had profits\\n * @param _distance If true the results were above expected returns, false means opposite\\n * @param _distanceValue The distance from/to expected returns for capital returned\\n */\\n function _getStrategyStewardBabl(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256, /* _profitValue */\\n bool _distance,\\n uint256 _distanceValue\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 strategyRewards = strategy.strategyRewards();\\n int256 userVotes = strategy.getUserVotes(_contributor);\\n uint256 bablCap;\\n uint256 expected =\\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\\n\\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\\n uint256 babl = 0;\\n if (userVotes > 0 && _profit == true && _distance == true) {\\n // Voting in favor of the execution of the strategy with profits and positive distance\\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\\n uint256(userVotes).preciseDiv(strategy.totalPositiveVotes())\\n );\\n } else if (userVotes > 0 && _profit == true && _distance == false) {\\n // Voting in favor positive profits but below expected return\\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\\n uint256(userVotes).preciseDiv(strategy.totalPositiveVotes())\\n );\\n babl = babl.sub(babl.preciseMul(_distanceValue.preciseDiv(expected))); // We discount the error of expected return vs real returns\\n } else if (userVotes > 0 && _profit == false) {\\n // Voting in favor of a non profitable strategy get nothing\\n babl = 0;\\n } else if (userVotes < 0 && _distance == false) {\\n // Voting against a strategy that got results below expected return provides rewards to the voter (helping the protocol to only have good strategies)\\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\\n uint256(Math.abs(userVotes)).preciseDiv(strategy.totalNegativeVotes())\\n );\\n\\n bablCap = babl.mul(2); // Max cap\\n babl = babl.add(babl.preciseMul(_distanceValue.preciseDiv(expected))); // We add a bonus inverse to the error of expected return vs real returns\\n\\n if (babl > bablCap) babl = bablCap; // We limit 2x by a Cap\\n } else if (userVotes < 0 && _distance == true) {\\n babl = 0;\\n }\\n return babl;\\n }\\n\\n /**\\n * Get the rewards for a Steward profile\\n * @param _strategy Strategy address\\n * @param _contributor Contributor address\\n * @param _profit Whether or not the strategy had profits\\n * @param _profitValue The value of profits\\n * @param _distance If true the results were above expected returns, false means opposite\\n */\\n function _getStrategyStewardProfits(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256 _profitValue,\\n bool _distance,\\n uint256 /* _distanceValue */\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\\n uint256 profits = 0;\\n int256 userVotes = strategy.getUserVotes(_contributor);\\n if (_profit == true) {\\n if (userVotes > 0) {\\n profits = _profitValue.multiplyDecimal(PROFIT_STEWARD_SHARE).preciseMul(uint256(userVotes)).preciseDiv(\\n strategy.totalPositiveVotes()\\n );\\n } else if ((userVotes < 0) && _distance == false) {\\n profits = _profitValue\\n .multiplyDecimal(PROFIT_STEWARD_SHARE)\\n .preciseMul(uint256(Math.abs(userVotes)))\\n .preciseDiv(strategy.totalNegativeVotes());\\n } else if ((userVotes < 0) && _distance == true) {\\n // Voted against a very profit strategy above expected returns, get no profit at all\\n profits = 0;\\n }\\n } else profits = 0; // No profits at all\\n\\n return profits;\\n }\\n\\n /**\\n * Get the BABL rewards (Mining program) for a Strategist profile\\n * @param _strategy Strategy address\\n * @param _contributor Contributor address\\n * @param _profit Whether or not the strategy had profits\\n * @param _distance If true the results were above expected returns, false means opposite\\n */\\n function _getStrategyStrategistBabl(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256, /* _profitValue */\\n bool _distance,\\n uint256 /* _distanceValue */\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 strategyRewards = strategy.strategyRewards();\\n uint256 babl;\\n uint256 bablCap;\\n uint256 expected =\\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\\n if (strategy.strategist() == _contributor) {\\n babl = strategyRewards.multiplyDecimal(BABL_STRATEGIST_SHARE); // Standard calculation to be ponderated\\n if (_profit == true && _distance == true) {\\n // Strategy with equal or higher profits than expected\\n bablCap = babl.mul(2); // Max cap\\n // The more the results are close to the expected the more bonus will get (limited by a x2 cap)\\n babl = babl.add(babl.preciseMul(expected.preciseDiv(strategy.capitalReturned())));\\n if (babl > bablCap) babl = bablCap; // We limit 2x by a Cap\\n } else if (_profit == true && _distance == false) {\\n //under expectations\\n // The more the results are close to the expected the less penalization it might have\\n babl = babl.sub(babl.sub(babl.preciseMul(strategy.capitalReturned().preciseDiv(expected))));\\n } else {\\n // No positive profit\\n return 0;\\n }\\n } else {\\n return 0;\\n }\\n return babl;\\n }\\n\\n /**\\n * Get the rewards for a Strategist profile\\n * @param _strategy Strategy address\\n * @param _contributor Contributor address\\n * @param _profit Whether or not the strategy had profits\\n * @param _profitValue The value of profits\\n */\\n function _getStrategyStrategistProfits(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256 _profitValue\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\\n uint256 profits;\\n if (_profit == true) {\\n if (strategy.strategist() == _contributor) {\\n // If the contributor was the strategist of the strategy\\n profits = _profitValue.multiplyDecimal(PROFIT_STRATEGIST_SHARE);\\n }\\n } else profits = 0; // No profits at all\\n\\n return profits;\\n }\\n\\n /**\\n * Add protocol power timestamps for each quarter\\n * @param _time Timestamp\\n */\\n function _addProtocolPerQuarter(uint256 _time) private onlyMiningActive {\\n ProtocolPerQuarter storage protocolCheckpoint = protocolPerQuarter[_getQuarter(_time)];\\n\\n if (!isProtocolPerQuarter[_getQuarter(_time).sub(1)]) {\\n // The quarter is not yet initialized then we create it\\n protocolCheckpoint.quarterNumber = _getQuarter(_time);\\n if (pid == 0) {\\n // The first strategy added in the first epoch\\n protocolCheckpoint.quarterPower = 0;\\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\\n } else {\\n // Each time a new epoch starts with either a new strategy execution or finalization\\n // We just take the proportional power for this quarter from previous checkpoint\\n uint256 powerToSplit =\\n protocolPerTimestamp[_time].power.sub(protocolPerTimestamp[timeList[pid.sub(1)]].power);\\n if (protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging == _getQuarter(_time).sub(1)) {\\n // There were no intermediate epochs without checkpoints\\n // We re-initialize the protocol power counting for this new quarter\\n protocolCheckpoint.quarterPower = powerToSplit\\n .mul(_time.sub(START_TIME.add(_getQuarter(_time).mul(EPOCH_DURATION).sub(EPOCH_DURATION))))\\n .div(_time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time));\\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\\n\\n protocolPerQuarter[_getQuarter(_time).sub(1)].quarterPower = protocolPerQuarter[\\n _getQuarter(_time).sub(1)\\n ]\\n .quarterPower\\n .add(powerToSplit.sub(protocolCheckpoint.quarterPower));\\n } else {\\n // There were intermediate epochs without checkpoints - we need to create their protocolPerQuarter's and update the last one\\n // We have to update all the quarters including where the previous checkpoint is and the one were we are now\\n for (\\n uint256 i = 0;\\n i <= _getQuarter(_time).sub(protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging);\\n i++\\n ) {\\n ProtocolPerQuarter storage newCheckpoint =\\n protocolPerQuarter[protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i)];\\n uint256 slotEnding =\\n START_TIME.add(\\n protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i).mul(EPOCH_DURATION)\\n );\\n if (i == 0) {\\n // We are in the first quarter to update, we add the corresponding part\\n\\n newCheckpoint.quarterPower = newCheckpoint.quarterPower.add(\\n powerToSplit.mul(slotEnding.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)).div(\\n _time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)\\n )\\n );\\n newCheckpoint.quarterPrincipal = protocolPerTimestamp[timeList[pid.sub(1)]].principal;\\n } else if (\\n i < _getQuarter(_time).sub(protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging)\\n ) {\\n // We are in an intermediate quarter\\n newCheckpoint.quarterPower = powerToSplit.mul(EPOCH_DURATION).div(\\n _time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)\\n );\\n newCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(\\n protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i)\\n );\\n newCheckpoint.quarterNumber = protocolPerTimestamp[timeList[pid.sub(1)]]\\n .quarterBelonging\\n .add(i);\\n newCheckpoint.quarterPrincipal = protocolPerTimestamp[timeList[pid.sub(1)]].principal;\\n } else {\\n // We are in the last quarter of the strategy\\n protocolCheckpoint.quarterPower = powerToSplit\\n .mul(\\n _time.sub(START_TIME.add(_getQuarter(_time).mul(EPOCH_DURATION).sub(EPOCH_DURATION)))\\n )\\n .div(_time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time));\\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\\n protocolCheckpoint.quarterNumber = _getQuarter(_time);\\n protocolCheckpoint.quarterPrincipal = protocolPrincipal;\\n }\\n }\\n }\\n }\\n isProtocolPerQuarter[_getQuarter(_time).sub(1)] = true;\\n } else {\\n // Quarter checkpoint already created, it must have been filled with general info\\n // We update the power of the quarter by adding the new difference between last quarter checkpoint and this checkpoint\\n protocolCheckpoint.quarterPower = protocolCheckpoint.quarterPower.add(\\n protocolPerTimestamp[_time].power.sub(protocolPerTimestamp[timeList[pid.sub(1)]].power)\\n );\\n }\\n protocolCheckpoint.quarterPrincipal = protocolPrincipal;\\n }\\n\\n /**\\n * Updates the strategy power overhead for rewards calculations of each strategy out of the whole protocol\\n * @param _strategy Strategy\\n * @param _capital New capital normalized in DAI\\n */\\n function _updatePowerOverhead(IStrategy _strategy, uint256 _capital) private onlyMiningActive {\\n if (_strategy.updatedAt() != 0) {\\n // There will be overhead after the first execution not before\\n if (_getQuarter(block.timestamp) == _getQuarter(_strategy.updatedAt())) {\\n // The overhead will remain within the same epoch\\n rewardsPowerOverhead[address(_strategy)][_getQuarter(block.timestamp)] = rewardsPowerOverhead[\\n address(_strategy)\\n ][_getQuarter(block.timestamp)]\\n .add(_capital.mul(block.timestamp.sub(_strategy.updatedAt())));\\n } else {\\n // We need to iterate since last update of the strategy capital\\n (uint256 numQuarters, uint256 startingQuarter) =\\n _getRewardsWindow(_strategy.updatedAt(), block.timestamp);\\n uint256 overheadPerQuarter = _capital.mul(block.timestamp.sub(_strategy.updatedAt())).div(numQuarters);\\n for (uint256 i = 0; i <= numQuarters.sub(1); i++) {\\n rewardsPowerOverhead[address(_strategy)][startingQuarter.add(i)] = rewardsPowerOverhead[\\n address(_strategy)\\n ][startingQuarter.add(i)]\\n .add(overheadPerQuarter);\\n }\\n }\\n }\\n }\\n\\n /**\\n * Check the strategy rewards for strategies starting and ending in the same quarter\\n * @param _strategy Strategy\\n * @param _startingQuarter Starting quarter\\n */\\n function _getStrategyRewardsOneQuarter(\\n address _strategy,\\n uint256 _allocated,\\n uint256 _startingQuarter\\n ) private view onlyMiningActive returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 strategyOverTime =\\n _allocated.mul(strategy.exitedAt().sub(strategy.executedAt())).sub(strategy.rewardsTotalOverhead());\\n return\\n strategyOverTime\\n .preciseDiv(protocolPerQuarter[_startingQuarter].quarterPower)\\n .preciseMul(uint256(protocolPerQuarter[_startingQuarter].supplyPerQuarter))\\n .mul(strategy.exitedAt().sub(_startingQuarter))\\n .div(block.timestamp.sub(_startingQuarter));\\n }\\n\\n /**\\n * Check the strategy rewards for strategies starting and ending in different quarters and/or more quarters\\n * @param _strategy Strategy\\n * @param _allocated Normalized allocated in DAI\\n * @param _startingQuarter Starting quarter\\n * @param _numQuarters Num of Quarters (in epochs)\\n */\\n function _getStrategyRewardsSomeQuarters(\\n address _strategy,\\n uint256 _allocated,\\n uint256 _startingQuarter,\\n uint256 _numQuarters\\n ) private view onlyMiningActive returns (uint256) {\\n // The strategy takes longer than one quarter / epoch\\n uint256 bablRewards;\\n for (uint256 i = 0; i <= _numQuarters.sub(1); i++) {\\n uint256 slotEnding = START_TIME.add(_startingQuarter.add(i).mul(EPOCH_DURATION)); // Initialization timestamp at the end of the first slot where the strategy starts its execution\\n uint256 powerRatioInQuarter =\\n _getStrategyRewardsPerQuarter(_strategy, _allocated, _startingQuarter, i, slotEnding);\\n bablRewards = bablRewards.add(powerRatioInQuarter);\\n }\\n return bablRewards;\\n }\\n\\n /**\\n * Check the strategy rewards for a specific quarter when strategies starting and ending in different quarters and/or more quarters\\n * @param _strategy Strategy\\n * @param _allocated Normalized allocated in DAI\\n * @param _startingQuarter Starting quarter\\n * @param _id Epoch number\\n * @param _slotEnding Ending slot timestamp of current slot (epoch)\\n */\\n function _getStrategyRewardsPerQuarter(\\n address _strategy,\\n uint256 _allocated,\\n uint256 _startingQuarter,\\n uint256 _id,\\n uint256 _slotEnding\\n ) private view onlyMiningActive returns (uint256) {\\n // The strategy takes longer than one quarter / epoch\\n // We need to calculate the strategy vs. protocol power ratio per each quarter\\n uint256 strategyPower; // Strategy power in each Epoch\\n uint256 protocolPower; // Protocol power in each Epoch\\n\\n // We iterate all the quarters where the strategy was active\\n uint256 percentage = 1e18;\\n if (IStrategy(_strategy).executedAt().add(EPOCH_DURATION) > _slotEnding) {\\n // We are in the first quarter of the strategy\\n\\n strategyPower = _allocated.mul(_slotEnding.sub(IStrategy(_strategy).executedAt())).sub(\\n rewardsPowerOverhead[address(_strategy)][_getQuarter(IStrategy(_strategy).executedAt())]\\n );\\n } else if (\\n IStrategy(_strategy).executedAt() < _slotEnding.sub(EPOCH_DURATION) &&\\n _slotEnding < IStrategy(_strategy).exitedAt()\\n ) {\\n // We are in an intermediate quarter different from starting or ending quarters\\n strategyPower = _allocated.mul(_slotEnding.sub(_slotEnding.sub(EPOCH_DURATION))).sub(\\n rewardsPowerOverhead[address(_strategy)][_getQuarter(_slotEnding.sub(45 days))]\\n );\\n } else {\\n // We are in the last quarter of the strategy\\n percentage = block.timestamp.sub(_slotEnding.sub(EPOCH_DURATION)).preciseDiv(\\n _slotEnding.sub(_slotEnding.sub(EPOCH_DURATION))\\n );\\n\\n strategyPower = _allocated.mul(IStrategy(_strategy).exitedAt().sub(_slotEnding.sub(EPOCH_DURATION))).sub(\\n rewardsPowerOverhead[address(_strategy)][_getQuarter(IStrategy(_strategy).exitedAt())]\\n );\\n }\\n protocolPower = protocolPerQuarter[_startingQuarter.add(_id)].quarterPower;\\n\\n _require(strategyPower <= protocolPower, Errors.OVERFLOW_IN_POWER);\\n\\n return\\n strategyPower\\n .preciseDiv(protocolPower)\\n .preciseMul(uint256(protocolPerQuarter[_startingQuarter.add(_id)].supplyPerQuarter))\\n .preciseMul(percentage);\\n }\\n\\n /**\\n * Safe BABL rewards (Mining program) token transfer.\\n * It handle cases when in case of rounding errors, RewardsDistributor might not have enough BABL.\\n * @param _to The receiver address of the contributor to send\\n * @param _amount The amount of BABL tokens to be rewarded during this claim\\n */\\n function _safeBABLTransfer(address _to, uint96 _amount) private onlyMiningActive {\\n uint256 bablBal = babltoken.balanceOf(address(this));\\n if (_amount > bablBal) {\\n SafeERC20.safeTransfer(babltoken, _to, bablBal);\\n } else {\\n SafeERC20.safeTransfer(babltoken, _to, _amount);\\n }\\n }\\n\\n /**\\n * Gets the contributor power from a timestamp to a specific timestamp within a garden\\n * @param _garden Address of the garden\\n * @param _contributor Address if the contributor\\n * @param _from Initial timestamp\\n * @param _to End timestamp\\n * @return uint256 Contributor power during that period\\n */\\n function _getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) private view returns (uint256) {\\n // Out of bounds\\n _require(_to >= IGarden(_garden).gardenInitializedAt() && _to >= _from, Errors.CONTRIBUTOR_POWER_CHECK_WINDOW);\\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][address(_contributor)];\\n Checkpoints memory powerCheckpoints = checkpoints[address(_garden)][address(_contributor)];\\n\\n if (contributor.initialDepositAt == 0 || contributor.initialDepositAt > _to) {\\n return 0;\\n } else {\\n if (_from <= IGarden(_garden).gardenInitializedAt()) {\\n // Avoid division by zero in case of _from parameter is not passed\\n _from = IGarden(_garden).gardenInitializedAt();\\n }\\n // Find closest point to _from and _to either contributor and garden checkpoints at their left\\n (powerCheckpoints.fromDepositAt, powerCheckpoints.lastDepositAt) = _locateCheckpointsContributor(\\n _garden,\\n _contributor,\\n _from,\\n _to\\n );\\n (powerCheckpoints.gardenFromDepositAt, powerCheckpoints.gardenLastDepositAt) = _locateCheckpointsGarden(\\n _garden,\\n _from,\\n _to\\n );\\n\\n // origin must be less than end window\\n _require(\\n powerCheckpoints.fromDepositAt <= powerCheckpoints.lastDepositAt &&\\n powerCheckpoints.gardenFromDepositAt <= powerCheckpoints.gardenLastDepositAt,\\n Errors.CONTRIBUTOR_POWER_CHECK_DEPOSITS\\n );\\n uint256 contributorPower;\\n uint256 gardenPower;\\n\\n // \\\"FROM power calculations\\\" PART\\n // Avoid underflows\\n\\n if (_from < powerCheckpoints.fromDepositAt) {\\n // Contributor still has no power but _from is later than the start of the garden\\n contributorPower = 0;\\n } else if (_from > powerCheckpoints.fromDepositAt) {\\n contributorPower = contributor.tsContributions[powerCheckpoints.fromDepositAt].power.add(\\n (_from.sub(powerCheckpoints.fromDepositAt)).mul(\\n contributor.tsContributions[powerCheckpoints.fromDepositAt].supply\\n )\\n );\\n } else {\\n // _from == fromDepositAt\\n contributorPower = contributor.tsContributions[powerCheckpoints.fromDepositAt].power;\\n }\\n gardenPower = gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenFromDepositAt].power.add(\\n (_from.sub(powerCheckpoints.gardenFromDepositAt)).mul(\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenFromDepositAt].supply\\n )\\n );\\n // \\\"TO power calculations\\\" PART\\n // We go for accurate power calculations avoiding overflows\\n // contributor power overflow\\n _require(contributorPower <= gardenPower, Errors.CONTRIBUTOR_POWER_OVERFLOW);\\n if (_from == _to) {\\n // Requested a specific checkpoint calculation (no slot)\\n if (gardenPower == 0) {\\n return 0;\\n } else {\\n return contributorPower.preciseDiv(gardenPower);\\n }\\n // Not a checkpoint anymore but a slot\\n } else if (_to < powerCheckpoints.lastDepositAt) {\\n // contributor has not deposited yet\\n return 0;\\n } else if (\\n _to == powerCheckpoints.lastDepositAt &&\\n powerCheckpoints.fromDepositAt == powerCheckpoints.lastDepositAt\\n ) {\\n // no more contributor checkpoints in the slot\\n gardenPower = (\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].power.add(\\n (_to.sub(powerCheckpoints.gardenLastDepositAt)).mul(\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].supply\\n )\\n )\\n )\\n .sub(gardenPower);\\n _require(contributorPower <= gardenPower, Errors.CONTRIBUTOR_POWER_OVERFLOW);\\n return contributorPower.preciseDiv(gardenPower);\\n } else {\\n contributorPower = (\\n contributor.tsContributions[powerCheckpoints.lastDepositAt].power.add(\\n (_to.sub(powerCheckpoints.lastDepositAt)).mul(\\n contributor.tsContributions[powerCheckpoints.lastDepositAt].supply\\n )\\n )\\n )\\n .sub(contributorPower);\\n\\n gardenPower = (\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].power.add(\\n (_to.sub(powerCheckpoints.gardenLastDepositAt)).mul(\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].supply\\n )\\n )\\n )\\n .sub(gardenPower);\\n _require(contributorPower <= gardenPower, Errors.CONTRIBUTOR_POWER_OVERFLOW);\\n\\n return contributorPower.preciseDiv(gardenPower);\\n }\\n }\\n }\\n\\n /**\\n * Gets the earlier and closest (deposit/withdrawal) checkpoints of a contributor in a specific range\\n * @param _garden Address of the garden\\n * @param _contributor Address if the contributor\\n * @param _from Initial timestamp\\n * @param _to End timestamp\\n * @return uint256 Contributor power during that period\\n */\\n function _locateCheckpointsContributor(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) private view returns (uint256, uint256) {\\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][address(_contributor)];\\n\\n uint256 lastDepositAt = contributor.timeListPointer[contributor.timeListPointer.length.sub(1)]; // Initialized with lastDeposit\\n uint256 fromDepositAt = contributor.timeListPointer[0]; // Initialized with initialDeposit\\n\\n if (lastDepositAt > _to || fromDepositAt < _from) {\\n // We go to find the closest deposits of the contributor to _from and _to\\n for (uint256 i = 0; i <= contributor.timeListPointer.length.sub(1); i++) {\\n if (contributor.timeListPointer[i] <= _to) {\\n lastDepositAt = contributor.timeListPointer[i];\\n }\\n if (contributor.timeListPointer[i] <= _from) {\\n fromDepositAt = contributor.timeListPointer[i];\\n }\\n }\\n }\\n return (fromDepositAt, lastDepositAt);\\n }\\n\\n /**\\n * Gets the earlier and closest (deposit/withdrawal) checkpoints of a garden in a specific range\\n * @param _garden Address of the garden\\n * @param _from Initial timestamp\\n * @param _to End timestamp\\n * @return uint256 Contributor power during that period\\n */\\n function _locateCheckpointsGarden(\\n address _garden,\\n uint256 _from,\\n uint256 _to\\n ) private view returns (uint256, uint256) {\\n uint256 gardenLastCheckpoint = gardenTimelist[address(_garden)].length.sub(1);\\n uint256 gardenLastDepositAt = gardenTimelist[address(_garden)][gardenLastCheckpoint]; // Initialized to the last garden checkpoint\\n uint256 gardenFromDepositAt = gardenTimelist[address(_garden)][0]; // Initialized to the first garden checkpoint\\n\\n if (gardenLastDepositAt > _to || gardenFromDepositAt < _from) {\\n // We go for the closest timestamp of garden to _to and _from\\n for (uint256 i = 0; i <= gardenLastCheckpoint; i++) {\\n uint256 gardenTime = gardenTimelist[address(_garden)][i];\\n if (gardenTime <= _to) {\\n gardenLastDepositAt = gardenTime;\\n }\\n if (gardenTime <= _from) {\\n gardenFromDepositAt = gardenTime;\\n }\\n }\\n }\\n return (gardenFromDepositAt, gardenLastDepositAt);\\n }\\n\\n /**\\n * Function that keeps checkpoints of the garden power (deposits and withdrawals) per timestamp\\n * @param _garden Garden address\\n */\\n function _updateGardenPower(address _garden) private {\\n IGarden garden = IGarden(_garden);\\n GardenPowerByTimestamp storage gardenTimestamp = gardenPowerByTimestamp[address(garden)][block.timestamp];\\n gardenTimestamp.supply = IERC20(address(IGarden(_garden))).totalSupply();\\n\\n gardenTimestamp.timestamp = block.timestamp;\\n\\n if (gardenPid[address(_garden)] == 0) {\\n // The very first deposit of all contributors in the mining program\\n gardenTimestamp.power = 0;\\n } else {\\n // Any other deposit different from the very first one (will have an antecesor)\\n gardenTimestamp.power = gardenPowerByTimestamp[address(garden)][\\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\\n ]\\n .power\\n .add(\\n gardenTimestamp\\n .timestamp\\n .sub(\\n gardenPowerByTimestamp[address(garden)][\\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\\n ]\\n .timestamp\\n )\\n .mul(\\n gardenPowerByTimestamp[address(garden)][\\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\\n ]\\n .supply\\n )\\n );\\n }\\n\\n gardenTimelist[address(garden)].push(block.timestamp); // Register of deposit timestamps in the array for iteration\\n gardenPid[address(garden)]++;\\n }\\n\\n /**\\n * Updates contributor timestamps params\\n * @param _garden Garden address\\n * @param _contributor Contributor address\\n * @param _previousBalance Previous balance\\n * @param _depositOrWithdraw Whether it is a deposit or a withdraw\\n */\\n function _setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw\\n ) private {\\n // We make checkpoints around contributor deposits to avoid fast loans and give the right rewards afterwards\\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][_contributor];\\n\\n contributor.tsContributions[block.timestamp].supply = IERC20(address(IGarden(_garden))).balanceOf(\\n address(_contributor)\\n );\\n\\n contributor.tsContributions[block.timestamp].timestamp = block.timestamp;\\n\\n contributor.tsContributions[block.timestamp].timePointer = contributor.pid;\\n\\n if (contributor.pid == 0) {\\n // The very first deposit\\n contributor.tsContributions[block.timestamp].power = 0;\\n } else {\\n // Any other deposits or withdrawals different from the very first one (will have an antecesor)\\n contributor.tsContributions[block.timestamp].power = contributor.tsContributions[contributor.lastDepositAt]\\n .power\\n .add(\\n (block.timestamp.sub(contributor.lastDepositAt)).mul(\\n contributor.tsContributions[contributor.lastDepositAt].supply\\n )\\n );\\n }\\n if (_depositOrWithdraw == true) {\\n // Deposit\\n if (_previousBalance == 0 || contributor.initialDepositAt == 0) {\\n contributor.initialDepositAt = block.timestamp;\\n }\\n contributor.lastDepositAt = block.timestamp;\\n } else {\\n // Withdrawals\\n if (IERC20(address(IGarden(_garden))).balanceOf(address(_contributor)) == 0) {\\n contributor.lastDepositAt = 0;\\n contributor.initialDepositAt = 0;\\n delete contributor.timeListPointer;\\n }\\n }\\n\\n contributor.timeListPointer.push(block.timestamp);\\n contributor.pid++;\\n }\\n\\n /**\\n * Calculates the BABL rewards supply for each quarter\\n * @param _quarter Number of the epoch (quarter)\\n */\\n function _tokenSupplyPerQuarter(uint256 _quarter) internal pure returns (uint96) {\\n _require(_quarter >= 1, Errors.QUARTERS_MIN_1);\\n if (_quarter >= 513) {\\n return 0;\\n } else {\\n uint256 firstFactor = (SafeDecimalMath.unit().add(DECAY_RATE)).powDecimal(_quarter.sub(1));\\n uint256 supplyForQuarter = Q1_REWARDS.divideDecimal(firstFactor);\\n return Safe3296.safe96(supplyForQuarter, 'overflow 96 bits');\\n }\\n }\\n\\n /**\\n * Calculates the quarter number for a specific time since START_TIME\\n * @param _now Timestamp to calculate its quarter\\n */\\n function _getQuarter(uint256 _now) internal view returns (uint256) {\\n uint256 quarter = (_now.sub(START_TIME).preciseDivCeil(EPOCH_DURATION)).div(1e18);\\n return quarter.add(1);\\n }\\n\\n /**\\n * Calculates the range (starting quarter and ending quarter since START_TIME)\\n * @param _from Starting timestamp\\n * @param _to Ending timestamp\\n */\\n function _getRewardsWindow(uint256 _from, uint256 _to) internal view returns (uint256, uint256) {\\n uint256 quarters = (_to.sub(_from).preciseDivCeil(EPOCH_DURATION)).div(1e18);\\n uint256 startingQuarter = (_from.sub(START_TIME).preciseDivCeil(EPOCH_DURATION)).div(1e18);\\n return (quarters.add(1), startingQuarter.add(1));\\n }\\n}\\n\",\"keccak256\":\"0xfc441c92c5baa279ff5037f9c7649f501a244641d504b90fd8c64c25aac755b6\",\"license\":\"Apache License\"},\"contracts/token/TimeLockRegistry.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\npragma experimental ABIEncoderV2;\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\nimport {TimeLockedToken} from './TimeLockedToken.sol';\\nimport {AddressArrayUtils} from '../lib/AddressArrayUtils.sol';\\n\\n/**\\n * @title TimeLockRegistry\\n * @notice Register Lockups for TimeLocked ERC20 Token BABL (e.g. vesting)\\n * @author Babylon Finance\\n * @dev This contract allows owner to register distributions for a TimeLockedToken\\n *\\n * To register a distribution, register method should be called by the owner.\\n * claim() should be called only by the BABL Token smartcontract (modifier onlyBABLToken)\\n * when any account registered to receive tokens make its own claim\\n * If case of a mistake, owner can cancel registration before the claim is done by the account\\n *\\n * Note this contract address must be setup in the TimeLockedToken's contract pointing\\n * to interact with (e.g. setTimeLockRegistry() function)\\n */\\n\\ncontract TimeLockRegistry is Ownable {\\n using SafeMath for uint256;\\n using Address for address;\\n using AddressArrayUtils for address[];\\n\\n /* ============ Events ============ */\\n\\n event Register(address receiver, uint256 distribution);\\n event Cancel(address receiver, uint256 distribution);\\n event Claim(address account, uint256 distribution);\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlyBABLToken() {\\n require(msg.sender == address(token), 'only BABL Token');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // time locked token\\n TimeLockedToken public token;\\n\\n /**\\n * @notice The profile of each token owner under vesting conditions and its special conditions\\n * @param receiver Account being registered\\n * @param investorType Indicates whether or not is a Team member (true = team member / advisor, false = private investor)\\n * @param vestingStarting Date When the vesting begins for such token owner\\n * @param distribution Tokens amount that receiver is due to get\\n */\\n struct Registration {\\n address receiver;\\n uint256 distribution;\\n bool investorType;\\n uint256 vestingStartingDate;\\n }\\n\\n /**\\n * @notice The profile of each token owner under vesting conditions and its special conditions\\n * @param team Indicates whether or not is a Team member (true = team member / advisor, false = private investor)\\n * @param vestingBegin When the vesting begins for such token owner\\n * @param vestingEnd When the vesting ends for such token owner\\n * @param lastClaim When the last claim was done\\n */\\n struct TokenVested {\\n bool team;\\n bool cliff;\\n uint256 vestingBegin;\\n uint256 vestingEnd;\\n uint256 lastClaim;\\n }\\n\\n /// @notice A record of token owners under vesting conditions for each account, by index\\n mapping(address => TokenVested) public tokenVested;\\n\\n // mapping from token owners under vesting conditions to BABL due amount (e.g. SAFT addresses, team members, advisors)\\n mapping(address => uint256) public registeredDistributions;\\n\\n // array of all registrations\\n address[] public registrations;\\n\\n // total amount of tokens registered\\n uint256 public totalTokens;\\n\\n // vesting for Team Members\\n uint256 private teamVesting = 365 days * 4;\\n\\n // vesting for Investors and Advisors\\n uint256 private investorVesting = 365 days * 3;\\n\\n /* ============ Functions ============ */\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * @notice Construct a new Time Lock Registry and gives ownership to sender\\n * @param _token TimeLockedToken contract to use in this registry\\n */\\n constructor(TimeLockedToken _token) {\\n token = _token;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /* ============ External Getter Functions ============ */\\n\\n /**\\n * Gets registrations\\n *\\n * @return address[] Returns list of registrations\\n */\\n\\n function getRegistrations() external view returns (address[] memory) {\\n return registrations;\\n }\\n\\n /* =========== Token related Gov Functions ====== */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION\\n *\\n * @notice Register multiple investors/team in a batch\\n * @param _registrations Registrations to process\\n */\\n function registerBatch(Registration[] memory _registrations) external onlyOwner {\\n for (uint256 i = 0; i < _registrations.length; i++) {\\n register(\\n _registrations[i].receiver,\\n _registrations[i].distribution,\\n _registrations[i].investorType,\\n _registrations[i].vestingStartingDate\\n );\\n }\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION\\n *\\n * @notice Register new account under vesting conditions (Team, Advisors, Investors e.g. SAFT purchaser)\\n * @param receiver Address belonging vesting conditions\\n * @param distribution Tokens amount that receiver is due to get\\n */\\n function register(\\n address receiver,\\n uint256 distribution,\\n bool investorType,\\n uint256 vestingStartingDate\\n ) public onlyOwner {\\n require(receiver != address(0), 'TimeLockRegistry::register: cannot register the zero address');\\n require(\\n receiver != address(this),\\n 'TimeLockRegistry::register: Time Lock Registry contract cannot be an investor'\\n );\\n require(distribution != 0, 'TimeLockRegistry::register: Distribution = 0');\\n require(\\n registeredDistributions[receiver] == 0,\\n 'TimeLockRegistry::register:Distribution for this address is already registered'\\n );\\n require(block.timestamp >= 1614553200, 'Cannot register earlier than March 2021'); // 1614553200 is UNIX TIME of 2021 March the 1st\\n require(totalTokens.add(distribution) <= IERC20(token).balanceOf(address(this)), 'Not enough tokens');\\n\\n totalTokens = totalTokens.add(distribution);\\n // register distribution\\n registeredDistributions[receiver] = distribution;\\n registrations.push(receiver);\\n\\n // register token vested conditions\\n TokenVested storage newTokenVested = tokenVested[receiver];\\n newTokenVested.team = investorType;\\n newTokenVested.vestingBegin = vestingStartingDate;\\n\\n if (newTokenVested.team == true) {\\n newTokenVested.vestingEnd = vestingStartingDate.add(teamVesting);\\n } else {\\n newTokenVested.vestingEnd = vestingStartingDate.add(investorVesting);\\n }\\n newTokenVested.lastClaim = vestingStartingDate;\\n\\n tokenVested[receiver] = newTokenVested;\\n\\n // emit register event\\n emit Register(receiver, distribution);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel distribution registration in case of mistake and before a claim is done\\n *\\n * @notice Cancel distribution registration\\n * @dev A claim has not to be done earlier\\n * @param receiver Address that should have it's distribution removed\\n * @return Whether or not it succeeded\\n */\\n function cancelRegistration(address receiver) external onlyOwner returns (bool) {\\n require(registeredDistributions[receiver] != 0, 'Not registered');\\n\\n // get amount from distributions\\n uint256 amount = registeredDistributions[receiver];\\n\\n // set distribution mapping to 0\\n delete registeredDistributions[receiver];\\n\\n // set tokenVested mapping to 0\\n delete tokenVested[receiver];\\n\\n // remove from the list of all registrations\\n registrations.remove(receiver);\\n\\n // decrease total tokens\\n totalTokens = totalTokens.sub(amount);\\n\\n // emit cancel event\\n emit Cancel(receiver, amount);\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel distribution registration in case of mistake and before a claim is done\\n *\\n * @notice Cancel already delivered tokens. It might only apply when non-completion of vesting period of Team members or Advisors\\n * @dev An automatic override allowance is granted during the claim process\\n * @param account Address that should have it's distribution removed\\n * @return Whether or not it succeeded\\n */\\n function cancelDeliveredTokens(address account) external onlyOwner returns (bool) {\\n uint256 loosingAmount = token.cancelVestedTokens(account);\\n\\n // emit cancel event\\n emit Cancel(account, loosingAmount);\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Recover tokens in Time Lock Registry smartcontract address by the owner\\n *\\n * @notice Send tokens from smartcontract address to the owner.\\n * It might only apply after a cancellation of vested tokens\\n * @param amount Amount to be recovered by the owner of the Time Lock Registry smartcontract from its balance\\n * @return Whether or not it succeeded\\n */\\n function transferToOwner(uint256 amount) external onlyOwner returns (bool) {\\n SafeERC20.safeTransfer(token, msg.sender, amount);\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Claim locked tokens by the registered account\\n *\\n * @notice Claim tokens due amount.\\n * @dev Claim is done by the user in the TimeLocked contract and the contract is the only allowed to call\\n * this function on behalf of the user to make the claim\\n * @return The amount of tokens registered and delivered after the claim\\n */\\n function claim(address _receiver) external onlyBABLToken returns (uint256) {\\n require(registeredDistributions[_receiver] != 0, 'Not registered');\\n\\n // get amount from distributions\\n uint256 amount = registeredDistributions[_receiver];\\n tokenVested[_receiver].lastClaim = block.timestamp;\\n\\n // set distribution mapping to 0\\n delete registeredDistributions[_receiver];\\n\\n // decrease total tokens\\n totalTokens = totalTokens.sub(amount);\\n\\n // register lockup in TimeLockedToken\\n // this will transfer funds from this contract and lock them for sender\\n token.registerLockup(\\n _receiver,\\n amount,\\n tokenVested[_receiver].team,\\n tokenVested[_receiver].vestingBegin,\\n tokenVested[_receiver].vestingEnd,\\n tokenVested[_receiver].lastClaim\\n );\\n\\n // set tokenVested mapping to 0\\n delete tokenVested[_receiver];\\n\\n // emit claim event\\n emit Claim(_receiver, amount);\\n\\n return amount;\\n }\\n\\n /* ============ Getter Functions ============ */\\n\\n function checkVesting(address address_)\\n external\\n view\\n returns (\\n bool team,\\n uint256 start,\\n uint256 end,\\n uint256 last\\n )\\n {\\n return (\\n tokenVested[address_].team,\\n tokenVested[address_].vestingBegin,\\n tokenVested[address_].vestingEnd,\\n tokenVested[address_].lastClaim\\n );\\n }\\n\\n function checkRegisteredDistribution(address address_) external view returns (uint256 amount) {\\n return registeredDistributions[address_];\\n }\\n}\\n\",\"keccak256\":\"0x5a2812398ff49dac4f10d03763768340a5de4e0f75fd2d00e18b5922051d094d\",\"license\":\"Apache License\"},\"contracts/token/TimeLockedToken.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {TimeLockRegistry} from './TimeLockRegistry.sol';\\nimport {RewardsDistributor} from './RewardsDistributor.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {VoteToken} from './VoteToken.sol';\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {Errors, _require} from '../lib/BabylonErrors.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\n\\n/**\\n * @title TimeLockedToken\\n * @notice Time Locked ERC20 Token\\n * @author Babylon Finance\\n * @dev Contract which gives the ability to time-lock tokens specially for vesting purposes usage\\n *\\n * By overriding the balanceOf() and transfer() functions in ERC20,\\n * an account can show its full, post-distribution balance and use it for voting power\\n * but only transfer or spend up to an allowed amount\\n *\\n * A portion of previously non-spendable tokens are allowed to be transferred\\n * along the time depending on each vesting conditions, and after all epochs have passed, the full\\n * account balance is unlocked. In case on non-completion vesting period, only the Time Lock Registry can cancel\\n * the delivery of the pending tokens and only can cancel the remaining locked ones.\\n */\\n\\nabstract contract TimeLockedToken is VoteToken {\\n using SafeMath for uint256;\\n\\n /* ============ Events ============ */\\n\\n /// @notice An event that emitted when a new lockout ocurr\\n event NewLockout(\\n address account,\\n uint256 tokenslocked,\\n bool isTeamOrAdvisor,\\n uint256 startingVesting,\\n uint256 endingVesting\\n );\\n\\n /// @notice An event that emitted when a new Time Lock is registered\\n event NewTimeLockRegistration(address previousAddress, address newAddress);\\n\\n /// @notice An event that emitted when a new Rewards Distributor is registered\\n event NewRewardsDistributorRegistration(address previousAddress, address newAddress);\\n\\n /// @notice An event that emitted when a cancellation of Lock tokens is registered\\n event Cancel(address account, uint256 amount);\\n\\n /// @notice An event that emitted when a claim of tokens are registered\\n event Claim(address _receiver, uint256 amount);\\n\\n /// @notice An event that emitted when a lockedBalance query is done\\n event LockedBalance(address _account, uint256 amount);\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlyTimeLockRegistry() {\\n require(\\n msg.sender == address(timeLockRegistry),\\n 'TimeLockedToken:: onlyTimeLockRegistry: can only be executed by TimeLockRegistry'\\n );\\n _;\\n }\\n\\n modifier onlyTimeLockOwner() {\\n if (address(timeLockRegistry) != address(0)) {\\n require(\\n msg.sender == Ownable(timeLockRegistry).owner(),\\n 'TimeLockedToken:: onlyTimeLockOwner: can only be executed by the owner of TimeLockRegistry'\\n );\\n }\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // represents total distribution for locked balances\\n mapping(address => uint256) distribution;\\n\\n /// @notice The profile of each token owner under its particular vesting conditions\\n /**\\n * @param team Indicates whether or not is a Team member or Advisor (true = team member/advisor, false = private investor)\\n * @param vestingBegin When the vesting begins for such token owner\\n * @param vestingEnd When the vesting ends for such token owner\\n * @param lastClaim When the last claim was done\\n */\\n struct VestedToken {\\n bool teamOrAdvisor;\\n uint256 vestingBegin;\\n uint256 vestingEnd;\\n uint256 lastClaim;\\n }\\n\\n /// @notice A record of token owners under vesting conditions for each account, by index\\n mapping(address => VestedToken) public vestedToken;\\n\\n // vesting duration for Team Members and Advisors\\n uint256 private teamVesting = 365 days * 4;\\n\\n // vesting duration for Investors\\n uint256 private investorVesting = 365 days * 3;\\n\\n // address of Time Lock Registry contract\\n IBabController public controller;\\n\\n // address of Time Lock Registry contract\\n TimeLockRegistry public timeLockRegistry;\\n\\n // address of Rewards Distriburor contract\\n RewardsDistributor public rewardsDistributor;\\n\\n // Enable Transfer of ERC20 BABL Tokens\\n // Only Minting or transfers from/to TimeLockRegistry and Rewards Distributor can transfer tokens until the protocol is fully decentralized\\n bool private tokenTransfersEnabled;\\n bool private tokenTransfersWereDisabled;\\n\\n /* ============ Functions ============ */\\n\\n /* ============ Constructor ============ */\\n\\n constructor(string memory _name, string memory _symbol) VoteToken(_name, _symbol) {\\n tokenTransfersEnabled = true;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /* =========== Token related Gov Functions ====== */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Disables transfers of ERC20 BABL Tokens\\n */\\n function disableTokensTransfers() external onlyOwner {\\n require(!tokenTransfersWereDisabled, 'BABL must flow');\\n tokenTransfersEnabled = false;\\n tokenTransfersWereDisabled = true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows transfers of ERC20 BABL Tokens\\n * Can only happen after the protocol is fully decentralized.\\n */\\n function enableTokensTransfers() external onlyOwner {\\n tokenTransfersEnabled = true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Set the Time Lock Registry contract to control token vesting conditions\\n *\\n * @notice Set the Time Lock Registry contract to control token vesting conditions\\n * @param newTimeLockRegistry Address of TimeLockRegistry contract\\n */\\n function setTimeLockRegistry(TimeLockRegistry newTimeLockRegistry) external onlyTimeLockOwner returns (bool) {\\n require(address(newTimeLockRegistry) != address(0), 'cannot be zero address');\\n require(address(newTimeLockRegistry) != address(this), 'cannot be this contract');\\n require(address(newTimeLockRegistry) != address(timeLockRegistry), 'must be new TimeLockRegistry');\\n emit NewTimeLockRegistration(address(timeLockRegistry), address(newTimeLockRegistry));\\n\\n timeLockRegistry = newTimeLockRegistry;\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Set the Rewards Distributor contract to control either BABL Mining or profit rewards\\n *\\n * @notice Set the Rewards Distriburor contract to control both types of rewards (profit and BABL Mining program)\\n * @param newRewardsDistributor Address of Rewards Distributor contract\\n */\\n function setRewardsDistributor(RewardsDistributor newRewardsDistributor) external onlyOwner returns (bool) {\\n require(address(newRewardsDistributor) != address(0), 'cannot be zero address');\\n require(address(newRewardsDistributor) != address(this), 'cannot be this contract');\\n require(address(newRewardsDistributor) != address(rewardsDistributor), 'must be new Rewards Distributor');\\n emit NewRewardsDistributorRegistration(address(rewardsDistributor), address(newRewardsDistributor));\\n\\n rewardsDistributor = newRewardsDistributor;\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Register new token lockup conditions for vested tokens defined only by Time Lock Registry\\n *\\n * @notice Tokens are completely delivered during the registration however lockup conditions apply for vested tokens\\n * locking them according to the distribution epoch periods and the type of recipient (Team, Advisor, Investor)\\n * Emits a transfer event showing a transfer to the recipient\\n * Only the registry can call this function\\n * @param _receiver Address to receive the tokens\\n * @param _amount Tokens to be transferred\\n * @param _profile True if is a Team Member or Advisor\\n * @param _vestingBegin Unix Time when the vesting for that particular address\\n * @param _vestingEnd Unix Time when the vesting for that particular address\\n * @param _lastClaim Unix Time when the claim was done from that particular address\\n *\\n */\\n function registerLockup(\\n address _receiver,\\n uint256 _amount,\\n bool _profile,\\n uint256 _vestingBegin,\\n uint256 _vestingEnd,\\n uint256 _lastClaim\\n ) external onlyTimeLockRegistry returns (bool) {\\n require(balanceOf(msg.sender) >= _amount, 'insufficient balance');\\n require(_receiver != address(0), 'cannot be zero address');\\n require(_receiver != address(this), 'cannot be this contract');\\n require(_receiver != address(timeLockRegistry), 'cannot be the TimeLockRegistry contract itself');\\n require(_receiver != msg.sender, 'the owner cannot lockup itself');\\n\\n // update amount of locked distribution\\n distribution[_receiver] = distribution[_receiver].add(_amount);\\n\\n VestedToken storage newVestedToken = vestedToken[_receiver];\\n\\n newVestedToken.teamOrAdvisor = _profile;\\n newVestedToken.vestingBegin = _vestingBegin;\\n newVestedToken.vestingEnd = _vestingEnd;\\n newVestedToken.lastClaim = _lastClaim;\\n\\n // transfer tokens to the recipient\\n _transfer(msg.sender, _receiver, _amount);\\n emit NewLockout(_receiver, _amount, _profile, _vestingBegin, _vestingEnd);\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel and remove locked tokens due to non-completion of vesting period\\n * applied only by Time Lock Registry and specifically to Team or Advisors as it does not apply to investors.\\n *\\n * @dev Cancel distribution registration\\n * @param lockedAccount that should have its still locked distribution removed due to non-completion of its vesting period\\n */\\n function cancelVestedTokens(address lockedAccount) external onlyTimeLockRegistry returns (uint256) {\\n return _cancelVestedTokensFromTimeLock(lockedAccount);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Each token owner can claim its own specific tokens with its own specific vesting conditions from the Time Lock Registry\\n *\\n * @dev Claim msg.sender tokens (if any available in the registry)\\n */\\n function claimMyTokens() external {\\n // claim msg.sender tokens from timeLockRegistry\\n uint256 amount = timeLockRegistry.claim(msg.sender);\\n // After a proper claim, locked tokens of Team and Advisors profiles are under restricted special vesting conditions so they automatic grant\\n // rights to the Time Lock Registry to only retire locked tokens if non-compliance vesting conditions take places along the vesting periods.\\n // It does not apply to Investors under vesting (their locked tokens cannot be removed).\\n if (vestedToken[msg.sender].teamOrAdvisor == true) {\\n approve(address(timeLockRegistry), amount);\\n }\\n // emit claim event\\n emit Claim(msg.sender, amount);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Get unlocked balance for an account\\n *\\n * @notice Get unlocked balance for an account\\n * @param account Account to check\\n * @return Amount that is unlocked and available eg. to transfer\\n */\\n function unlockedBalance(address account) public returns (uint256) {\\n // totalBalance - lockedBalance\\n return balanceOf(account).sub(lockedBalance(account));\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. View the locked balance for an account\\n *\\n * @notice View locked balance for an account\\n * @param account Account to check\\n * @return Amount locked in the time of checking\\n */\\n\\n function viewLockedBalance(address account) public view returns (uint256) {\\n // distribution of locked tokens\\n // get amount from distributions\\n\\n uint256 amount = distribution[account];\\n uint256 lockedAmount = amount;\\n\\n // Team and investors cannot transfer tokens in the first year\\n if (vestedToken[account].vestingBegin.add(365 days) > block.timestamp && amount != 0) {\\n return lockedAmount;\\n }\\n\\n // in case of vesting has passed, all tokens are now available, if no vesting lock is 0 as well\\n if (block.timestamp >= vestedToken[account].vestingEnd || amount == 0) {\\n lockedAmount = 0;\\n } else if (amount != 0) {\\n // in case of still under vesting period, locked tokens are recalculated\\n lockedAmount = amount.mul(vestedToken[account].vestingEnd.sub(block.timestamp)).div(\\n vestedToken[account].vestingEnd.sub(vestedToken[account].vestingBegin)\\n );\\n }\\n return lockedAmount;\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Get locked balance for an account\\n *\\n * @notice Get locked balance for an account\\n * @param account Account to check\\n * @return Amount locked in the time of checking\\n */\\n function lockedBalance(address account) public returns (uint256) {\\n // get amount from distributions locked tokens (if any)\\n uint256 lockedAmount = viewLockedBalance(account);\\n // in case of vesting has passed, all tokens are now available so we set mapping to 0 only for accounts under vesting\\n if (\\n block.timestamp >= vestedToken[account].vestingEnd &&\\n msg.sender == account &&\\n lockedAmount == 0 &&\\n vestedToken[account].vestingEnd != 0\\n ) {\\n delete distribution[account];\\n }\\n emit LockedBalance(account, lockedAmount);\\n return lockedAmount;\\n }\\n\\n /**\\n * PUBLIC FUNCTION. Get the address of Time Lock Registry\\n *\\n * @notice Get the address of Time Lock Registry\\n * @return Address of the Time Lock Registry\\n */\\n function getTimeLockRegistry() external view returns (address) {\\n return address(timeLockRegistry);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the Approval of allowances of ERC20 with special conditions for vesting\\n *\\n * @notice Override of \\\"Approve\\\" function to allow the `spender` to transfer up to `amount` from `src`\\n * @dev This will overwrite the approval amount for `spender` except in the case of spender is Time Lock Registry\\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\\n * @param spender The address of the account which may transfer tokens\\n * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\\n * @return Whether or not the approval succeeded\\n */\\n function approve(address spender, uint256 rawAmount) public override nonReentrant returns (bool) {\\n require(spender != address(0), 'TimeLockedToken::approve: spender cannot be zero address');\\n require(spender != msg.sender, 'TimeLockedToken::approve: spender cannot be the msg.sender');\\n\\n uint96 amount;\\n if (rawAmount == uint256(-1)) {\\n amount = uint96(-1);\\n } else {\\n amount = safe96(rawAmount, 'TimeLockedToken::approve: amount exceeds 96 bits');\\n }\\n\\n // There is no option to decreaseAllowance to timeLockRegistry in case of vested tokens\\n if ((spender == address(timeLockRegistry)) && (amount < allowance(msg.sender, address(timeLockRegistry)))) {\\n amount = safe96(\\n allowance(msg.sender, address(timeLockRegistry)),\\n 'TimeLockedToken::approve: cannot decrease allowance to timelockregistry'\\n );\\n }\\n _approve(msg.sender, spender, amount);\\n emit Approval(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the Increase of allowances of ERC20 with special conditions for vesting\\n *\\n * @notice Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * @dev This is an override with respect to the fulfillment of vesting conditions along the way\\n * However an user can increase allowance many times, it will never be able to transfer locked tokens during vesting period\\n * @return Whether or not the increaseAllowance succeeded\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public override nonReentrant returns (bool) {\\n require(\\n unlockedBalance(msg.sender) >= allowance(msg.sender, spender).add(addedValue) ||\\n spender == address(timeLockRegistry),\\n 'TimeLockedToken::increaseAllowance:Not enough unlocked tokens'\\n );\\n require(spender != address(0), 'TimeLockedToken::increaseAllowance:Spender cannot be zero address');\\n require(spender != msg.sender, 'TimeLockedToken::increaseAllowance:Spender cannot be the msg.sender');\\n _approve(msg.sender, spender, allowance(msg.sender, spender).add(addedValue));\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the decrease of allowances of ERC20 with special conditions for vesting\\n *\\n * @notice Atomically decrease the allowance granted to `spender` by the caller.\\n *\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n * This is an override with respect to the fulfillment of vesting conditions along the way\\n * An user cannot decrease the allowance to the Time Lock Registry who is in charge of vesting conditions\\n * @return Whether or not the decreaseAllowance succeeded\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public override nonReentrant returns (bool) {\\n require(spender != address(0), 'TimeLockedToken::decreaseAllowance:Spender cannot be zero address');\\n require(spender != msg.sender, 'TimeLockedToken::decreaseAllowance:Spender cannot be the msg.sender');\\n require(\\n allowance(msg.sender, spender) >= subtractedValue,\\n 'TimeLockedToken::decreaseAllowance:Underflow condition'\\n );\\n\\n // There is no option to decreaseAllowance to timeLockRegistry in case of vested tokens\\n require(\\n address(spender) != address(timeLockRegistry),\\n 'TimeLockedToken::decreaseAllowance:cannot decrease allowance to timeLockRegistry'\\n );\\n\\n _approve(\\n msg.sender,\\n spender,\\n allowance(msg.sender, spender).sub(subtractedValue, 'ERC20: decreased allowance below zero')\\n );\\n return true;\\n }\\n\\n /* ============ Internal Only Function ============ */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the _transfer of ERC20 BABL tokens only allowing the transfer of unlocked tokens\\n *\\n * @dev Transfer function which includes only unlocked tokens\\n * Locked tokens can always be transfered back to the returns address\\n * Transferring to owner allows re-issuance of funds through registry\\n *\\n * @param _from The address to send tokens from\\n * @param _to The address that will receive the tokens\\n * @param _value The amount of tokens to be transferred\\n */\\n function _transfer(\\n address _from,\\n address _to,\\n uint256 _value\\n ) internal override {\\n require(_from != address(0), 'TimeLockedToken:: _transfer: cannot transfer from the zero address');\\n require(_to != address(0), 'TimeLockedToken:: _transfer: cannot transfer to the zero address');\\n require(\\n _to != address(this),\\n 'TimeLockedToken:: _transfer: do not transfer tokens to the token contract itself'\\n );\\n\\n require(balanceOf(_from) >= _value, 'TimeLockedToken:: _transfer: insufficient balance');\\n\\n // check if enough unlocked balance to transfer\\n require(unlockedBalance(_from) >= _value, 'TimeLockedToken:: _transfer: attempting to transfer locked funds');\\n super._transfer(_from, _to, _value);\\n // voting power\\n _moveDelegates(\\n delegates[_from],\\n delegates[_to],\\n safe96(_value, 'TimeLockedToken:: _transfer: uint96 overflow')\\n );\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Disable BABL token transfer until certain conditions are met\\n *\\n * @dev Override the _beforeTokenTransfer of ERC20 BABL tokens until certain conditions are met:\\n * Only allowing minting or transfers from Time Lock Registry and Rewards Distributor until transfers are allowed in the controller\\n * Transferring to owner allows re-issuance of funds through registry\\n *\\n * @param _from The address to send tokens from\\n * @param _to The address that will receive the tokens\\n * @param _value The amount of tokens to be transferred\\n */\\n\\n // Disable garden token transfers. Allow minting and burning.\\n function _beforeTokenTransfer(\\n address _from,\\n address _to,\\n uint256 _value\\n ) internal virtual override {\\n super._beforeTokenTransfer(_from, _to, _value);\\n _require(\\n _from == address(0) ||\\n _from == address(timeLockRegistry) ||\\n _from == address(rewardsDistributor) ||\\n _to == address(timeLockRegistry) ||\\n tokenTransfersEnabled,\\n Errors.BABL_TRANSFERS_DISABLED\\n );\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel and remove locked tokens due to non-completion of vesting period\\n * applied only by Time Lock Registry and specifically to Team or Advisors\\n *\\n * @dev Cancel distribution registration\\n * @param lockedAccount that should have its still locked distribution removed due to non-completion of its vesting period\\n */\\n function _cancelVestedTokensFromTimeLock(address lockedAccount) internal onlyTimeLockRegistry returns (uint256) {\\n require(distribution[lockedAccount] != 0, 'TimeLockedToken::cancelTokens:Not registered');\\n\\n // get an update on locked amount from distributions at this precise moment\\n uint256 loosingAmount = lockedBalance(lockedAccount);\\n\\n require(loosingAmount > 0, 'TimeLockedToken::cancelTokens:There are no more locked tokens');\\n require(\\n vestedToken[lockedAccount].teamOrAdvisor == true,\\n 'TimeLockedToken::cancelTokens:cannot cancel locked tokens to Investors'\\n );\\n\\n // set distribution mapping to 0\\n delete distribution[lockedAccount];\\n\\n // set tokenVested mapping to 0\\n delete vestedToken[lockedAccount];\\n\\n // transfer only locked tokens back to TimeLockRegistry Owner (msg.sender)\\n require(\\n transferFrom(lockedAccount, address(timeLockRegistry), loosingAmount),\\n 'TimeLockedToken::cancelTokens:Transfer failed'\\n );\\n\\n // emit cancel event\\n emit Cancel(lockedAccount, loosingAmount);\\n\\n return loosingAmount;\\n }\\n}\\n\",\"keccak256\":\"0xad214a3aa8fcc15e51df9d4f4523c54f2c3149c47765cc8c44b6f4f9510bec4c\",\"license\":\"Apache License\"},\"contracts/token/VoteToken.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {IVoteToken} from '../interfaces/IVoteToken.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Context} from '@openzeppelin/contracts/utils/Context.sol';\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\n\\n/**\\n * @title VoteToken\\n * @notice Custom token which tracks voting power for governance\\n * @dev This is an abstraction of a fork of the Compound governance contract\\n * VoteToken is used by BABL to allow tracking voting power\\n * Checkpoints are created every time state is changed which record voting power\\n * Inherits standard ERC20 behavior\\n */\\n\\nabstract contract VoteToken is Context, ERC20, Ownable, IVoteToken, ReentrancyGuard {\\n using SafeMath for uint256;\\n using Address for address;\\n\\n /* ============ Events ============ */\\n\\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\\n event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);\\n\\n /* ============ Modifiers ============ */\\n\\n /* ============ State Variables ============ */\\n\\n /// @notice The EIP-712 typehash for the contract's domain\\n bytes32 public constant DOMAIN_TYPEHASH =\\n keccak256('EIP712Domain(string name,uint256 chainId,address verifyingContract)');\\n\\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\\n bytes32 public constant DELEGATION_TYPEHASH =\\n keccak256('Delegation(address delegatee,uint256 nonce,uint256 expiry)');\\n\\n /// @dev A record of votes checkpoints for each account, by index\\n mapping(address => address) public delegates;\\n\\n /// @notice A checkpoint for marking number of votes from a given block\\n struct Checkpoint {\\n uint32 fromBlock;\\n uint96 votes;\\n }\\n\\n /// @notice A record of votes checkpoints for each account, by index\\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\\n\\n /// @notice The number of checkpoints for each account\\n mapping(address => uint32) public numCheckpoints;\\n\\n /// @notice A record of states for signing / validating signatures\\n mapping(address => uint256) public nonces;\\n\\n /* ============ Functions ============ */\\n\\n /* ============ Constructor ============ */\\n\\n constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {}\\n\\n /* ============ External Functions ============ */\\n\\n /* =========== Token related Gov Functions ====== */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Delegating votes from msg.sender to delegatee\\n *\\n * @notice Delegate votes from `msg.sender` to `delegatee`\\n * @param delegatee The address to delegate votes to\\n */\\n\\n function delegate(address delegatee) external override {\\n return _delegate(msg.sender, delegatee);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Delegate votes using signature to 'delegatee'\\n *\\n * @notice Delegates votes from signatory to `delegatee`\\n * @param delegatee The address to delegate votes to\\n * @param nonce The contract state required to match the signature\\n * @param expiry The time at which to expire the signature\\n * @param v The recovery byte of the signature\\n * @param r Half of the ECDSA signature pair\\n * @param s Half of the ECDSA signature pair\\n */\\n\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external override {\\n bytes32 domainSeparator =\\n keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name())), getChainId(), address(this)));\\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\\n bytes32 digest = keccak256(abi.encodePacked('\\\\x19\\\\x01', domainSeparator, structHash));\\n address signatory = ecrecover(digest, v, r, s);\\n require(signatory != address(0), 'VoteToken::delegateBySig: invalid signature');\\n require(nonce == nonces[signatory].add(1), 'VoteToken::delegateBySig: invalid nonce');\\n nonces[signatory]++;\\n require(block.timestamp <= expiry, 'VoteToken::delegateBySig: signature expired');\\n return _delegate(signatory, delegatee);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Check Delegate votes using signature to 'delegatee'\\n *\\n * @notice Get current voting power for an account\\n * @param account Account to get voting power for\\n * @return Voting power for an account\\n */\\n function getCurrentVotes(address account) external view virtual override returns (uint96) {\\n uint32 nCheckpoints = numCheckpoints[account];\\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Get voting power at a specific block for an account\\n *\\n * @param account Account to get voting power for\\n * @param blockNumber Block to get voting power at\\n * @return Voting power for an account at specific block\\n */\\n function getPriorVotes(address account, uint256 blockNumber) external view virtual override returns (uint96) {\\n require(blockNumber < block.number, 'BABLToken::getPriorVotes: not yet determined');\\n\\n uint32 nCheckpoints = numCheckpoints[account];\\n if (nCheckpoints == 0) {\\n return 0;\\n }\\n\\n // First check most recent balance\\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\\n return checkpoints[account][nCheckpoints - 1].votes;\\n }\\n\\n // Next check implicit zero balance\\n if (checkpoints[account][0].fromBlock > blockNumber) {\\n return 0;\\n }\\n\\n uint32 lower = 0;\\n uint32 upper = nCheckpoints - 1;\\n while (upper > lower) {\\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\\n Checkpoint memory cp = checkpoints[account][center];\\n if (cp.fromBlock == blockNumber) {\\n return cp.votes;\\n } else if (cp.fromBlock < blockNumber) {\\n lower = center;\\n } else {\\n upper = center - 1;\\n }\\n }\\n return checkpoints[account][lower].votes;\\n }\\n\\n function getMyDelegatee() external view override returns (address) {\\n return delegates[msg.sender];\\n }\\n\\n function getDelegatee(address account) external view override returns (address) {\\n return delegates[account];\\n }\\n\\n function getCheckpoints(address account, uint32 id)\\n external\\n view\\n override\\n returns (uint32 fromBlock, uint96 votes)\\n {\\n Checkpoint storage getCheckpoint = checkpoints[account][id];\\n return (getCheckpoint.fromBlock, getCheckpoint.votes);\\n }\\n\\n function getNumberOfCheckpoints(address account) external view override returns (uint32) {\\n return numCheckpoints[account];\\n }\\n\\n /* ============ Internal Only Function ============ */\\n\\n /**\\n * GOVERNANCE FUNCTION. Make a delegation\\n *\\n * @dev Internal function to delegate voting power to an account\\n * @param delegator The address of the account delegating votes from\\n * @param delegatee The address to delegate votes to\\n */\\n\\n function _delegate(address delegator, address delegatee) internal {\\n address currentDelegate = delegates[delegator];\\n uint96 delegatorBalance = safe96(_balanceOf(delegator), 'VoteToken::_delegate: uint96 overflow');\\n delegates[delegator] = delegatee;\\n\\n emit DelegateChanged(delegator, currentDelegate, delegatee);\\n\\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\\n }\\n\\n function _balanceOf(address account) internal view virtual returns (uint256) {\\n return balanceOf(account);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Move the delegates\\n *\\n * @dev Internal function to move delegates between accounts\\n * @param srcRep The address of the account delegating votes from\\n * @param dstRep The address of the account delegating votes to\\n * @param amount The voting power to move\\n */\\n function _moveDelegates(\\n address srcRep,\\n address dstRep,\\n uint96 amount\\n ) internal {\\n if (srcRep != dstRep && amount > 0) {\\n // It must not revert but do nothing in cases of address(0) being part of the move\\n // Sub voting amount to source in case it is not the zero address (e.g. transfers)\\n if (srcRep != address(0)) {\\n uint32 srcRepNum = numCheckpoints[srcRep];\\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\\n uint96 srcRepNew = sub96(srcRepOld, amount, 'VoteToken::_moveDelegates: vote amount underflows');\\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\\n }\\n if (dstRep != address(0)) {\\n // Add it to destination in case it is not the zero address (e.g. any transfer of tokens or delegations except a first mint to a specific address)\\n uint32 dstRepNum = numCheckpoints[dstRep];\\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\\n uint96 dstRepNew = add96(dstRepOld, amount, 'VoteToken::_moveDelegates: vote amount overflows');\\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\\n }\\n }\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Internal function to write a checkpoint for voting power\\n *\\n * @dev internal function to write a checkpoint for voting power\\n * @param delegatee The address of the account delegating votes to\\n * @param nCheckpoints The num checkpoint\\n * @param oldVotes The previous voting power\\n * @param newVotes The new voting power\\n */\\n function _writeCheckpoint(\\n address delegatee,\\n uint32 nCheckpoints,\\n uint96 oldVotes,\\n uint96 newVotes\\n ) internal {\\n uint32 blockNumber = safe32(block.number, 'VoteToken::_writeCheckpoint: block number exceeds 32 bits');\\n\\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\\n } else {\\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\\n numCheckpoints[delegatee] = nCheckpoints + 1;\\n }\\n\\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint32\\n *\\n * @dev internal function to convert from uint256 to uint32\\n */\\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\\n require(n < 2**32, errorMessage);\\n return uint32(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint96\\n *\\n * @dev internal function to convert from uint256 to uint96\\n */\\n function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) {\\n require(n < 2**96, errorMessage);\\n return uint96(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to add two uint96 numbers\\n *\\n * @dev internal safe math function to add two uint96 numbers\\n */\\n function add96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n uint96 c = a + b;\\n require(c >= a, errorMessage);\\n return c;\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to subtract two uint96 numbers\\n *\\n * @dev internal safe math function to subtract two uint96 numbers\\n */\\n function sub96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to get chain ID\\n *\\n * @dev internal function to get chain ID\\n */\\n function getChainId() internal pure returns (uint256) {\\n uint256 chainId;\\n assembly {\\n chainId := chainid()\\n }\\n return chainId;\\n }\\n}\\n\",\"keccak256\":\"0xca174dc6b9b5f780aaaf9c832961b7f552b8cd0b6b6f36e8691fa7226de49457\",\"license\":\"Apache License\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50615485806100206000396000f3fe6080604052600436106105b55760003560e01c80637177fec9116102eb578063bc0922831161018f578063dfaef58f116100e1578063f142c3bc11610095578063f56e895d1161006f578063f56e895d14611711578063f948e50a14611726578063f979cdd914611774576105b5565b8063f142c3bc146115e5578063f2fde38b14611620578063f4330b4914611653576105b5565b8063ead4c1cf116100c6578063ead4c1cf1461156a578063f04ec5471461157f578063f05017eb146115b2576105b5565b8063dfaef58f14611504578063e973f4e914611537576105b5565b8063c9f7f2ed11610143578063d276cbdc1161011d578063d276cbdc1461149e578063d6a45aa5146114da578063daec2a1a146114ef576105b5565b8063c9f7f2ed1461145f578063cfd1801914611474578063d196f61f14611489576105b5565b8063c2d38e7911610174578063c2d38e7914611402578063c80aad6314611435578063c8ed947f1461144a576105b5565b8063bc0922831461136a578063bc819ea61461139d576105b5565b80638d78fb79116102485780639ef35710116101fc578063ad9d791d116101d6578063ad9d791d146112d1578063b0ecdf8014611304578063b82efd4f14611337576105b5565b80639ef35710146111f4578063a65b994714611209578063ad5c4648146112bc576105b5565b80638e20fb071161022d5780638e20fb0714611182578063974f5728146111975780639e18eb39146111ca576105b5565b80638d78fb79146111585780638da5cb5b1461116d576105b5565b8063867b6efa1161029f57806388e8dc751161028457806388e8dc75146110d7578063897904291461110a5780638bdb2afa14611143576105b5565b8063867b6efa1461108f57806386f2bc81146110c2576105b5565b80637f80e05b116102d05780637f80e05b146110325780638129fc1c1461104757806385d5d0361461105c576105b5565b80637177fec9146110085780637c4f0a361461101d576105b5565b806336c148b71161045d578063556d1a09116103af57806361b73ae6116103635780636acf33931161033d5780636acf339314610dc15780636b2fb67814610fde578063715018a614610ff3576105b5565b806361b73ae614610cc657806361d027b314610d795780636968551314610d8e576105b5565b80635dc2803a116103945780635dc2803a14610c535780635e192de614610c7e5780636176605e14610cb1576105b5565b8063556d1a0914610c29578063568c081314610c3e576105b5565b8063404c36391161041157806350d9f37f116103eb57806350d9f37f14610bcc57806352aeec7714610be15780635435ed8b14610bf6576105b5565b8063404c363914610b5a578063411137c314610b845780634a44ff4414610bb7576105b5565b8063393bfe4911610442578063393bfe4914610afd5780633f2a554014610b125780634032b72b14610b27576105b5565b806336c148b714610abe57806337973e5f14610ad3576105b5565b80632630c12f116105165780633040a2fb116104ca578063314a83c9116104a4578063314a83c9146109a857806333dc7dd014610a58578063364d118114610a8b576105b5565b80633040a2fb146108c057806330944c621461097e5780633137547714610993576105b5565b8063294d237c116104fb578063294d237c146108635780632b9db0bf146108785780632e0519cf1461088d576105b5565b80632630c12f1461083957806327e4acc71461084e576105b5565b806318b9e2521161056d578063201041981161055257806320104198146107b557806322c7fa8f146107df578063259072e114610812576105b5565b806318b9e252146106c45780631bdbf0ac146106f7576105b5565b806314ae9f2e1161059e57806314ae9f2e1461064757806314f45ca81461067c57806317a25714146106af576105b5565b806306796729146105ba57806313bc6d4b14610600575b600080fd5b3480156105c657600080fd5b506105e4600480360360208110156105dd57600080fd5b50356117a7565b604080516001600160a01b039092168252519081900360200190f35b34801561060c57600080fd5b506106336004803603602081101561062357600080fd5b50356001600160a01b03166117c5565b604080519115158252519081900360200190f35b34801561065357600080fd5b5061067a6004803603602081101561066a57600080fd5b50356001600160a01b0316611a2c565b005b34801561068857600080fd5b5061067a6004803603602081101561069f57600080fd5b50356001600160a01b0316611b1c565b3480156106bb57600080fd5b5061067a611d0b565b3480156106d057600080fd5b5061067a600480360360208110156106e757600080fd5b50356001600160a01b0316611d80565b34801561070357600080fd5b5061067a6004803603604081101561071a57600080fd5b81019060208101813564010000000081111561073557600080fd5b82018360208201111561074757600080fd5b8035906020019184600183028401116401000000008311171561076957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b03169150611fd19050565b3480156107c157600080fd5b506105e4600480360360208110156107d857600080fd5b50356121c9565b3480156107eb57600080fd5b5061067a6004803603602081101561080257600080fd5b50356001600160a01b03166121e9565b34801561081e57600080fd5b50610827612369565b60408051918252519081900360200190f35b34801561084557600080fd5b506105e461236f565b34801561085a57600080fd5b5061063361237e565b34801561086f57600080fd5b506105e4612387565b34801561088457600080fd5b50610827612396565b34801561089957600080fd5b506108a261239c565b60408051938452602084019290925282820152519081900360600190f35b3480156108cc57600080fd5b5061067a600480360360408110156108e357600080fd5b8101906020810181356401000000008111156108fe57600080fd5b82018360208201111561091057600080fd5b8035906020019184600183028401116401000000008311171561093257600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b031691506123aa9050565b34801561098a57600080fd5b506106336125a1565b34801561099f57600080fd5b506108276125af565b3480156109b457600080fd5b5061067a600480360360208110156109cb57600080fd5b8101906020810181356401000000008111156109e657600080fd5b8201836020820111156109f857600080fd5b80359060200191846020830284011164010000000083111715610a1a57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506125b5945050505050565b348015610a6457600080fd5b5061067a60048036036020811015610a7b57600080fd5b50356001600160a01b0316612673565b348015610a9757600080fd5b5061063360048036036020811015610aae57600080fd5b50356001600160a01b0316612785565b348015610aca57600080fd5b5061067a61279a565b348015610adf57600080fd5b506105e460048036036020811015610af657600080fd5b5035612865565b348015610b0957600080fd5b5061063361288f565b348015610b1e57600080fd5b506105e4612898565b348015610b3357600080fd5b5061067a60048036036020811015610b4a57600080fd5b50356001600160a01b03166128a7565b348015610b6657600080fd5b5061067a60048036036020811015610b7d57600080fd5b503561292d565b348015610b9057600080fd5b5061063360048036036020811015610ba757600080fd5b50356001600160a01b03166129d4565b348015610bc357600080fd5b506108276129f2565b348015610bd857600080fd5b506108276129f8565b348015610bed57600080fd5b5061067a6129fe565b348015610c0257600080fd5b5061067a60048036036020811015610c1957600080fd5b50356001600160a01b0316612af8565b348015610c3557600080fd5b50610827612e15565b348015610c4a57600080fd5b50610827612e1c565b348015610c5f57600080fd5b50610c68612e22565b6040805160ff9092168252519081900360200190f35b348015610c8a57600080fd5b5061063360048036036020811015610ca157600080fd5b50356001600160a01b0316612e27565b348015610cbd57600080fd5b506105e4612e3c565b348015610cd257600080fd5b5061067a60048036036020811015610ce957600080fd5b810190602081018135640100000000811115610d0457600080fd5b820183602082011115610d1657600080fd5b80359060200191846001830284011164010000000083111715610d3857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612e4b945050505050565b348015610d8557600080fd5b506105e4612fea565b348015610d9a57600080fd5b5061067a60048036036020811015610db157600080fd5b50356001600160a01b0316612ff9565b6105e4600480360360e0811015610dd757600080fd5b6001600160a01b038235169190810190604081016020820135640100000000811115610e0257600080fd5b820183602082011115610e1457600080fd5b80359060200191846001830284011164010000000083111715610e3657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050640100000000811115610e8957600080fd5b820183602082011115610e9b57600080fd5b80359060200191846001830284011164010000000083111715610ebd57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050640100000000811115610f1057600080fd5b820183602082011115610f2257600080fd5b80359060200191846001830284011164010000000083111715610f4457600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092958435959094909350604081019250602001359050640100000000811115610f9f57600080fd5b820183602082011115610fb157600080fd5b80359060200191846020830284011164010000000083111715610fd357600080fd5b91935091503561310b565b348015610fea57600080fd5b50610827613756565b348015610fff57600080fd5b5061067a61375c565b34801561101457600080fd5b50610827613808565b34801561102957600080fd5b5061082761380e565b34801561103e57600080fd5b50610633613814565b34801561105357600080fd5b5061067a613823565b34801561106857600080fd5b5061067a6004803603602081101561107f57600080fd5b50356001600160a01b03166138db565b34801561109b57600080fd5b5061067a600480360360208110156110b257600080fd5b50356001600160a01b03166139ed565b3480156110ce57600080fd5b50610827613b02565b3480156110e357600080fd5b5061067a600480360360208110156110fa57600080fd5b50356001600160a01b0316613b08565b34801561111657600080fd5b5061067a6004803603604081101561112d57600080fd5b506001600160a01b038135169060200135613ca0565b34801561114f57600080fd5b506105e4613e18565b34801561116457600080fd5b50610827613e27565b34801561117957600080fd5b506105e4613e2d565b34801561118e57600080fd5b50610827613e3c565b3480156111a357600080fd5b5061067a600480360360208110156111ba57600080fd5b50356001600160a01b0316613e43565b3480156111d657600080fd5b506105e4600480360360208110156111ed57600080fd5b5035614013565b34801561120057600080fd5b506105e4614023565b34801561121557600080fd5b506105e46004803603602081101561122c57600080fd5b81019060208101813564010000000081111561124757600080fd5b82018360208201111561125957600080fd5b8035906020019184600183028401116401000000008311171561127b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550614032945050505050565b3480156112c857600080fd5b506105e4614061565b3480156112dd57600080fd5b50610633600480360360208110156112f457600080fd5b50356001600160a01b0316614079565b34801561131057600080fd5b506106336004803603602081101561132757600080fd5b50356001600160a01b031661408e565b34801561134357600080fd5b5061067a6004803603602081101561135a57600080fd5b50356001600160a01b03166140a3565b34801561137657600080fd5b5061067a6004803603602081101561138d57600080fd5b50356001600160a01b03166141b4565b3480156113a957600080fd5b506113b2614331565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156113ee5781810151838201526020016113d6565b505050509050019250505060405180910390f35b34801561140e57600080fd5b5061067a6004803603602081101561142557600080fd5b50356001600160a01b0316614393565b34801561144157600080fd5b506105e4614510565b34801561145657600080fd5b506105e461451f565b34801561146b57600080fd5b5061082761452e565b34801561148057600080fd5b50610827614534565b34801561149557600080fd5b5061067a61453a565b3480156114aa57600080fd5b5061067a600480360360408110156114c157600080fd5b50803560ff1690602001356001600160a01b03166145ed565b3480156114e657600080fd5b506105e46147e6565b3480156114fb57600080fd5b506113b26147f5565b34801561151057600080fd5b5061067a6004803603602081101561152757600080fd5b50356001600160a01b0316614855565b34801561154357600080fd5b5061067a6004803603602081101561155a57600080fd5b50356001600160a01b0316614967565b34801561157657600080fd5b506105e4614a79565b34801561158b57600080fd5b5061067a600480360360208110156115a257600080fd5b50356001600160a01b0316614a88565b3480156115be57600080fd5b50610827600480360360208110156115d557600080fd5b50356001600160a01b0316614be4565b3480156115f157600080fd5b506115fa614bf6565b604080519485526020850193909352838301919091526060830152519081900360800190f35b34801561162c57600080fd5b5061067a6004803603602081101561164357600080fd5b50356001600160a01b0316614c08565b34801561165f57600080fd5b506106336004803603604081101561167657600080fd5b81019060208101813564010000000081111561169157600080fd5b8201836020820111156116a357600080fd5b803590602001918460018302840111640100000000831117156116c557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b03169150614d0b9050565b34801561171d57600080fd5b50610827614d46565b34801561173257600080fd5b5061173b614d4c565b604051808261028080838360005b83811015611761578181015183820152602001611749565b5050505090500191505060405180910390f35b34801561178057600080fd5b506106336004803603602081101561179757600080fd5b50356001600160a01b0316614d8c565b6000818152607060205260409020546001600160a01b03165b919050565b6001600160a01b03811660009081526086602052604081205460ff16806117f957506068546001600160a01b038381169116145b8061181157506069546001600160a01b038381169116145b806118295750606a546001600160a01b038381169116145b806118415750606d546001600160a01b038381169116145b806118595750606b546001600160a01b038381169116145b8061187c5750816001600160a01b0316611871613e2d565b6001600160a01b0316145b8061188f57506001600160a01b03821630145b8061189e575061189e82614daa565b80611a26575060866000836001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156118e157600080fd5b505afa1580156118f5573d6000803e3d6000fd5b505050506040513d602081101561190b57600080fd5b50516001600160a01b0316815260208101919091526040016000205460ff168015611a265750816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b15801561196a57600080fd5b505afa15801561197e573d6000803e3d6000fd5b505050506040513d602081101561199457600080fd5b5051604080517f17ab9f200000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152915191909216916317ab9f20916024808301926020929190829003018186803b1580156119f957600080fd5b505afa158015611a0d573d6000803e3d6000fd5b505050506040513d6020811015611a2357600080fd5b50515b92915050565b611a34614dfa565b6001600160a01b0316611a45613e2d565b6001600160a01b031614611a8e576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526089602052604090205460ff16611afb576040805162461bcd60e51b815260206004820152601560248201527f4b65657065722069732077686974656c69737465640000000000000000000000604482015290519081900360640190fd5b6001600160a01b03166000908152608960205260409020805460ff19169055565b611b24614dfa565b6001600160a01b0316611b35613e2d565b6001600160a01b031614611b7e576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526086602052604090205460ff16611beb576040805162461bcd60e51b815260206004820152601560248201527f47617264656e20646f6573206e6f742065786973740000000000000000000000604482015290519081900360640190fd5b6000819050806001600160a01b03166302fb0c5e6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c2957600080fd5b505afa158015611c3d573d6000803e3d6000fd5b505050506040513d6020811015611c5357600080fd5b505115611ca7576040805162461bcd60e51b815260206004820181905260248201527f5468652067617264656e206e6565647320746f2062652064697361626c65642e604482015290519081900360640190fd5b6040805163567619c560e11b81526001600482015290516001600160a01b0383169163acec338a91602480830192600092919082900301818387803b158015611cef57600080fd5b505af1158015611d03573d6000803e3d6000fd5b505050505050565b611d13614dfa565b6001600160a01b0316611d24613e2d565b6001600160a01b031614611d6d576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6093805462ff0000191662010000179055565b611d88614dfa565b6001600160a01b0316611d99613e2d565b6001600160a01b031614611de2576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526086602052604090205460ff16611e4f576040805162461bcd60e51b815260206004820152601560248201527f47617264656e20646f6573206e6f742065786973740000000000000000000000604482015290519081900360640190fd5b806001600160a01b03166302fb0c5e6040518163ffffffff1660e01b815260040160206040518083038186803b158015611e8857600080fd5b505afa158015611e9c573d6000803e3d6000fd5b505050506040513d6020811015611eb257600080fd5b505115611f06576040805162461bcd60e51b815260206004820181905260248201527f5468652067617264656e206e6565647320746f2062652064697361626c65642e604482015290519081900360640190fd5b611f73816065805480602002602001604051908101604052809291908181526020018280548015611f6057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611f42575b5050505050614dfe90919063ffffffff16565b8051611f87916065916020909101906152c1565b506001600160a01b038116600081815260866020526040808220805460ff19169055517fb52dedfe431c6250e847edee5dca0a14cfaad5c6626218f99bd60c8ad9939a9f9190a250565b611fd9614dfa565b6001600160a01b0316611fea613e2d565b6001600160a01b031614612033576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b600061203e83614e7b565b6000818152607060205260409020549091506001600160a01b0316156120ab576040805162461bcd60e51b815260206004820152601b60248201527f496e746567726174696f6e2065786973747320616c72656164792e0000000000604482015290519081900360640190fd5b6001600160a01b038216612106576040805162461bcd60e51b815260206004820152601f60248201527f496e746567726174696f6e2061646472657373206d7573742065786973742e00604482015290519081900360640190fd5b60008181526070602090815260409182902080546001600160a01b0319166001600160a01b0386161790559051845185928291908401908083835b602083106121605780518252601f199092019160209182019101612141565b51815160209384036101000a6000190180199092169116179052604080519290940182900382206001600160a01b038916835293519395507ffda47fb8c9da07a420b19d406f4c50352dfa9f6513a950bb282baf8cb9b9050594509083900301919050a2505050565b607281601481106121d957600080fd5b01546001600160a01b0316905081565b6121f1614dfa565b6001600160a01b0316612202613e2d565b6001600160a01b03161461224b576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b606c546001600160a01b03828116911614156122ae576040805162461bcd60e51b815260206004820152601a60248201527f497368746172204761746520616c726561647920657869737473000000000000604482015290519081900360640190fd5b6001600160a01b038116612309576040805162461bcd60e51b815260206004820152601d60248201527f4973687461722047617465206f7261636c65206d757374206578697374000000604482015290519081900360640190fd5b606c80546001600160a01b038381166001600160a01b03198316811790935560408051938452911660208301819052815190927f9d8291abf2224012a00e3e6cb815777395423c95684705c6a799205e926f38d492908290030190a15050565b60975481565b6069546001600160a01b031681565b60995460ff1681565b6068546001600160a01b031681565b60915481565b608c54608d54608e54909192565b6123b2614dfa565b6001600160a01b03166123c3613e2d565b6001600160a01b03161461240c576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b600061241783614e7b565b6000818152607060205260409020549091506001600160a01b0316612483576040805162461bcd60e51b815260206004820152601b60248201527f496e746567726174696f6e20646f6573206e6f742065786973742e0000000000604482015290519081900360640190fd5b6001600160a01b0382166124de576040805162461bcd60e51b815260206004820152601f60248201527f496e746567726174696f6e2061646472657373206d7573742065786973742e00604482015290519081900360640190fd5b60008181526070602090815260409182902080546001600160a01b0319166001600160a01b0386161790559051845185928291908401908083835b602083106125385780518252601f199092019160209182019101612519565b51815160209384036101000a6000190180199092169116179052604080519290940182900382206001600160a01b038916835293519395507f10af83bc70c2a73aefcd7156f6f80519861b0d2657dee2b4b8a8123e70f4b99f94509083900301919050a2505050565b609354610100900460ff1681565b60955481565b6125bd614dfa565b6001600160a01b03166125ce613e2d565b6001600160a01b031614612617576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b60005b815181101561266f5760016089600084848151811061263557fe5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905560010161261a565b5050565b61267b614dfa565b6001600160a01b031661268c613e2d565b6001600160a01b0316146126d5576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b038116612728576040805162461bcd60e51b8152602060048201526015602482015274041646472657373206d757374206e6f74206265203605c1b604482015290519081900360640190fd5b606780546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917f75cbfa1661740f312268987c8dfe34da6bacb541f3e31eb54ea7fd5d88a79e2b9181900360200190a25050565b60866020526000908152604090205460ff1681565b6127a2614dfa565b6001600160a01b03166127b3613e2d565b6001600160a01b0316146127fc576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b65017e14a710004211612856576040805162461bcd60e51b815260206004820152601f60248201527f5472616e73666572732063616e6e6f7420626520656e61626c65642079657400604482015290519081900360640190fd5b6093805460ff19166001179055565b6066818154811061287557600080fd5b6000918252602090912001546001600160a01b0316905081565b60935460ff1681565b606b546001600160a01b031681565b6128af614dfa565b6001600160a01b03166128c0613e2d565b6001600160a01b031614612909576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b03166000908152608960205260409020805460ff19166001179055565b612935614dfa565b6001600160a01b0316612946613e2d565b6001600160a01b03161461298f576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b60018110156129cf5760405162461bcd60e51b815260040180806020018281038252602d815260200180615381602d913960400191505060405180910390fd5b609855565b6001600160a01b031660009081526089602052604090205460ff1690565b60905481565b60965481565b612a06614dfa565b6001600160a01b0316612a17613e2d565b6001600160a01b031614612a60576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b609354610100900460ff16612af6576093805461ff001916610100179055606b54604080517f79fc904f00000000000000000000000000000000000000000000000000000000815290516001600160a01b03909216916379fc904f9160048082019260009290919082900301818387803b158015612add57600080fd5b505af1158015612af1573d6000803e3d6000fd5b505050505b565b612b00614dfa565b6001600160a01b0316612b11613e2d565b6001600160a01b031614612b5a576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b038116612bad576040805162461bcd60e51b8152602060048201526015602482015274041646472657373206d757374206e6f74206265203605c1b604482015290519081900360640190fd5b6071546001600160a01b0382811691161415612c10576040805162461bcd60e51b815260206004820152601960248201527f41646472657373206d75737420626520646966666572656e7400000000000000604482015290519081900360640190fd5b806001600160a01b031660706000612d4c846001600160a01b03166317d7de7c6040518163ffffffff1660e01b815260040160006040518083038186803b158015612c5a57600080fd5b505afa158015612c6e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015612c9757600080fd5b8101908080516040519392919084640100000000821115612cb757600080fd5b908301906020820185811115612ccc57600080fd5b8251640100000000811182820188101715612ce657600080fd5b82525081516020918201929091019080838360005b83811015612d13578181015183820152602001612cfb565b50505050905090810190601f168015612d405780820380516001836020036101000a031916815260200191505b50604052505050614e7b565b81526020810191909152604001600020546001600160a01b031614612db8576040805162461bcd60e51b815260206004820152601d60248201527f496e746567726174696f6e206e6565647320746f2062652076616c6964000000604482015290519081900360640190fd5b607180546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917f7c0554a0d606bbd6266e57a40fdb3702f32d1a564d5d06f05ed977ace613dd349181900360200190a25050565b62093a8081565b60945481565b601481565b60896020526000908152604090205460ff1681565b6071546001600160a01b031681565b612e53614dfa565b6001600160a01b0316612e64613e2d565b6001600160a01b031614612ead576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6000612eb882614e7b565b6000818152607060205260409020549091506001600160a01b0316612f24576040805162461bcd60e51b815260206004820152601b60248201527f496e746567726174696f6e20646f6573206e6f742065786973742e0000000000604482015290519081900360640190fd5b60008181526070602090815260409182902080546001600160a01b03198116909155915184516001600160a01b039093169285928291908401908083835b60208310612f815780518252601f199092019160209182019101612f62565b51815160209384036101000a6000190180199092169116179052604080519290940182900382206001600160a01b038816835293519395507ffc3fbb608ec9e619ead57ddfa31f2ab35c888b67f6471b74dce69c035eed445b94509083900301919050a2505050565b608b546001600160a01b031681565b613001614dfa565b6001600160a01b0316613012613e2d565b6001600160a01b03161461305b576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b0381166130ae576040805162461bcd60e51b8152602060048201526015602482015274041646472657373206d757374206e6f74206265203605c1b604482015290519081900360640190fd5b606d80546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917f57c1ea229271e944c7d975557caf535c1c974708de760613121827217db4ce8f9181900360200190a25050565b6071546000906001600160a01b031661316b576040805162461bcd60e51b815260206004820181905260248201527f4e65656420612064656661756c7420747261646520696e746567726174696f6e604482015290519081900360640190fd5b606c54604080517f7804a5dc00000000000000000000000000000000000000000000000000000000815233600482015290516001600160a01b0390921691637804a5dc91602480820192602092909190829003018186803b1580156131cf57600080fd5b505afa1580156131e3573d6000803e3d6000fd5b505050506040513d60208110156131f957600080fd5b505180613208575060995460ff165b6132435760405162461bcd60e51b81526004018080602001828103825260278152602001806153fc6027913960400191505060405180910390fd5b6000606a60009054906101000a90046001600160a01b03166001600160a01b0316638d06366f8b338c8c8c8c8c8c8c6040518a63ffffffff1660e01b8152600401808a6001600160a01b03168152602001896001600160a01b031681526020018060200180602001806020018881526020018060200186815260200185810385528c818151815260200191508051906020019080838360005b838110156132f45781810151838201526020016132dc565b50505050905090810190601f1680156133215780820380516001836020036101000a031916815260200191505b5085810384528b5181528b516020918201918d019080838360005b8381101561335457818101518382015260200161333c565b50505050905090810190601f1680156133815780820380516001836020036101000a031916815260200191505b5085810383528a5181528a516020918201918c019080838360005b838110156133b457818101518382015260200161339c565b50505050905090810190601f1680156133e15780820380516001836020036101000a031916815260200191505b508581038252888882818152602001925060200280828437600081840152601f19601f8201169050808301925050509d5050505050505050505050505050602060405180830381600087803b15801561343957600080fd5b505af115801561344d573d6000803e3d6000fd5b505050506040513d602081101561346357600080fd5b505190506001600160a01b038a1673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2141580613491575034155b156135c957604080517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810185905290516001600160a01b038c16916323b872dd9160648083019260209291908290030181600087803b15801561350457600080fd5b505af1158015613518573d6000803e3d6000fd5b505050506040513d602081101561352e57600080fd5b5050604080517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b038381166004830152602482018690529151918c169163095ea7b3916044808201926020929091908290030181600087803b15801561359c57600080fd5b505af11580156135b0573d6000803e3d6000fd5b505050506040513d60208110156135c657600080fd5b50505b6001600160a01b03811660009081526086602052604090205460ff1615613637576040805162461bcd60e51b815260206004820152601560248201527f47617264656e20616c7265616479206578697374730000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116600081815260866020526040808220805460ff1916600190811790915560658054918201815583527f8ff97419363ffd7000167f130ef7168fbea05faf9251824ca5043f113cc6a7c70180546001600160a01b0319168417905580517f8dbdbe6d00000000000000000000000000000000000000000000000000000000815260048101879052602481018790523360448201529051638dbdbe6d9234926064808201939182900301818588803b1580156136fa57600080fd5b505af115801561370e573d6000803e3d6000fd5b50506040513393506001600160a01b03851692507f3f9c315348eaae54d760380967a68b458af53312321328f584799f93283dc1de9150600090a39998505050505050505050565b61546090565b613764614dfa565b6001600160a01b0316613775613e2d565b6001600160a01b0316146137be576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380546001600160a01b0319169055565b60985481565b608c5481565b60935462010000900460ff1681565b61382b614e86565b6611c37937e0800060955566b1a2bc2ec500006094819055600060968190556097556093805462ffffff19169055606780546001600160a01b031916731f98431c8ad98523631ae4a59f267346ea31f98417905567016345785d8a0000608c55608d55670b1a2bc2ec500000608e5567011c37937e080000608f5567025bf6196bd10000609055670a688906bd8b0000609155670214e8348c4f000060925560646098556099805460ff19169055565b6138e3614dfa565b6001600160a01b03166138f4613e2d565b6001600160a01b03161461393d576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b038116613990576040805162461bcd60e51b8152602060048201526015602482015274041646472657373206d757374206e6f74206265203605c1b604482015290519081900360640190fd5b606b80546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917f52cd8e0a7f86e9df123b3357ab2ee1c4cd0f5ac84ca8c98d93beb2679b2bb8069181900360200190a25050565b6139f5614dfa565b6001600160a01b0316613a06613e2d565b6001600160a01b031614613a4f576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b038116613aa2576040805162461bcd60e51b8152602060048201526015602482015274041646472657373206d757374206e6f74206265203605c1b604482015290519081900360640190fd5b608b80546001600160a01b038381166001600160a01b03198316811790935560408051938452911660208301819052815190927f8c3aa5f43a388513435861bf27dfad7829cd248696fed367c62d441f6295449692908290030190a15050565b60925481565b613b10614dfa565b6001600160a01b0316613b21613e2d565b6001600160a01b031614613b6a576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526087602052604090205460ff16613bd7576040805162461bcd60e51b815260206004820152601c60248201527f5265736572766520617373657420646f6573206e6f7420657869737400000000604482015290519081900360640190fd5b613c42816066805480602002602001604051908101604052809291908181526020018280548015611f60576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311611f42575050505050614dfe90919063ffffffff16565b8051613c56916066916020909101906152c1565b506001600160a01b038116600081815260876020526040808220805460ff19169055517f2a4ae73bc76175e864e83c9843f11cf15a1bfcfa73152fb96d133416efee48ed9190a250565b613ca8614dfa565b6001600160a01b0316613cb9613e2d565b6001600160a01b031614613d02576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b60008111613d57576040805162461bcd60e51b815260206004820152601d60248201527f5f6d696e5269736b79506169724c6971756964697479457468203e2030000000604482015290519081900360640190fd5b6001600160a01b03821660009081526087602052604090205460ff16613dc4576040805162461bcd60e51b815260206004820152601b60248201527f4e6565647320746f20626520612076616c696420726573657276650000000000604482015290519081900360640190fd5b6001600160a01b0382166000818152608a6020908152604091829020849055815184815291517fb78c51bc9bffa228585b84c38a0234fe0a48eb7aeb9f7a6a7a46f0ddd3270dd59281900390910190a25050565b6067546001600160a01b031681565b608e5481565b6000613e37614f38565b905090565b62093a8090565b613e4b614dfa565b6001600160a01b0316613e5c613e2d565b6001600160a01b031614613ea5576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526086602052604090205460ff16613f12576040805162461bcd60e51b815260206004820152601560248201527f47617264656e20646f6573206e6f742065786973740000000000000000000000604482015290519081900360640190fd5b6000819050806001600160a01b03166302fb0c5e6040518163ffffffff1660e01b815260040160206040518083038186803b158015613f5057600080fd5b505afa158015613f64573d6000803e3d6000fd5b505050506040513d6020811015613f7a57600080fd5b5051613fcd576040805162461bcd60e51b815260206004820152601e60248201527f5468652067617264656e206e6565647320746f206265206163746976652e0000604482015290519081900360640190fd5b6040805163567619c560e11b815260006004820181905291516001600160a01b0384169263acec338a926024808201939182900301818387803b158015611cef57600080fd5b6065818154811061287557600080fd5b606d546001600160a01b031681565b60006070600061404184614e7b565b81526020810191909152604001600020546001600160a01b031692915050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b60886020526000908152604090205460ff1681565b60876020526000908152604090205460ff1681565b6140ab614dfa565b6001600160a01b03166140bc613e2d565b6001600160a01b031614614105576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b038116614158576040805162461bcd60e51b8152602060048201526015602482015274041646472657373206d757374206e6f74206265203605c1b604482015290519081900360640190fd5b606f80546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917e40167ea3901ef812c672b081813db3c0fc117c302ace151f1f9a907906e1669181900360200190a25050565b6141bc614dfa565b6001600160a01b03166141cd613e2d565b6001600160a01b031614614216576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6068546001600160a01b0382811691161415614279576040805162461bcd60e51b815260206004820152601c60248201527f47617264656e2056616c75657220616c72656164792065786973747300000000604482015290519081900360640190fd5b6001600160a01b0381166142d4576040805162461bcd60e51b815260206004820152601860248201527f47617264656e2056616c756572206d7573742065786973740000000000000000604482015290519081900360640190fd5b606880546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917fb89b871cab0fe1b2d8c7cc3e16640ef9a9bf67f031e44947331820e025bf69479181900360200190a25050565b6060606680548060200260200160405190810160405280929190818152602001828054801561438957602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161436b575b5050505050905090565b61439b614dfa565b6001600160a01b03166143ac613e2d565b6001600160a01b0316146143f5576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6069546001600160a01b0382811691161415614458576040805162461bcd60e51b815260206004820152601b60248201527f5072696365206f7261636c6520616c7265616479206578697374730000000000604482015290519081900360640190fd5b6001600160a01b0381166144b3576040805162461bcd60e51b815260206004820152601760248201527f5072696365206f7261636c65206d757374206578697374000000000000000000604482015290519081900360640190fd5b606980546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917f40bddd72ea96b80dae14e3d13e8ce2c4ecd2500d88c6c0004d24a00deab28f9c9181900360200190a25050565b606a546001600160a01b031681565b606c546001600160a01b031681565b608d5481565b608f5481565b614542614dfa565b6001600160a01b0316614553613e2d565b6001600160a01b03161461459c576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b60995460ff16156145de5760405162461bcd60e51b815260040180806020018281038252602d815260200180615423602d913960400191505060405180910390fd5b6099805460ff19166001179055565b6145f5614dfa565b6001600160a01b0316614606613e2d565b6001600160a01b03161461464f576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b601460ff8316106146a7576040805162461bcd60e51b815260206004820152601660248201527f4d6178206f7065726174696f6e73207265616368656400000000000000000000604482015290519081900360640190fd5b806001600160a01b031660728360ff16601481106146c157fe5b01546001600160a01b0316141561471f576040805162461bcd60e51b815260206004820152601560248201527f4f7065726174696f6e20616c7265616479207365740000000000000000000000604482015290519081900360640190fd5b6001600160a01b03811661477a576040805162461bcd60e51b815260206004820152601d60248201527f4f7065726174696f6e2061646472657373206d7573742065786973742e000000604482015290519081900360640190fd5b8060728360ff166014811061478b57fe5b0180546001600160a01b039283166001600160a01b03199091161790556040805191831682525160ff8416917f2dc23b4bb2132388a8a9f2d4a7ec650d42dcd4c1c63e6495756fa25e8ecc6abd919081900360200190a25050565b606f546001600160a01b031681565b60606065805480602002602001604051908101604052809291908181526020018280548015614389576020028201919060005260206000209081546001600160a01b0316815260019091019060200180831161436b575050505050905090565b61485d614dfa565b6001600160a01b031661486e613e2d565b6001600160a01b0316146148b7576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b03811661490a576040805162461bcd60e51b8152602060048201526015602482015274041646472657373206d757374206e6f74206265203605c1b604482015290519081900360640190fd5b606e80546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917f578086cc379999d712cf9ea4c177a02b092c028a84cf82d2dd590f2606b3169f9181900360200190a25050565b61496f614dfa565b6001600160a01b0316614980613e2d565b6001600160a01b0316146149c9576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b038116614a1c576040805162461bcd60e51b8152602060048201526015602482015274041646472657373206d757374206e6f74206265203605c1b604482015290519081900360640190fd5b606a80546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917f1e3307b8b00f4ec731298a869e9665a2662abd65a0e3fe9dd01fd53c35b0ae939181900360200190a25050565b606e546001600160a01b031681565b614a90614dfa565b6001600160a01b0316614aa1613e2d565b6001600160a01b031614614aea576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526087602052604090205460ff1615614b58576040805162461bcd60e51b815260206004820152601b60248201527f5265736572766520617373657420616c72656164792061646465640000000000604482015290519081900360640190fd5b6001600160a01b038116600081815260876020526040808220805460ff1916600190811790915560668054918201815583527f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e943540180546001600160a01b03191684179055517f9fef46e320a4767c320315d2f597ee79c1e17c3c3330d026764d6a7dac8fcd5c9190a250565b608a6020526000908152604090205481565b608f5460905460915460925490919293565b614c10614dfa565b6001600160a01b0316614c21613e2d565b6001600160a01b031614614c6a576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b038116614caf5760405162461bcd60e51b815260040180806020018281038252602681526020018061535b6026913960400191505060405180910390fd5b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b6000816001600160a01b031660706000614d2486614e7b565b81526020810191909152604001600020546001600160a01b0316149392505050565b61546081565b614d54615326565b60408051610280810191829052607280546001600160a01b03168252909160149060736020850180831161436b575050505050905090565b6001600160a01b031660009081526087602052604090205460ff1690565b6000805b601460ff82161015614df15760728160ff1660148110614dca57fe5b01546001600160a01b0384811691161415614de95760019150506117c0565b600101614dae565b50600092915050565b3390565b6060600080614e0d8585614f47565b9150915080614e63576040805162461bcd60e51b815260206004820152601560248201527f41646472657373206e6f7420696e2061727261792e0000000000000000000000604482015290519081900360640190fd5b6000614e6f8684614fad565b509350611a2692505050565b805160209091012090565b600054610100900460ff1680614e9f5750614e9f615111565b80614ead575060005460ff16155b614ee85760405162461bcd60e51b815260040180806020018281038252602e8152602001806153ae602e913960400191505060405180910390fd5b600054610100900460ff16158015614f13576000805460ff1961ff0019909116610100171660011790555b614f1b615122565b614f236151c2565b8015614f35576000805461ff00191690555b50565b6033546001600160a01b031690565b81516000908190815b81811015614f9a57846001600160a01b0316868281518110614f6e57fe5b60200260200101516001600160a01b03161415614f9257925060019150614fa69050565b600101614f50565b50600019600092509250505b9250929050565b8151606090600090808410615009576040805162461bcd60e51b815260206004820152601860248201527f496e646578206d757374206265203c2041206c656e6774680000000000000000604482015290519081900360640190fd5b60006001820367ffffffffffffffff8111801561502557600080fd5b5060405190808252806020026020018201604052801561504f578160200160208202803683370190505b50905060005b8581101561509d5786818151811061506957fe5b602002602001015182828151811061507d57fe5b6001600160a01b0390921660209283029190910190910152600101615055565b50600185015b828110156150ee578681815181106150b757fe5b60200260200101518260018303815181106150ce57fe5b6001600160a01b03909216602092830291909101909101526001016150a3565b50808686815181106150fc57fe5b60200260200101519350935050509250929050565b600061511c306152bb565b15905090565b600054610100900460ff168061513b575061513b615111565b80615149575060005460ff16155b6151845760405162461bcd60e51b815260040180806020018281038252602e8152602001806153ae602e913960400191505060405180910390fd5b600054610100900460ff16158015614f23576000805460ff1961ff0019909116610100171660011790558015614f35576000805461ff001916905550565b600054610100900460ff16806151db57506151db615111565b806151e9575060005460ff16155b6152245760405162461bcd60e51b815260040180806020018281038252602e8152602001806153ae602e913960400191505060405180910390fd5b600054610100900460ff1615801561524f576000805460ff1961ff0019909116610100171660011790555b6000615259614dfa565b603380546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015614f35576000805461ff001916905550565b3b151590565b828054828255906000526020600020908101928215615316579160200282015b8281111561531657825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906152e1565b50615322929150615345565b5090565b6040518061028001604052806014906020820280368337509192915050565b5b80821115615322576000815560010161534656fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373436f6e7472696275746f72732063616e6e6f74206265206c657373207468616e2031207065722067617264656e496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65644f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725573657220646f6573206e6f742068617665206372656174696f6e207065726d697373696f6e7347617264656e206372656174696f6e20697320616c7265616479206f70656e20746f20746865207075626c6963a26469706673582212204711939f944b6f601349758365fa9856d94d76ef67bab5abadbb91532610f20364736f6c63430007060033", + "deployedBytecode": "0x6080604052600436106105b55760003560e01c80637177fec9116102eb578063bc0922831161018f578063dfaef58f116100e1578063f142c3bc11610095578063f56e895d1161006f578063f56e895d14611711578063f948e50a14611726578063f979cdd914611774576105b5565b8063f142c3bc146115e5578063f2fde38b14611620578063f4330b4914611653576105b5565b8063ead4c1cf116100c6578063ead4c1cf1461156a578063f04ec5471461157f578063f05017eb146115b2576105b5565b8063dfaef58f14611504578063e973f4e914611537576105b5565b8063c9f7f2ed11610143578063d276cbdc1161011d578063d276cbdc1461149e578063d6a45aa5146114da578063daec2a1a146114ef576105b5565b8063c9f7f2ed1461145f578063cfd1801914611474578063d196f61f14611489576105b5565b8063c2d38e7911610174578063c2d38e7914611402578063c80aad6314611435578063c8ed947f1461144a576105b5565b8063bc0922831461136a578063bc819ea61461139d576105b5565b80638d78fb79116102485780639ef35710116101fc578063ad9d791d116101d6578063ad9d791d146112d1578063b0ecdf8014611304578063b82efd4f14611337576105b5565b80639ef35710146111f4578063a65b994714611209578063ad5c4648146112bc576105b5565b80638e20fb071161022d5780638e20fb0714611182578063974f5728146111975780639e18eb39146111ca576105b5565b80638d78fb79146111585780638da5cb5b1461116d576105b5565b8063867b6efa1161029f57806388e8dc751161028457806388e8dc75146110d7578063897904291461110a5780638bdb2afa14611143576105b5565b8063867b6efa1461108f57806386f2bc81146110c2576105b5565b80637f80e05b116102d05780637f80e05b146110325780638129fc1c1461104757806385d5d0361461105c576105b5565b80637177fec9146110085780637c4f0a361461101d576105b5565b806336c148b71161045d578063556d1a09116103af57806361b73ae6116103635780636acf33931161033d5780636acf339314610dc15780636b2fb67814610fde578063715018a614610ff3576105b5565b806361b73ae614610cc657806361d027b314610d795780636968551314610d8e576105b5565b80635dc2803a116103945780635dc2803a14610c535780635e192de614610c7e5780636176605e14610cb1576105b5565b8063556d1a0914610c29578063568c081314610c3e576105b5565b8063404c36391161041157806350d9f37f116103eb57806350d9f37f14610bcc57806352aeec7714610be15780635435ed8b14610bf6576105b5565b8063404c363914610b5a578063411137c314610b845780634a44ff4414610bb7576105b5565b8063393bfe4911610442578063393bfe4914610afd5780633f2a554014610b125780634032b72b14610b27576105b5565b806336c148b714610abe57806337973e5f14610ad3576105b5565b80632630c12f116105165780633040a2fb116104ca578063314a83c9116104a4578063314a83c9146109a857806333dc7dd014610a58578063364d118114610a8b576105b5565b80633040a2fb146108c057806330944c621461097e5780633137547714610993576105b5565b8063294d237c116104fb578063294d237c146108635780632b9db0bf146108785780632e0519cf1461088d576105b5565b80632630c12f1461083957806327e4acc71461084e576105b5565b806318b9e2521161056d578063201041981161055257806320104198146107b557806322c7fa8f146107df578063259072e114610812576105b5565b806318b9e252146106c45780631bdbf0ac146106f7576105b5565b806314ae9f2e1161059e57806314ae9f2e1461064757806314f45ca81461067c57806317a25714146106af576105b5565b806306796729146105ba57806313bc6d4b14610600575b600080fd5b3480156105c657600080fd5b506105e4600480360360208110156105dd57600080fd5b50356117a7565b604080516001600160a01b039092168252519081900360200190f35b34801561060c57600080fd5b506106336004803603602081101561062357600080fd5b50356001600160a01b03166117c5565b604080519115158252519081900360200190f35b34801561065357600080fd5b5061067a6004803603602081101561066a57600080fd5b50356001600160a01b0316611a2c565b005b34801561068857600080fd5b5061067a6004803603602081101561069f57600080fd5b50356001600160a01b0316611b1c565b3480156106bb57600080fd5b5061067a611d0b565b3480156106d057600080fd5b5061067a600480360360208110156106e757600080fd5b50356001600160a01b0316611d80565b34801561070357600080fd5b5061067a6004803603604081101561071a57600080fd5b81019060208101813564010000000081111561073557600080fd5b82018360208201111561074757600080fd5b8035906020019184600183028401116401000000008311171561076957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b03169150611fd19050565b3480156107c157600080fd5b506105e4600480360360208110156107d857600080fd5b50356121c9565b3480156107eb57600080fd5b5061067a6004803603602081101561080257600080fd5b50356001600160a01b03166121e9565b34801561081e57600080fd5b50610827612369565b60408051918252519081900360200190f35b34801561084557600080fd5b506105e461236f565b34801561085a57600080fd5b5061063361237e565b34801561086f57600080fd5b506105e4612387565b34801561088457600080fd5b50610827612396565b34801561089957600080fd5b506108a261239c565b60408051938452602084019290925282820152519081900360600190f35b3480156108cc57600080fd5b5061067a600480360360408110156108e357600080fd5b8101906020810181356401000000008111156108fe57600080fd5b82018360208201111561091057600080fd5b8035906020019184600183028401116401000000008311171561093257600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b031691506123aa9050565b34801561098a57600080fd5b506106336125a1565b34801561099f57600080fd5b506108276125af565b3480156109b457600080fd5b5061067a600480360360208110156109cb57600080fd5b8101906020810181356401000000008111156109e657600080fd5b8201836020820111156109f857600080fd5b80359060200191846020830284011164010000000083111715610a1a57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506125b5945050505050565b348015610a6457600080fd5b5061067a60048036036020811015610a7b57600080fd5b50356001600160a01b0316612673565b348015610a9757600080fd5b5061063360048036036020811015610aae57600080fd5b50356001600160a01b0316612785565b348015610aca57600080fd5b5061067a61279a565b348015610adf57600080fd5b506105e460048036036020811015610af657600080fd5b5035612865565b348015610b0957600080fd5b5061063361288f565b348015610b1e57600080fd5b506105e4612898565b348015610b3357600080fd5b5061067a60048036036020811015610b4a57600080fd5b50356001600160a01b03166128a7565b348015610b6657600080fd5b5061067a60048036036020811015610b7d57600080fd5b503561292d565b348015610b9057600080fd5b5061063360048036036020811015610ba757600080fd5b50356001600160a01b03166129d4565b348015610bc357600080fd5b506108276129f2565b348015610bd857600080fd5b506108276129f8565b348015610bed57600080fd5b5061067a6129fe565b348015610c0257600080fd5b5061067a60048036036020811015610c1957600080fd5b50356001600160a01b0316612af8565b348015610c3557600080fd5b50610827612e15565b348015610c4a57600080fd5b50610827612e1c565b348015610c5f57600080fd5b50610c68612e22565b6040805160ff9092168252519081900360200190f35b348015610c8a57600080fd5b5061063360048036036020811015610ca157600080fd5b50356001600160a01b0316612e27565b348015610cbd57600080fd5b506105e4612e3c565b348015610cd257600080fd5b5061067a60048036036020811015610ce957600080fd5b810190602081018135640100000000811115610d0457600080fd5b820183602082011115610d1657600080fd5b80359060200191846001830284011164010000000083111715610d3857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612e4b945050505050565b348015610d8557600080fd5b506105e4612fea565b348015610d9a57600080fd5b5061067a60048036036020811015610db157600080fd5b50356001600160a01b0316612ff9565b6105e4600480360360e0811015610dd757600080fd5b6001600160a01b038235169190810190604081016020820135640100000000811115610e0257600080fd5b820183602082011115610e1457600080fd5b80359060200191846001830284011164010000000083111715610e3657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050640100000000811115610e8957600080fd5b820183602082011115610e9b57600080fd5b80359060200191846001830284011164010000000083111715610ebd57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050640100000000811115610f1057600080fd5b820183602082011115610f2257600080fd5b80359060200191846001830284011164010000000083111715610f4457600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092958435959094909350604081019250602001359050640100000000811115610f9f57600080fd5b820183602082011115610fb157600080fd5b80359060200191846020830284011164010000000083111715610fd357600080fd5b91935091503561310b565b348015610fea57600080fd5b50610827613756565b348015610fff57600080fd5b5061067a61375c565b34801561101457600080fd5b50610827613808565b34801561102957600080fd5b5061082761380e565b34801561103e57600080fd5b50610633613814565b34801561105357600080fd5b5061067a613823565b34801561106857600080fd5b5061067a6004803603602081101561107f57600080fd5b50356001600160a01b03166138db565b34801561109b57600080fd5b5061067a600480360360208110156110b257600080fd5b50356001600160a01b03166139ed565b3480156110ce57600080fd5b50610827613b02565b3480156110e357600080fd5b5061067a600480360360208110156110fa57600080fd5b50356001600160a01b0316613b08565b34801561111657600080fd5b5061067a6004803603604081101561112d57600080fd5b506001600160a01b038135169060200135613ca0565b34801561114f57600080fd5b506105e4613e18565b34801561116457600080fd5b50610827613e27565b34801561117957600080fd5b506105e4613e2d565b34801561118e57600080fd5b50610827613e3c565b3480156111a357600080fd5b5061067a600480360360208110156111ba57600080fd5b50356001600160a01b0316613e43565b3480156111d657600080fd5b506105e4600480360360208110156111ed57600080fd5b5035614013565b34801561120057600080fd5b506105e4614023565b34801561121557600080fd5b506105e46004803603602081101561122c57600080fd5b81019060208101813564010000000081111561124757600080fd5b82018360208201111561125957600080fd5b8035906020019184600183028401116401000000008311171561127b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550614032945050505050565b3480156112c857600080fd5b506105e4614061565b3480156112dd57600080fd5b50610633600480360360208110156112f457600080fd5b50356001600160a01b0316614079565b34801561131057600080fd5b506106336004803603602081101561132757600080fd5b50356001600160a01b031661408e565b34801561134357600080fd5b5061067a6004803603602081101561135a57600080fd5b50356001600160a01b03166140a3565b34801561137657600080fd5b5061067a6004803603602081101561138d57600080fd5b50356001600160a01b03166141b4565b3480156113a957600080fd5b506113b2614331565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156113ee5781810151838201526020016113d6565b505050509050019250505060405180910390f35b34801561140e57600080fd5b5061067a6004803603602081101561142557600080fd5b50356001600160a01b0316614393565b34801561144157600080fd5b506105e4614510565b34801561145657600080fd5b506105e461451f565b34801561146b57600080fd5b5061082761452e565b34801561148057600080fd5b50610827614534565b34801561149557600080fd5b5061067a61453a565b3480156114aa57600080fd5b5061067a600480360360408110156114c157600080fd5b50803560ff1690602001356001600160a01b03166145ed565b3480156114e657600080fd5b506105e46147e6565b3480156114fb57600080fd5b506113b26147f5565b34801561151057600080fd5b5061067a6004803603602081101561152757600080fd5b50356001600160a01b0316614855565b34801561154357600080fd5b5061067a6004803603602081101561155a57600080fd5b50356001600160a01b0316614967565b34801561157657600080fd5b506105e4614a79565b34801561158b57600080fd5b5061067a600480360360208110156115a257600080fd5b50356001600160a01b0316614a88565b3480156115be57600080fd5b50610827600480360360208110156115d557600080fd5b50356001600160a01b0316614be4565b3480156115f157600080fd5b506115fa614bf6565b604080519485526020850193909352838301919091526060830152519081900360800190f35b34801561162c57600080fd5b5061067a6004803603602081101561164357600080fd5b50356001600160a01b0316614c08565b34801561165f57600080fd5b506106336004803603604081101561167657600080fd5b81019060208101813564010000000081111561169157600080fd5b8201836020820111156116a357600080fd5b803590602001918460018302840111640100000000831117156116c557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b03169150614d0b9050565b34801561171d57600080fd5b50610827614d46565b34801561173257600080fd5b5061173b614d4c565b604051808261028080838360005b83811015611761578181015183820152602001611749565b5050505090500191505060405180910390f35b34801561178057600080fd5b506106336004803603602081101561179757600080fd5b50356001600160a01b0316614d8c565b6000818152607060205260409020546001600160a01b03165b919050565b6001600160a01b03811660009081526086602052604081205460ff16806117f957506068546001600160a01b038381169116145b8061181157506069546001600160a01b038381169116145b806118295750606a546001600160a01b038381169116145b806118415750606d546001600160a01b038381169116145b806118595750606b546001600160a01b038381169116145b8061187c5750816001600160a01b0316611871613e2d565b6001600160a01b0316145b8061188f57506001600160a01b03821630145b8061189e575061189e82614daa565b80611a26575060866000836001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156118e157600080fd5b505afa1580156118f5573d6000803e3d6000fd5b505050506040513d602081101561190b57600080fd5b50516001600160a01b0316815260208101919091526040016000205460ff168015611a265750816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b15801561196a57600080fd5b505afa15801561197e573d6000803e3d6000fd5b505050506040513d602081101561199457600080fd5b5051604080517f17ab9f200000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152915191909216916317ab9f20916024808301926020929190829003018186803b1580156119f957600080fd5b505afa158015611a0d573d6000803e3d6000fd5b505050506040513d6020811015611a2357600080fd5b50515b92915050565b611a34614dfa565b6001600160a01b0316611a45613e2d565b6001600160a01b031614611a8e576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526089602052604090205460ff16611afb576040805162461bcd60e51b815260206004820152601560248201527f4b65657065722069732077686974656c69737465640000000000000000000000604482015290519081900360640190fd5b6001600160a01b03166000908152608960205260409020805460ff19169055565b611b24614dfa565b6001600160a01b0316611b35613e2d565b6001600160a01b031614611b7e576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526086602052604090205460ff16611beb576040805162461bcd60e51b815260206004820152601560248201527f47617264656e20646f6573206e6f742065786973740000000000000000000000604482015290519081900360640190fd5b6000819050806001600160a01b03166302fb0c5e6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c2957600080fd5b505afa158015611c3d573d6000803e3d6000fd5b505050506040513d6020811015611c5357600080fd5b505115611ca7576040805162461bcd60e51b815260206004820181905260248201527f5468652067617264656e206e6565647320746f2062652064697361626c65642e604482015290519081900360640190fd5b6040805163567619c560e11b81526001600482015290516001600160a01b0383169163acec338a91602480830192600092919082900301818387803b158015611cef57600080fd5b505af1158015611d03573d6000803e3d6000fd5b505050505050565b611d13614dfa565b6001600160a01b0316611d24613e2d565b6001600160a01b031614611d6d576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6093805462ff0000191662010000179055565b611d88614dfa565b6001600160a01b0316611d99613e2d565b6001600160a01b031614611de2576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526086602052604090205460ff16611e4f576040805162461bcd60e51b815260206004820152601560248201527f47617264656e20646f6573206e6f742065786973740000000000000000000000604482015290519081900360640190fd5b806001600160a01b03166302fb0c5e6040518163ffffffff1660e01b815260040160206040518083038186803b158015611e8857600080fd5b505afa158015611e9c573d6000803e3d6000fd5b505050506040513d6020811015611eb257600080fd5b505115611f06576040805162461bcd60e51b815260206004820181905260248201527f5468652067617264656e206e6565647320746f2062652064697361626c65642e604482015290519081900360640190fd5b611f73816065805480602002602001604051908101604052809291908181526020018280548015611f6057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611f42575b5050505050614dfe90919063ffffffff16565b8051611f87916065916020909101906152c1565b506001600160a01b038116600081815260866020526040808220805460ff19169055517fb52dedfe431c6250e847edee5dca0a14cfaad5c6626218f99bd60c8ad9939a9f9190a250565b611fd9614dfa565b6001600160a01b0316611fea613e2d565b6001600160a01b031614612033576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b600061203e83614e7b565b6000818152607060205260409020549091506001600160a01b0316156120ab576040805162461bcd60e51b815260206004820152601b60248201527f496e746567726174696f6e2065786973747320616c72656164792e0000000000604482015290519081900360640190fd5b6001600160a01b038216612106576040805162461bcd60e51b815260206004820152601f60248201527f496e746567726174696f6e2061646472657373206d7573742065786973742e00604482015290519081900360640190fd5b60008181526070602090815260409182902080546001600160a01b0319166001600160a01b0386161790559051845185928291908401908083835b602083106121605780518252601f199092019160209182019101612141565b51815160209384036101000a6000190180199092169116179052604080519290940182900382206001600160a01b038916835293519395507ffda47fb8c9da07a420b19d406f4c50352dfa9f6513a950bb282baf8cb9b9050594509083900301919050a2505050565b607281601481106121d957600080fd5b01546001600160a01b0316905081565b6121f1614dfa565b6001600160a01b0316612202613e2d565b6001600160a01b03161461224b576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b606c546001600160a01b03828116911614156122ae576040805162461bcd60e51b815260206004820152601a60248201527f497368746172204761746520616c726561647920657869737473000000000000604482015290519081900360640190fd5b6001600160a01b038116612309576040805162461bcd60e51b815260206004820152601d60248201527f4973687461722047617465206f7261636c65206d757374206578697374000000604482015290519081900360640190fd5b606c80546001600160a01b038381166001600160a01b03198316811790935560408051938452911660208301819052815190927f9d8291abf2224012a00e3e6cb815777395423c95684705c6a799205e926f38d492908290030190a15050565b60975481565b6069546001600160a01b031681565b60995460ff1681565b6068546001600160a01b031681565b60915481565b608c54608d54608e54909192565b6123b2614dfa565b6001600160a01b03166123c3613e2d565b6001600160a01b03161461240c576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b600061241783614e7b565b6000818152607060205260409020549091506001600160a01b0316612483576040805162461bcd60e51b815260206004820152601b60248201527f496e746567726174696f6e20646f6573206e6f742065786973742e0000000000604482015290519081900360640190fd5b6001600160a01b0382166124de576040805162461bcd60e51b815260206004820152601f60248201527f496e746567726174696f6e2061646472657373206d7573742065786973742e00604482015290519081900360640190fd5b60008181526070602090815260409182902080546001600160a01b0319166001600160a01b0386161790559051845185928291908401908083835b602083106125385780518252601f199092019160209182019101612519565b51815160209384036101000a6000190180199092169116179052604080519290940182900382206001600160a01b038916835293519395507f10af83bc70c2a73aefcd7156f6f80519861b0d2657dee2b4b8a8123e70f4b99f94509083900301919050a2505050565b609354610100900460ff1681565b60955481565b6125bd614dfa565b6001600160a01b03166125ce613e2d565b6001600160a01b031614612617576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b60005b815181101561266f5760016089600084848151811061263557fe5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905560010161261a565b5050565b61267b614dfa565b6001600160a01b031661268c613e2d565b6001600160a01b0316146126d5576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b038116612728576040805162461bcd60e51b8152602060048201526015602482015274041646472657373206d757374206e6f74206265203605c1b604482015290519081900360640190fd5b606780546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917f75cbfa1661740f312268987c8dfe34da6bacb541f3e31eb54ea7fd5d88a79e2b9181900360200190a25050565b60866020526000908152604090205460ff1681565b6127a2614dfa565b6001600160a01b03166127b3613e2d565b6001600160a01b0316146127fc576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b65017e14a710004211612856576040805162461bcd60e51b815260206004820152601f60248201527f5472616e73666572732063616e6e6f7420626520656e61626c65642079657400604482015290519081900360640190fd5b6093805460ff19166001179055565b6066818154811061287557600080fd5b6000918252602090912001546001600160a01b0316905081565b60935460ff1681565b606b546001600160a01b031681565b6128af614dfa565b6001600160a01b03166128c0613e2d565b6001600160a01b031614612909576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b03166000908152608960205260409020805460ff19166001179055565b612935614dfa565b6001600160a01b0316612946613e2d565b6001600160a01b03161461298f576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b60018110156129cf5760405162461bcd60e51b815260040180806020018281038252602d815260200180615381602d913960400191505060405180910390fd5b609855565b6001600160a01b031660009081526089602052604090205460ff1690565b60905481565b60965481565b612a06614dfa565b6001600160a01b0316612a17613e2d565b6001600160a01b031614612a60576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b609354610100900460ff16612af6576093805461ff001916610100179055606b54604080517f79fc904f00000000000000000000000000000000000000000000000000000000815290516001600160a01b03909216916379fc904f9160048082019260009290919082900301818387803b158015612add57600080fd5b505af1158015612af1573d6000803e3d6000fd5b505050505b565b612b00614dfa565b6001600160a01b0316612b11613e2d565b6001600160a01b031614612b5a576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b038116612bad576040805162461bcd60e51b8152602060048201526015602482015274041646472657373206d757374206e6f74206265203605c1b604482015290519081900360640190fd5b6071546001600160a01b0382811691161415612c10576040805162461bcd60e51b815260206004820152601960248201527f41646472657373206d75737420626520646966666572656e7400000000000000604482015290519081900360640190fd5b806001600160a01b031660706000612d4c846001600160a01b03166317d7de7c6040518163ffffffff1660e01b815260040160006040518083038186803b158015612c5a57600080fd5b505afa158015612c6e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015612c9757600080fd5b8101908080516040519392919084640100000000821115612cb757600080fd5b908301906020820185811115612ccc57600080fd5b8251640100000000811182820188101715612ce657600080fd5b82525081516020918201929091019080838360005b83811015612d13578181015183820152602001612cfb565b50505050905090810190601f168015612d405780820380516001836020036101000a031916815260200191505b50604052505050614e7b565b81526020810191909152604001600020546001600160a01b031614612db8576040805162461bcd60e51b815260206004820152601d60248201527f496e746567726174696f6e206e6565647320746f2062652076616c6964000000604482015290519081900360640190fd5b607180546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917f7c0554a0d606bbd6266e57a40fdb3702f32d1a564d5d06f05ed977ace613dd349181900360200190a25050565b62093a8081565b60945481565b601481565b60896020526000908152604090205460ff1681565b6071546001600160a01b031681565b612e53614dfa565b6001600160a01b0316612e64613e2d565b6001600160a01b031614612ead576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6000612eb882614e7b565b6000818152607060205260409020549091506001600160a01b0316612f24576040805162461bcd60e51b815260206004820152601b60248201527f496e746567726174696f6e20646f6573206e6f742065786973742e0000000000604482015290519081900360640190fd5b60008181526070602090815260409182902080546001600160a01b03198116909155915184516001600160a01b039093169285928291908401908083835b60208310612f815780518252601f199092019160209182019101612f62565b51815160209384036101000a6000190180199092169116179052604080519290940182900382206001600160a01b038816835293519395507ffc3fbb608ec9e619ead57ddfa31f2ab35c888b67f6471b74dce69c035eed445b94509083900301919050a2505050565b608b546001600160a01b031681565b613001614dfa565b6001600160a01b0316613012613e2d565b6001600160a01b03161461305b576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b0381166130ae576040805162461bcd60e51b8152602060048201526015602482015274041646472657373206d757374206e6f74206265203605c1b604482015290519081900360640190fd5b606d80546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917f57c1ea229271e944c7d975557caf535c1c974708de760613121827217db4ce8f9181900360200190a25050565b6071546000906001600160a01b031661316b576040805162461bcd60e51b815260206004820181905260248201527f4e65656420612064656661756c7420747261646520696e746567726174696f6e604482015290519081900360640190fd5b606c54604080517f7804a5dc00000000000000000000000000000000000000000000000000000000815233600482015290516001600160a01b0390921691637804a5dc91602480820192602092909190829003018186803b1580156131cf57600080fd5b505afa1580156131e3573d6000803e3d6000fd5b505050506040513d60208110156131f957600080fd5b505180613208575060995460ff165b6132435760405162461bcd60e51b81526004018080602001828103825260278152602001806153fc6027913960400191505060405180910390fd5b6000606a60009054906101000a90046001600160a01b03166001600160a01b0316638d06366f8b338c8c8c8c8c8c8c6040518a63ffffffff1660e01b8152600401808a6001600160a01b03168152602001896001600160a01b031681526020018060200180602001806020018881526020018060200186815260200185810385528c818151815260200191508051906020019080838360005b838110156132f45781810151838201526020016132dc565b50505050905090810190601f1680156133215780820380516001836020036101000a031916815260200191505b5085810384528b5181528b516020918201918d019080838360005b8381101561335457818101518382015260200161333c565b50505050905090810190601f1680156133815780820380516001836020036101000a031916815260200191505b5085810383528a5181528a516020918201918c019080838360005b838110156133b457818101518382015260200161339c565b50505050905090810190601f1680156133e15780820380516001836020036101000a031916815260200191505b508581038252888882818152602001925060200280828437600081840152601f19601f8201169050808301925050509d5050505050505050505050505050602060405180830381600087803b15801561343957600080fd5b505af115801561344d573d6000803e3d6000fd5b505050506040513d602081101561346357600080fd5b505190506001600160a01b038a1673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2141580613491575034155b156135c957604080517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810185905290516001600160a01b038c16916323b872dd9160648083019260209291908290030181600087803b15801561350457600080fd5b505af1158015613518573d6000803e3d6000fd5b505050506040513d602081101561352e57600080fd5b5050604080517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b038381166004830152602482018690529151918c169163095ea7b3916044808201926020929091908290030181600087803b15801561359c57600080fd5b505af11580156135b0573d6000803e3d6000fd5b505050506040513d60208110156135c657600080fd5b50505b6001600160a01b03811660009081526086602052604090205460ff1615613637576040805162461bcd60e51b815260206004820152601560248201527f47617264656e20616c7265616479206578697374730000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116600081815260866020526040808220805460ff1916600190811790915560658054918201815583527f8ff97419363ffd7000167f130ef7168fbea05faf9251824ca5043f113cc6a7c70180546001600160a01b0319168417905580517f8dbdbe6d00000000000000000000000000000000000000000000000000000000815260048101879052602481018790523360448201529051638dbdbe6d9234926064808201939182900301818588803b1580156136fa57600080fd5b505af115801561370e573d6000803e3d6000fd5b50506040513393506001600160a01b03851692507f3f9c315348eaae54d760380967a68b458af53312321328f584799f93283dc1de9150600090a39998505050505050505050565b61546090565b613764614dfa565b6001600160a01b0316613775613e2d565b6001600160a01b0316146137be576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380546001600160a01b0319169055565b60985481565b608c5481565b60935462010000900460ff1681565b61382b614e86565b6611c37937e0800060955566b1a2bc2ec500006094819055600060968190556097556093805462ffffff19169055606780546001600160a01b031916731f98431c8ad98523631ae4a59f267346ea31f98417905567016345785d8a0000608c55608d55670b1a2bc2ec500000608e5567011c37937e080000608f5567025bf6196bd10000609055670a688906bd8b0000609155670214e8348c4f000060925560646098556099805460ff19169055565b6138e3614dfa565b6001600160a01b03166138f4613e2d565b6001600160a01b03161461393d576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b038116613990576040805162461bcd60e51b8152602060048201526015602482015274041646472657373206d757374206e6f74206265203605c1b604482015290519081900360640190fd5b606b80546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917f52cd8e0a7f86e9df123b3357ab2ee1c4cd0f5ac84ca8c98d93beb2679b2bb8069181900360200190a25050565b6139f5614dfa565b6001600160a01b0316613a06613e2d565b6001600160a01b031614613a4f576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b038116613aa2576040805162461bcd60e51b8152602060048201526015602482015274041646472657373206d757374206e6f74206265203605c1b604482015290519081900360640190fd5b608b80546001600160a01b038381166001600160a01b03198316811790935560408051938452911660208301819052815190927f8c3aa5f43a388513435861bf27dfad7829cd248696fed367c62d441f6295449692908290030190a15050565b60925481565b613b10614dfa565b6001600160a01b0316613b21613e2d565b6001600160a01b031614613b6a576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526087602052604090205460ff16613bd7576040805162461bcd60e51b815260206004820152601c60248201527f5265736572766520617373657420646f6573206e6f7420657869737400000000604482015290519081900360640190fd5b613c42816066805480602002602001604051908101604052809291908181526020018280548015611f60576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311611f42575050505050614dfe90919063ffffffff16565b8051613c56916066916020909101906152c1565b506001600160a01b038116600081815260876020526040808220805460ff19169055517f2a4ae73bc76175e864e83c9843f11cf15a1bfcfa73152fb96d133416efee48ed9190a250565b613ca8614dfa565b6001600160a01b0316613cb9613e2d565b6001600160a01b031614613d02576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b60008111613d57576040805162461bcd60e51b815260206004820152601d60248201527f5f6d696e5269736b79506169724c6971756964697479457468203e2030000000604482015290519081900360640190fd5b6001600160a01b03821660009081526087602052604090205460ff16613dc4576040805162461bcd60e51b815260206004820152601b60248201527f4e6565647320746f20626520612076616c696420726573657276650000000000604482015290519081900360640190fd5b6001600160a01b0382166000818152608a6020908152604091829020849055815184815291517fb78c51bc9bffa228585b84c38a0234fe0a48eb7aeb9f7a6a7a46f0ddd3270dd59281900390910190a25050565b6067546001600160a01b031681565b608e5481565b6000613e37614f38565b905090565b62093a8090565b613e4b614dfa565b6001600160a01b0316613e5c613e2d565b6001600160a01b031614613ea5576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526086602052604090205460ff16613f12576040805162461bcd60e51b815260206004820152601560248201527f47617264656e20646f6573206e6f742065786973740000000000000000000000604482015290519081900360640190fd5b6000819050806001600160a01b03166302fb0c5e6040518163ffffffff1660e01b815260040160206040518083038186803b158015613f5057600080fd5b505afa158015613f64573d6000803e3d6000fd5b505050506040513d6020811015613f7a57600080fd5b5051613fcd576040805162461bcd60e51b815260206004820152601e60248201527f5468652067617264656e206e6565647320746f206265206163746976652e0000604482015290519081900360640190fd5b6040805163567619c560e11b815260006004820181905291516001600160a01b0384169263acec338a926024808201939182900301818387803b158015611cef57600080fd5b6065818154811061287557600080fd5b606d546001600160a01b031681565b60006070600061404184614e7b565b81526020810191909152604001600020546001600160a01b031692915050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b60886020526000908152604090205460ff1681565b60876020526000908152604090205460ff1681565b6140ab614dfa565b6001600160a01b03166140bc613e2d565b6001600160a01b031614614105576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b038116614158576040805162461bcd60e51b8152602060048201526015602482015274041646472657373206d757374206e6f74206265203605c1b604482015290519081900360640190fd5b606f80546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917e40167ea3901ef812c672b081813db3c0fc117c302ace151f1f9a907906e1669181900360200190a25050565b6141bc614dfa565b6001600160a01b03166141cd613e2d565b6001600160a01b031614614216576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6068546001600160a01b0382811691161415614279576040805162461bcd60e51b815260206004820152601c60248201527f47617264656e2056616c75657220616c72656164792065786973747300000000604482015290519081900360640190fd5b6001600160a01b0381166142d4576040805162461bcd60e51b815260206004820152601860248201527f47617264656e2056616c756572206d7573742065786973740000000000000000604482015290519081900360640190fd5b606880546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917fb89b871cab0fe1b2d8c7cc3e16640ef9a9bf67f031e44947331820e025bf69479181900360200190a25050565b6060606680548060200260200160405190810160405280929190818152602001828054801561438957602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161436b575b5050505050905090565b61439b614dfa565b6001600160a01b03166143ac613e2d565b6001600160a01b0316146143f5576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6069546001600160a01b0382811691161415614458576040805162461bcd60e51b815260206004820152601b60248201527f5072696365206f7261636c6520616c7265616479206578697374730000000000604482015290519081900360640190fd5b6001600160a01b0381166144b3576040805162461bcd60e51b815260206004820152601760248201527f5072696365206f7261636c65206d757374206578697374000000000000000000604482015290519081900360640190fd5b606980546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917f40bddd72ea96b80dae14e3d13e8ce2c4ecd2500d88c6c0004d24a00deab28f9c9181900360200190a25050565b606a546001600160a01b031681565b606c546001600160a01b031681565b608d5481565b608f5481565b614542614dfa565b6001600160a01b0316614553613e2d565b6001600160a01b03161461459c576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b60995460ff16156145de5760405162461bcd60e51b815260040180806020018281038252602d815260200180615423602d913960400191505060405180910390fd5b6099805460ff19166001179055565b6145f5614dfa565b6001600160a01b0316614606613e2d565b6001600160a01b03161461464f576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b601460ff8316106146a7576040805162461bcd60e51b815260206004820152601660248201527f4d6178206f7065726174696f6e73207265616368656400000000000000000000604482015290519081900360640190fd5b806001600160a01b031660728360ff16601481106146c157fe5b01546001600160a01b0316141561471f576040805162461bcd60e51b815260206004820152601560248201527f4f7065726174696f6e20616c7265616479207365740000000000000000000000604482015290519081900360640190fd5b6001600160a01b03811661477a576040805162461bcd60e51b815260206004820152601d60248201527f4f7065726174696f6e2061646472657373206d7573742065786973742e000000604482015290519081900360640190fd5b8060728360ff166014811061478b57fe5b0180546001600160a01b039283166001600160a01b03199091161790556040805191831682525160ff8416917f2dc23b4bb2132388a8a9f2d4a7ec650d42dcd4c1c63e6495756fa25e8ecc6abd919081900360200190a25050565b606f546001600160a01b031681565b60606065805480602002602001604051908101604052809291908181526020018280548015614389576020028201919060005260206000209081546001600160a01b0316815260019091019060200180831161436b575050505050905090565b61485d614dfa565b6001600160a01b031661486e613e2d565b6001600160a01b0316146148b7576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b03811661490a576040805162461bcd60e51b8152602060048201526015602482015274041646472657373206d757374206e6f74206265203605c1b604482015290519081900360640190fd5b606e80546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917f578086cc379999d712cf9ea4c177a02b092c028a84cf82d2dd590f2606b3169f9181900360200190a25050565b61496f614dfa565b6001600160a01b0316614980613e2d565b6001600160a01b0316146149c9576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b038116614a1c576040805162461bcd60e51b8152602060048201526015602482015274041646472657373206d757374206e6f74206265203605c1b604482015290519081900360640190fd5b606a80546001600160a01b038381166001600160a01b031983168117909355604080519190921680825291519192917f1e3307b8b00f4ec731298a869e9665a2662abd65a0e3fe9dd01fd53c35b0ae939181900360200190a25050565b606e546001600160a01b031681565b614a90614dfa565b6001600160a01b0316614aa1613e2d565b6001600160a01b031614614aea576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526087602052604090205460ff1615614b58576040805162461bcd60e51b815260206004820152601b60248201527f5265736572766520617373657420616c72656164792061646465640000000000604482015290519081900360640190fd5b6001600160a01b038116600081815260876020526040808220805460ff1916600190811790915560668054918201815583527f46501879b8ca8525e8c2fd519e2fbfcfa2ebea26501294aa02cbfcfb12e943540180546001600160a01b03191684179055517f9fef46e320a4767c320315d2f597ee79c1e17c3c3330d026764d6a7dac8fcd5c9190a250565b608a6020526000908152604090205481565b608f5460905460915460925490919293565b614c10614dfa565b6001600160a01b0316614c21613e2d565b6001600160a01b031614614c6a576040805162461bcd60e51b815260206004820181905260248201526000805160206153dc833981519152604482015290519081900360640190fd5b6001600160a01b038116614caf5760405162461bcd60e51b815260040180806020018281038252602681526020018061535b6026913960400191505060405180910390fd5b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b6000816001600160a01b031660706000614d2486614e7b565b81526020810191909152604001600020546001600160a01b0316149392505050565b61546081565b614d54615326565b60408051610280810191829052607280546001600160a01b03168252909160149060736020850180831161436b575050505050905090565b6001600160a01b031660009081526087602052604090205460ff1690565b6000805b601460ff82161015614df15760728160ff1660148110614dca57fe5b01546001600160a01b0384811691161415614de95760019150506117c0565b600101614dae565b50600092915050565b3390565b6060600080614e0d8585614f47565b9150915080614e63576040805162461bcd60e51b815260206004820152601560248201527f41646472657373206e6f7420696e2061727261792e0000000000000000000000604482015290519081900360640190fd5b6000614e6f8684614fad565b509350611a2692505050565b805160209091012090565b600054610100900460ff1680614e9f5750614e9f615111565b80614ead575060005460ff16155b614ee85760405162461bcd60e51b815260040180806020018281038252602e8152602001806153ae602e913960400191505060405180910390fd5b600054610100900460ff16158015614f13576000805460ff1961ff0019909116610100171660011790555b614f1b615122565b614f236151c2565b8015614f35576000805461ff00191690555b50565b6033546001600160a01b031690565b81516000908190815b81811015614f9a57846001600160a01b0316868281518110614f6e57fe5b60200260200101516001600160a01b03161415614f9257925060019150614fa69050565b600101614f50565b50600019600092509250505b9250929050565b8151606090600090808410615009576040805162461bcd60e51b815260206004820152601860248201527f496e646578206d757374206265203c2041206c656e6774680000000000000000604482015290519081900360640190fd5b60006001820367ffffffffffffffff8111801561502557600080fd5b5060405190808252806020026020018201604052801561504f578160200160208202803683370190505b50905060005b8581101561509d5786818151811061506957fe5b602002602001015182828151811061507d57fe5b6001600160a01b0390921660209283029190910190910152600101615055565b50600185015b828110156150ee578681815181106150b757fe5b60200260200101518260018303815181106150ce57fe5b6001600160a01b03909216602092830291909101909101526001016150a3565b50808686815181106150fc57fe5b60200260200101519350935050509250929050565b600061511c306152bb565b15905090565b600054610100900460ff168061513b575061513b615111565b80615149575060005460ff16155b6151845760405162461bcd60e51b815260040180806020018281038252602e8152602001806153ae602e913960400191505060405180910390fd5b600054610100900460ff16158015614f23576000805460ff1961ff0019909116610100171660011790558015614f35576000805461ff001916905550565b600054610100900460ff16806151db57506151db615111565b806151e9575060005460ff16155b6152245760405162461bcd60e51b815260040180806020018281038252602e8152602001806153ae602e913960400191505060405180910390fd5b600054610100900460ff1615801561524f576000805460ff1961ff0019909116610100171660011790555b6000615259614dfa565b603380546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015614f35576000805461ff001916905550565b3b151590565b828054828255906000526020600020908101928215615316579160200282015b8281111561531657825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906152e1565b50615322929150615345565b5090565b6040518061028001604052806014906020820280368337509192915050565b5b80821115615322576000815560010161534656fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373436f6e7472696275746f72732063616e6e6f74206265206c657373207468616e2031207065722067617264656e496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65644f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725573657220646f6573206e6f742068617665206372656174696f6e207065726d697373696f6e7347617264656e206372656174696f6e20697320616c7265616479206f70656e20746f20746865207075626c6963a26469706673582212204711939f944b6f601349758365fa9856d94d76ef67bab5abadbb91532610f20364736f6c63430007060033", "devdoc": { "author": "Babylon Finance Protocol BabController is a smart contract used to deploy new gardens contracts and house the integrations and resources of the system.", "kind": "dev", @@ -1504,9 +1681,10 @@ "_reserveAsset": "Address of the reserve assset" } }, - "createGarden(address,string,string,string,uint256,uint256[])": { + "createGarden(address,string,string,string,uint256,uint256[],uint256)": { "params": { "_gardenParams": "Array of numeric garden params", + "_initialContribution": "Initial contribution by the gardener", "_name": "Name of the Garden", "_reserveAsset": "Reserve asset of the Garden. Initially just weth", "_seed": "Seed to regenerate the garden NFT", @@ -1524,6 +1702,11 @@ "_newGardenFactory": "Address of the new garden factory" } }, + "editGardenNFT(address)": { + "params": { + "_newGardenNFT": "Address of the new garden NFT" + } + }, "editGardenValuer(address)": { "params": { "_gardenValuer": "Address of the new garden valuer" @@ -1540,9 +1723,10 @@ "_ishtarGate": "Address of the new Ishtar Gate" } }, - "editLiquidityMinimum(uint256)": { + "editLiquidityReserve(address,uint256)": { "params": { - "_minRiskyPairLiquidityEth": "Absolute min liquidity of an asset to grab price" + "_newMinLiquidityReserve": "Absolute min liquidity of an asset to grab price", + "_reserve": "Address of the reserve to edit" } }, "editPriceOracle(address)": { @@ -1560,11 +1744,21 @@ "_newStrategyFactory": "Address of the new strategy factory" } }, + "editStrategyNFT(address)": { + "params": { + "_newStrategyNFT": "Address of the new strategy NFT" + } + }, "editTreasury(address)": { "params": { "_newTreasury": "Address of the new protocol fee recipient" } }, + "editUniswapFactory(address)": { + "params": { + "_newUniswapFactory": "Address of the new uniswap factory" + } + }, "enableGarden(address)": { "params": { "_garden": "Address of the garden" @@ -1665,8 +1859,8 @@ "addReserveAsset(address)": { "notice": "PRIVILEGED FACTORY FUNCTION. Adds a new valid reserve asset for gardens" }, - "createGarden(address,string,string,string,uint256,uint256[])": { - "notice": "Creates a Garden smart contract and registers the Garden with the controller." + "createGarden(address,string,string,string,uint256,uint256[],uint256)": { + "notice": "Creates a Garden smart contract and registers the Garden with the controller. If asset is not WETH, the creator needs to approve the controller" }, "disableGarden(address)": { "notice": "PRIVILEGED GOVERNANCE FUNCTION. Allows governance to disable a garden" @@ -1674,6 +1868,9 @@ "editGardenFactory(address)": { "notice": "PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol garden factory" }, + "editGardenNFT(address)": { + "notice": "PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol garden NFT" + }, "editGardenValuer(address)": { "notice": "PRIVILEGED GOVERNANCE FUNCTION. Allows governance to change the garden valuer" }, @@ -1683,7 +1880,7 @@ "editIshtarGate(address)": { "notice": "PRIVILEGED GOVERNANCE FUNCTION. Allows governance to change the Ishtar Gate Address" }, - "editLiquidityMinimum(uint256)": { + "editLiquidityReserve(address,uint256)": { "notice": "GOVERNANCE FUNCTION: Edits the minimum liquidity an asset must have on Uniswap" }, "editPriceOracle(address)": { @@ -1695,9 +1892,15 @@ "editStrategyFactory(address)": { "notice": "PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol strategy factory" }, + "editStrategyNFT(address)": { + "notice": "PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol strategy NFT" + }, "editTreasury(address)": { "notice": "PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol fee recipient" }, + "editUniswapFactory(address)": { + "notice": "PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol uniswaps factory" + }, "enableBABLMiningProgram()": { "notice": "PRIVILEGED GOVERNANCE FUNCTION. Enable and starts the BABL Mining program by the Rewards Distributor Can only happen after public launch of the protocol." }, @@ -1728,6 +1931,9 @@ "isValidIntegration(string,address)": { "notice": "Check if integration name is valid" }, + "openPublicGardenCreation()": { + "notice": "PRIVILEGED GOVERNANCE FUNCTION. Allows governance to enable public creation of gardens" + }, "removeGarden(address)": { "notice": "PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a Garden" }, @@ -1741,11 +1947,14 @@ "notice": "PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a reserve asset" }, "setAllowPublicGardens()": { - "notice": "PRIVILEGED GOVERNANCE FUNCTION. Allows transfers of ERC20 BABL Tokens Can only happen after the protocol is fully decentralized. PRIVILEGED GOVERNANCE FUNCTION. Allows public gardens" + "notice": "PRIVILEGED GOVERNANCE FUNCTION. Allows public gardens" }, "setDefaultTradeIntegration(address)": { "notice": "PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol default trde integration" }, + "setMaxContributorsPerGarden(uint256)": { + "notice": "PRIVILEGED GOVERNANCE FUNCTION. Change the max number of contributors for new Gardens since the change" + }, "setOperation(uint8,address)": { "notice": "GOVERNANCE FUNCTION: Edit an existing operation on the registry" } @@ -1755,7 +1964,7 @@ "storageLayout": { "storage": [ { - "astId": 579, + "astId": 492, "contract": "contracts/BabController.sol:BabController", "label": "_initialized", "offset": 0, @@ -1763,7 +1972,7 @@ "type": "t_bool" }, { - "astId": 582, + "astId": 495, "contract": "contracts/BabController.sol:BabController", "label": "_initializing", "offset": 1, @@ -1771,7 +1980,7 @@ "type": "t_bool" }, { - "astId": 2700, + "astId": 1447, "contract": "contracts/BabController.sol:BabController", "label": "__gap", "offset": 0, @@ -1795,7 +2004,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 10862, + "astId": 9546, "contract": "contracts/BabController.sol:BabController", "label": "gardens", "offset": 0, @@ -1803,7 +2012,7 @@ "type": "t_array(t_address)dyn_storage" }, { - "astId": 10865, + "astId": 9549, "contract": "contracts/BabController.sol:BabController", "label": "reserveAssets", "offset": 0, @@ -1811,236 +2020,276 @@ "type": "t_array(t_address)dyn_storage" }, { - "astId": 10868, + "astId": 9552, "contract": "contracts/BabController.sol:BabController", - "label": "gardenValuer", + "label": "uniswapFactory", "offset": 0, "slot": "103", "type": "t_address" }, { - "astId": 10871, + "astId": 9555, "contract": "contracts/BabController.sol:BabController", - "label": "priceOracle", + "label": "gardenValuer", "offset": 0, "slot": "104", "type": "t_address" }, { - "astId": 10874, + "astId": 9558, "contract": "contracts/BabController.sol:BabController", - "label": "gardenFactory", + "label": "priceOracle", "offset": 0, "slot": "105", "type": "t_address" }, { - "astId": 10877, + "astId": 9561, "contract": "contracts/BabController.sol:BabController", - "label": "rewardsDistributor", + "label": "gardenFactory", "offset": 0, "slot": "106", "type": "t_address" }, { - "astId": 10880, + "astId": 9564, "contract": "contracts/BabController.sol:BabController", - "label": "ishtarGate", + "label": "rewardsDistributor", "offset": 0, "slot": "107", "type": "t_address" }, { - "astId": 10883, + "astId": 9567, "contract": "contracts/BabController.sol:BabController", - "label": "strategyFactory", + "label": "ishtarGate", "offset": 0, "slot": "108", "type": "t_address" }, { - "astId": 10887, + "astId": 9570, "contract": "contracts/BabController.sol:BabController", - "label": "enabledIntegrations", + "label": "strategyFactory", "offset": 0, "slot": "109", + "type": "t_address" + }, + { + "astId": 9573, + "contract": "contracts/BabController.sol:BabController", + "label": "gardenNFT", + "offset": 0, + "slot": "110", + "type": "t_address" + }, + { + "astId": 9576, + "contract": "contracts/BabController.sol:BabController", + "label": "strategyNFT", + "offset": 0, + "slot": "111", + "type": "t_address" + }, + { + "astId": 9580, + "contract": "contracts/BabController.sol:BabController", + "label": "enabledIntegrations", + "offset": 0, + "slot": "112", "type": "t_mapping(t_bytes32,t_address)" }, { - "astId": 10890, + "astId": 9583, "contract": "contracts/BabController.sol:BabController", "label": "defaultTradeIntegration", "offset": 0, - "slot": "110", + "slot": "113", "type": "t_address" }, { - "astId": 10895, + "astId": 9588, "contract": "contracts/BabController.sol:BabController", "label": "enabledOperations", "offset": 0, - "slot": "111", + "slot": "114", "type": "t_array(t_address)20_storage" }, { - "astId": 10900, + "astId": 9593, "contract": "contracts/BabController.sol:BabController", "label": "isGarden", "offset": 0, - "slot": "131", + "slot": "134", "type": "t_mapping(t_address,t_bool)" }, { - "astId": 10904, + "astId": 9597, "contract": "contracts/BabController.sol:BabController", "label": "validReserveAsset", "offset": 0, - "slot": "132", + "slot": "135", "type": "t_mapping(t_address,t_bool)" }, { - "astId": 10908, + "astId": 9601, "contract": "contracts/BabController.sol:BabController", "label": "assetWhitelist", "offset": 0, - "slot": "133", + "slot": "136", "type": "t_mapping(t_address,t_bool)" }, { - "astId": 10912, + "astId": 9605, "contract": "contracts/BabController.sol:BabController", "label": "keeperList", "offset": 0, - "slot": "134", + "slot": "137", "type": "t_mapping(t_address,t_bool)" }, { - "astId": 10915, + "astId": 9610, + "contract": "contracts/BabController.sol:BabController", + "label": "minLiquidityPerReserve", + "offset": 0, + "slot": "138", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 9613, "contract": "contracts/BabController.sol:BabController", "label": "treasury", "offset": 0, - "slot": "135", + "slot": "139", "type": "t_address" }, { - "astId": 10923, + "astId": 9621, "contract": "contracts/BabController.sol:BabController", "label": "strategistProfitPercentage", "offset": 0, - "slot": "136", + "slot": "140", "type": "t_uint256" }, { - "astId": 10925, + "astId": 9623, "contract": "contracts/BabController.sol:BabController", "label": "stewardsProfitPercentage", "offset": 0, - "slot": "137", + "slot": "141", "type": "t_uint256" }, { - "astId": 10927, + "astId": 9625, "contract": "contracts/BabController.sol:BabController", "label": "lpsProfitPercentage", "offset": 0, - "slot": "138", + "slot": "142", "type": "t_uint256" }, { - "astId": 10929, + "astId": 9627, "contract": "contracts/BabController.sol:BabController", "label": "strategistBABLPercentage", "offset": 0, - "slot": "139", + "slot": "143", "type": "t_uint256" }, { - "astId": 10931, + "astId": 9629, "contract": "contracts/BabController.sol:BabController", "label": "stewardsBABLPercentage", "offset": 0, - "slot": "140", + "slot": "144", "type": "t_uint256" }, { - "astId": 10933, + "astId": 9631, "contract": "contracts/BabController.sol:BabController", "label": "lpsBABLPercentage", "offset": 0, - "slot": "141", + "slot": "145", "type": "t_uint256" }, { - "astId": 10935, + "astId": 9633, "contract": "contracts/BabController.sol:BabController", "label": "gardenCreatorBonus", "offset": 0, - "slot": "142", - "type": "t_uint256" - }, - { - "astId": 10938, - "contract": "contracts/BabController.sol:BabController", - "label": "minRiskyPairLiquidityEth", - "offset": 0, - "slot": "143", + "slot": "146", "type": "t_uint256" }, { - "astId": 10941, + "astId": 9636, "contract": "contracts/BabController.sol:BabController", "label": "gardenTokensTransfersEnabled", "offset": 0, - "slot": "144", + "slot": "147", "type": "t_bool" }, { - "astId": 10944, + "astId": 9639, "contract": "contracts/BabController.sol:BabController", "label": "bablMiningProgramEnabled", "offset": 1, - "slot": "144", + "slot": "147", "type": "t_bool" }, { - "astId": 10947, + "astId": 9642, "contract": "contracts/BabController.sol:BabController", "label": "allowPublicGardens", "offset": 2, - "slot": "144", + "slot": "147", "type": "t_bool" }, { - "astId": 10950, + "astId": 9645, "contract": "contracts/BabController.sol:BabController", "label": "protocolPerformanceFee", "offset": 0, - "slot": "145", + "slot": "148", "type": "t_uint256" }, { - "astId": 10953, + "astId": 9648, "contract": "contracts/BabController.sol:BabController", "label": "protocolManagementFee", "offset": 0, - "slot": "146", + "slot": "149", "type": "t_uint256" }, { - "astId": 10956, + "astId": 9651, "contract": "contracts/BabController.sol:BabController", "label": "protocolDepositGardenTokenFee", "offset": 0, - "slot": "147", + "slot": "150", "type": "t_uint256" }, { - "astId": 10959, + "astId": 9654, "contract": "contracts/BabController.sol:BabController", "label": "protocolWithdrawalGardenTokenFee", "offset": 0, - "slot": "148", + "slot": "151", + "type": "t_uint256" + }, + { + "astId": 9657, + "contract": "contracts/BabController.sol:BabController", + "label": "maxContributorsPerGarden", + "offset": 0, + "slot": "152", "type": "t_uint256" + }, + { + "astId": 9660, + "contract": "contracts/BabController.sol:BabController", + "label": "gardenCreationIsOpen", + "offset": 0, + "slot": "153", + "type": "t_bool" } ], "types": { @@ -2090,6 +2339,13 @@ "numberOfBytes": "32", "value": "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_address)": { "encoding": "mapping", "key": "t_bytes32", diff --git a/deployments/artifacts/mainnet/BabControllerProxy.json b/deployments/artifacts/mainnet/BabControllerProxy.json index bdce6cf63..d4fe4f9ae 100644 --- a/deployments/artifacts/mainnet/BabControllerProxy.json +++ b/deployments/artifacts/mainnet/BabControllerProxy.json @@ -1,5 +1,5 @@ { - "address": "0xffe7c30daDb1B132b86aB7bbede496615d54c8Ac", + "address": "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F", "abi": [ { "inputs": [ @@ -133,40 +133,40 @@ "type": "receive" } ], - "transactionHash": "0x7e9731b3a4db2f22756af334b0b6d56de75ce64fd112cf59c1031b8549227c96", + "transactionHash": "0x020456bc4cebac9e5201e60d0a394e60e7250ed84db40dd9922c87ecd5261c59", "receipt": { "to": null, - "from": "0x311FEE0d859FA936FaEd456758dCD8047C4fFEd7", - "contractAddress": "0x26E44AD5b46C6A8C167815B7D180F6a5eD91D7bc", - "transactionIndex": 7, - "gasUsed": "732431", - "logsBloom": "0x00000000000040000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000001000000000000000008000000000000000000020000000000000000000800000000000000000000000800000000400000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000004000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x55199627acd59deb639dc6d0ff332d7d2ac52e5dc141b28a646e5bed56db27e4", - "transactionHash": "0x7e9731b3a4db2f22756af334b0b6d56de75ce64fd112cf59c1031b8549227c96", + "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", + "contractAddress": "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F", + "transactionIndex": 113, + "gasUsed": "756785", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000020800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000002000008000000000000000000004000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x11a01d2a5e10ca94470a109da661f49a670be28370a7f073ffacde2848c08bf0", + "transactionHash": "0x020456bc4cebac9e5201e60d0a394e60e7250ed84db40dd9922c87ecd5261c59", "logs": [ { - "transactionIndex": 7, - "blockNumber": 8516137, - "transactionHash": "0x7e9731b3a4db2f22756af334b0b6d56de75ce64fd112cf59c1031b8549227c96", - "address": "0x26E44AD5b46C6A8C167815B7D180F6a5eD91D7bc", + "transactionIndex": 113, + "blockNumber": 12451131, + "transactionHash": "0x020456bc4cebac9e5201e60d0a394e60e7250ed84db40dd9922c87ecd5261c59", + "address": "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000311fee0d859fa936faed456758dcd8047c4ffed7" + "0x000000000000000000000000040cc3af8455f3c34d1df1d2a305e047a062bebf" ], "data": "0x", - "logIndex": 5, - "blockHash": "0x55199627acd59deb639dc6d0ff332d7d2ac52e5dc141b28a646e5bed56db27e4" + "logIndex": 190, + "blockHash": "0x11a01d2a5e10ca94470a109da661f49a670be28370a7f073ffacde2848c08bf0" } ], - "blockNumber": 8516137, - "cumulativeGasUsed": "2692689", + "blockNumber": 12451131, + "cumulativeGasUsed": "9376714", "status": 1, "byzantium": true }, "args": [ - "0x359899D971C6882454CA4807E63474FA4b56ce3B", - "0x9Ab55868AF0e7c4d4EC30c6CaF8a18299D3D266B", + "0xeb0CfB66E30F2015C8672DF996aF0fcde8CB318A", + "0x0c085fd8bbfd78db0107bf17047e8fa906d871dc", "0x8129fc1c" ], "bytecode": "0x60806040526040516109943803806109948339818101604052606081101561002657600080fd5b8151602083015160408085018051915193959294830192918464010000000082111561005157600080fd5b90830190602082018581111561006657600080fd5b825164010000000081118282018810171561008057600080fd5b82525081516020918201929091019080838360005b838110156100ad578181015183820152602001610095565b50505050905090810190601f1680156100da5780820380516001836020036101000a031916815260200191505b5060408181527f656970313936372e70726f78792e696d706c656d656e746174696f6e0000000082525190819003601c01902086935084925060008051602061093983398151915260001990910114905061013157fe5b610143826001600160e01b0361026516565b8051156101fb576000826001600160a01b0316826040518082805190602001908083835b602083106101865780518252601f199092019160209182019101610167565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146101e6576040519150601f19603f3d011682016040523d82523d6000602084013e6101eb565b606091505b50509050806101f957600080fd5b505b5050604080517f656970313936372e70726f78792e61646d696e00000000000000000000000000815290519081900360130190206000805160206109198339815191526000199091011461024b57fe5b61025d826001600160e01b036102c516565b5050506102dd565b610278816102d760201b6103b41760201c565b6102b35760405162461bcd60e51b815260040180806020018281038252603b815260200180610959603b913960400191505060405180910390fd5b60008051602061093983398151915255565b60008051602061091983398151915255565b3b151590565b61062d806102ec6000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100985780635c60da1b146101185780638f28397014610149578063f851a4401461017c5761005d565b3661005d5761005b610191565b005b61005b610191565b34801561007157600080fd5b5061005b6004803603602081101561008857600080fd5b50356001600160a01b03166101ab565b61005b600480360360408110156100ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100d957600080fd5b8201836020820111156100eb57600080fd5b8035906020019184600183028401116401000000008311171561010d57600080fd5b5090925090506101e5565b34801561012457600080fd5b5061012d610292565b604080516001600160a01b039092168252519081900360200190f35b34801561015557600080fd5b5061005b6004803603602081101561016c57600080fd5b50356001600160a01b03166102cf565b34801561018857600080fd5b5061012d610389565b6101996103ba565b6101a96101a461041a565b61043f565b565b6101b3610463565b6001600160a01b0316336001600160a01b031614156101da576101d581610488565b6101e2565b6101e2610191565b50565b6101ed610463565b6001600160a01b0316336001600160a01b031614156102855761020f83610488565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d806000811461026c576040519150601f19603f3d011682016040523d82523d6000602084013e610271565b606091505b505090508061027f57600080fd5b5061028d565b61028d610191565b505050565b600061029c610463565b6001600160a01b0316336001600160a01b031614156102c4576102bd61041a565b90506102cc565b6102cc610191565b90565b6102d7610463565b6001600160a01b0316336001600160a01b031614156101da576001600160a01b0381166103355760405162461bcd60e51b81526004018080602001828103825260368152602001806105876036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61035e610463565b604080516001600160a01b03928316815291841660208301528051918290030190a16101d5816104c8565b6000610393610463565b6001600160a01b0316336001600160a01b031614156102c4576102bd610463565b3b151590565b6103c2610463565b6001600160a01b0316336001600160a01b031614156104125760405162461bcd60e51b81526004018080602001828103825260328152602001806105556032913960400191505060405180910390fd5b6101a96101a9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b610491816104ec565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b6104f5816103b4565b6105305760405162461bcd60e51b815260040180806020018281038252603b8152602001806105bd603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a26469706673582212206e221e2a3547bd97244b05ed46430b1b078ba097cb2a4e25ec3d79cf9ac9f02c64736f6c63430006080033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc43616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373", diff --git a/deployments/artifacts/mainnet/BalancerIntegration.json b/deployments/artifacts/mainnet/BalancerIntegration.json index d84a8f220..de4c158c1 100644 --- a/deployments/artifacts/mainnet/BalancerIntegration.json +++ b/deployments/artifacts/mainnet/BalancerIntegration.json @@ -1,5 +1,5 @@ { - "address": "0xC32C2e1c7cB4c6B09503b8102F676f7bB42374Fe", + "address": "0x6aA8fcf1f54edec27019C9363F05F80881Fd5342", "abi": [ { "inputs": [ @@ -345,31 +345,31 @@ "type": "function" } ], - "transactionHash": "0xd7a0bca0bac70370b7d6993733e776f44eeb0ef46e80df50a92e07dfb58b8bfa", + "transactionHash": "0x6c81387ad1a88f416e59f298acca28dcca88f1ec6c1957e669c853b105e445fa", "receipt": { "to": null, "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", - "contractAddress": "0xC32C2e1c7cB4c6B09503b8102F676f7bB42374Fe", - "transactionIndex": 186, - "gasUsed": "1986479", + "contractAddress": "0x6aA8fcf1f54edec27019C9363F05F80881Fd5342", + "transactionIndex": 11, + "gasUsed": "1986503", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x00a7e06a552d3b94c60455da319b2281a99f5a8ab0d850ac871ea29927406787", - "transactionHash": "0xd7a0bca0bac70370b7d6993733e776f44eeb0ef46e80df50a92e07dfb58b8bfa", + "blockHash": "0x3584fe8e79af890df92112d46fdf763229b6e01b144c930f0e5dbc8ee6f6bd36", + "transactionHash": "0x6c81387ad1a88f416e59f298acca28dcca88f1ec6c1957e669c853b105e445fa", "logs": [], - "blockNumber": 12360952, - "cumulativeGasUsed": "10808356", + "blockNumber": 12451277, + "cumulativeGasUsed": "2550298", "status": 1, "byzantium": true }, "args": [ - "0xffe7c30daDb1B132b86aB7bbede496615d54c8Ac", + "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F", "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", "0x9424B1412450D0f8Fc2255FAf6046b98213B76Bd" ], - "solcInputHash": "a02a2075cf667a20c416d2d0a5e8f337", - "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_weth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_coreFactoryAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_pool\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_poolTokensOut\",\"type\":\"uint256\"}],\"name\":\"PoolEntered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_pool\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_poolTokensIn\",\"type\":\"uint256\"}],\"name\":\"PoolExited\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"coreFactory\",\"outputs\":[{\"internalType\":\"contract IBFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_poolTokensIn\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"_tokensOut\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_minAmountsOut\",\"type\":\"uint256[]\"}],\"name\":\"exitPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_liquidity\",\"type\":\"uint256\"}],\"name\":\"getPoolMinAmountsOut\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_minAmountsOut\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"}],\"name\":\"getPoolTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_poolToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxAmountsIn\",\"type\":\"uint256\"}],\"name\":\"getPoolTokensOut\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"}],\"name\":\"getPoolWeights\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"initializedByGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"}],\"name\":\"isPool\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_poolTokensOut\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"_tokensIn\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_maxAmountsIn\",\"type\":\"uint256[]\"}],\"name\":\"joinPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Protocol Kyber protocol trade integration\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of the controller\",\"_coreFactoryAddress\":\"Address of Balancer core factory address\",\"_weth\":\"Address of the WETH ERC20\"}},\"exitPool(address,address,uint256,address[],uint256[])\":{\"params\":{\"_minAmountsOut\":\"Array of min token quantities to receive from the pool\",\"_poolAddress\":\"Address of the pool token to join\",\"_poolTokensIn\":\"Pool tokens to exchange for the underlying tokens\",\"_strategy\":\"Address of the strategy\",\"_tokensOut\":\"Array of token addresses to withdraw\"}},\"isPool(address)\":{\"params\":{\"_poolAddress\":\"Pool address to check\"},\"returns\":{\"_0\":\"bool True if the address is a pool\"}},\"joinPool(address,address,uint256,address[],uint256[])\":{\"params\":{\"_maxAmountsIn\":\"Array of max token quantities to pull out from the garden\",\"_poolAddress\":\"Address of the pool token to join\",\"_poolTokensOut\":\"Min amount of pool tokens to receive\",\"_strategy\":\"Address of the strategy\",\"_tokensIn\":\"Array of token addresses to deposit\"}}},\"title\":\"BalancerIntegration\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates the integration\"},\"exitPool(address,address,uint256,address[],uint256[])\":{\"notice\":\"Exits a liquidity pool. Accrue protocol fee (if any)\"},\"getName()\":{\"notice\":\"Returns the name of the integration\"},\"isPool(address)\":{\"notice\":\"Checks whether a pool address is valid\"},\"joinPool(address,address,uint256,address[],uint256[])\":{\"notice\":\"Joins a pool\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/integrations/pool/BalancerIntegration.sol\":\"BalancerIntegration\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\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 /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\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, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x7b2b8baa20fd60ab4a328c8e34c64a353651b80ba4b5b157cbb61813f6f85d55\",\"license\":\"MIT\"},\"contracts/integrations/BaseIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IIntegration} from '../interfaces/IIntegration.sol';\\nimport {IWETH} from '../interfaces/external/weth/IWETH.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\n\\n/**\\n * @title BaseIntegration\\n * @author Babylon Finance\\n *\\n * Abstract class that houses common Integration-related state and functions.\\n */\\nabstract contract BaseIntegration {\\n using SafeCast for int256;\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlySystemContract() {\\n require(IBabController(controller).isSystemContract(msg.sender), 'Only system can call this');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the controller\\n address public controller;\\n // Wrapped ETH address\\n address public immutable weth;\\n // Name of the integration\\n string public name;\\n mapping(address => bool) public initializedByGarden;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) {\\n require(_controller != address(0), 'Controller must be defined');\\n name = _name;\\n controller = _controller;\\n weth = _weth;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the name of the integration\\n */\\n function getName() external view returns (string memory) {\\n return name;\\n }\\n}\\n\",\"keccak256\":\"0xf15da8b024a5a4f205b363420cb5851fd1c4225970999aed5f00d829bbd4f638\",\"license\":\"Apache License\"},\"contracts/integrations/pool/BalancerIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {PoolIntegration} from './PoolIntegration.sol';\\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\\nimport {IBFactory} from '../../interfaces/external/balancer/IBFactory.sol';\\nimport {IBPool} from '../../interfaces/external/balancer/IBPool.sol';\\n\\n/**\\n * @title BalancerIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Kyber protocol trade integration\\n */\\ncontract BalancerIntegration is PoolIntegration {\\n using SafeMath for uint256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ State Variables ============ */\\n\\n // Address of Kyber Network Proxy\\n IBFactory public coreFactory;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _controller Address of the controller\\n * @param _weth Address of the WETH ERC20\\n * @param _coreFactoryAddress Address of Balancer core factory address\\n */\\n constructor(\\n address _controller,\\n address _weth,\\n address _coreFactoryAddress\\n ) PoolIntegration('balancer', _weth, _controller) {\\n coreFactory = IBFactory(_coreFactoryAddress);\\n }\\n\\n /* ============ External Functions ============ */\\n\\n function getPoolTokens(address _poolAddress) external view override returns (address[] memory) {\\n return IBPool(_poolAddress).getCurrentTokens();\\n }\\n\\n function getPoolWeights(address _poolAddress) external view override returns (uint256[] memory) {\\n address[] memory poolTokens = IBPool(_poolAddress).getCurrentTokens();\\n uint256[] memory result = new uint256[](poolTokens.length);\\n for (uint8 i = 0; i < poolTokens.length; i++) {\\n result[i] = IBPool(_poolAddress).getNormalizedWeight(poolTokens[i]);\\n }\\n return result;\\n }\\n\\n function getPoolTokensOut(\\n address _poolAddress,\\n address _poolToken,\\n uint256 _maxAmountsIn\\n ) external view override returns (uint256) {\\n uint256 tokenBalance = IBPool(_poolAddress).getBalance(_poolToken);\\n return IBPool(_poolAddress).totalSupply().preciseMul(_maxAmountsIn.preciseDiv(tokenBalance));\\n }\\n\\n function getPoolMinAmountsOut(address _poolAddress, uint256 _liquidity)\\n external\\n view\\n override\\n returns (uint256[] memory _minAmountsOut)\\n {\\n uint256 lpTokensTotalSupply = IBPool(_poolAddress).totalSupply();\\n address[] memory poolTokens = IBPool(_poolAddress).getCurrentTokens();\\n uint256[] memory result = new uint256[](poolTokens.length);\\n for (uint256 i = 0; i < poolTokens.length; i++) {\\n result[i] = IERC20(poolTokens[i])\\n .balanceOf(_poolAddress)\\n .mul(_liquidity)\\n .div(lpTokensTotalSupply)\\n .preciseMul(1e18 - SLIPPAGE_ALLOWED);\\n }\\n return result;\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n function _isPool(address _poolAddress) internal view override returns (bool) {\\n return coreFactory.isBPool(_poolAddress);\\n }\\n\\n function _getSpender(address _poolAddress) internal pure override returns (address) {\\n return _poolAddress;\\n }\\n\\n /**\\n * Return join pool calldata which is already generated from the pool API\\n *\\n * hparam _strategy Address of the strategy\\n * @param _poolAddress Address of the pool\\n * @param _poolTokensOut Amount of pool tokens to send\\n * hparam _tokensIn Addresses of tokens to send to the pool\\n * @param _maxAmountsIn Amounts of tokens to send to the pool\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getJoinPoolCalldata(\\n address, /* _strategy */\\n address _poolAddress,\\n uint256 _poolTokensOut,\\n address[] calldata, /* _tokensIn */\\n uint256[] calldata _maxAmountsIn\\n )\\n internal\\n pure\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n // Encode method data for Garden to invoke\\n bytes memory methodData = abi.encodeWithSignature('joinPool(uint256,uint256[])', _poolTokensOut, _maxAmountsIn);\\n\\n return (_poolAddress, 0, methodData);\\n }\\n\\n /**\\n * Return exit pool calldata which is already generated from the pool API\\n *\\n * hparam _strategy Address of the strategy\\n * @param _poolAddress Address of the pool\\n * @param _poolTokensIn Amount of pool tokens to receive\\n * hparam _tokensOut Addresses of tokens to receive\\n * @param _minAmountsOut Amounts of pool tokens to receive\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getExitPoolCalldata(\\n address, /* _strategy */\\n address _poolAddress,\\n uint256 _poolTokensIn,\\n address[] calldata, /* _tokensOut */\\n uint256[] calldata _minAmountsOut\\n )\\n internal\\n pure\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n require(_poolTokensIn > 0, '_poolTokensIn has to not 0');\\n require(_minAmountsOut.length > 1, 'Has to provide _minAmountsOut');\\n // Encode method data for Garden to invoke\\n bytes memory methodData = abi.encodeWithSignature('exitPool(uint256,uint256[])', _poolTokensIn, _minAmountsOut);\\n\\n return (_poolAddress, 0, methodData);\\n }\\n}\\n\",\"keccak256\":\"0xbd61cae7c987d8cff6ac592a5abbb45e15f135c56c572c312e8de404ff1fca79\",\"license\":\"Apache License\"},\"contracts/integrations/pool/PoolIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\n\\nimport {IPoolIntegration} from '../../interfaces/IPoolIntegration.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\n\\nimport {BaseIntegration} from '../BaseIntegration.sol';\\n\\n/**\\n * @title PoolIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Base class for integration with trading protocols\\n */\\nabstract contract PoolIntegration is BaseIntegration, ReentrancyGuard, IPoolIntegration {\\n using SafeMath for uint256;\\n using SafeCast for uint256;\\n\\n /* ============ Struct ============ */\\n\\n struct PoolInfo {\\n IGarden garden; // Garden address\\n IStrategy strategy; // Strategy address\\n address pool; // Pool address\\n uint256 totalSupply; // Total Supply of the pool\\n uint256 poolTokensInTransaction; // Pool tokens affected by this transaction\\n uint256 poolTokensInStrategy; // Pool tokens strategy balance\\n uint256[] limitPoolTokenQuantities;\\n }\\n\\n /* ============ Events ============ */\\n\\n event PoolEntered(address indexed _strategy, address indexed _garden, address _pool, uint256 _poolTokensOut);\\n\\n event PoolExited(address indexed _strategy, address indexed _garden, address _pool, uint256 _poolTokensIn);\\n\\n /* ============ Constants ============ */\\n\\n uint256 internal constant SLIPPAGE_ALLOWED = 1e16; // 1%\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) BaseIntegration(_name, _weth, _controller) {}\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Joins a pool\\n *\\n * @param _strategy Address of the strategy\\n * @param _poolAddress Address of the pool token to join\\n * @param _poolTokensOut Min amount of pool tokens to receive\\n * @param _tokensIn Array of token addresses to deposit\\n * @param _maxAmountsIn Array of max token quantities to pull out from the garden\\n */\\n function joinPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensOut,\\n address[] calldata _tokensIn,\\n uint256[] calldata _maxAmountsIn\\n ) external override nonReentrant onlySystemContract {\\n PoolInfo memory poolInfo = _createPoolInfo(_strategy, _poolAddress, _poolTokensOut, _tokensIn, _maxAmountsIn);\\n _validatePreJoinPoolData(poolInfo);\\n // Approve spending of the tokens\\n for (uint256 i = 0; i < _tokensIn.length; i++) {\\n // No need to approve ETH\\n if (_tokensIn[i] != address(0)) {\\n poolInfo.strategy.invokeApprove(_getSpender(_poolAddress), _tokensIn[i], _maxAmountsIn[i]);\\n }\\n }\\n (address targetPool, uint256 callValue, bytes memory methodData) =\\n _getJoinPoolCalldata(_strategy, _poolAddress, _poolTokensOut, _tokensIn, _maxAmountsIn);\\n poolInfo.strategy.invokeFromIntegration(targetPool, callValue, methodData);\\n poolInfo.poolTokensInTransaction = IERC20(poolInfo.pool).balanceOf(address(poolInfo.strategy)).sub(\\n poolInfo.poolTokensInStrategy\\n );\\n _validatePostJoinPoolData(poolInfo);\\n\\n emit PoolEntered(address(poolInfo.strategy), address(poolInfo.garden), poolInfo.pool, _poolTokensOut);\\n }\\n\\n /**\\n * Exits a liquidity pool. Accrue protocol fee (if any)\\n *\\n * @param _strategy Address of the strategy\\n * @param _poolAddress Address of the pool token to join\\n * @param _poolTokensIn Pool tokens to exchange for the underlying tokens\\n * @param _tokensOut Array of token addresses to withdraw\\n * @param _minAmountsOut Array of min token quantities to receive from the pool\\n */\\n function exitPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensIn,\\n address[] calldata _tokensOut,\\n uint256[] calldata _minAmountsOut\\n ) external override nonReentrant onlySystemContract {\\n PoolInfo memory poolInfo = _createPoolInfo(_strategy, _poolAddress, _poolTokensIn, _tokensOut, _minAmountsOut);\\n _validatePreExitPoolData(poolInfo);\\n // Approve spending of the pool token\\n poolInfo.strategy.invokeApprove(_getSpender(_poolAddress), _poolAddress, _poolTokensIn);\\n\\n (address targetPool, uint256 callValue, bytes memory methodData) =\\n _getExitPoolCalldata(_strategy, _poolAddress, _poolTokensIn, _tokensOut, _minAmountsOut);\\n poolInfo.strategy.invokeFromIntegration(targetPool, callValue, methodData);\\n _validatePostExitPoolData(poolInfo);\\n\\n emit PoolExited(address(poolInfo.strategy), address(poolInfo.garden), poolInfo.pool, _poolTokensIn);\\n }\\n\\n /**\\n * Checks whether a pool address is valid\\n *\\n * @param _poolAddress Pool address to check\\n * @return bool True if the address is a pool\\n */\\n function isPool(address _poolAddress) external view override returns (bool) {\\n return _isPool(_poolAddress);\\n }\\n\\n function getPoolTokens(\\n address /* _poolAddress */\\n ) external view virtual override returns (address[] memory);\\n\\n function getPoolWeights(\\n address /*_poolAddress */\\n ) external view virtual override returns (uint256[] memory);\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Create and return PoolInfo struct\\n *\\n * @param _strategy Address of the strategy\\n * @param _pool Address of the pool\\n * @param _poolTokensInTransaction Number of pool tokens involved\\n * hparam _poolTokens Addresseses of the pool tokens\\n * @param _limitPoolTokenQuantities Limit quantity of the pool tokens\\n *\\n * return PoolInfo Struct containing data for pool\\n */\\n function _createPoolInfo(\\n address _strategy,\\n address _pool,\\n uint256 _poolTokensInTransaction,\\n address[] calldata, /* _poolTokens */\\n uint256[] calldata _limitPoolTokenQuantities\\n ) internal view returns (PoolInfo memory) {\\n PoolInfo memory poolInfo;\\n poolInfo.strategy = IStrategy(_strategy);\\n poolInfo.garden = IGarden(poolInfo.strategy.garden());\\n poolInfo.pool = _pool;\\n poolInfo.totalSupply = IERC20(_pool).totalSupply();\\n poolInfo.poolTokensInStrategy = IERC20(_pool).balanceOf(_strategy);\\n poolInfo.poolTokensInTransaction = _poolTokensInTransaction;\\n poolInfo.limitPoolTokenQuantities = _limitPoolTokenQuantities;\\n\\n return poolInfo;\\n }\\n\\n /**\\n * Validate pre pool join data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePreJoinPoolData(PoolInfo memory _poolInfo) internal view {\\n require(_isPool(_poolInfo.pool), 'The pool address is not valid');\\n require(_poolInfo.poolTokensInTransaction > 0, 'Min pool tokens to receive must be greater than 0');\\n }\\n\\n /**\\n * Validate pre pool data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePreExitPoolData(PoolInfo memory _poolInfo) internal view {\\n require(_isPool(_poolInfo.pool), 'The pool address is not valid');\\n require(_poolInfo.poolTokensInTransaction > 0, 'Pool tokens to exchange must be greater than 0');\\n require(\\n _poolInfo.poolTokensInStrategy >= _poolInfo.poolTokensInTransaction,\\n 'The strategy does not have enough pool tokens'\\n );\\n }\\n\\n /**\\n * Validate post join pool data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePostJoinPoolData(PoolInfo memory _poolInfo) internal view {\\n require(\\n (IERC20(_poolInfo.pool).balanceOf(address(_poolInfo.strategy)) > _poolInfo.poolTokensInStrategy),\\n 'The strategy did not receive the pool tokens'\\n );\\n }\\n\\n /**\\n * Validate post exit pool data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePostExitPoolData(PoolInfo memory _poolInfo) internal view {\\n require(\\n IERC20(_poolInfo.pool).balanceOf(address(_poolInfo.strategy)) ==\\n _poolInfo.poolTokensInStrategy - _poolInfo.poolTokensInTransaction,\\n 'The strategy did not return the pool tokens'\\n );\\n // TODO: validate individual tokens received\\n }\\n\\n /**\\n * Return join pool calldata which is already generated from the pool API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * hparam _poolTokensOut Amount of pool tokens to send\\n * hparam _tokensIn Addresses of tokens to send to the pool\\n * hparam _maxAmountsIn Amounts of tokens to send to the pool\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getJoinPoolCalldata(\\n address, /* _strategy */\\n address, /* _poolAddress */\\n uint256, /* _poolTokensOut */\\n address[] calldata, /* _tokensIn */\\n uint256[] calldata /* _maxAmountsIn */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n /**\\n * Return exit pool calldata which is already generated from the pool API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * hparam _poolTokensIn Amount of pool tokens to receive\\n * hparam _tokensOut Addresses of tokens to receive\\n * hparam _minAmountsOut Amounts of pool tokens to receive\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getExitPoolCalldata(\\n address, /* _strategy */\\n address, /* _poolAddress */\\n uint256, /* _poolTokensIn */\\n address[] calldata, /* _tokensOut */\\n uint256[] calldata /* _minAmountsOut */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n function _isPool(\\n address /* _poolAddress */\\n ) internal view virtual returns (bool);\\n\\n function _getSpender(\\n address /* _poolAddress */\\n ) internal view virtual returns (address);\\n}\\n\",\"keccak256\":\"0x0b8b81675c457a05c1a2ab85cf840cd8504bb7a6a1d68c0969d80755b423c3e6\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityMinimum(uint256 _minRiskyPairLiquidityEth) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minRiskyPairLiquidityEth() external view returns (uint256);\\n\\n function getUniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0x57cf4ece98219f805a416e8c24728d30d9b37c4126d66785d2617b97e35ffae6\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function nftAddress() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategy(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function reenableEthForStrategies() external;\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x5e460136e0b45024ea1c1f32cde607f3ce75dd5b14cee34007d6bbd08beabc82\",\"license\":\"Apache License\"},\"contracts/interfaces/IIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIntegration\\n * @author Babylon Finance\\n *\\n * Interface for protocol integrations\\n */\\ninterface IIntegration {\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xee03c9274ddf3257e3bfd2bb229fea3412c9105f178e64174f59efeafd53182c\",\"license\":\"Apache License\"},\"contracts/interfaces/IPoolIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPoolIntegration\\n * @author Babylon Finance\\n *\\n * Interface for liquiditypool protocol integrations\\n */\\ninterface IPoolIntegration {\\n function joinPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensOut,\\n address[] memory _poolTokens,\\n uint256[] memory _maxAmountsIn\\n ) external;\\n\\n function exitPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensIn,\\n address[] memory _poolTokens,\\n uint256[] memory _minAmountsOut\\n ) external;\\n\\n function getPoolTokens(address _poolAddress) external view returns (address[] memory);\\n\\n function getPoolWeights(address _poolAddress) external view returns (uint256[] memory);\\n\\n function getPoolTokensOut(\\n address _poolAdress,\\n address _tokenAddress,\\n uint256 _maxAmountsIn\\n ) external view returns (uint256);\\n\\n function getPoolMinAmountsOut(address _poolAddress, uint256 _poolTokenAmount)\\n external\\n view\\n returns (uint256[] memory _minAmountsOut);\\n\\n function isPool(address _poolAddress) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xee7df0934dad8d729ee6dacf85e1ec327a0c8e17bcabaa2afa7d14d93325f9ac\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital,\\n address _strategyNft\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function strategyNft() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x4396906e436eb68c96715e0a53ae1656ac5d7934ebdaeb58ec3c33953465bc39\",\"license\":\"Apache License\"},\"contracts/interfaces/external/balancer/IBFactory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport {IBPool} from './IBPool.sol';\\n\\ninterface IBFactory {\\n function isBPool(address b) external view returns (bool);\\n\\n function newBPool() external returns (IBPool);\\n}\\n\",\"keccak256\":\"0xcc05c1d419cf327d8e67ea17c9fce1d113e85172cd9afd8ee30467afdeded48a\",\"license\":\"MIT\"},\"contracts/interfaces/external/balancer/IBPool.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\ninterface IBPool {\\n function isPublicSwap() external view returns (bool);\\n\\n function isFinalized() external view returns (bool);\\n\\n function isBound(address t) external view returns (bool);\\n\\n function getNumTokens() external view returns (uint256);\\n\\n function getCurrentTokens() external view returns (address[] memory tokens);\\n\\n function getFinalTokens() external view returns (address[] memory tokens);\\n\\n function getDenormalizedWeight(address token) external view returns (uint256);\\n\\n function getTotalDenormalizedWeight() external view returns (uint256);\\n\\n function getNormalizedWeight(address token) external view returns (uint256);\\n\\n function getBalance(address token) external view returns (uint256);\\n\\n function getSwapFee() external view returns (uint256);\\n\\n function getController() external view returns (address);\\n\\n function setSwapFee(uint256 swapFee) external;\\n\\n function setController(address manager) external;\\n\\n function setPublicSwap(bool external_) external;\\n\\n function finalize() external;\\n\\n function bind(\\n address token,\\n uint256 balance,\\n uint256 denorm\\n ) external;\\n\\n function rebind(\\n address token,\\n uint256 balance,\\n uint256 denorm\\n ) external;\\n\\n function unbind(address token) external;\\n\\n function gulp(address token) external;\\n\\n function getSpotPrice(address tokenIn, address tokenOut) external view returns (uint256 spotPrice);\\n\\n function getSpotPriceSansFee(address tokenIn, address tokenOut) external view returns (uint256 spotPrice);\\n\\n function joinPool(uint256 poolAmountOut, uint256[] calldata maxAmountsIn) external;\\n\\n function exitPool(uint256 poolAmountIn, uint256[] calldata minAmountsOut) external;\\n\\n function swapExactAmountIn(\\n address tokenIn,\\n uint256 tokenAmountIn,\\n address tokenOut,\\n uint256 minAmountOut,\\n uint256 maxPrice\\n ) external returns (uint256 tokenAmountOut, uint256 spotPriceAfter);\\n\\n function swapExactAmountOut(\\n address tokenIn,\\n uint256 maxAmountIn,\\n address tokenOut,\\n uint256 tokenAmountOut,\\n uint256 maxPrice\\n ) external returns (uint256 tokenAmountIn, uint256 spotPriceAfter);\\n\\n function joinswapExternAmountIn(\\n address tokenIn,\\n uint256 tokenAmountIn,\\n uint256 minPoolAmountOut\\n ) external returns (uint256 poolAmountOut);\\n\\n function joinswapPoolAmountOut(\\n address tokenIn,\\n uint256 poolAmountOut,\\n uint256 maxAmountIn\\n ) external returns (uint256 tokenAmountIn);\\n\\n function exitswapPoolAmountIn(\\n address tokenOut,\\n uint256 poolAmountIn,\\n uint256 minAmountOut\\n ) external returns (uint256 tokenAmountOut);\\n\\n function exitswapExternAmountOut(\\n address tokenOut,\\n uint256 tokenAmountOut,\\n uint256 maxPoolAmountIn\\n ) external returns (uint256 poolAmountIn);\\n\\n function totalSupply() external view returns (uint256);\\n\\n function balanceOf(address whom) external view returns (uint256);\\n\\n function allowance(address src, address dst) external view returns (uint256);\\n\\n function approve(address dst, uint256 amt) external returns (bool);\\n\\n function transfer(address dst, uint256 amt) external returns (bool);\\n\\n function transferFrom(\\n address src,\\n address dst,\\n uint256 amt\\n ) external returns (bool);\\n\\n function calcSpotPrice(\\n uint256 tokenBalanceIn,\\n uint256 tokenWeightIn,\\n uint256 tokenBalanceOut,\\n uint256 tokenWeightOut,\\n uint256 swapFee\\n ) external pure returns (uint256 spotPrice);\\n\\n function calcOutGivenIn(\\n uint256 tokenBalanceIn,\\n uint256 tokenWeightIn,\\n uint256 tokenBalanceOut,\\n uint256 tokenWeightOut,\\n uint256 tokenAmountIn,\\n uint256 swapFee\\n ) external pure returns (uint256 tokenAmountOut);\\n\\n function calcInGivenOut(\\n uint256 tokenBalanceIn,\\n uint256 tokenWeightIn,\\n uint256 tokenBalanceOut,\\n uint256 tokenWeightOut,\\n uint256 tokenAmountOut,\\n uint256 swapFee\\n ) external pure returns (uint256 tokenAmountIn);\\n\\n function calcPoolOutGivenSingleIn(\\n uint256 tokenBalanceIn,\\n uint256 tokenWeightIn,\\n uint256 poolSupply,\\n uint256 totalWeight,\\n uint256 tokenAmountIn,\\n uint256 swapFee\\n ) external pure returns (uint256 poolAmountOut);\\n\\n function calcSingleInGivenPoolOut(\\n uint256 tokenBalanceIn,\\n uint256 tokenWeightIn,\\n uint256 poolSupply,\\n uint256 totalWeight,\\n uint256 poolAmountOut,\\n uint256 swapFee\\n ) external pure returns (uint256 tokenAmountIn);\\n\\n function calcSingleOutGivenPoolIn(\\n uint256 tokenBalanceOut,\\n uint256 tokenWeightOut,\\n uint256 poolSupply,\\n uint256 totalWeight,\\n uint256 poolAmountIn,\\n uint256 swapFee\\n ) external pure returns (uint256 tokenAmountOut);\\n\\n function calcPoolInGivenSingleOut(\\n uint256 tokenBalanceOut,\\n uint256 tokenWeightOut,\\n uint256 poolSupply,\\n uint256 totalWeight,\\n uint256 tokenAmountOut,\\n uint256 swapFee\\n ) external pure returns (uint256 poolAmountIn);\\n}\\n\",\"keccak256\":\"0x5521da1ca55fff53cfe3cbdb68091e16918257c68eb7e3d574319498003cda51\",\"license\":\"MIT\"},\"contracts/interfaces/external/weth/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface IWETH is IERC20 {\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n}\\n\",\"keccak256\":\"0xacc7980a650b7a753ee51f1bbc0ae4f641e84261bcc02cfdaf87ee8136483684\",\"license\":\"MIT\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523480156200001157600080fd5b506040516200234438038062002344833981810160405260608110156200003757600080fd5b508051602080830151604093840151845180860190955260088552673130b630b731b2b960c11b92850192909252919282848282826001600160a01b038116620000c8576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c6572206d75737420626520646566696e6564000000000000604482015290519081900360640190fd5b8251620000dd90600190602086019062000132565b50600080546001600160a01b03199081166001600160a01b039384161790915560609290921b6001600160601b03191660805260016003556004805490921696169590951790945550620001de945050505050565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826200016a5760008555620001b5565b82601f106200018557805160ff1916838001178555620001b5565b82800160010185558215620001b5579182015b82811115620001b557825182559160200191906001019062000198565b50620001c3929150620001c7565b5090565b5b80821115620001c35760008155600101620001c8565b60805160601c612148620001fc6000398061070552506121486000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c806362cc395a1161008c578063bd9d8ad911610066578063bd9d8ad914610403578063ca4f280314610479578063f5e393251461049f578063f77c4791146104cb576100df565b806362cc395a14610217578063708a3476146102fb578063b10198fb146103dd576100df565b80633d8df667116100bd5780633d8df667146101b15780633fc8cef3146101d55780635b16ebb7146101dd576100df565b806306fdde03146100e457806317d7de7c146101615780633cd5bd9514610169575b600080fd5b6100ec6104d3565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012657818101518382015260200161010e565b50505050905090810190601f1680156101535780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100ec610560565b61019f6004803603606081101561017f57600080fd5b506001600160a01b038135811691602081013590911690604001356105f5565b60408051918252519081900360200190f35b6101b96106f4565b604080516001600160a01b039092168252519081900360200190f35b6101b9610703565b610203600480360360208110156101f357600080fd5b50356001600160a01b0316610727565b604080519115158252519081900360200190f35b6102f9600480360360a081101561022d57600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561026857600080fd5b82018360208201111561027a57600080fd5b8035906020019184602083028401116401000000008311171561029c57600080fd5b9193909290916020810190356401000000008111156102ba57600080fd5b8201836020820111156102cc57600080fd5b803590602001918460208302840111640100000000831117156102ee57600080fd5b509092509050610738565b005b6102f9600480360360a081101561031157600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561034c57600080fd5b82018360208201111561035e57600080fd5b8035906020019184602083028401116401000000008311171561038057600080fd5b91939092909160208101903564010000000081111561039e57600080fd5b8201836020820111156103b057600080fd5b803590602001918460208302840111640100000000831117156103d257600080fd5b509092509050610b55565b610203600480360360208110156103f357600080fd5b50356001600160a01b0316611074565b6104296004803603602081101561041957600080fd5b50356001600160a01b0316611089565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561046557818101518382015260200161044d565b505050509050019250505060405180910390f35b6104296004803603602081101561048f57600080fd5b50356001600160a01b03166112a2565b610429600480360360408110156104b557600080fd5b506001600160a01b0381351690602001356113ad565b6101b9611676565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105585780601f1061052d57610100808354040283529160200191610558565b820191906000526020600020905b81548152906001019060200180831161053b57829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156105eb5780601f106105c0576101008083540402835291602001916105eb565b820191906000526020600020905b8154815290600101906020018083116105ce57829003601f168201915b5050505050905090565b600080846001600160a01b031663f8b2cb4f856040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561064557600080fd5b505afa158015610659573d6000803e3d6000fd5b505050506040513d602081101561066f57600080fd5b505190506106eb6106808483611685565b866001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156106b957600080fd5b505afa1580156106cd573d6000803e3d6000fd5b505050506040513d60208110156106e357600080fd5b5051906116a4565b95945050505050565b6004546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000610732826116bc565b92915050565b60026003541415610790576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b1580156107e057600080fd5b505afa1580156107f4573d6000803e3d6000fd5b505050506040513d602081101561080a57600080fd5b505161085d576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b600061086e88888888888888611752565b90506108798161195e565b80602001516001600160a01b03166397ccdc6061089589611a49565b89896040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b1580156108ed57600080fd5b505af1158015610901573d6000803e3d6000fd5b5050505060008060006109198b8b8b8b8b8b8b611a4c565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561099657818101518382015260200161097e565b50505050905090810190601f1680156109c35780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1580156109e457600080fd5b505af11580156109f8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610a2157600080fd5b8101908080516040519392919084640100000000821115610a4157600080fd5b908301906020820185811115610a5657600080fd5b8251640100000000811182820188101715610a7057600080fd5b82525081516020918201929091019080838360005b83811015610a9d578181015183820152602001610a85565b50505050905090810190601f168015610aca5780820380516001836020036101000a031916815260200191505b5060405250505050610adb84611bb2565b83600001516001600160a01b031684602001516001600160a01b03167f7659e40cf608296ce5aa9eff9c80adc7a49cb481173fc4e302e3983827b042df86604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b60026003541415610bad576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b158015610bfd57600080fd5b505afa158015610c11573d6000803e3d6000fd5b505050506040513d6020811015610c2757600080fd5b5051610c7a576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b6000610c8b88888888888888611752565b9050610c9681611c7a565b60005b84811015610d8f576000868683818110610caf57fe5b905060200201356001600160a01b03166001600160a01b031614610d875781602001516001600160a01b03166397ccdc60610ce98a611a49565b888885818110610cf557fe5b905060200201356001600160a01b0316878786818110610d1157fe5b905060200201356040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015610d6e57600080fd5b505af1158015610d82573d6000803e3d6000fd5b505050505b600101610c99565b506000806000610da48b8b8b8b8b8b8b611d1b565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610e21578181015183820152602001610e09565b50505050905090810190601f168015610e4e5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610e6f57600080fd5b505af1158015610e83573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610eac57600080fd5b8101908080516040519392919084640100000000821115610ecc57600080fd5b908301906020820185811115610ee157600080fd5b8251640100000000811182820188101715610efb57600080fd5b82525081516020918201929091019080838360005b83811015610f28578181015183820152602001610f10565b50505050905090810190601f168015610f555780820380516001836020036101000a031916815260200191505b5060405250505050610fec8460a0015185604001516001600160a01b03166370a0823187602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610fba57600080fd5b505afa158015610fce573d6000803e3d6000fd5b505050506040513d6020811015610fe457600080fd5b505190611dd7565b6080850152610ffa84611e34565b83600001516001600160a01b031684602001516001600160a01b03167fe5ca6288535c5c6c2462c912b4033eade15b80926717896a2d58a2defdeb912886604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b60026020526000908152604090205460ff1681565b60606000826001600160a01b031663cc77828d6040518163ffffffff1660e01b815260040160006040518083038186803b1580156110c657600080fd5b505afa1580156110da573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561110357600080fd5b810190808051604051939291908464010000000082111561112357600080fd5b90830190602082018581111561113857600080fd5b825186602082028301116401000000008211171561115557600080fd5b82525081516020918201928201910280838360005b8381101561118257818101518382015260200161116a565b5050505090500160405250505090506000815167ffffffffffffffff811180156111ab57600080fd5b506040519080825280602002602001820160405280156111d5578160200160208202803683370190505b50905060005b82518160ff16101561129a57846001600160a01b031663f1b8a9b7848360ff168151811061120557fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561124a57600080fd5b505afa15801561125e573d6000803e3d6000fd5b505050506040513d602081101561127457600080fd5b50518251839060ff841690811061128757fe5b60209081029190910101526001016111db565b509392505050565b6060816001600160a01b031663cc77828d6040518163ffffffff1660e01b815260040160006040518083038186803b1580156112dd57600080fd5b505afa1580156112f1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561131a57600080fd5b810190808051604051939291908464010000000082111561133a57600080fd5b90830190602082018581111561134f57600080fd5b825186602082028301116401000000008211171561136c57600080fd5b82525081516020918201928201910280838360005b83811015611399578181015183820152602001611381565b505050509050016040525050509050919050565b60606000836001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113ea57600080fd5b505afa1580156113fe573d6000803e3d6000fd5b505050506040513d602081101561141457600080fd5b5051604080517fcc77828d00000000000000000000000000000000000000000000000000000000815290519192506000916001600160a01b0387169163cc77828d9160048083019286929190829003018186803b15801561147457600080fd5b505afa158015611488573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156114b157600080fd5b81019080805160405193929190846401000000008211156114d157600080fd5b9083019060208201858111156114e657600080fd5b825186602082028301116401000000008211171561150357600080fd5b82525081516020918201928201910280838360005b83811015611530578181015183820152602001611518565b5050505090500160405250505090506000815167ffffffffffffffff8111801561155957600080fd5b50604051908082528060200260200182016040528015611583578160200160208202803683370190505b50905060005b825181101561166c5761164d662386f26fc10000670de0b6b3a764000003611647866116418a8887815181106115bb57fe5b60200260200101516001600160a01b03166370a082318e6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561160f57600080fd5b505afa158015611623573d6000803e3d6000fd5b505050506040513d602081101561163957600080fd5b505190611ef6565b90611f4f565b906116a4565b82828151811061165957fe5b6020908102919091010152600101611589565b5095945050505050565b6000546001600160a01b031681565b600061169d8261164185670de0b6b3a7640000611ef6565b9392505050565b600061169d670de0b6b3a76400006116418585611ef6565b6000600460009054906101000a90046001600160a01b03166001600160a01b031663c2bb6dc2836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561172057600080fd5b505afa158015611734573d6000803e3d6000fd5b505050506040513d602081101561174a57600080fd5b505192915050565b61175a611fb6565b611762611fb6565b6001600160a01b0389166020808301829052604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b892600480840193919291829003018186803b1580156117c057600080fd5b505afa1580156117d4573d6000803e3d6000fd5b505050506040513d60208110156117ea57600080fd5b50516001600160a01b0390811682528816604080830182905280517f18160ddd00000000000000000000000000000000000000000000000000000000815290516318160ddd91600480820192602092909190829003018186803b15801561185057600080fd5b505afa158015611864573d6000803e3d6000fd5b505050506040513d602081101561187a57600080fd5b50516060820152604080517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b038b811660048301529151918a16916370a0823191602480820192602092909190829003018186803b1580156118e457600080fd5b505afa1580156118f8573d6000803e3d6000fd5b505050506040513d602081101561190e57600080fd5b505160a0820152608081018790526040805160208581028281018201909352858252909186918691829185019084908082843760009201919091525050505060c082015298975050505050505050565b61196b81604001516116bc565b6119bc576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b60008160800151116119ff5760405162461bcd60e51b815260040180806020018281038252602e815260200180612061602e913960400191505060405180910390fd5b80608001518160a001511015611a465760405162461bcd60e51b815260040180806020018281038252602d8152602001806120bb602d913960400191505060405180910390fd5b50565b90565b600080606060008811611aa6576040805162461bcd60e51b815260206004820152601a60248201527f5f706f6f6c546f6b656e73496e2068617320746f206e6f742030000000000000604482015290519081900360640190fd5b60018411611afb576040805162461bcd60e51b815260206004820152601d60248201527f48617320746f2070726f76696465205f6d696e416d6f756e74734f7574000000604482015290519081900360640190fd5b600088868660405160240180848152602001806020018281038252848482818152602001925060200280828437600081840152601f19601f8201169050808301925050509450505050506040516020818303038152906040527fb02f0b73000000000000000000000000000000000000000000000000000000006001600160e01b0319166020820180516001600160e01b038381831617835250505050905089600082935093509350509750975097945050505050565b80608001518160a001510381604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611c1257600080fd5b505afa158015611c26573d6000803e3d6000fd5b505050506040513d6020811015611c3c57600080fd5b505114611a465760405162461bcd60e51b815260040180806020018281038252602b8152602001806120e8602b913960400191505060405180910390fd5b611c8781604001516116bc565b611cd8576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b6000816080015111611a465760405162461bcd60e51b815260040180806020018281038252603181526020018061200f6031913960400191505060405180910390fd5b6000806060600088868660405160240180848152602001806020018281038252848482818152602001925060200280828437600081840152601f19601f8201169050808301925050509450505050506040516020818303038152906040527f4f69c0d4000000000000000000000000000000000000000000000000000000006001600160e01b0319166020820180516001600160e01b038381831617835250505050905089600082935093509350509750975097945050505050565b600082821115611e2e576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b8060a0015181604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611e8e57600080fd5b505afa158015611ea2573d6000803e3d6000fd5b505050506040513d6020811015611eb857600080fd5b505111611a465760405162461bcd60e51b815260040180806020018281038252602c81526020018061208f602c913960400191505060405180910390fd5b600082611f0557506000610732565b82820282848281611f1257fe5b041461169d5760405162461bcd60e51b81526004018080602001828103825260218152602001806120406021913960400191505060405180910390fd5b6000808211611fa5576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611fae57fe5b049392505050565b6040518060e0016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160608152509056fe4d696e20706f6f6c20746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77506f6f6c20746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520737472617465677920646964206e6f7420726563656976652074686520706f6f6c20746f6b656e7354686520737472617465677920646f6573206e6f74206861766520656e6f75676820706f6f6c20746f6b656e7354686520737472617465677920646964206e6f742072657475726e2074686520706f6f6c20746f6b656e73a264697066735822122068bb644c1500fe915159c83a20b7dd0ece7891fd8915678a003daefe1e79931764736f6c63430007060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100df5760003560e01c806362cc395a1161008c578063bd9d8ad911610066578063bd9d8ad914610403578063ca4f280314610479578063f5e393251461049f578063f77c4791146104cb576100df565b806362cc395a14610217578063708a3476146102fb578063b10198fb146103dd576100df565b80633d8df667116100bd5780633d8df667146101b15780633fc8cef3146101d55780635b16ebb7146101dd576100df565b806306fdde03146100e457806317d7de7c146101615780633cd5bd9514610169575b600080fd5b6100ec6104d3565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012657818101518382015260200161010e565b50505050905090810190601f1680156101535780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100ec610560565b61019f6004803603606081101561017f57600080fd5b506001600160a01b038135811691602081013590911690604001356105f5565b60408051918252519081900360200190f35b6101b96106f4565b604080516001600160a01b039092168252519081900360200190f35b6101b9610703565b610203600480360360208110156101f357600080fd5b50356001600160a01b0316610727565b604080519115158252519081900360200190f35b6102f9600480360360a081101561022d57600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561026857600080fd5b82018360208201111561027a57600080fd5b8035906020019184602083028401116401000000008311171561029c57600080fd5b9193909290916020810190356401000000008111156102ba57600080fd5b8201836020820111156102cc57600080fd5b803590602001918460208302840111640100000000831117156102ee57600080fd5b509092509050610738565b005b6102f9600480360360a081101561031157600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561034c57600080fd5b82018360208201111561035e57600080fd5b8035906020019184602083028401116401000000008311171561038057600080fd5b91939092909160208101903564010000000081111561039e57600080fd5b8201836020820111156103b057600080fd5b803590602001918460208302840111640100000000831117156103d257600080fd5b509092509050610b55565b610203600480360360208110156103f357600080fd5b50356001600160a01b0316611074565b6104296004803603602081101561041957600080fd5b50356001600160a01b0316611089565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561046557818101518382015260200161044d565b505050509050019250505060405180910390f35b6104296004803603602081101561048f57600080fd5b50356001600160a01b03166112a2565b610429600480360360408110156104b557600080fd5b506001600160a01b0381351690602001356113ad565b6101b9611676565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105585780601f1061052d57610100808354040283529160200191610558565b820191906000526020600020905b81548152906001019060200180831161053b57829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156105eb5780601f106105c0576101008083540402835291602001916105eb565b820191906000526020600020905b8154815290600101906020018083116105ce57829003601f168201915b5050505050905090565b600080846001600160a01b031663f8b2cb4f856040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561064557600080fd5b505afa158015610659573d6000803e3d6000fd5b505050506040513d602081101561066f57600080fd5b505190506106eb6106808483611685565b866001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156106b957600080fd5b505afa1580156106cd573d6000803e3d6000fd5b505050506040513d60208110156106e357600080fd5b5051906116a4565b95945050505050565b6004546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000610732826116bc565b92915050565b60026003541415610790576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b1580156107e057600080fd5b505afa1580156107f4573d6000803e3d6000fd5b505050506040513d602081101561080a57600080fd5b505161085d576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b600061086e88888888888888611752565b90506108798161195e565b80602001516001600160a01b03166397ccdc6061089589611a49565b89896040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b1580156108ed57600080fd5b505af1158015610901573d6000803e3d6000fd5b5050505060008060006109198b8b8b8b8b8b8b611a4c565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561099657818101518382015260200161097e565b50505050905090810190601f1680156109c35780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1580156109e457600080fd5b505af11580156109f8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610a2157600080fd5b8101908080516040519392919084640100000000821115610a4157600080fd5b908301906020820185811115610a5657600080fd5b8251640100000000811182820188101715610a7057600080fd5b82525081516020918201929091019080838360005b83811015610a9d578181015183820152602001610a85565b50505050905090810190601f168015610aca5780820380516001836020036101000a031916815260200191505b5060405250505050610adb84611bb2565b83600001516001600160a01b031684602001516001600160a01b03167f7659e40cf608296ce5aa9eff9c80adc7a49cb481173fc4e302e3983827b042df86604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b60026003541415610bad576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b158015610bfd57600080fd5b505afa158015610c11573d6000803e3d6000fd5b505050506040513d6020811015610c2757600080fd5b5051610c7a576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b6000610c8b88888888888888611752565b9050610c9681611c7a565b60005b84811015610d8f576000868683818110610caf57fe5b905060200201356001600160a01b03166001600160a01b031614610d875781602001516001600160a01b03166397ccdc60610ce98a611a49565b888885818110610cf557fe5b905060200201356001600160a01b0316878786818110610d1157fe5b905060200201356040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015610d6e57600080fd5b505af1158015610d82573d6000803e3d6000fd5b505050505b600101610c99565b506000806000610da48b8b8b8b8b8b8b611d1b565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610e21578181015183820152602001610e09565b50505050905090810190601f168015610e4e5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610e6f57600080fd5b505af1158015610e83573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610eac57600080fd5b8101908080516040519392919084640100000000821115610ecc57600080fd5b908301906020820185811115610ee157600080fd5b8251640100000000811182820188101715610efb57600080fd5b82525081516020918201929091019080838360005b83811015610f28578181015183820152602001610f10565b50505050905090810190601f168015610f555780820380516001836020036101000a031916815260200191505b5060405250505050610fec8460a0015185604001516001600160a01b03166370a0823187602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610fba57600080fd5b505afa158015610fce573d6000803e3d6000fd5b505050506040513d6020811015610fe457600080fd5b505190611dd7565b6080850152610ffa84611e34565b83600001516001600160a01b031684602001516001600160a01b03167fe5ca6288535c5c6c2462c912b4033eade15b80926717896a2d58a2defdeb912886604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b60026020526000908152604090205460ff1681565b60606000826001600160a01b031663cc77828d6040518163ffffffff1660e01b815260040160006040518083038186803b1580156110c657600080fd5b505afa1580156110da573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561110357600080fd5b810190808051604051939291908464010000000082111561112357600080fd5b90830190602082018581111561113857600080fd5b825186602082028301116401000000008211171561115557600080fd5b82525081516020918201928201910280838360005b8381101561118257818101518382015260200161116a565b5050505090500160405250505090506000815167ffffffffffffffff811180156111ab57600080fd5b506040519080825280602002602001820160405280156111d5578160200160208202803683370190505b50905060005b82518160ff16101561129a57846001600160a01b031663f1b8a9b7848360ff168151811061120557fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561124a57600080fd5b505afa15801561125e573d6000803e3d6000fd5b505050506040513d602081101561127457600080fd5b50518251839060ff841690811061128757fe5b60209081029190910101526001016111db565b509392505050565b6060816001600160a01b031663cc77828d6040518163ffffffff1660e01b815260040160006040518083038186803b1580156112dd57600080fd5b505afa1580156112f1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561131a57600080fd5b810190808051604051939291908464010000000082111561133a57600080fd5b90830190602082018581111561134f57600080fd5b825186602082028301116401000000008211171561136c57600080fd5b82525081516020918201928201910280838360005b83811015611399578181015183820152602001611381565b505050509050016040525050509050919050565b60606000836001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113ea57600080fd5b505afa1580156113fe573d6000803e3d6000fd5b505050506040513d602081101561141457600080fd5b5051604080517fcc77828d00000000000000000000000000000000000000000000000000000000815290519192506000916001600160a01b0387169163cc77828d9160048083019286929190829003018186803b15801561147457600080fd5b505afa158015611488573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156114b157600080fd5b81019080805160405193929190846401000000008211156114d157600080fd5b9083019060208201858111156114e657600080fd5b825186602082028301116401000000008211171561150357600080fd5b82525081516020918201928201910280838360005b83811015611530578181015183820152602001611518565b5050505090500160405250505090506000815167ffffffffffffffff8111801561155957600080fd5b50604051908082528060200260200182016040528015611583578160200160208202803683370190505b50905060005b825181101561166c5761164d662386f26fc10000670de0b6b3a764000003611647866116418a8887815181106115bb57fe5b60200260200101516001600160a01b03166370a082318e6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561160f57600080fd5b505afa158015611623573d6000803e3d6000fd5b505050506040513d602081101561163957600080fd5b505190611ef6565b90611f4f565b906116a4565b82828151811061165957fe5b6020908102919091010152600101611589565b5095945050505050565b6000546001600160a01b031681565b600061169d8261164185670de0b6b3a7640000611ef6565b9392505050565b600061169d670de0b6b3a76400006116418585611ef6565b6000600460009054906101000a90046001600160a01b03166001600160a01b031663c2bb6dc2836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561172057600080fd5b505afa158015611734573d6000803e3d6000fd5b505050506040513d602081101561174a57600080fd5b505192915050565b61175a611fb6565b611762611fb6565b6001600160a01b0389166020808301829052604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b892600480840193919291829003018186803b1580156117c057600080fd5b505afa1580156117d4573d6000803e3d6000fd5b505050506040513d60208110156117ea57600080fd5b50516001600160a01b0390811682528816604080830182905280517f18160ddd00000000000000000000000000000000000000000000000000000000815290516318160ddd91600480820192602092909190829003018186803b15801561185057600080fd5b505afa158015611864573d6000803e3d6000fd5b505050506040513d602081101561187a57600080fd5b50516060820152604080517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b038b811660048301529151918a16916370a0823191602480820192602092909190829003018186803b1580156118e457600080fd5b505afa1580156118f8573d6000803e3d6000fd5b505050506040513d602081101561190e57600080fd5b505160a0820152608081018790526040805160208581028281018201909352858252909186918691829185019084908082843760009201919091525050505060c082015298975050505050505050565b61196b81604001516116bc565b6119bc576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b60008160800151116119ff5760405162461bcd60e51b815260040180806020018281038252602e815260200180612061602e913960400191505060405180910390fd5b80608001518160a001511015611a465760405162461bcd60e51b815260040180806020018281038252602d8152602001806120bb602d913960400191505060405180910390fd5b50565b90565b600080606060008811611aa6576040805162461bcd60e51b815260206004820152601a60248201527f5f706f6f6c546f6b656e73496e2068617320746f206e6f742030000000000000604482015290519081900360640190fd5b60018411611afb576040805162461bcd60e51b815260206004820152601d60248201527f48617320746f2070726f76696465205f6d696e416d6f756e74734f7574000000604482015290519081900360640190fd5b600088868660405160240180848152602001806020018281038252848482818152602001925060200280828437600081840152601f19601f8201169050808301925050509450505050506040516020818303038152906040527fb02f0b73000000000000000000000000000000000000000000000000000000006001600160e01b0319166020820180516001600160e01b038381831617835250505050905089600082935093509350509750975097945050505050565b80608001518160a001510381604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611c1257600080fd5b505afa158015611c26573d6000803e3d6000fd5b505050506040513d6020811015611c3c57600080fd5b505114611a465760405162461bcd60e51b815260040180806020018281038252602b8152602001806120e8602b913960400191505060405180910390fd5b611c8781604001516116bc565b611cd8576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b6000816080015111611a465760405162461bcd60e51b815260040180806020018281038252603181526020018061200f6031913960400191505060405180910390fd5b6000806060600088868660405160240180848152602001806020018281038252848482818152602001925060200280828437600081840152601f19601f8201169050808301925050509450505050506040516020818303038152906040527f4f69c0d4000000000000000000000000000000000000000000000000000000006001600160e01b0319166020820180516001600160e01b038381831617835250505050905089600082935093509350509750975097945050505050565b600082821115611e2e576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b8060a0015181604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611e8e57600080fd5b505afa158015611ea2573d6000803e3d6000fd5b505050506040513d6020811015611eb857600080fd5b505111611a465760405162461bcd60e51b815260040180806020018281038252602c81526020018061208f602c913960400191505060405180910390fd5b600082611f0557506000610732565b82820282848281611f1257fe5b041461169d5760405162461bcd60e51b81526004018080602001828103825260218152602001806120406021913960400191505060405180910390fd5b6000808211611fa5576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611fae57fe5b049392505050565b6040518060e0016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160608152509056fe4d696e20706f6f6c20746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77506f6f6c20746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520737472617465677920646964206e6f7420726563656976652074686520706f6f6c20746f6b656e7354686520737472617465677920646f6573206e6f74206861766520656e6f75676820706f6f6c20746f6b656e7354686520737472617465677920646964206e6f742072657475726e2074686520706f6f6c20746f6b656e73a264697066735822122068bb644c1500fe915159c83a20b7dd0ece7891fd8915678a003daefe1e79931764736f6c63430007060033", + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_weth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_coreFactoryAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_pool\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_poolTokensOut\",\"type\":\"uint256\"}],\"name\":\"PoolEntered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_pool\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_poolTokensIn\",\"type\":\"uint256\"}],\"name\":\"PoolExited\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"coreFactory\",\"outputs\":[{\"internalType\":\"contract IBFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_poolTokensIn\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"_tokensOut\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_minAmountsOut\",\"type\":\"uint256[]\"}],\"name\":\"exitPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_liquidity\",\"type\":\"uint256\"}],\"name\":\"getPoolMinAmountsOut\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_minAmountsOut\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"}],\"name\":\"getPoolTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_poolToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxAmountsIn\",\"type\":\"uint256\"}],\"name\":\"getPoolTokensOut\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"}],\"name\":\"getPoolWeights\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"initializedByGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"}],\"name\":\"isPool\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_poolTokensOut\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"_tokensIn\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_maxAmountsIn\",\"type\":\"uint256[]\"}],\"name\":\"joinPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Protocol Kyber protocol trade integration\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of the controller\",\"_coreFactoryAddress\":\"Address of Balancer core factory address\",\"_weth\":\"Address of the WETH ERC20\"}},\"exitPool(address,address,uint256,address[],uint256[])\":{\"params\":{\"_minAmountsOut\":\"Array of min token quantities to receive from the pool\",\"_poolAddress\":\"Address of the pool token to join\",\"_poolTokensIn\":\"Pool tokens to exchange for the underlying tokens\",\"_strategy\":\"Address of the strategy\",\"_tokensOut\":\"Array of token addresses to withdraw\"}},\"isPool(address)\":{\"params\":{\"_poolAddress\":\"Pool address to check\"},\"returns\":{\"_0\":\"bool True if the address is a pool\"}},\"joinPool(address,address,uint256,address[],uint256[])\":{\"params\":{\"_maxAmountsIn\":\"Array of max token quantities to pull out from the garden\",\"_poolAddress\":\"Address of the pool token to join\",\"_poolTokensOut\":\"Min amount of pool tokens to receive\",\"_strategy\":\"Address of the strategy\",\"_tokensIn\":\"Array of token addresses to deposit\"}}},\"title\":\"BalancerIntegration\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates the integration\"},\"exitPool(address,address,uint256,address[],uint256[])\":{\"notice\":\"Exits a liquidity pool. Accrue protocol fee (if any)\"},\"getName()\":{\"notice\":\"Returns the name of the integration\"},\"isPool(address)\":{\"notice\":\"Checks whether a pool address is valid\"},\"joinPool(address,address,uint256,address[],uint256[])\":{\"notice\":\"Joins a pool\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/integrations/pool/BalancerIntegration.sol\":\"BalancerIntegration\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\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 /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\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, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x7b2b8baa20fd60ab4a328c8e34c64a353651b80ba4b5b157cbb61813f6f85d55\",\"license\":\"MIT\"},\"contracts/integrations/BaseIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IIntegration} from '../interfaces/IIntegration.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\n\\n/**\\n * @title BaseIntegration\\n * @author Babylon Finance\\n *\\n * Abstract class that houses common Integration-related state and functions.\\n */\\nabstract contract BaseIntegration {\\n using SafeCast for int256;\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlySystemContract() {\\n require(IBabController(controller).isSystemContract(msg.sender), 'Only system can call this');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the controller\\n address public controller;\\n // Wrapped ETH address\\n address public immutable weth;\\n // Name of the integration\\n string public name;\\n mapping(address => bool) public initializedByGarden;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) {\\n require(_controller != address(0), 'Controller must be defined');\\n name = _name;\\n controller = _controller;\\n weth = _weth;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the name of the integration\\n */\\n function getName() external view returns (string memory) {\\n return name;\\n }\\n}\\n\",\"keccak256\":\"0x2834e38218ae7abce3038140002a433c22ea9303d65b2d929cd88f6d5f712812\",\"license\":\"Apache License\"},\"contracts/integrations/pool/BalancerIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {PoolIntegration} from './PoolIntegration.sol';\\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\\nimport {IBFactory} from '../../interfaces/external/balancer/IBFactory.sol';\\nimport {IBPool} from '../../interfaces/external/balancer/IBPool.sol';\\n\\n/**\\n * @title BalancerIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Kyber protocol trade integration\\n */\\ncontract BalancerIntegration is PoolIntegration {\\n using SafeMath for uint256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ State Variables ============ */\\n\\n // Address of Kyber Network Proxy\\n IBFactory public coreFactory;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _controller Address of the controller\\n * @param _weth Address of the WETH ERC20\\n * @param _coreFactoryAddress Address of Balancer core factory address\\n */\\n constructor(\\n address _controller,\\n address _weth,\\n address _coreFactoryAddress\\n ) PoolIntegration('balancer', _weth, _controller) {\\n coreFactory = IBFactory(_coreFactoryAddress);\\n }\\n\\n /* ============ External Functions ============ */\\n\\n function getPoolTokens(address _poolAddress) external view override returns (address[] memory) {\\n return IBPool(_poolAddress).getCurrentTokens();\\n }\\n\\n function getPoolWeights(address _poolAddress) external view override returns (uint256[] memory) {\\n address[] memory poolTokens = IBPool(_poolAddress).getCurrentTokens();\\n uint256[] memory result = new uint256[](poolTokens.length);\\n for (uint8 i = 0; i < poolTokens.length; i++) {\\n result[i] = IBPool(_poolAddress).getNormalizedWeight(poolTokens[i]);\\n }\\n return result;\\n }\\n\\n function getPoolTokensOut(\\n address _poolAddress,\\n address _poolToken,\\n uint256 _maxAmountsIn\\n ) external view override returns (uint256) {\\n uint256 tokenBalance = IBPool(_poolAddress).getBalance(_poolToken);\\n return IBPool(_poolAddress).totalSupply().preciseMul(_maxAmountsIn.preciseDiv(tokenBalance));\\n }\\n\\n function getPoolMinAmountsOut(address _poolAddress, uint256 _liquidity)\\n external\\n view\\n override\\n returns (uint256[] memory _minAmountsOut)\\n {\\n uint256 lpTokensTotalSupply = IBPool(_poolAddress).totalSupply();\\n address[] memory poolTokens = IBPool(_poolAddress).getCurrentTokens();\\n uint256[] memory result = new uint256[](poolTokens.length);\\n for (uint256 i = 0; i < poolTokens.length; i++) {\\n result[i] = IERC20(poolTokens[i])\\n .balanceOf(_poolAddress)\\n .mul(_liquidity)\\n .div(lpTokensTotalSupply)\\n .preciseMul(1e18 - SLIPPAGE_ALLOWED);\\n }\\n return result;\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n function _isPool(address _poolAddress) internal view override returns (bool) {\\n return coreFactory.isBPool(_poolAddress);\\n }\\n\\n function _getSpender(address _poolAddress) internal pure override returns (address) {\\n return _poolAddress;\\n }\\n\\n /**\\n * Return join pool calldata which is already generated from the pool API\\n *\\n * hparam _strategy Address of the strategy\\n * @param _poolAddress Address of the pool\\n * @param _poolTokensOut Amount of pool tokens to send\\n * hparam _tokensIn Addresses of tokens to send to the pool\\n * @param _maxAmountsIn Amounts of tokens to send to the pool\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getJoinPoolCalldata(\\n address, /* _strategy */\\n address _poolAddress,\\n uint256 _poolTokensOut,\\n address[] calldata, /* _tokensIn */\\n uint256[] calldata _maxAmountsIn\\n )\\n internal\\n pure\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n // Encode method data for Garden to invoke\\n bytes memory methodData = abi.encodeWithSignature('joinPool(uint256,uint256[])', _poolTokensOut, _maxAmountsIn);\\n\\n return (_poolAddress, 0, methodData);\\n }\\n\\n /**\\n * Return exit pool calldata which is already generated from the pool API\\n *\\n * hparam _strategy Address of the strategy\\n * @param _poolAddress Address of the pool\\n * @param _poolTokensIn Amount of pool tokens to receive\\n * hparam _tokensOut Addresses of tokens to receive\\n * @param _minAmountsOut Amounts of pool tokens to receive\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getExitPoolCalldata(\\n address, /* _strategy */\\n address _poolAddress,\\n uint256 _poolTokensIn,\\n address[] calldata, /* _tokensOut */\\n uint256[] calldata _minAmountsOut\\n )\\n internal\\n pure\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n require(_poolTokensIn > 0, '_poolTokensIn has to not 0');\\n require(_minAmountsOut.length > 1, 'Has to provide _minAmountsOut');\\n // Encode method data for Garden to invoke\\n bytes memory methodData = abi.encodeWithSignature('exitPool(uint256,uint256[])', _poolTokensIn, _minAmountsOut);\\n\\n return (_poolAddress, 0, methodData);\\n }\\n}\\n\",\"keccak256\":\"0x05b5e885dd907fb3e00992f6f0c9f0e0b6adbdba6e27cec54cff489544a6e945\",\"license\":\"Apache License\"},\"contracts/integrations/pool/PoolIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\n\\nimport {IPoolIntegration} from '../../interfaces/IPoolIntegration.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\n\\nimport {BaseIntegration} from '../BaseIntegration.sol';\\n\\n/**\\n * @title PoolIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Base class for integration with trading protocols\\n */\\nabstract contract PoolIntegration is BaseIntegration, ReentrancyGuard, IPoolIntegration {\\n using SafeMath for uint256;\\n using SafeCast for uint256;\\n\\n /* ============ Struct ============ */\\n\\n struct PoolInfo {\\n IGarden garden; // Garden address\\n IStrategy strategy; // Strategy address\\n address pool; // Pool address\\n uint256 totalSupply; // Total Supply of the pool\\n uint256 poolTokensInTransaction; // Pool tokens affected by this transaction\\n uint256 poolTokensInStrategy; // Pool tokens strategy balance\\n uint256[] limitPoolTokenQuantities;\\n }\\n\\n /* ============ Events ============ */\\n\\n event PoolEntered(address indexed _strategy, address indexed _garden, address _pool, uint256 _poolTokensOut);\\n\\n event PoolExited(address indexed _strategy, address indexed _garden, address _pool, uint256 _poolTokensIn);\\n\\n /* ============ Constants ============ */\\n\\n uint256 internal constant SLIPPAGE_ALLOWED = 1e16; // 1%\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) BaseIntegration(_name, _weth, _controller) {}\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Joins a pool\\n *\\n * @param _strategy Address of the strategy\\n * @param _poolAddress Address of the pool token to join\\n * @param _poolTokensOut Min amount of pool tokens to receive\\n * @param _tokensIn Array of token addresses to deposit\\n * @param _maxAmountsIn Array of max token quantities to pull out from the garden\\n */\\n function joinPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensOut,\\n address[] calldata _tokensIn,\\n uint256[] calldata _maxAmountsIn\\n ) external override nonReentrant onlySystemContract {\\n PoolInfo memory poolInfo = _createPoolInfo(_strategy, _poolAddress, _poolTokensOut, _tokensIn, _maxAmountsIn);\\n _validatePreJoinPoolData(poolInfo);\\n // Approve spending of the tokens\\n for (uint256 i = 0; i < _tokensIn.length; i++) {\\n // No need to approve ETH\\n if (_tokensIn[i] != address(0)) {\\n poolInfo.strategy.invokeApprove(_getSpender(_poolAddress), _tokensIn[i], _maxAmountsIn[i]);\\n }\\n }\\n (address targetPool, uint256 callValue, bytes memory methodData) =\\n _getJoinPoolCalldata(_strategy, _poolAddress, _poolTokensOut, _tokensIn, _maxAmountsIn);\\n poolInfo.strategy.invokeFromIntegration(targetPool, callValue, methodData);\\n poolInfo.poolTokensInTransaction = IERC20(poolInfo.pool).balanceOf(address(poolInfo.strategy)).sub(\\n poolInfo.poolTokensInStrategy\\n );\\n _validatePostJoinPoolData(poolInfo);\\n\\n emit PoolEntered(address(poolInfo.strategy), address(poolInfo.garden), poolInfo.pool, _poolTokensOut);\\n }\\n\\n /**\\n * Exits a liquidity pool. Accrue protocol fee (if any)\\n *\\n * @param _strategy Address of the strategy\\n * @param _poolAddress Address of the pool token to join\\n * @param _poolTokensIn Pool tokens to exchange for the underlying tokens\\n * @param _tokensOut Array of token addresses to withdraw\\n * @param _minAmountsOut Array of min token quantities to receive from the pool\\n */\\n function exitPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensIn,\\n address[] calldata _tokensOut,\\n uint256[] calldata _minAmountsOut\\n ) external override nonReentrant onlySystemContract {\\n PoolInfo memory poolInfo = _createPoolInfo(_strategy, _poolAddress, _poolTokensIn, _tokensOut, _minAmountsOut);\\n _validatePreExitPoolData(poolInfo);\\n // Approve spending of the pool token\\n poolInfo.strategy.invokeApprove(_getSpender(_poolAddress), _poolAddress, _poolTokensIn);\\n\\n (address targetPool, uint256 callValue, bytes memory methodData) =\\n _getExitPoolCalldata(_strategy, _poolAddress, _poolTokensIn, _tokensOut, _minAmountsOut);\\n poolInfo.strategy.invokeFromIntegration(targetPool, callValue, methodData);\\n _validatePostExitPoolData(poolInfo);\\n\\n emit PoolExited(address(poolInfo.strategy), address(poolInfo.garden), poolInfo.pool, _poolTokensIn);\\n }\\n\\n /**\\n * Checks whether a pool address is valid\\n *\\n * @param _poolAddress Pool address to check\\n * @return bool True if the address is a pool\\n */\\n function isPool(address _poolAddress) external view override returns (bool) {\\n return _isPool(_poolAddress);\\n }\\n\\n function getPoolTokens(\\n address /* _poolAddress */\\n ) external view virtual override returns (address[] memory);\\n\\n function getPoolWeights(\\n address /*_poolAddress */\\n ) external view virtual override returns (uint256[] memory);\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Create and return PoolInfo struct\\n *\\n * @param _strategy Address of the strategy\\n * @param _pool Address of the pool\\n * @param _poolTokensInTransaction Number of pool tokens involved\\n * hparam _poolTokens Addresseses of the pool tokens\\n * @param _limitPoolTokenQuantities Limit quantity of the pool tokens\\n *\\n * return PoolInfo Struct containing data for pool\\n */\\n function _createPoolInfo(\\n address _strategy,\\n address _pool,\\n uint256 _poolTokensInTransaction,\\n address[] calldata, /* _poolTokens */\\n uint256[] calldata _limitPoolTokenQuantities\\n ) internal view returns (PoolInfo memory) {\\n PoolInfo memory poolInfo;\\n poolInfo.strategy = IStrategy(_strategy);\\n poolInfo.garden = IGarden(poolInfo.strategy.garden());\\n poolInfo.pool = _pool;\\n poolInfo.totalSupply = IERC20(_pool).totalSupply();\\n poolInfo.poolTokensInStrategy = IERC20(_pool).balanceOf(_strategy);\\n poolInfo.poolTokensInTransaction = _poolTokensInTransaction;\\n poolInfo.limitPoolTokenQuantities = _limitPoolTokenQuantities;\\n\\n return poolInfo;\\n }\\n\\n /**\\n * Validate pre pool join data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePreJoinPoolData(PoolInfo memory _poolInfo) internal view {\\n require(_isPool(_poolInfo.pool), 'The pool address is not valid');\\n require(_poolInfo.poolTokensInTransaction > 0, 'Min pool tokens to receive must be greater than 0');\\n }\\n\\n /**\\n * Validate pre pool data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePreExitPoolData(PoolInfo memory _poolInfo) internal view {\\n require(_isPool(_poolInfo.pool), 'The pool address is not valid');\\n require(_poolInfo.poolTokensInTransaction > 0, 'Pool tokens to exchange must be greater than 0');\\n require(\\n _poolInfo.poolTokensInStrategy >= _poolInfo.poolTokensInTransaction,\\n 'The strategy does not have enough pool tokens'\\n );\\n }\\n\\n /**\\n * Validate post join pool data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePostJoinPoolData(PoolInfo memory _poolInfo) internal view {\\n require(\\n (IERC20(_poolInfo.pool).balanceOf(address(_poolInfo.strategy)) > _poolInfo.poolTokensInStrategy),\\n 'The strategy did not receive the pool tokens'\\n );\\n }\\n\\n /**\\n * Validate post exit pool data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePostExitPoolData(PoolInfo memory _poolInfo) internal view {\\n require(\\n IERC20(_poolInfo.pool).balanceOf(address(_poolInfo.strategy)) ==\\n _poolInfo.poolTokensInStrategy - _poolInfo.poolTokensInTransaction,\\n 'The strategy did not return the pool tokens'\\n );\\n // TODO: validate individual tokens received\\n }\\n\\n /**\\n * Return join pool calldata which is already generated from the pool API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * hparam _poolTokensOut Amount of pool tokens to send\\n * hparam _tokensIn Addresses of tokens to send to the pool\\n * hparam _maxAmountsIn Amounts of tokens to send to the pool\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getJoinPoolCalldata(\\n address, /* _strategy */\\n address, /* _poolAddress */\\n uint256, /* _poolTokensOut */\\n address[] calldata, /* _tokensIn */\\n uint256[] calldata /* _maxAmountsIn */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n /**\\n * Return exit pool calldata which is already generated from the pool API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * hparam _poolTokensIn Amount of pool tokens to receive\\n * hparam _tokensOut Addresses of tokens to receive\\n * hparam _minAmountsOut Amounts of pool tokens to receive\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getExitPoolCalldata(\\n address, /* _strategy */\\n address, /* _poolAddress */\\n uint256, /* _poolTokensIn */\\n address[] calldata, /* _tokensOut */\\n uint256[] calldata /* _minAmountsOut */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n function _isPool(\\n address /* _poolAddress */\\n ) internal view virtual returns (bool);\\n\\n function _getSpender(\\n address /* _poolAddress */\\n ) internal view virtual returns (address);\\n}\\n\",\"keccak256\":\"0xdb4cc931a671cbf8ab93c43a5e9e2853b8d5cfc744eeec928ad3659b23f2db90\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editGardenNFT(address _newGardenNFT) external;\\n\\n function editStrategyNFT(address _newStrategyNFT) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function editUniswapFactory(address _newUniswapFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\\n\\n function maxContributorsPerGarden() external view returns (uint256);\\n\\n function gardenCreationIsOpen() external view returns (bool);\\n\\n function openPublicGardenCreation() external;\\n\\n function setMaxContributorsPerGarden(uint256 _newMax) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function gardenNFT() external view returns (address);\\n\\n function strategyNFT() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\\n\\n function uniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0xdee5a27301c24f507d312f32249487fa9b0a756062a7e479405a1d1ee9ee7bb8\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function isGardenStrategy(address _strategy) external view returns (bool);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategyActiveInGarden(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to,\\n bool _withPenalty\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x88f1786ffee23e386aaa1735177912e1b5a7cdd440dafe52fb139fe50fd621b4\",\"license\":\"Apache License\"},\"contracts/interfaces/IIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIntegration\\n * @author Babylon Finance\\n *\\n * Interface for protocol integrations\\n */\\ninterface IIntegration {\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xee03c9274ddf3257e3bfd2bb229fea3412c9105f178e64174f59efeafd53182c\",\"license\":\"Apache License\"},\"contracts/interfaces/IPoolIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPoolIntegration\\n * @author Babylon Finance\\n *\\n * Interface for liquiditypool protocol integrations\\n */\\ninterface IPoolIntegration {\\n function joinPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensOut,\\n address[] memory _poolTokens,\\n uint256[] memory _maxAmountsIn\\n ) external;\\n\\n function exitPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensIn,\\n address[] memory _poolTokens,\\n uint256[] memory _minAmountsOut\\n ) external;\\n\\n function getPoolTokens(address _poolAddress) external view returns (address[] memory);\\n\\n function getPoolWeights(address _poolAddress) external view returns (uint256[] memory);\\n\\n function getPoolTokensOut(\\n address _poolAdress,\\n address _tokenAddress,\\n uint256 _maxAmountsIn\\n ) external view returns (uint256);\\n\\n function getPoolMinAmountsOut(address _poolAddress, uint256 _poolTokenAmount)\\n external\\n view\\n returns (uint256[] memory _minAmountsOut);\\n\\n function isPool(address _poolAddress) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xee7df0934dad8d729ee6dacf85e1ec327a0c8e17bcabaa2afa7d14d93325f9ac\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n address,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x850597ec9a68eb86f31f13b6b77d3b31350b4ed3d0019dedfbd3550ad1a1d9e2\",\"license\":\"Apache License\"},\"contracts/interfaces/external/balancer/IBFactory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport {IBPool} from './IBPool.sol';\\n\\ninterface IBFactory {\\n function isBPool(address b) external view returns (bool);\\n\\n function newBPool() external returns (IBPool);\\n}\\n\",\"keccak256\":\"0xcc05c1d419cf327d8e67ea17c9fce1d113e85172cd9afd8ee30467afdeded48a\",\"license\":\"MIT\"},\"contracts/interfaces/external/balancer/IBPool.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\ninterface IBPool {\\n function isPublicSwap() external view returns (bool);\\n\\n function isFinalized() external view returns (bool);\\n\\n function isBound(address t) external view returns (bool);\\n\\n function getNumTokens() external view returns (uint256);\\n\\n function getCurrentTokens() external view returns (address[] memory tokens);\\n\\n function getFinalTokens() external view returns (address[] memory tokens);\\n\\n function getDenormalizedWeight(address token) external view returns (uint256);\\n\\n function getTotalDenormalizedWeight() external view returns (uint256);\\n\\n function getNormalizedWeight(address token) external view returns (uint256);\\n\\n function getBalance(address token) external view returns (uint256);\\n\\n function getSwapFee() external view returns (uint256);\\n\\n function getController() external view returns (address);\\n\\n function setSwapFee(uint256 swapFee) external;\\n\\n function setController(address manager) external;\\n\\n function setPublicSwap(bool external_) external;\\n\\n function finalize() external;\\n\\n function bind(\\n address token,\\n uint256 balance,\\n uint256 denorm\\n ) external;\\n\\n function rebind(\\n address token,\\n uint256 balance,\\n uint256 denorm\\n ) external;\\n\\n function unbind(address token) external;\\n\\n function gulp(address token) external;\\n\\n function getSpotPrice(address tokenIn, address tokenOut) external view returns (uint256 spotPrice);\\n\\n function getSpotPriceSansFee(address tokenIn, address tokenOut) external view returns (uint256 spotPrice);\\n\\n function joinPool(uint256 poolAmountOut, uint256[] calldata maxAmountsIn) external;\\n\\n function exitPool(uint256 poolAmountIn, uint256[] calldata minAmountsOut) external;\\n\\n function swapExactAmountIn(\\n address tokenIn,\\n uint256 tokenAmountIn,\\n address tokenOut,\\n uint256 minAmountOut,\\n uint256 maxPrice\\n ) external returns (uint256 tokenAmountOut, uint256 spotPriceAfter);\\n\\n function swapExactAmountOut(\\n address tokenIn,\\n uint256 maxAmountIn,\\n address tokenOut,\\n uint256 tokenAmountOut,\\n uint256 maxPrice\\n ) external returns (uint256 tokenAmountIn, uint256 spotPriceAfter);\\n\\n function joinswapExternAmountIn(\\n address tokenIn,\\n uint256 tokenAmountIn,\\n uint256 minPoolAmountOut\\n ) external returns (uint256 poolAmountOut);\\n\\n function joinswapPoolAmountOut(\\n address tokenIn,\\n uint256 poolAmountOut,\\n uint256 maxAmountIn\\n ) external returns (uint256 tokenAmountIn);\\n\\n function exitswapPoolAmountIn(\\n address tokenOut,\\n uint256 poolAmountIn,\\n uint256 minAmountOut\\n ) external returns (uint256 tokenAmountOut);\\n\\n function exitswapExternAmountOut(\\n address tokenOut,\\n uint256 tokenAmountOut,\\n uint256 maxPoolAmountIn\\n ) external returns (uint256 poolAmountIn);\\n\\n function totalSupply() external view returns (uint256);\\n\\n function balanceOf(address whom) external view returns (uint256);\\n\\n function allowance(address src, address dst) external view returns (uint256);\\n\\n function approve(address dst, uint256 amt) external returns (bool);\\n\\n function transfer(address dst, uint256 amt) external returns (bool);\\n\\n function transferFrom(\\n address src,\\n address dst,\\n uint256 amt\\n ) external returns (bool);\\n\\n function calcSpotPrice(\\n uint256 tokenBalanceIn,\\n uint256 tokenWeightIn,\\n uint256 tokenBalanceOut,\\n uint256 tokenWeightOut,\\n uint256 swapFee\\n ) external pure returns (uint256 spotPrice);\\n\\n function calcOutGivenIn(\\n uint256 tokenBalanceIn,\\n uint256 tokenWeightIn,\\n uint256 tokenBalanceOut,\\n uint256 tokenWeightOut,\\n uint256 tokenAmountIn,\\n uint256 swapFee\\n ) external pure returns (uint256 tokenAmountOut);\\n\\n function calcInGivenOut(\\n uint256 tokenBalanceIn,\\n uint256 tokenWeightIn,\\n uint256 tokenBalanceOut,\\n uint256 tokenWeightOut,\\n uint256 tokenAmountOut,\\n uint256 swapFee\\n ) external pure returns (uint256 tokenAmountIn);\\n\\n function calcPoolOutGivenSingleIn(\\n uint256 tokenBalanceIn,\\n uint256 tokenWeightIn,\\n uint256 poolSupply,\\n uint256 totalWeight,\\n uint256 tokenAmountIn,\\n uint256 swapFee\\n ) external pure returns (uint256 poolAmountOut);\\n\\n function calcSingleInGivenPoolOut(\\n uint256 tokenBalanceIn,\\n uint256 tokenWeightIn,\\n uint256 poolSupply,\\n uint256 totalWeight,\\n uint256 poolAmountOut,\\n uint256 swapFee\\n ) external pure returns (uint256 tokenAmountIn);\\n\\n function calcSingleOutGivenPoolIn(\\n uint256 tokenBalanceOut,\\n uint256 tokenWeightOut,\\n uint256 poolSupply,\\n uint256 totalWeight,\\n uint256 poolAmountIn,\\n uint256 swapFee\\n ) external pure returns (uint256 tokenAmountOut);\\n\\n function calcPoolInGivenSingleOut(\\n uint256 tokenBalanceOut,\\n uint256 tokenWeightOut,\\n uint256 poolSupply,\\n uint256 totalWeight,\\n uint256 tokenAmountOut,\\n uint256 swapFee\\n ) external pure returns (uint256 poolAmountIn);\\n}\\n\",\"keccak256\":\"0x5521da1ca55fff53cfe3cbdb68091e16918257c68eb7e3d574319498003cda51\",\"license\":\"MIT\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b506040516200234438038062002344833981810160405260608110156200003757600080fd5b508051602080830151604093840151845180860190955260088552673130b630b731b2b960c11b92850192909252919282848282826001600160a01b038116620000c8576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c6572206d75737420626520646566696e6564000000000000604482015290519081900360640190fd5b8251620000dd90600190602086019062000132565b50600080546001600160a01b03199081166001600160a01b039384161790915560609290921b6001600160601b03191660805260016003556004805490921696169590951790945550620001de945050505050565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826200016a5760008555620001b5565b82601f106200018557805160ff1916838001178555620001b5565b82800160010185558215620001b5579182015b82811115620001b557825182559160200191906001019062000198565b50620001c3929150620001c7565b5090565b5b80821115620001c35760008155600101620001c8565b60805160601c612148620001fc6000398061070552506121486000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c806362cc395a1161008c578063bd9d8ad911610066578063bd9d8ad914610403578063ca4f280314610479578063f5e393251461049f578063f77c4791146104cb576100df565b806362cc395a14610217578063708a3476146102fb578063b10198fb146103dd576100df565b80633d8df667116100bd5780633d8df667146101b15780633fc8cef3146101d55780635b16ebb7146101dd576100df565b806306fdde03146100e457806317d7de7c146101615780633cd5bd9514610169575b600080fd5b6100ec6104d3565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012657818101518382015260200161010e565b50505050905090810190601f1680156101535780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100ec610560565b61019f6004803603606081101561017f57600080fd5b506001600160a01b038135811691602081013590911690604001356105f5565b60408051918252519081900360200190f35b6101b96106f4565b604080516001600160a01b039092168252519081900360200190f35b6101b9610703565b610203600480360360208110156101f357600080fd5b50356001600160a01b0316610727565b604080519115158252519081900360200190f35b6102f9600480360360a081101561022d57600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561026857600080fd5b82018360208201111561027a57600080fd5b8035906020019184602083028401116401000000008311171561029c57600080fd5b9193909290916020810190356401000000008111156102ba57600080fd5b8201836020820111156102cc57600080fd5b803590602001918460208302840111640100000000831117156102ee57600080fd5b509092509050610738565b005b6102f9600480360360a081101561031157600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561034c57600080fd5b82018360208201111561035e57600080fd5b8035906020019184602083028401116401000000008311171561038057600080fd5b91939092909160208101903564010000000081111561039e57600080fd5b8201836020820111156103b057600080fd5b803590602001918460208302840111640100000000831117156103d257600080fd5b509092509050610b55565b610203600480360360208110156103f357600080fd5b50356001600160a01b0316611074565b6104296004803603602081101561041957600080fd5b50356001600160a01b0316611089565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561046557818101518382015260200161044d565b505050509050019250505060405180910390f35b6104296004803603602081101561048f57600080fd5b50356001600160a01b03166112a2565b610429600480360360408110156104b557600080fd5b506001600160a01b0381351690602001356113ad565b6101b9611676565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105585780601f1061052d57610100808354040283529160200191610558565b820191906000526020600020905b81548152906001019060200180831161053b57829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156105eb5780601f106105c0576101008083540402835291602001916105eb565b820191906000526020600020905b8154815290600101906020018083116105ce57829003601f168201915b5050505050905090565b600080846001600160a01b031663f8b2cb4f856040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561064557600080fd5b505afa158015610659573d6000803e3d6000fd5b505050506040513d602081101561066f57600080fd5b505190506106eb6106808483611685565b866001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156106b957600080fd5b505afa1580156106cd573d6000803e3d6000fd5b505050506040513d60208110156106e357600080fd5b5051906116a4565b95945050505050565b6004546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000610732826116bc565b92915050565b60026003541415610790576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b1580156107e057600080fd5b505afa1580156107f4573d6000803e3d6000fd5b505050506040513d602081101561080a57600080fd5b505161085d576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b600061086e88888888888888611752565b90506108798161195e565b80602001516001600160a01b03166397ccdc6061089589611a49565b89896040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b1580156108ed57600080fd5b505af1158015610901573d6000803e3d6000fd5b5050505060008060006109198b8b8b8b8b8b8b611a4c565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561099657818101518382015260200161097e565b50505050905090810190601f1680156109c35780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1580156109e457600080fd5b505af11580156109f8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610a2157600080fd5b8101908080516040519392919084640100000000821115610a4157600080fd5b908301906020820185811115610a5657600080fd5b8251640100000000811182820188101715610a7057600080fd5b82525081516020918201929091019080838360005b83811015610a9d578181015183820152602001610a85565b50505050905090810190601f168015610aca5780820380516001836020036101000a031916815260200191505b5060405250505050610adb84611bb2565b83600001516001600160a01b031684602001516001600160a01b03167f7659e40cf608296ce5aa9eff9c80adc7a49cb481173fc4e302e3983827b042df86604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b60026003541415610bad576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b158015610bfd57600080fd5b505afa158015610c11573d6000803e3d6000fd5b505050506040513d6020811015610c2757600080fd5b5051610c7a576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b6000610c8b88888888888888611752565b9050610c9681611c7a565b60005b84811015610d8f576000868683818110610caf57fe5b905060200201356001600160a01b03166001600160a01b031614610d875781602001516001600160a01b03166397ccdc60610ce98a611a49565b888885818110610cf557fe5b905060200201356001600160a01b0316878786818110610d1157fe5b905060200201356040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015610d6e57600080fd5b505af1158015610d82573d6000803e3d6000fd5b505050505b600101610c99565b506000806000610da48b8b8b8b8b8b8b611d1b565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610e21578181015183820152602001610e09565b50505050905090810190601f168015610e4e5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610e6f57600080fd5b505af1158015610e83573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610eac57600080fd5b8101908080516040519392919084640100000000821115610ecc57600080fd5b908301906020820185811115610ee157600080fd5b8251640100000000811182820188101715610efb57600080fd5b82525081516020918201929091019080838360005b83811015610f28578181015183820152602001610f10565b50505050905090810190601f168015610f555780820380516001836020036101000a031916815260200191505b5060405250505050610fec8460a0015185604001516001600160a01b03166370a0823187602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610fba57600080fd5b505afa158015610fce573d6000803e3d6000fd5b505050506040513d6020811015610fe457600080fd5b505190611dd7565b6080850152610ffa84611e34565b83600001516001600160a01b031684602001516001600160a01b03167fe5ca6288535c5c6c2462c912b4033eade15b80926717896a2d58a2defdeb912886604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b60026020526000908152604090205460ff1681565b60606000826001600160a01b031663cc77828d6040518163ffffffff1660e01b815260040160006040518083038186803b1580156110c657600080fd5b505afa1580156110da573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561110357600080fd5b810190808051604051939291908464010000000082111561112357600080fd5b90830190602082018581111561113857600080fd5b825186602082028301116401000000008211171561115557600080fd5b82525081516020918201928201910280838360005b8381101561118257818101518382015260200161116a565b5050505090500160405250505090506000815167ffffffffffffffff811180156111ab57600080fd5b506040519080825280602002602001820160405280156111d5578160200160208202803683370190505b50905060005b82518160ff16101561129a57846001600160a01b031663f1b8a9b7848360ff168151811061120557fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561124a57600080fd5b505afa15801561125e573d6000803e3d6000fd5b505050506040513d602081101561127457600080fd5b50518251839060ff841690811061128757fe5b60209081029190910101526001016111db565b509392505050565b6060816001600160a01b031663cc77828d6040518163ffffffff1660e01b815260040160006040518083038186803b1580156112dd57600080fd5b505afa1580156112f1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561131a57600080fd5b810190808051604051939291908464010000000082111561133a57600080fd5b90830190602082018581111561134f57600080fd5b825186602082028301116401000000008211171561136c57600080fd5b82525081516020918201928201910280838360005b83811015611399578181015183820152602001611381565b505050509050016040525050509050919050565b60606000836001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113ea57600080fd5b505afa1580156113fe573d6000803e3d6000fd5b505050506040513d602081101561141457600080fd5b5051604080517fcc77828d00000000000000000000000000000000000000000000000000000000815290519192506000916001600160a01b0387169163cc77828d9160048083019286929190829003018186803b15801561147457600080fd5b505afa158015611488573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156114b157600080fd5b81019080805160405193929190846401000000008211156114d157600080fd5b9083019060208201858111156114e657600080fd5b825186602082028301116401000000008211171561150357600080fd5b82525081516020918201928201910280838360005b83811015611530578181015183820152602001611518565b5050505090500160405250505090506000815167ffffffffffffffff8111801561155957600080fd5b50604051908082528060200260200182016040528015611583578160200160208202803683370190505b50905060005b825181101561166c5761164d662386f26fc10000670de0b6b3a764000003611647866116418a8887815181106115bb57fe5b60200260200101516001600160a01b03166370a082318e6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561160f57600080fd5b505afa158015611623573d6000803e3d6000fd5b505050506040513d602081101561163957600080fd5b505190611ef6565b90611f4f565b906116a4565b82828151811061165957fe5b6020908102919091010152600101611589565b5095945050505050565b6000546001600160a01b031681565b600061169d8261164185670de0b6b3a7640000611ef6565b9392505050565b600061169d670de0b6b3a76400006116418585611ef6565b6000600460009054906101000a90046001600160a01b03166001600160a01b031663c2bb6dc2836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561172057600080fd5b505afa158015611734573d6000803e3d6000fd5b505050506040513d602081101561174a57600080fd5b505192915050565b61175a611fb6565b611762611fb6565b6001600160a01b0389166020808301829052604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b892600480840193919291829003018186803b1580156117c057600080fd5b505afa1580156117d4573d6000803e3d6000fd5b505050506040513d60208110156117ea57600080fd5b50516001600160a01b0390811682528816604080830182905280517f18160ddd00000000000000000000000000000000000000000000000000000000815290516318160ddd91600480820192602092909190829003018186803b15801561185057600080fd5b505afa158015611864573d6000803e3d6000fd5b505050506040513d602081101561187a57600080fd5b50516060820152604080517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b038b811660048301529151918a16916370a0823191602480820192602092909190829003018186803b1580156118e457600080fd5b505afa1580156118f8573d6000803e3d6000fd5b505050506040513d602081101561190e57600080fd5b505160a0820152608081018790526040805160208581028281018201909352858252909186918691829185019084908082843760009201919091525050505060c082015298975050505050505050565b61196b81604001516116bc565b6119bc576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b60008160800151116119ff5760405162461bcd60e51b815260040180806020018281038252602e815260200180612061602e913960400191505060405180910390fd5b80608001518160a001511015611a465760405162461bcd60e51b815260040180806020018281038252602d8152602001806120bb602d913960400191505060405180910390fd5b50565b90565b600080606060008811611aa6576040805162461bcd60e51b815260206004820152601a60248201527f5f706f6f6c546f6b656e73496e2068617320746f206e6f742030000000000000604482015290519081900360640190fd5b60018411611afb576040805162461bcd60e51b815260206004820152601d60248201527f48617320746f2070726f76696465205f6d696e416d6f756e74734f7574000000604482015290519081900360640190fd5b600088868660405160240180848152602001806020018281038252848482818152602001925060200280828437600081840152601f19601f8201169050808301925050509450505050506040516020818303038152906040527fb02f0b73000000000000000000000000000000000000000000000000000000006001600160e01b0319166020820180516001600160e01b038381831617835250505050905089600082935093509350509750975097945050505050565b80608001518160a001510381604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611c1257600080fd5b505afa158015611c26573d6000803e3d6000fd5b505050506040513d6020811015611c3c57600080fd5b505114611a465760405162461bcd60e51b815260040180806020018281038252602b8152602001806120e8602b913960400191505060405180910390fd5b611c8781604001516116bc565b611cd8576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b6000816080015111611a465760405162461bcd60e51b815260040180806020018281038252603181526020018061200f6031913960400191505060405180910390fd5b6000806060600088868660405160240180848152602001806020018281038252848482818152602001925060200280828437600081840152601f19601f8201169050808301925050509450505050506040516020818303038152906040527f4f69c0d4000000000000000000000000000000000000000000000000000000006001600160e01b0319166020820180516001600160e01b038381831617835250505050905089600082935093509350509750975097945050505050565b600082821115611e2e576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b8060a0015181604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611e8e57600080fd5b505afa158015611ea2573d6000803e3d6000fd5b505050506040513d6020811015611eb857600080fd5b505111611a465760405162461bcd60e51b815260040180806020018281038252602c81526020018061208f602c913960400191505060405180910390fd5b600082611f0557506000610732565b82820282848281611f1257fe5b041461169d5760405162461bcd60e51b81526004018080602001828103825260218152602001806120406021913960400191505060405180910390fd5b6000808211611fa5576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611fae57fe5b049392505050565b6040518060e0016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160608152509056fe4d696e20706f6f6c20746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77506f6f6c20746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520737472617465677920646964206e6f7420726563656976652074686520706f6f6c20746f6b656e7354686520737472617465677920646f6573206e6f74206861766520656e6f75676820706f6f6c20746f6b656e7354686520737472617465677920646964206e6f742072657475726e2074686520706f6f6c20746f6b656e73a26469706673582212200174d3d9b68eae456f02e99e8de18bcb5944a511b1ec8fd124805338c0eaeb6164736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100df5760003560e01c806362cc395a1161008c578063bd9d8ad911610066578063bd9d8ad914610403578063ca4f280314610479578063f5e393251461049f578063f77c4791146104cb576100df565b806362cc395a14610217578063708a3476146102fb578063b10198fb146103dd576100df565b80633d8df667116100bd5780633d8df667146101b15780633fc8cef3146101d55780635b16ebb7146101dd576100df565b806306fdde03146100e457806317d7de7c146101615780633cd5bd9514610169575b600080fd5b6100ec6104d3565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012657818101518382015260200161010e565b50505050905090810190601f1680156101535780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100ec610560565b61019f6004803603606081101561017f57600080fd5b506001600160a01b038135811691602081013590911690604001356105f5565b60408051918252519081900360200190f35b6101b96106f4565b604080516001600160a01b039092168252519081900360200190f35b6101b9610703565b610203600480360360208110156101f357600080fd5b50356001600160a01b0316610727565b604080519115158252519081900360200190f35b6102f9600480360360a081101561022d57600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561026857600080fd5b82018360208201111561027a57600080fd5b8035906020019184602083028401116401000000008311171561029c57600080fd5b9193909290916020810190356401000000008111156102ba57600080fd5b8201836020820111156102cc57600080fd5b803590602001918460208302840111640100000000831117156102ee57600080fd5b509092509050610738565b005b6102f9600480360360a081101561031157600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561034c57600080fd5b82018360208201111561035e57600080fd5b8035906020019184602083028401116401000000008311171561038057600080fd5b91939092909160208101903564010000000081111561039e57600080fd5b8201836020820111156103b057600080fd5b803590602001918460208302840111640100000000831117156103d257600080fd5b509092509050610b55565b610203600480360360208110156103f357600080fd5b50356001600160a01b0316611074565b6104296004803603602081101561041957600080fd5b50356001600160a01b0316611089565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561046557818101518382015260200161044d565b505050509050019250505060405180910390f35b6104296004803603602081101561048f57600080fd5b50356001600160a01b03166112a2565b610429600480360360408110156104b557600080fd5b506001600160a01b0381351690602001356113ad565b6101b9611676565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105585780601f1061052d57610100808354040283529160200191610558565b820191906000526020600020905b81548152906001019060200180831161053b57829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156105eb5780601f106105c0576101008083540402835291602001916105eb565b820191906000526020600020905b8154815290600101906020018083116105ce57829003601f168201915b5050505050905090565b600080846001600160a01b031663f8b2cb4f856040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561064557600080fd5b505afa158015610659573d6000803e3d6000fd5b505050506040513d602081101561066f57600080fd5b505190506106eb6106808483611685565b866001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156106b957600080fd5b505afa1580156106cd573d6000803e3d6000fd5b505050506040513d60208110156106e357600080fd5b5051906116a4565b95945050505050565b6004546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000610732826116bc565b92915050565b60026003541415610790576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b1580156107e057600080fd5b505afa1580156107f4573d6000803e3d6000fd5b505050506040513d602081101561080a57600080fd5b505161085d576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b600061086e88888888888888611752565b90506108798161195e565b80602001516001600160a01b03166397ccdc6061089589611a49565b89896040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b1580156108ed57600080fd5b505af1158015610901573d6000803e3d6000fd5b5050505060008060006109198b8b8b8b8b8b8b611a4c565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561099657818101518382015260200161097e565b50505050905090810190601f1680156109c35780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1580156109e457600080fd5b505af11580156109f8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610a2157600080fd5b8101908080516040519392919084640100000000821115610a4157600080fd5b908301906020820185811115610a5657600080fd5b8251640100000000811182820188101715610a7057600080fd5b82525081516020918201929091019080838360005b83811015610a9d578181015183820152602001610a85565b50505050905090810190601f168015610aca5780820380516001836020036101000a031916815260200191505b5060405250505050610adb84611bb2565b83600001516001600160a01b031684602001516001600160a01b03167f7659e40cf608296ce5aa9eff9c80adc7a49cb481173fc4e302e3983827b042df86604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b60026003541415610bad576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b158015610bfd57600080fd5b505afa158015610c11573d6000803e3d6000fd5b505050506040513d6020811015610c2757600080fd5b5051610c7a576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b6000610c8b88888888888888611752565b9050610c9681611c7a565b60005b84811015610d8f576000868683818110610caf57fe5b905060200201356001600160a01b03166001600160a01b031614610d875781602001516001600160a01b03166397ccdc60610ce98a611a49565b888885818110610cf557fe5b905060200201356001600160a01b0316878786818110610d1157fe5b905060200201356040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015610d6e57600080fd5b505af1158015610d82573d6000803e3d6000fd5b505050505b600101610c99565b506000806000610da48b8b8b8b8b8b8b611d1b565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610e21578181015183820152602001610e09565b50505050905090810190601f168015610e4e5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610e6f57600080fd5b505af1158015610e83573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610eac57600080fd5b8101908080516040519392919084640100000000821115610ecc57600080fd5b908301906020820185811115610ee157600080fd5b8251640100000000811182820188101715610efb57600080fd5b82525081516020918201929091019080838360005b83811015610f28578181015183820152602001610f10565b50505050905090810190601f168015610f555780820380516001836020036101000a031916815260200191505b5060405250505050610fec8460a0015185604001516001600160a01b03166370a0823187602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610fba57600080fd5b505afa158015610fce573d6000803e3d6000fd5b505050506040513d6020811015610fe457600080fd5b505190611dd7565b6080850152610ffa84611e34565b83600001516001600160a01b031684602001516001600160a01b03167fe5ca6288535c5c6c2462c912b4033eade15b80926717896a2d58a2defdeb912886604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b60026020526000908152604090205460ff1681565b60606000826001600160a01b031663cc77828d6040518163ffffffff1660e01b815260040160006040518083038186803b1580156110c657600080fd5b505afa1580156110da573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561110357600080fd5b810190808051604051939291908464010000000082111561112357600080fd5b90830190602082018581111561113857600080fd5b825186602082028301116401000000008211171561115557600080fd5b82525081516020918201928201910280838360005b8381101561118257818101518382015260200161116a565b5050505090500160405250505090506000815167ffffffffffffffff811180156111ab57600080fd5b506040519080825280602002602001820160405280156111d5578160200160208202803683370190505b50905060005b82518160ff16101561129a57846001600160a01b031663f1b8a9b7848360ff168151811061120557fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561124a57600080fd5b505afa15801561125e573d6000803e3d6000fd5b505050506040513d602081101561127457600080fd5b50518251839060ff841690811061128757fe5b60209081029190910101526001016111db565b509392505050565b6060816001600160a01b031663cc77828d6040518163ffffffff1660e01b815260040160006040518083038186803b1580156112dd57600080fd5b505afa1580156112f1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561131a57600080fd5b810190808051604051939291908464010000000082111561133a57600080fd5b90830190602082018581111561134f57600080fd5b825186602082028301116401000000008211171561136c57600080fd5b82525081516020918201928201910280838360005b83811015611399578181015183820152602001611381565b505050509050016040525050509050919050565b60606000836001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113ea57600080fd5b505afa1580156113fe573d6000803e3d6000fd5b505050506040513d602081101561141457600080fd5b5051604080517fcc77828d00000000000000000000000000000000000000000000000000000000815290519192506000916001600160a01b0387169163cc77828d9160048083019286929190829003018186803b15801561147457600080fd5b505afa158015611488573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156114b157600080fd5b81019080805160405193929190846401000000008211156114d157600080fd5b9083019060208201858111156114e657600080fd5b825186602082028301116401000000008211171561150357600080fd5b82525081516020918201928201910280838360005b83811015611530578181015183820152602001611518565b5050505090500160405250505090506000815167ffffffffffffffff8111801561155957600080fd5b50604051908082528060200260200182016040528015611583578160200160208202803683370190505b50905060005b825181101561166c5761164d662386f26fc10000670de0b6b3a764000003611647866116418a8887815181106115bb57fe5b60200260200101516001600160a01b03166370a082318e6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561160f57600080fd5b505afa158015611623573d6000803e3d6000fd5b505050506040513d602081101561163957600080fd5b505190611ef6565b90611f4f565b906116a4565b82828151811061165957fe5b6020908102919091010152600101611589565b5095945050505050565b6000546001600160a01b031681565b600061169d8261164185670de0b6b3a7640000611ef6565b9392505050565b600061169d670de0b6b3a76400006116418585611ef6565b6000600460009054906101000a90046001600160a01b03166001600160a01b031663c2bb6dc2836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561172057600080fd5b505afa158015611734573d6000803e3d6000fd5b505050506040513d602081101561174a57600080fd5b505192915050565b61175a611fb6565b611762611fb6565b6001600160a01b0389166020808301829052604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b892600480840193919291829003018186803b1580156117c057600080fd5b505afa1580156117d4573d6000803e3d6000fd5b505050506040513d60208110156117ea57600080fd5b50516001600160a01b0390811682528816604080830182905280517f18160ddd00000000000000000000000000000000000000000000000000000000815290516318160ddd91600480820192602092909190829003018186803b15801561185057600080fd5b505afa158015611864573d6000803e3d6000fd5b505050506040513d602081101561187a57600080fd5b50516060820152604080517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b038b811660048301529151918a16916370a0823191602480820192602092909190829003018186803b1580156118e457600080fd5b505afa1580156118f8573d6000803e3d6000fd5b505050506040513d602081101561190e57600080fd5b505160a0820152608081018790526040805160208581028281018201909352858252909186918691829185019084908082843760009201919091525050505060c082015298975050505050505050565b61196b81604001516116bc565b6119bc576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b60008160800151116119ff5760405162461bcd60e51b815260040180806020018281038252602e815260200180612061602e913960400191505060405180910390fd5b80608001518160a001511015611a465760405162461bcd60e51b815260040180806020018281038252602d8152602001806120bb602d913960400191505060405180910390fd5b50565b90565b600080606060008811611aa6576040805162461bcd60e51b815260206004820152601a60248201527f5f706f6f6c546f6b656e73496e2068617320746f206e6f742030000000000000604482015290519081900360640190fd5b60018411611afb576040805162461bcd60e51b815260206004820152601d60248201527f48617320746f2070726f76696465205f6d696e416d6f756e74734f7574000000604482015290519081900360640190fd5b600088868660405160240180848152602001806020018281038252848482818152602001925060200280828437600081840152601f19601f8201169050808301925050509450505050506040516020818303038152906040527fb02f0b73000000000000000000000000000000000000000000000000000000006001600160e01b0319166020820180516001600160e01b038381831617835250505050905089600082935093509350509750975097945050505050565b80608001518160a001510381604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611c1257600080fd5b505afa158015611c26573d6000803e3d6000fd5b505050506040513d6020811015611c3c57600080fd5b505114611a465760405162461bcd60e51b815260040180806020018281038252602b8152602001806120e8602b913960400191505060405180910390fd5b611c8781604001516116bc565b611cd8576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b6000816080015111611a465760405162461bcd60e51b815260040180806020018281038252603181526020018061200f6031913960400191505060405180910390fd5b6000806060600088868660405160240180848152602001806020018281038252848482818152602001925060200280828437600081840152601f19601f8201169050808301925050509450505050506040516020818303038152906040527f4f69c0d4000000000000000000000000000000000000000000000000000000006001600160e01b0319166020820180516001600160e01b038381831617835250505050905089600082935093509350509750975097945050505050565b600082821115611e2e576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b8060a0015181604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611e8e57600080fd5b505afa158015611ea2573d6000803e3d6000fd5b505050506040513d6020811015611eb857600080fd5b505111611a465760405162461bcd60e51b815260040180806020018281038252602c81526020018061208f602c913960400191505060405180910390fd5b600082611f0557506000610732565b82820282848281611f1257fe5b041461169d5760405162461bcd60e51b81526004018080602001828103825260218152602001806120406021913960400191505060405180910390fd5b6000808211611fa5576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611fae57fe5b049392505050565b6040518060e0016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160608152509056fe4d696e20706f6f6c20746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77506f6f6c20746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520737472617465677920646964206e6f7420726563656976652074686520706f6f6c20746f6b656e7354686520737472617465677920646f6573206e6f74206861766520656e6f75676820706f6f6c20746f6b656e7354686520737472617465677920646964206e6f742072657475726e2074686520706f6f6c20746f6b656e73a26469706673582212200174d3d9b68eae456f02e99e8de18bcb5944a511b1ec8fd124805338c0eaeb6164736f6c63430007060033", "devdoc": { "author": "Babylon Finance Protocol Kyber protocol trade integration", "kind": "dev", @@ -435,7 +435,7 @@ "storageLayout": { "storage": [ { - "astId": 18742, + "astId": 17657, "contract": "contracts/integrations/pool/BalancerIntegration.sol:BalancerIntegration", "label": "controller", "offset": 0, @@ -443,7 +443,7 @@ "type": "t_address" }, { - "astId": 18746, + "astId": 17661, "contract": "contracts/integrations/pool/BalancerIntegration.sol:BalancerIntegration", "label": "name", "offset": 0, @@ -451,7 +451,7 @@ "type": "t_string_storage" }, { - "astId": 18750, + "astId": 17665, "contract": "contracts/integrations/pool/BalancerIntegration.sol:BalancerIntegration", "label": "initializedByGarden", "offset": 0, @@ -459,7 +459,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 7995, + "astId": 5603, "contract": "contracts/integrations/pool/BalancerIntegration.sol:BalancerIntegration", "label": "_status", "offset": 0, @@ -467,12 +467,12 @@ "type": "t_uint256" }, { - "astId": 20716, + "astId": 19625, "contract": "contracts/integrations/pool/BalancerIntegration.sol:BalancerIntegration", "label": "coreFactory", "offset": 0, "slot": "4", - "type": "t_contract(IBFactory)26135" + "type": "t_contract(IBFactory)25238" } ], "types": { @@ -486,7 +486,7 @@ "label": "bool", "numberOfBytes": "1" }, - "t_contract(IBFactory)26135": { + "t_contract(IBFactory)25238": { "encoding": "inplace", "label": "contract IBFactory", "numberOfBytes": "20" diff --git a/deployments/artifacts/mainnet/BuyOperation.json b/deployments/artifacts/mainnet/BuyOperation.json index 58f4799a5..63297e771 100644 --- a/deployments/artifacts/mainnet/BuyOperation.json +++ b/deployments/artifacts/mainnet/BuyOperation.json @@ -1,5 +1,5 @@ { - "address": "0x4Bd40678693F3699903064f12838A8645b9F574C", + "address": "0x3647df3fe499BC9f34F97f2488a2524b84074647", "abi": [ { "inputs": [ @@ -196,30 +196,30 @@ "type": "function" } ], - "transactionHash": "0xe6742610596dafdcc9bb6b3438d02d622ea8938f0ca009d34a451a5b81d1e257", + "transactionHash": "0xe08086f377df6fe91e99f8043958ccd4913fe0e0d9b25911f29097abdb7271ce", "receipt": { "to": null, "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", - "contractAddress": "0x4Bd40678693F3699903064f12838A8645b9F574C", - "transactionIndex": 34, - "gasUsed": "1236363", + "contractAddress": "0x3647df3fe499BC9f34F97f2488a2524b84074647", + "transactionIndex": 35, + "gasUsed": "1125977", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x642311880beadaba4f79458d37999bd38cb962e70ecbe3aa987340f1d561a659", - "transactionHash": "0xe6742610596dafdcc9bb6b3438d02d622ea8938f0ca009d34a451a5b81d1e257", + "blockHash": "0x3ced68a78c491cbbc0edf2928d7006c185245570e80a27e695a873611002c41d", + "transactionHash": "0xe08086f377df6fe91e99f8043958ccd4913fe0e0d9b25911f29097abdb7271ce", "logs": [], - "blockNumber": 12361022, - "cumulativeGasUsed": "3106326", + "blockNumber": 12451337, + "cumulativeGasUsed": "3599386", "status": 1, "byzantium": true }, "args": [ "buy", - "0xffe7c30daDb1B132b86aB7bbede496615d54c8Ac" + "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F" ], - "solcInputHash": "a02a2075cf667a20c416d2d0a5e8f337", - "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_capital\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"executeOperation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_percentage\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"exitOperation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"getNAV\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"validateOperation\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Executes a buy operation\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of the controller\",\"_name\":\"Name of the integration\"}},\"executeOperation(address,uint256,uint8,address,address,address)\":{\"params\":{\"_capital\":\"Amount of capital received from the garden\"}},\"exitOperation(uint256,address,address,address)\":{\"params\":{\"_percentage\":\"of capital to exit from the strategy\"}},\"getNAV(address,address,address)\":{\"returns\":{\"_0\":\"_nav NAV of the strategy\"}},\"validateOperation(address,address,address,uint256)\":{\"params\":{\"_data\":\"Operation data\"}}},\"title\":\"BuyOperation\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates the integration\"},\"executeOperation(address,uint256,uint8,address,address,address)\":{\"notice\":\"Executes the buy operation\"},\"exitOperation(uint256,address,address,address)\":{\"notice\":\"Exits the buy operation.\"},\"getNAV(address,address,address)\":{\"notice\":\"Gets the NAV of the buy op in the reserve asset\"},\"getName()\":{\"notice\":\"Returns the name of the operation\"},\"validateOperation(address,address,address,uint256)\":{\"notice\":\"Sets operation data for the buy operation\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/strategies/operations/BuyOperation.sol\":\"BuyOperation\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityMinimum(uint256 _minRiskyPairLiquidityEth) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minRiskyPairLiquidityEth() external view returns (uint256);\\n\\n function getUniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0x57cf4ece98219f805a416e8c24728d30d9b37c4126d66785d2617b97e35ffae6\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function nftAddress() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategy(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function reenableEthForStrategies() external;\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x5e460136e0b45024ea1c1f32cde607f3ce75dd5b14cee34007d6bbd08beabc82\",\"license\":\"Apache License\"},\"contracts/interfaces/IOperation.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from './IGarden.sol';\\nimport {IStrategy} from './IStrategy.sol';\\n\\n/**\\n * @title IOperation\\n * @author Babylon Finance\\n *\\n * Interface for an strategy operation\\n */\\ninterface IOperation {\\n function validateOperation(\\n address _data,\\n IGarden _garden,\\n address _integration,\\n uint256 _index\\n ) external view;\\n\\n function executeOperation(\\n address _asset,\\n uint256 _capital,\\n uint8 _assetStatus,\\n address _data,\\n IGarden _garden,\\n address _integration\\n )\\n external\\n returns (\\n address,\\n uint256,\\n uint8\\n );\\n\\n function exitOperation(\\n uint256 _percentage,\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external;\\n\\n function getNAV(\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external view returns (uint256);\\n\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x856e173e6c8e1fdbe54988df58d0805a23a6a2f8408bd4f90a488a1978e762ed\",\"license\":\"Apache License\"},\"contracts/interfaces/IPriceOracle.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol IPriceOracle)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPriceOracle\\n * @author Babylon Finance\\n *\\n * Interface for interacting with PriceOracle\\n */\\ninterface IPriceOracle {\\n /* ============ Functions ============ */\\n\\n function getPrice(address _assetOne, address _assetTwo) external view returns (uint256);\\n\\n function updateAdapters(address _assetOne, address _assetTwo) external;\\n}\\n\",\"keccak256\":\"0xa22e0e5e166f6f6714553b736ee921b916c37bc5b557042bf6042cc010d2a041\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital,\\n address _strategyNft\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function strategyNft() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x4396906e436eb68c96715e0a53ae1656ac5d7934ebdaeb58ec3c33953465bc39\",\"license\":\"Apache License\"},\"contracts/interfaces/ITradeIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title ITrade\\n * @author Babylon Finance\\n *\\n * Interface for trading protocol integrations\\n */\\ninterface ITradeIntegration {\\n function trade(\\n address _strategy,\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken,\\n uint256 _minReceiveQuantity\\n ) external;\\n\\n function getConversionRates(\\n address _sourceToken,\\n address _destinationToken,\\n uint256 _sourceQuantity\\n ) external returns (uint256, uint256);\\n}\\n\",\"keccak256\":\"0x95df25f2cbfd3d82a9e22c9202f9fc2c497e90fd6e5fcfb00c4162f6447c0cbd\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"contracts/strategies/operations/BuyOperation.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {Operation} from './Operation.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\\nimport {ITradeIntegration} from '../../interfaces/ITradeIntegration.sol';\\n\\n/**\\n * @title BuyOperation\\n * @author Babylon Finance\\n *\\n * Executes a buy operation\\n */\\ncontract BuyOperation is Operation {\\n using PreciseUnitMath for uint256;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _controller Address of the controller\\n */\\n constructor(string memory _name, address _controller) Operation(_name, _controller) {}\\n\\n /**\\n * Sets operation data for the buy operation\\n *\\n * @param _data Operation data\\n */\\n function validateOperation(\\n address _data,\\n IGarden _garden,\\n address, /* _integration */\\n uint256 /* _index */\\n ) external view override onlyStrategy {\\n require(_data != _garden.reserveAsset(), 'Receive token must be different');\\n }\\n\\n /**\\n * Executes the buy operation\\n * @param _capital Amount of capital received from the garden\\n */\\n function executeOperation(\\n address _asset,\\n uint256 _capital,\\n uint8, /* _assetStatus */\\n address _data,\\n IGarden, /* _garden */\\n address /* _integration */\\n )\\n external\\n override\\n onlyStrategy\\n returns (\\n address,\\n uint256,\\n uint8\\n )\\n {\\n IStrategy(msg.sender).trade(_asset, _capital, _data);\\n return (_data, IERC20(_data).balanceOf(address(msg.sender)), 0); // liquid\\n }\\n\\n /**\\n * Exits the buy operation.\\n * @param _percentage of capital to exit from the strategy\\n */\\n function exitOperation(\\n uint256 _percentage,\\n address _data,\\n IGarden _garden,\\n address /* _integration */\\n ) external override onlyStrategy {\\n require(_percentage <= 100e18, 'Unwind Percentage <= 100%');\\n IStrategy(msg.sender).trade(\\n _data,\\n IERC20(_data).balanceOf(address(msg.sender)).preciseMul(_percentage),\\n _garden.reserveAsset()\\n );\\n }\\n\\n /**\\n * Gets the NAV of the buy op in the reserve asset\\n *\\n * @return _nav NAV of the strategy\\n */\\n function getNAV(\\n address _data,\\n IGarden _garden,\\n address /* _integration */\\n ) external view override onlyStrategy returns (uint256) {\\n if (!IStrategy(msg.sender).isStrategyActive()) {\\n return 0;\\n }\\n uint256 price = _getPrice(_garden.reserveAsset(), _data);\\n uint256 NAV = _normalizeDecimals(_data, IERC20(_data).balanceOf(msg.sender)).preciseDiv(price);\\n require(NAV != 0, 'NAV has to be bigger 0');\\n return NAV;\\n }\\n}\\n\",\"keccak256\":\"0x231cb8763d60c07ec2c068e0014dceec79adf447a365c9efe6db8b375644830b\",\"license\":\"Apache License\"},\"contracts/strategies/operations/Operation.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {IOperation} from '../../interfaces/IOperation.sol';\\nimport {ITradeIntegration} from '../../interfaces/ITradeIntegration.sol';\\nimport {IPriceOracle} from '../../interfaces/IPriceOracle.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\n\\n/**\\n * @title LongStrategy\\n * @author Babylon Finance\\n *\\n * Holds the data for a long strategy\\n */\\nabstract contract Operation is IOperation {\\n using SafeMath for uint256;\\n /* ============ Modifiers ============ */\\n\\n modifier onlyStrategy() {\\n IStrategy strategy = IStrategy(msg.sender);\\n IGarden garden = strategy.garden();\\n require(IBabController(controller).isSystemContract(address(garden)), 'Only a garden can call this');\\n require(garden.isStrategy(msg.sender), 'Sender must be a strategy');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n uint256 internal constant SLIPPAGE_ALLOWED = 1e16; // 1%\\n uint256 internal constant HUNDRED_PERCENT = 1e18; // 100%\\n address internal constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\\n\\n // Address of the controller\\n address public controller;\\n // Name of the operation\\n string public name;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _controller Address of the controller\\n */\\n constructor(string memory _name, address _controller) {\\n require(_controller != address(0), 'Controller must be defined');\\n name = _name;\\n controller = _controller;\\n }\\n\\n /* ============ Virtual External Functions ============ */\\n\\n function validateOperation(\\n address _data,\\n IGarden _garden,\\n address _integration,\\n uint256 _index\\n ) external view virtual override;\\n\\n function executeOperation(\\n address _asset,\\n uint256 _capital,\\n uint8 _assetStatus,\\n address _data,\\n IGarden _garden,\\n address _integration\\n )\\n external\\n virtual\\n override\\n returns (\\n address,\\n uint256,\\n uint8\\n );\\n\\n function exitOperation(\\n uint256 _percentage,\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external virtual override;\\n\\n function getNAV(\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external view virtual override returns (uint256);\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the name of the operation\\n */\\n function getName() external view override returns (string memory) {\\n return name;\\n }\\n\\n /**\\n * Returns the price of the pair through the price oracle\\n */\\n function _getPrice(address _assetOne, address _assetTwo) internal view returns (uint256) {\\n IPriceOracle oracle = IPriceOracle(IBabController(controller).priceOracle());\\n return oracle.getPrice(_assetOne, _assetTwo);\\n }\\n\\n function _normalizeDecimals(address _asset, uint256 _quantity) internal view returns (uint256) {\\n uint8 tokenDecimals = ERC20(_asset).decimals();\\n return tokenDecimals != 18 ? _quantity.mul(10**(18 - tokenDecimals)) : _quantity;\\n }\\n}\\n\",\"keccak256\":\"0x9b65b8d307d5c35ba537bf051095d28fbb3128c593091cc1ac16de22b4370d8e\",\"license\":\"Apache License\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b50604051620016c5380380620016c5833981810160405260408110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001519150829050816001600160a01b03811662000150576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c6572206d75737420626520646566696e6564000000000000604482015290519081900360640190fd5b81516200016590600190602085019062000190565b50600080546001600160a01b0319166001600160a01b0392909216919091179055506200023c915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001c8576000855562000213565b82601f10620001e357805160ff191683800117855562000213565b8280016001018555821562000213579182015b8281111562000213578251825591602001919060010190620001f6565b506200022192915062000225565b5090565b5b8082111562000221576000815560010162000226565b611479806200024c6000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80634222326a1161005b5780634222326a1461014757806355d9750b14610191578063c8cd307514610209578063f77c4791146102455761007d565b806306fdde031461008257806317d7de7c146100ff578063419ea18a14610107575b600080fd5b61008a610269565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100c45781810151838201526020016100ac565b50505050905090810190601f1680156100f15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61008a6102f6565b6101456004803603608081101561011d57600080fd5b508035906001600160a01b03602082013581169160408101358216916060909101351661038b565b005b61017f6004803603606081101561015d57600080fd5b506001600160a01b03813581169160208101358216916040909101351661077f565b60408051918252519081900360200190f35b6101de600480360360c08110156101a757600080fd5b506001600160a01b03813581169160208101359160ff604083013516916060810135821691608082013581169160a0013516610b4e565b604080516001600160a01b039094168452602084019290925260ff1682820152519081900360600190f35b6101456004803603608081101561021f57600080fd5b506001600160a01b03813581169160208101358216916040820135169060600135610e8c565b61024d611154565b604080516001600160a01b039092168252519081900360200190f35b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102ee5780601f106102c3576101008083540402835291602001916102ee565b820191906000526020600020905b8154815290600101906020018083116102d157829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156103815780601f1061035657610100808354040283529160200191610381565b820191906000526020600020905b81548152906001019060200180831161036457829003601f168201915b5050505050905090565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156103cb57600080fd5b505afa1580156103df573d6000803e3d6000fd5b505050506040513d60208110156103f557600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561044657600080fd5b505afa15801561045a573d6000803e3d6000fd5b505050506040513d602081101561047057600080fd5b50516104c3576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b15801561050957600080fd5b505afa15801561051d573d6000803e3d6000fd5b505050506040513d602081101561053357600080fd5b5051610586576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b68056bc75e2d631000008611156105e4576040805162461bcd60e51b815260206004820152601960248201527f556e77696e642050657263656e74616765203c3d203130302500000000000000604482015290519081900360640190fd5b336001600160a01b0316630e32db528661067789896001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561064557600080fd5b505afa158015610659573d6000803e3d6000fd5b505050506040513d602081101561066f57600080fd5b505190611163565b876001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b1580156106b057600080fd5b505afa1580156106c4573d6000803e3d6000fd5b505050506040513d60208110156106da57600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b1681526001600160a01b039485166004820152602481019390935292166044820152905160648083019260209291908290030181600087803b15801561074b57600080fd5b505af115801561075f573d6000803e3d6000fd5b505050506040513d602081101561077557600080fd5b5050505050505050565b6000803390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156107c057600080fd5b505afa1580156107d4573d6000803e3d6000fd5b505050506040513d60208110156107ea57600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561083b57600080fd5b505afa15801561084f573d6000803e3d6000fd5b505050506040513d602081101561086557600080fd5b50516108b8576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b1580156108fe57600080fd5b505afa158015610912573d6000803e3d6000fd5b505050506040513d602081101561092857600080fd5b505161097b576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b336001600160a01b031663e4df5e1a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109b457600080fd5b505afa1580156109c8573d6000803e3d6000fd5b505050506040513d60208110156109de57600080fd5b50516109ed5760009250610b45565b6000610a5d866001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b158015610a2b57600080fd5b505afa158015610a3f573d6000803e3d6000fd5b505050506040513d6020811015610a5557600080fd5b50518861118a565b90506000610aed82610ae78a8b6001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610ab657600080fd5b505afa158015610aca573d6000803e3d6000fd5b505050506040513d6020811015610ae057600080fd5b50516112b6565b9061134e565b905080610b41576040805162461bcd60e51b815260206004820152601660248201527f4e41562068617320746f20626520626967676572203000000000000000000000604482015290519081900360640190fd5b9350505b50509392505050565b6000806000803390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015610b9257600080fd5b505afa158015610ba6573d6000803e3d6000fd5b505050506040513d6020811015610bbc57600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b158015610c0d57600080fd5b505afa158015610c21573d6000803e3d6000fd5b505050506040513d6020811015610c3757600080fd5b5051610c8a576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b158015610cd057600080fd5b505afa158015610ce4573d6000803e3d6000fd5b505050506040513d6020811015610cfa57600080fd5b5051610d4d576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b604080517f0e32db520000000000000000000000000000000000000000000000000000000081526001600160a01b038d81166004830152602482018d90528a16604482015290513391630e32db529160648083019260209291908290030181600087803b158015610dbd57600080fd5b505af1158015610dd1573d6000803e3d6000fd5b505050506040513d6020811015610de757600080fd5b5050604080517f70a08231000000000000000000000000000000000000000000000000000000008152336004820152905189916001600160a01b038316916370a0823191602480820192602092909190829003018186803b158015610e4b57600080fd5b505afa158015610e5f573d6000803e3d6000fd5b505050506040513d6020811015610e7557600080fd5b5051909c909b5060009a5098505050505050505050565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015610ecc57600080fd5b505afa158015610ee0573d6000803e3d6000fd5b505050506040513d6020811015610ef657600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b158015610f4757600080fd5b505afa158015610f5b573d6000803e3d6000fd5b505050506040513d6020811015610f7157600080fd5b5051610fc4576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b15801561100a57600080fd5b505afa15801561101e573d6000803e3d6000fd5b505050506040513d602081101561103457600080fd5b5051611087576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b846001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b1580156110c057600080fd5b505afa1580156110d4573d6000803e3d6000fd5b505050506040513d60208110156110ea57600080fd5b50516001600160a01b038781169116141561114c576040805162461bcd60e51b815260206004820152601f60248201527f5265636569766520746f6b656e206d75737420626520646966666572656e7400604482015290519081900360640190fd5b505050505050565b6000546001600160a01b031681565b6000611181670de0b6b3a764000061117b8585611362565b906113bb565b90505b92915050565b60008054604080517f2630c12f000000000000000000000000000000000000000000000000000000008152905183926001600160a01b031691632630c12f916004808301926020929190829003018186803b1580156111e857600080fd5b505afa1580156111fc573d6000803e3d6000fd5b505050506040513d602081101561121257600080fd5b5051604080517fac41865a0000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152868116602483015291519293509083169163ac41865a91604480820192602092909190829003018186803b15801561128257600080fd5b505afa158015611296573d6000803e3d6000fd5b505050506040513d60208110156112ac57600080fd5b5051949350505050565b600080836001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156112f257600080fd5b505afa158015611306573d6000803e3d6000fd5b505050506040513d602081101561131c57600080fd5b50519050601260ff821614156113325782611346565b6113468360ff601284900316600a0a611362565b949350505050565b60006111818261117b85670de0b6b3a76400005b60008261137157506000611184565b8282028284828161137e57fe5b04146111815760405162461bcd60e51b81526004018080602001828103825260218152602001806114236021913960400191505060405180910390fd5b6000808211611411576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161141a57fe5b04939250505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220f6dd59ee05f4ae46d1aec655137465b3517a33a210b01045ec19b60e785e878364736f6c63430007060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80634222326a1161005b5780634222326a1461014757806355d9750b14610191578063c8cd307514610209578063f77c4791146102455761007d565b806306fdde031461008257806317d7de7c146100ff578063419ea18a14610107575b600080fd5b61008a610269565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100c45781810151838201526020016100ac565b50505050905090810190601f1680156100f15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61008a6102f6565b6101456004803603608081101561011d57600080fd5b508035906001600160a01b03602082013581169160408101358216916060909101351661038b565b005b61017f6004803603606081101561015d57600080fd5b506001600160a01b03813581169160208101358216916040909101351661077f565b60408051918252519081900360200190f35b6101de600480360360c08110156101a757600080fd5b506001600160a01b03813581169160208101359160ff604083013516916060810135821691608082013581169160a0013516610b4e565b604080516001600160a01b039094168452602084019290925260ff1682820152519081900360600190f35b6101456004803603608081101561021f57600080fd5b506001600160a01b03813581169160208101358216916040820135169060600135610e8c565b61024d611154565b604080516001600160a01b039092168252519081900360200190f35b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102ee5780601f106102c3576101008083540402835291602001916102ee565b820191906000526020600020905b8154815290600101906020018083116102d157829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156103815780601f1061035657610100808354040283529160200191610381565b820191906000526020600020905b81548152906001019060200180831161036457829003601f168201915b5050505050905090565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156103cb57600080fd5b505afa1580156103df573d6000803e3d6000fd5b505050506040513d60208110156103f557600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561044657600080fd5b505afa15801561045a573d6000803e3d6000fd5b505050506040513d602081101561047057600080fd5b50516104c3576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b15801561050957600080fd5b505afa15801561051d573d6000803e3d6000fd5b505050506040513d602081101561053357600080fd5b5051610586576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b68056bc75e2d631000008611156105e4576040805162461bcd60e51b815260206004820152601960248201527f556e77696e642050657263656e74616765203c3d203130302500000000000000604482015290519081900360640190fd5b336001600160a01b0316630e32db528661067789896001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561064557600080fd5b505afa158015610659573d6000803e3d6000fd5b505050506040513d602081101561066f57600080fd5b505190611163565b876001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b1580156106b057600080fd5b505afa1580156106c4573d6000803e3d6000fd5b505050506040513d60208110156106da57600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b1681526001600160a01b039485166004820152602481019390935292166044820152905160648083019260209291908290030181600087803b15801561074b57600080fd5b505af115801561075f573d6000803e3d6000fd5b505050506040513d602081101561077557600080fd5b5050505050505050565b6000803390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156107c057600080fd5b505afa1580156107d4573d6000803e3d6000fd5b505050506040513d60208110156107ea57600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561083b57600080fd5b505afa15801561084f573d6000803e3d6000fd5b505050506040513d602081101561086557600080fd5b50516108b8576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b1580156108fe57600080fd5b505afa158015610912573d6000803e3d6000fd5b505050506040513d602081101561092857600080fd5b505161097b576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b336001600160a01b031663e4df5e1a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109b457600080fd5b505afa1580156109c8573d6000803e3d6000fd5b505050506040513d60208110156109de57600080fd5b50516109ed5760009250610b45565b6000610a5d866001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b158015610a2b57600080fd5b505afa158015610a3f573d6000803e3d6000fd5b505050506040513d6020811015610a5557600080fd5b50518861118a565b90506000610aed82610ae78a8b6001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610ab657600080fd5b505afa158015610aca573d6000803e3d6000fd5b505050506040513d6020811015610ae057600080fd5b50516112b6565b9061134e565b905080610b41576040805162461bcd60e51b815260206004820152601660248201527f4e41562068617320746f20626520626967676572203000000000000000000000604482015290519081900360640190fd5b9350505b50509392505050565b6000806000803390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015610b9257600080fd5b505afa158015610ba6573d6000803e3d6000fd5b505050506040513d6020811015610bbc57600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b158015610c0d57600080fd5b505afa158015610c21573d6000803e3d6000fd5b505050506040513d6020811015610c3757600080fd5b5051610c8a576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b158015610cd057600080fd5b505afa158015610ce4573d6000803e3d6000fd5b505050506040513d6020811015610cfa57600080fd5b5051610d4d576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b604080517f0e32db520000000000000000000000000000000000000000000000000000000081526001600160a01b038d81166004830152602482018d90528a16604482015290513391630e32db529160648083019260209291908290030181600087803b158015610dbd57600080fd5b505af1158015610dd1573d6000803e3d6000fd5b505050506040513d6020811015610de757600080fd5b5050604080517f70a08231000000000000000000000000000000000000000000000000000000008152336004820152905189916001600160a01b038316916370a0823191602480820192602092909190829003018186803b158015610e4b57600080fd5b505afa158015610e5f573d6000803e3d6000fd5b505050506040513d6020811015610e7557600080fd5b5051909c909b5060009a5098505050505050505050565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015610ecc57600080fd5b505afa158015610ee0573d6000803e3d6000fd5b505050506040513d6020811015610ef657600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b158015610f4757600080fd5b505afa158015610f5b573d6000803e3d6000fd5b505050506040513d6020811015610f7157600080fd5b5051610fc4576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b15801561100a57600080fd5b505afa15801561101e573d6000803e3d6000fd5b505050506040513d602081101561103457600080fd5b5051611087576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b846001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b1580156110c057600080fd5b505afa1580156110d4573d6000803e3d6000fd5b505050506040513d60208110156110ea57600080fd5b50516001600160a01b038781169116141561114c576040805162461bcd60e51b815260206004820152601f60248201527f5265636569766520746f6b656e206d75737420626520646966666572656e7400604482015290519081900360640190fd5b505050505050565b6000546001600160a01b031681565b6000611181670de0b6b3a764000061117b8585611362565b906113bb565b90505b92915050565b60008054604080517f2630c12f000000000000000000000000000000000000000000000000000000008152905183926001600160a01b031691632630c12f916004808301926020929190829003018186803b1580156111e857600080fd5b505afa1580156111fc573d6000803e3d6000fd5b505050506040513d602081101561121257600080fd5b5051604080517fac41865a0000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152868116602483015291519293509083169163ac41865a91604480820192602092909190829003018186803b15801561128257600080fd5b505afa158015611296573d6000803e3d6000fd5b505050506040513d60208110156112ac57600080fd5b5051949350505050565b600080836001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156112f257600080fd5b505afa158015611306573d6000803e3d6000fd5b505050506040513d602081101561131c57600080fd5b50519050601260ff821614156113325782611346565b6113468360ff601284900316600a0a611362565b949350505050565b60006111818261117b85670de0b6b3a76400005b60008261137157506000611184565b8282028284828161137e57fe5b04146111815760405162461bcd60e51b81526004018080602001828103825260218152602001806114236021913960400191505060405180910390fd5b6000808211611411576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161141a57fe5b04939250505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220f6dd59ee05f4ae46d1aec655137465b3517a33a210b01045ec19b60e785e878364736f6c63430007060033", + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_capital\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"executeOperation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_percentage\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"exitOperation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"getNAV\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"validateOperation\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Executes a buy operation\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of the controller\",\"_name\":\"Name of the integration\"}},\"executeOperation(address,uint256,uint8,address,address,address)\":{\"params\":{\"_capital\":\"Amount of capital received from the garden\"}},\"exitOperation(uint256,address,address,address)\":{\"params\":{\"_percentage\":\"of capital to exit from the strategy\"}},\"getNAV(address,address,address)\":{\"returns\":{\"_0\":\"_nav NAV of the strategy\"}},\"validateOperation(address,address,address,uint256)\":{\"params\":{\"_data\":\"Operation data\"}}},\"title\":\"BuyOperation\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates the integration\"},\"executeOperation(address,uint256,uint8,address,address,address)\":{\"notice\":\"Executes the buy operation\"},\"exitOperation(uint256,address,address,address)\":{\"notice\":\"Exits the buy operation.\"},\"getNAV(address,address,address)\":{\"notice\":\"Gets the NAV of the buy op in the reserve asset\"},\"getName()\":{\"notice\":\"Returns the name of the operation\"},\"validateOperation(address,address,address,uint256)\":{\"notice\":\"Sets operation data for the buy operation\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/strategies/operations/BuyOperation.sol\":\"BuyOperation\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editGardenNFT(address _newGardenNFT) external;\\n\\n function editStrategyNFT(address _newStrategyNFT) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function editUniswapFactory(address _newUniswapFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\\n\\n function maxContributorsPerGarden() external view returns (uint256);\\n\\n function gardenCreationIsOpen() external view returns (bool);\\n\\n function openPublicGardenCreation() external;\\n\\n function setMaxContributorsPerGarden(uint256 _newMax) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function gardenNFT() external view returns (address);\\n\\n function strategyNFT() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\\n\\n function uniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0xdee5a27301c24f507d312f32249487fa9b0a756062a7e479405a1d1ee9ee7bb8\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function isGardenStrategy(address _strategy) external view returns (bool);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategyActiveInGarden(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to,\\n bool _withPenalty\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x88f1786ffee23e386aaa1735177912e1b5a7cdd440dafe52fb139fe50fd621b4\",\"license\":\"Apache License\"},\"contracts/interfaces/IOperation.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from './IGarden.sol';\\nimport {IStrategy} from './IStrategy.sol';\\n\\n/**\\n * @title IOperation\\n * @author Babylon Finance\\n *\\n * Interface for an strategy operation\\n */\\ninterface IOperation {\\n function validateOperation(\\n address _data,\\n IGarden _garden,\\n address _integration,\\n uint256 _index\\n ) external view;\\n\\n function executeOperation(\\n address _asset,\\n uint256 _capital,\\n uint8 _assetStatus,\\n address _data,\\n IGarden _garden,\\n address _integration\\n )\\n external\\n returns (\\n address,\\n uint256,\\n uint8\\n );\\n\\n function exitOperation(\\n uint256 _percentage,\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external;\\n\\n function getNAV(\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external view returns (uint256);\\n\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x856e173e6c8e1fdbe54988df58d0805a23a6a2f8408bd4f90a488a1978e762ed\",\"license\":\"Apache License\"},\"contracts/interfaces/IPriceOracle.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol IPriceOracle)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPriceOracle\\n * @author Babylon Finance\\n *\\n * Interface for interacting with PriceOracle\\n */\\ninterface IPriceOracle {\\n /* ============ Functions ============ */\\n\\n function getPrice(address _assetOne, address _assetTwo) external view returns (uint256);\\n\\n function updateAdapters(address _assetOne, address _assetTwo) external;\\n}\\n\",\"keccak256\":\"0xa22e0e5e166f6f6714553b736ee921b916c37bc5b557042bf6042cc010d2a041\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n address,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x850597ec9a68eb86f31f13b6b77d3b31350b4ed3d0019dedfbd3550ad1a1d9e2\",\"license\":\"Apache License\"},\"contracts/interfaces/ITradeIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title ITrade\\n * @author Babylon Finance\\n *\\n * Interface for trading protocol integrations\\n */\\ninterface ITradeIntegration {\\n function trade(\\n address _strategy,\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken,\\n uint256 _minReceiveQuantity\\n ) external;\\n\\n function getConversionRates(\\n address _sourceToken,\\n address _destinationToken,\\n uint256 _sourceQuantity\\n ) external returns (uint256, uint256);\\n}\\n\",\"keccak256\":\"0x95df25f2cbfd3d82a9e22c9202f9fc2c497e90fd6e5fcfb00c4162f6447c0cbd\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"contracts/strategies/operations/BuyOperation.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {Operation} from './Operation.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\\nimport {ITradeIntegration} from '../../interfaces/ITradeIntegration.sol';\\n\\n/**\\n * @title BuyOperation\\n * @author Babylon Finance\\n *\\n * Executes a buy operation\\n */\\ncontract BuyOperation is Operation {\\n using PreciseUnitMath for uint256;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _controller Address of the controller\\n */\\n constructor(string memory _name, address _controller) Operation(_name, _controller) {}\\n\\n /**\\n * Sets operation data for the buy operation\\n *\\n * @param _data Operation data\\n */\\n function validateOperation(\\n address _data,\\n IGarden _garden,\\n address, /* _integration */\\n uint256 /* _index */\\n ) external view override onlyStrategy {\\n require(_data != _garden.reserveAsset(), 'Receive token must be different');\\n }\\n\\n /**\\n * Executes the buy operation\\n * @param _capital Amount of capital received from the garden\\n */\\n function executeOperation(\\n address _asset,\\n uint256 _capital,\\n uint8, /* _assetStatus */\\n address _data,\\n IGarden, /* _garden */\\n address /* _integration */\\n )\\n external\\n override\\n onlyStrategy\\n returns (\\n address,\\n uint256,\\n uint8\\n )\\n {\\n IStrategy(msg.sender).trade(_asset, _capital, _data);\\n return (_data, IERC20(_data).balanceOf(address(msg.sender)), 0); // liquid\\n }\\n\\n /**\\n * Exits the buy operation.\\n * @param _percentage of capital to exit from the strategy\\n */\\n function exitOperation(\\n uint256 _percentage,\\n address _data,\\n IGarden _garden,\\n address /* _integration */\\n ) external override onlyStrategy {\\n require(_percentage <= 100e18, 'Unwind Percentage <= 100%');\\n IStrategy(msg.sender).trade(\\n _data,\\n IERC20(_data).balanceOf(address(msg.sender)).preciseMul(_percentage),\\n _garden.reserveAsset()\\n );\\n }\\n\\n /**\\n * Gets the NAV of the buy op in the reserve asset\\n *\\n * @return _nav NAV of the strategy\\n */\\n function getNAV(\\n address _data,\\n IGarden _garden,\\n address /* _integration */\\n ) external view override returns (uint256) {\\n if (!IStrategy(msg.sender).isStrategyActive()) {\\n return 0;\\n }\\n uint256 price = _getPrice(_garden.reserveAsset(), _data);\\n uint256 NAV = _normalizeDecimals(_data, IERC20(_data).balanceOf(msg.sender)).preciseDiv(price);\\n require(NAV != 0, 'NAV has to be bigger 0');\\n return NAV;\\n }\\n}\\n\",\"keccak256\":\"0xef4cf4e1c6257ab32e28bb12937acbd91b012b08f6dc628fa33b9dac740799e4\",\"license\":\"Apache License\"},\"contracts/strategies/operations/Operation.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {IOperation} from '../../interfaces/IOperation.sol';\\nimport {ITradeIntegration} from '../../interfaces/ITradeIntegration.sol';\\nimport {IPriceOracle} from '../../interfaces/IPriceOracle.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\n\\n/**\\n * @title LongStrategy\\n * @author Babylon Finance\\n *\\n * Holds the data for a long strategy\\n */\\nabstract contract Operation is IOperation {\\n using SafeMath for uint256;\\n /* ============ Modifiers ============ */\\n\\n modifier onlyStrategy() {\\n IStrategy strategy = IStrategy(msg.sender);\\n IGarden garden = strategy.garden();\\n require(IBabController(controller).isSystemContract(address(garden)), 'Only a garden can call this');\\n require(garden.isStrategyActiveInGarden(msg.sender), 'Sender must be a strategy');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n uint256 internal constant SLIPPAGE_ALLOWED = 1e16; // 1%\\n uint256 internal constant HUNDRED_PERCENT = 1e18; // 100%\\n address internal constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\\n\\n // Address of the controller\\n address public controller;\\n // Name of the operation\\n string public name;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _controller Address of the controller\\n */\\n constructor(string memory _name, address _controller) {\\n require(_controller != address(0), 'Controller must be defined');\\n name = _name;\\n controller = _controller;\\n }\\n\\n /* ============ Virtual External Functions ============ */\\n\\n function validateOperation(\\n address _data,\\n IGarden _garden,\\n address _integration,\\n uint256 _index\\n ) external view virtual override;\\n\\n function executeOperation(\\n address _asset,\\n uint256 _capital,\\n uint8 _assetStatus,\\n address _data,\\n IGarden _garden,\\n address _integration\\n )\\n external\\n virtual\\n override\\n returns (\\n address,\\n uint256,\\n uint8\\n );\\n\\n function exitOperation(\\n uint256 _percentage,\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external virtual override;\\n\\n function getNAV(\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external view virtual override returns (uint256);\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the name of the operation\\n */\\n function getName() external view override returns (string memory) {\\n return name;\\n }\\n\\n /**\\n * Returns the price of the pair through the price oracle\\n */\\n function _getPrice(address _assetOne, address _assetTwo) internal view returns (uint256) {\\n IPriceOracle oracle = IPriceOracle(IBabController(controller).priceOracle());\\n return oracle.getPrice(_assetOne, _assetTwo);\\n }\\n\\n function _normalizeDecimals(address _asset, uint256 _quantity) internal view returns (uint256) {\\n uint8 tokenDecimals = ERC20(_asset).decimals();\\n return tokenDecimals != 18 ? _quantity.mul(10**(18 - tokenDecimals)) : _quantity;\\n }\\n}\\n\",\"keccak256\":\"0x0baba132298f5c3b3082ee381eed5314ab4587179905af9635e038c1b1845418\",\"license\":\"Apache License\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50604051620014c5380380620014c5833981810160405260408110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001519150829050816001600160a01b03811662000150576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c6572206d75737420626520646566696e6564000000000000604482015290519081900360640190fd5b81516200016590600190602085019062000190565b50600080546001600160a01b0319166001600160a01b0392909216919091179055506200023c915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001c8576000855562000213565b82601f10620001e357805160ff191683800117855562000213565b8280016001018555821562000213579182015b8281111562000213578251825591602001919060010190620001f6565b506200022192915062000225565b5090565b5b8082111562000221576000815560010162000226565b611279806200024c6000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80634222326a1161005b5780634222326a1461014757806355d9750b14610191578063c8cd307514610209578063f77c4791146102455761007d565b806306fdde031461008257806317d7de7c146100ff578063419ea18a14610107575b600080fd5b61008a610269565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100c45781810151838201526020016100ac565b50505050905090810190601f1680156100f15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61008a6102f6565b6101456004803603608081101561011d57600080fd5b508035906001600160a01b03602082013581169160408101358216916060909101351661038b565b005b61017f6004803603606081101561015d57600080fd5b506001600160a01b03813581169160208101358216916040909101351661077e565b60408051918252519081900360200190f35b6101de600480360360c08110156101a757600080fd5b506001600160a01b03813581169160208101359160ff604083013516916060810135821691608082013581169160a0013516610950565b604080516001600160a01b039094168452602084019290925260ff1682820152519081900360600190f35b6101456004803603608081101561021f57600080fd5b506001600160a01b03813581169160208101358216916040820135169060600135610c8d565b61024d610f54565b604080516001600160a01b039092168252519081900360200190f35b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102ee5780601f106102c3576101008083540402835291602001916102ee565b820191906000526020600020905b8154815290600101906020018083116102d157829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156103815780601f1061035657610100808354040283529160200191610381565b820191906000526020600020905b81548152906001019060200180831161036457829003601f168201915b5050505050905090565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156103cb57600080fd5b505afa1580156103df573d6000803e3d6000fd5b505050506040513d60208110156103f557600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561044657600080fd5b505afa15801561045a573d6000803e3d6000fd5b505050506040513d602081101561047057600080fd5b50516104c3576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b6040805162bd5cf960e51b815233600482015290516001600160a01b038316916317ab9f20916024808301926020929190829003018186803b15801561050857600080fd5b505afa15801561051c573d6000803e3d6000fd5b505050506040513d602081101561053257600080fd5b5051610585576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b68056bc75e2d631000008611156105e3576040805162461bcd60e51b815260206004820152601960248201527f556e77696e642050657263656e74616765203c3d203130302500000000000000604482015290519081900360640190fd5b336001600160a01b0316630e32db528661067689896001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561064457600080fd5b505afa158015610658573d6000803e3d6000fd5b505050506040513d602081101561066e57600080fd5b505190610f63565b876001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b1580156106af57600080fd5b505afa1580156106c3573d6000803e3d6000fd5b505050506040513d60208110156106d957600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b1681526001600160a01b039485166004820152602481019390935292166044820152905160648083019260209291908290030181600087803b15801561074a57600080fd5b505af115801561075e573d6000803e3d6000fd5b505050506040513d602081101561077457600080fd5b5050505050505050565b6000336001600160a01b031663e4df5e1a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156107b957600080fd5b505afa1580156107cd573d6000803e3d6000fd5b505050506040513d60208110156107e357600080fd5b50516107f157506000610949565b6000610861846001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561082f57600080fd5b505afa158015610843573d6000803e3d6000fd5b505050506040513d602081101561085957600080fd5b505186610f8a565b905060006108f1826108eb88896001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156108ba57600080fd5b505afa1580156108ce573d6000803e3d6000fd5b505050506040513d60208110156108e457600080fd5b50516110b6565b9061114e565b905080610945576040805162461bcd60e51b815260206004820152601660248201527f4e41562068617320746f20626520626967676572203000000000000000000000604482015290519081900360640190fd5b9150505b9392505050565b6000806000803390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b15801561099457600080fd5b505afa1580156109a8573d6000803e3d6000fd5b505050506040513d60208110156109be57600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b158015610a0f57600080fd5b505afa158015610a23573d6000803e3d6000fd5b505050506040513d6020811015610a3957600080fd5b5051610a8c576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b6040805162bd5cf960e51b815233600482015290516001600160a01b038316916317ab9f20916024808301926020929190829003018186803b158015610ad157600080fd5b505afa158015610ae5573d6000803e3d6000fd5b505050506040513d6020811015610afb57600080fd5b5051610b4e576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b604080517f0e32db520000000000000000000000000000000000000000000000000000000081526001600160a01b038d81166004830152602482018d90528a16604482015290513391630e32db529160648083019260209291908290030181600087803b158015610bbe57600080fd5b505af1158015610bd2573d6000803e3d6000fd5b505050506040513d6020811015610be857600080fd5b5050604080517f70a08231000000000000000000000000000000000000000000000000000000008152336004820152905189916001600160a01b038316916370a0823191602480820192602092909190829003018186803b158015610c4c57600080fd5b505afa158015610c60573d6000803e3d6000fd5b505050506040513d6020811015610c7657600080fd5b5051909c909b5060009a5098505050505050505050565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015610ccd57600080fd5b505afa158015610ce1573d6000803e3d6000fd5b505050506040513d6020811015610cf757600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b158015610d4857600080fd5b505afa158015610d5c573d6000803e3d6000fd5b505050506040513d6020811015610d7257600080fd5b5051610dc5576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b6040805162bd5cf960e51b815233600482015290516001600160a01b038316916317ab9f20916024808301926020929190829003018186803b158015610e0a57600080fd5b505afa158015610e1e573d6000803e3d6000fd5b505050506040513d6020811015610e3457600080fd5b5051610e87576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b846001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b158015610ec057600080fd5b505afa158015610ed4573d6000803e3d6000fd5b505050506040513d6020811015610eea57600080fd5b50516001600160a01b0387811691161415610f4c576040805162461bcd60e51b815260206004820152601f60248201527f5265636569766520746f6b656e206d75737420626520646966666572656e7400604482015290519081900360640190fd5b505050505050565b6000546001600160a01b031681565b6000610f81670de0b6b3a7640000610f7b8585611162565b906111bb565b90505b92915050565b60008054604080517f2630c12f000000000000000000000000000000000000000000000000000000008152905183926001600160a01b031691632630c12f916004808301926020929190829003018186803b158015610fe857600080fd5b505afa158015610ffc573d6000803e3d6000fd5b505050506040513d602081101561101257600080fd5b5051604080517fac41865a0000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152868116602483015291519293509083169163ac41865a91604480820192602092909190829003018186803b15801561108257600080fd5b505afa158015611096573d6000803e3d6000fd5b505050506040513d60208110156110ac57600080fd5b5051949350505050565b600080836001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156110f257600080fd5b505afa158015611106573d6000803e3d6000fd5b505050506040513d602081101561111c57600080fd5b50519050601260ff821614156111325782611146565b6111468360ff601284900316600a0a611162565b949350505050565b6000610f8182610f7b85670de0b6b3a76400005b60008261117157506000610f84565b8282028284828161117e57fe5b0414610f815760405162461bcd60e51b81526004018080602001828103825260218152602001806112236021913960400191505060405180910390fd5b6000808211611211576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161121a57fe5b04939250505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220de700a138fa2ac7864f8371b4238bcd5528cab21b85b69936e097e22b3c0437864736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80634222326a1161005b5780634222326a1461014757806355d9750b14610191578063c8cd307514610209578063f77c4791146102455761007d565b806306fdde031461008257806317d7de7c146100ff578063419ea18a14610107575b600080fd5b61008a610269565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100c45781810151838201526020016100ac565b50505050905090810190601f1680156100f15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61008a6102f6565b6101456004803603608081101561011d57600080fd5b508035906001600160a01b03602082013581169160408101358216916060909101351661038b565b005b61017f6004803603606081101561015d57600080fd5b506001600160a01b03813581169160208101358216916040909101351661077e565b60408051918252519081900360200190f35b6101de600480360360c08110156101a757600080fd5b506001600160a01b03813581169160208101359160ff604083013516916060810135821691608082013581169160a0013516610950565b604080516001600160a01b039094168452602084019290925260ff1682820152519081900360600190f35b6101456004803603608081101561021f57600080fd5b506001600160a01b03813581169160208101358216916040820135169060600135610c8d565b61024d610f54565b604080516001600160a01b039092168252519081900360200190f35b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102ee5780601f106102c3576101008083540402835291602001916102ee565b820191906000526020600020905b8154815290600101906020018083116102d157829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156103815780601f1061035657610100808354040283529160200191610381565b820191906000526020600020905b81548152906001019060200180831161036457829003601f168201915b5050505050905090565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156103cb57600080fd5b505afa1580156103df573d6000803e3d6000fd5b505050506040513d60208110156103f557600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561044657600080fd5b505afa15801561045a573d6000803e3d6000fd5b505050506040513d602081101561047057600080fd5b50516104c3576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b6040805162bd5cf960e51b815233600482015290516001600160a01b038316916317ab9f20916024808301926020929190829003018186803b15801561050857600080fd5b505afa15801561051c573d6000803e3d6000fd5b505050506040513d602081101561053257600080fd5b5051610585576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b68056bc75e2d631000008611156105e3576040805162461bcd60e51b815260206004820152601960248201527f556e77696e642050657263656e74616765203c3d203130302500000000000000604482015290519081900360640190fd5b336001600160a01b0316630e32db528661067689896001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561064457600080fd5b505afa158015610658573d6000803e3d6000fd5b505050506040513d602081101561066e57600080fd5b505190610f63565b876001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b1580156106af57600080fd5b505afa1580156106c3573d6000803e3d6000fd5b505050506040513d60208110156106d957600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b1681526001600160a01b039485166004820152602481019390935292166044820152905160648083019260209291908290030181600087803b15801561074a57600080fd5b505af115801561075e573d6000803e3d6000fd5b505050506040513d602081101561077457600080fd5b5050505050505050565b6000336001600160a01b031663e4df5e1a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156107b957600080fd5b505afa1580156107cd573d6000803e3d6000fd5b505050506040513d60208110156107e357600080fd5b50516107f157506000610949565b6000610861846001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561082f57600080fd5b505afa158015610843573d6000803e3d6000fd5b505050506040513d602081101561085957600080fd5b505186610f8a565b905060006108f1826108eb88896001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156108ba57600080fd5b505afa1580156108ce573d6000803e3d6000fd5b505050506040513d60208110156108e457600080fd5b50516110b6565b9061114e565b905080610945576040805162461bcd60e51b815260206004820152601660248201527f4e41562068617320746f20626520626967676572203000000000000000000000604482015290519081900360640190fd5b9150505b9392505050565b6000806000803390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b15801561099457600080fd5b505afa1580156109a8573d6000803e3d6000fd5b505050506040513d60208110156109be57600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b158015610a0f57600080fd5b505afa158015610a23573d6000803e3d6000fd5b505050506040513d6020811015610a3957600080fd5b5051610a8c576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b6040805162bd5cf960e51b815233600482015290516001600160a01b038316916317ab9f20916024808301926020929190829003018186803b158015610ad157600080fd5b505afa158015610ae5573d6000803e3d6000fd5b505050506040513d6020811015610afb57600080fd5b5051610b4e576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b604080517f0e32db520000000000000000000000000000000000000000000000000000000081526001600160a01b038d81166004830152602482018d90528a16604482015290513391630e32db529160648083019260209291908290030181600087803b158015610bbe57600080fd5b505af1158015610bd2573d6000803e3d6000fd5b505050506040513d6020811015610be857600080fd5b5050604080517f70a08231000000000000000000000000000000000000000000000000000000008152336004820152905189916001600160a01b038316916370a0823191602480820192602092909190829003018186803b158015610c4c57600080fd5b505afa158015610c60573d6000803e3d6000fd5b505050506040513d6020811015610c7657600080fd5b5051909c909b5060009a5098505050505050505050565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015610ccd57600080fd5b505afa158015610ce1573d6000803e3d6000fd5b505050506040513d6020811015610cf757600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b158015610d4857600080fd5b505afa158015610d5c573d6000803e3d6000fd5b505050506040513d6020811015610d7257600080fd5b5051610dc5576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b6040805162bd5cf960e51b815233600482015290516001600160a01b038316916317ab9f20916024808301926020929190829003018186803b158015610e0a57600080fd5b505afa158015610e1e573d6000803e3d6000fd5b505050506040513d6020811015610e3457600080fd5b5051610e87576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b846001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b158015610ec057600080fd5b505afa158015610ed4573d6000803e3d6000fd5b505050506040513d6020811015610eea57600080fd5b50516001600160a01b0387811691161415610f4c576040805162461bcd60e51b815260206004820152601f60248201527f5265636569766520746f6b656e206d75737420626520646966666572656e7400604482015290519081900360640190fd5b505050505050565b6000546001600160a01b031681565b6000610f81670de0b6b3a7640000610f7b8585611162565b906111bb565b90505b92915050565b60008054604080517f2630c12f000000000000000000000000000000000000000000000000000000008152905183926001600160a01b031691632630c12f916004808301926020929190829003018186803b158015610fe857600080fd5b505afa158015610ffc573d6000803e3d6000fd5b505050506040513d602081101561101257600080fd5b5051604080517fac41865a0000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152868116602483015291519293509083169163ac41865a91604480820192602092909190829003018186803b15801561108257600080fd5b505afa158015611096573d6000803e3d6000fd5b505050506040513d60208110156110ac57600080fd5b5051949350505050565b600080836001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156110f257600080fd5b505afa158015611106573d6000803e3d6000fd5b505050506040513d602081101561111c57600080fd5b50519050601260ff821614156111325782611146565b6111468360ff601284900316600a0a611162565b949350505050565b6000610f8182610f7b85670de0b6b3a76400005b60008261117157506000610f84565b8282028284828161117e57fe5b0414610f815760405162461bcd60e51b81526004018080602001828103825260218152602001806112236021913960400191505060405180910390fd5b6000808211611211576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161121a57fe5b04939250505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220de700a138fa2ac7864f8371b4238bcd5528cab21b85b69936e097e22b3c0437864736f6c63430007060033", "devdoc": { "author": "Babylon Finance Executes a buy operation", "kind": "dev", @@ -281,7 +281,7 @@ "storageLayout": { "storage": [ { - "astId": 33459, + "astId": 33052, "contract": "contracts/strategies/operations/BuyOperation.sol:BuyOperation", "label": "controller", "offset": 0, @@ -289,7 +289,7 @@ "type": "t_address" }, { - "astId": 33461, + "astId": 33054, "contract": "contracts/strategies/operations/BuyOperation.sol:BuyOperation", "label": "name", "offset": 0, diff --git a/deployments/artifacts/mainnet/CompoundLendIntegration.json b/deployments/artifacts/mainnet/CompoundLendIntegration.json index 67d7331c5..781051733 100644 --- a/deployments/artifacts/mainnet/CompoundLendIntegration.json +++ b/deployments/artifacts/mainnet/CompoundLendIntegration.json @@ -1,5 +1,5 @@ { - "address": "0xCfBA8914e3C543DEd1753a71999BEd53d169855D", + "address": "0xc0b3995D78Ae5a6aD9A5438e3D62CD0085BDAA57", "abi": [ { "inputs": [ @@ -331,30 +331,30 @@ "type": "function" } ], - "transactionHash": "0xf65019141a34fb7e8ffbd3254c901a03bf6db64ca9dd7e9446980306168e1550", + "transactionHash": "0xfda0129a481c05f08b1e469d263e324a1d686cdf795efaee99754044d4f2d0e8", "receipt": { "to": null, "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", - "contractAddress": "0xCfBA8914e3C543DEd1753a71999BEd53d169855D", - "transactionIndex": 18, + "contractAddress": "0xc0b3995D78Ae5a6aD9A5438e3D62CD0085BDAA57", + "transactionIndex": 86, "gasUsed": "1408134", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x1eb586b4d322b379475fc743cd5ddb9bdde59a16f51fb73d5d2739db19ca2fd0", - "transactionHash": "0xf65019141a34fb7e8ffbd3254c901a03bf6db64ca9dd7e9446980306168e1550", + "blockHash": "0x92dcab74597991c2972a8a835b298133b3418b1a9ef8b31464c985c39e0d317a", + "transactionHash": "0xfda0129a481c05f08b1e469d263e324a1d686cdf795efaee99754044d4f2d0e8", "logs": [], - "blockNumber": 12361009, - "cumulativeGasUsed": "2643004", + "blockNumber": 12451319, + "cumulativeGasUsed": "7282952", "status": 1, "byzantium": true }, "args": [ - "0xffe7c30daDb1B132b86aB7bbede496615d54c8Ac", + "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F", "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" ], - "solcInputHash": "a02a2075cf667a20c416d2d0a5e8f337", - "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"garden\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assetToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"numTokensToRedeem\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"protocolFee\",\"type\":\"uint256\"}],\"name\":\"TokensRedeemed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"garden\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assetToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"numTokensToSupply\",\"type\":\"uint256\"}],\"name\":\"TokensSupplied\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"assetToCToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_assetToken\",\"type\":\"address\"}],\"name\":\"getExchangeRatePerToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_assetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_numTokensToSupply\",\"type\":\"uint256\"}],\"name\":\"getExpectedShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_assetToken\",\"type\":\"address\"}],\"name\":\"getInvestmentToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"initializedByGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_investmentAddress\",\"type\":\"address\"}],\"name\":\"isInvestment\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_assetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_numTokensToRedeem\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minAmountExpected\",\"type\":\"uint256\"}],\"name\":\"redeemTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_assetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_numTokensToSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minAmountExpected\",\"type\":\"uint256\"}],\"name\":\"supplyTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_assetAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_cTokenAddress\",\"type\":\"address\"}],\"name\":\"updateCTokenMapping\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Protocol Compound lend integration.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of the controller\",\"_weth\":\"Address of the WETH ERC20\"}},\"getExpectedShares(address,uint256)\":{\"params\":{\"_numTokensToSupply\":\"Amount of ERC20 tokens to supply\"},\"returns\":{\"_0\":\"uint256 Amount of supply tokens to receive\"}},\"isInvestment(address)\":{\"params\":{\"_investmentAddress\":\"Investment address to check\"},\"returns\":{\"_0\":\"bool True if the address is a investment\"}}},\"title\":\"CompoundLendIntegration\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates the integration\"},\"getExpectedShares(address,uint256)\":{\"notice\":\"Gets the amount of cTokens expected to get after depositing ERC20 asset.\"},\"getName()\":{\"notice\":\"Returns the name of the integration\"},\"isInvestment(address)\":{\"notice\":\"Checks whether an investment address is valid\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/integrations/lend/CompoundLendIntegration.sol\":\"CompoundLendIntegration\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\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 /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\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, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x7b2b8baa20fd60ab4a328c8e34c64a353651b80ba4b5b157cbb61813f6f85d55\",\"license\":\"MIT\"},\"contracts/integrations/BaseIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IIntegration} from '../interfaces/IIntegration.sol';\\nimport {IWETH} from '../interfaces/external/weth/IWETH.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\n\\n/**\\n * @title BaseIntegration\\n * @author Babylon Finance\\n *\\n * Abstract class that houses common Integration-related state and functions.\\n */\\nabstract contract BaseIntegration {\\n using SafeCast for int256;\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlySystemContract() {\\n require(IBabController(controller).isSystemContract(msg.sender), 'Only system can call this');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the controller\\n address public controller;\\n // Wrapped ETH address\\n address public immutable weth;\\n // Name of the integration\\n string public name;\\n mapping(address => bool) public initializedByGarden;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) {\\n require(_controller != address(0), 'Controller must be defined');\\n name = _name;\\n controller = _controller;\\n weth = _weth;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the name of the integration\\n */\\n function getName() external view returns (string memory) {\\n return name;\\n }\\n}\\n\",\"keccak256\":\"0xf15da8b024a5a4f205b363420cb5851fd1c4225970999aed5f00d829bbd4f638\",\"license\":\"Apache License\"},\"contracts/integrations/lend/CompoundLendIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\nimport {ICToken} from '../../interfaces/external/compound/ICToken.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\nimport {LendIntegration} from './LendIntegration.sol';\\n\\n/**\\n * @title CompoundLendIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Compound lend integration.\\n */\\ncontract CompoundLendIntegration is LendIntegration {\\n using SafeMath for uint256;\\n using SafeCast for uint256;\\n\\n /* ============ Modifiers ============ */\\n\\n /**\\n * Throws if the sender is not the protocol\\n */\\n modifier onlyProtocol() {\\n require(msg.sender == controller, 'Only controller can call this');\\n _;\\n }\\n\\n /* ============ Constant ============ */\\n\\n address internal constant cETH = 0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5;\\n // Mapping of asset addresses to cToken addresses\\n mapping(address => address) public assetToCToken;\\n\\n /* ============ Struct ============ */\\n\\n /* ============ Events ============ */\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n constructor(address _controller, address _weth) LendIntegration('compoundlend', _weth, _controller) {\\n assetToCToken[0x6B175474E89094C44Da98b954EedeAC495271d0F] = 0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643; // DAI\\n assetToCToken[0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984] = 0x35A18000230DA775CAc24873d00Ff85BccdeD550; // UNI\\n assetToCToken[0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2] = 0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5; // WETH\\n assetToCToken[0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48] = 0x39AA39c021dfbaE8faC545936693aC917d5E7563; // USDC\\n assetToCToken[0xdAC17F958D2ee523a2206206994597C13D831ec7] = 0xf650C3d88D12dB855b8bf7D11Be6C55A4e07dCC9; // USDT\\n assetToCToken[0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599] = 0xC11b1268C1A384e55C48c2391d8d480264A3A7F4; // WBTC\\n assetToCToken[0xc00e94Cb662C3520282E6f5717214004A7f26888] = 0x70e36f6BF80a52b3B46b3aF8e106CC0ed743E8e4; // COMP\\n }\\n\\n /* ============ External Functions ============ */\\n\\n // Governance function\\n function updateCTokenMapping(address _assetAddress, address _cTokenAddress) external onlyProtocol {\\n assetToCToken[_assetAddress] = _cTokenAddress;\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n function _isInvestment(address _assetToken) internal view override returns (bool) {\\n return assetToCToken[_assetToken] != address(0);\\n }\\n\\n function _getExpectedShares(address _assetToken, uint256 _numTokensToSupply)\\n internal\\n view\\n override\\n returns (uint256)\\n {\\n uint256 oneCTokenInUderlying = _getExchangeRatePerToken(_assetToken);\\n return oneCTokenInUderlying.mul(_numTokensToSupply).div(10**18);\\n }\\n\\n // TODO: Test this\\n function _getExchangeRatePerToken(address _assetToken) internal view override returns (uint256) {\\n address cToken = assetToCToken[_assetToken];\\n uint256 exchangeRateCurrent = ICToken(cToken).exchangeRateStored();\\n // TODO: exchangeRateCurrent reverts wit no reason. Super strange.\\n // uint256 exchangeRateCurrent = ICToken(cToken).exchangeRateCurrent();\\n uint8 assetDecimals = ERC20(_assetToken).decimals();\\n // cTokens always have 8 decimals.\\n if (assetDecimals < 8) {\\n uint256 mantissa = 8 - assetDecimals;\\n return exchangeRateCurrent.mul(10**mantissa);\\n } else {\\n uint256 mantissa = assetDecimals - 8;\\n return exchangeRateCurrent.div(10**mantissa);\\n }\\n }\\n\\n function _getRedeemCalldata(\\n address, /* _strategy */\\n address _assetToken,\\n uint256 _numTokensToSupply\\n )\\n internal\\n view\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n // Encode method data for Garden to invoke\\n bytes memory methodData = abi.encodeWithSignature('redeem(uint256)', _numTokensToSupply);\\n\\n return (assetToCToken[_assetToken], 0, methodData);\\n }\\n\\n /**\\n * Returns calldata for supplying tokens.\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getSupplyCalldata(\\n address, /* _strategy */\\n address _assetToken,\\n uint256 _numTokensToSupply\\n )\\n internal\\n view\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n // Encode method data for Garden to invoke\\n bytes memory methodData = abi.encodeWithSignature('mint(uint256)', _numTokensToSupply);\\n // If it is ETH, send the value\\n return (assetToCToken[_assetToken], assetToCToken[_assetToken] == cETH ? _numTokensToSupply : 0, methodData);\\n }\\n\\n function _getSpender(address _assetToken) internal view override returns (address) {\\n return assetToCToken[_assetToken];\\n }\\n\\n function _getInvestmentToken(address _assetToken) internal view override returns (address) {\\n return assetToCToken[_assetToken];\\n }\\n}\\n\",\"keccak256\":\"0x4aad4338dce4f51f1f3530c7931cc28d433fc1c2d8be45712ab2ac767fb02760\",\"license\":\"Apache License\"},\"contracts/integrations/lend/LendIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\n\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\nimport {ILendIntegration} from '../../interfaces/ILendIntegration.sol';\\n\\nimport {BaseIntegration} from '../BaseIntegration.sol';\\n\\n/**\\n * @title LendIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Base class for integration with passive investments like Yearn, Indexed\\n */\\nabstract contract LendIntegration is BaseIntegration, ReentrancyGuard, ILendIntegration {\\n using SafeMath for uint256;\\n using SafeCast for uint256;\\n\\n /* ============ Struct ============ */\\n struct InvestmentInfo {\\n IStrategy strategy; // Strategy address\\n IGarden garden; // Garden address\\n address assetToken;\\n address investment; // Investment address\\n uint256 investmentTokensInTransaction; // Investment tokens affected by this transaction\\n uint256 investmentTokensInGarden; // Investment tokens garden balance\\n uint256 limitDepositTokenQuantity; // Limit deposit/withdrawal token amount\\n }\\n\\n /* ============ Events ============ */\\n\\n event TokensSupplied(\\n address indexed garden,\\n address indexed strategy,\\n address indexed assetToken,\\n uint256 numTokensToSupply\\n );\\n\\n event TokensRedeemed(\\n address indexed garden,\\n address indexed strategy,\\n address indexed assetToken,\\n uint256 numTokensToRedeem,\\n uint256 protocolFee\\n );\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) BaseIntegration(_name, _weth, _controller) {}\\n\\n /* ============ External Functions ============ */\\n function getInvestmentToken(address _assetToken) external view override returns (address) {\\n return _getInvestmentToken(_assetToken);\\n }\\n\\n /**\\n * Checks whether an investment address is valid\\n *\\n * @param _investmentAddress Investment address to check\\n * @return bool True if the address is a investment\\n */\\n function isInvestment(address _investmentAddress) external view returns (bool) {\\n return _isInvestment(_investmentAddress);\\n }\\n\\n function supplyTokens(\\n address _strategy,\\n address _assetToken,\\n uint256 _numTokensToSupply,\\n uint256 _minAmountExpected\\n ) external override {\\n InvestmentInfo memory investmentInfo =\\n _createInvestmentInfo(\\n _strategy,\\n _assetToken,\\n _getInvestmentToken(_assetToken),\\n _numTokensToSupply,\\n _minAmountExpected\\n );\\n\\n _validatePreJoinInvestmentData(investmentInfo);\\n\\n investmentInfo.strategy.invokeApprove(_getSpender(_assetToken), _assetToken, _numTokensToSupply);\\n\\n (address targetInvestment, uint256 callValue, bytes memory methodData) =\\n _getSupplyCalldata(_strategy, _assetToken, _numTokensToSupply);\\n\\n investmentInfo.strategy.invokeFromIntegration(targetInvestment, callValue, methodData);\\n _validatePostEnterInvestmentData(investmentInfo);\\n\\n emit TokensSupplied(\\n address(investmentInfo.garden),\\n address(investmentInfo.strategy),\\n _assetToken,\\n _numTokensToSupply\\n );\\n }\\n\\n function redeemTokens(\\n address _strategy,\\n address _assetToken,\\n uint256 _numTokensToRedeem,\\n uint256 _minAmountExpected\\n ) external override {\\n InvestmentInfo memory investmentInfo =\\n _createInvestmentInfo(\\n _strategy,\\n _assetToken,\\n _getInvestmentToken(_assetToken),\\n _numTokensToRedeem,\\n _minAmountExpected\\n );\\n\\n _validatePreExitInvestmentData(investmentInfo);\\n\\n (address targetInvestment, uint256 callValue, bytes memory methodData) =\\n _getRedeemCalldata(_strategy, _assetToken, _numTokensToRedeem);\\n\\n investmentInfo.strategy.invokeFromIntegration(targetInvestment, callValue, methodData);\\n\\n _validatePostExitInvestmentData(investmentInfo);\\n\\n emit TokensSupplied(\\n address(investmentInfo.garden),\\n address(investmentInfo.strategy),\\n _assetToken,\\n _numTokensToRedeem\\n );\\n }\\n\\n function getExchangeRatePerToken(address _assetToken) external view override returns (uint256) {\\n return _getExchangeRatePerToken(_assetToken);\\n }\\n\\n /**\\n * Gets the amount of cTokens expected to get after depositing ERC20 asset.\\n *\\n * @param _numTokensToSupply Amount of ERC20 tokens to supply\\n * @return uint256 Amount of supply tokens to receive\\n */\\n function getExpectedShares(address _assetToken, uint256 _numTokensToSupply)\\n external\\n view\\n override\\n returns (uint256)\\n {\\n return _getExpectedShares(_assetToken, _numTokensToSupply);\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Validate pre investment join data. Check investment is valid, token quantity is valid.\\n *\\n * @param _investmentInfo Struct containing investment information used in internal functions\\n */\\n function _validatePreJoinInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\\n require(_isInvestment(_investmentInfo.assetToken), 'The investment address is not valid');\\n require(\\n _investmentInfo.investmentTokensInTransaction > 0,\\n 'Min investment tokens to receive must be greater than 0'\\n );\\n }\\n\\n /**\\n * Validate post enter investment data. Check investment is valid, token quantity is valid.\\n *\\n * @param _investmentInfo Struct containing investment information used in internal functions\\n */\\n function _validatePostEnterInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\\n require(\\n (IERC20(_investmentInfo.investment).balanceOf(address(_investmentInfo.strategy)) >\\n _investmentInfo.investmentTokensInGarden),\\n 'The garden did not receive the investment tokens'\\n );\\n }\\n\\n /**\\n * Validate post exit investment data. Check investment is valid, token quantity is valid.\\n *\\n * @param _investmentInfo Struct containing investment information used in internal functions\\n */\\n function _validatePostExitInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\\n require(\\n IERC20(_investmentInfo.investment).balanceOf(address(_investmentInfo.strategy)) ==\\n _investmentInfo.investmentTokensInGarden - _investmentInfo.investmentTokensInTransaction,\\n 'The garden did not return the investment tokens'\\n );\\n }\\n\\n /**\\n * Validate pre investment data. Check investment is valid, token quantity is valid.\\n *\\n * @param _investmentInfo Struct containing investment information used in internal functions\\n */\\n function _validatePreExitInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\\n require(_isInvestment(_investmentInfo.assetToken), 'The investment address is not valid');\\n require(\\n _investmentInfo.investmentTokensInTransaction > 0,\\n 'Investment tokens to exchange must be greater than 0'\\n );\\n require(\\n _investmentInfo.investmentTokensInGarden >= _investmentInfo.investmentTokensInTransaction,\\n 'The garden does not have enough investment tokens'\\n );\\n }\\n\\n function _isInvestment(\\n address //_investmentAddress\\n ) internal view virtual returns (bool);\\n\\n /**\\n * Create and return InvestmentInfo struct\\n *\\n * return InvestmentInfo Struct containing data for the investment\\n */\\n function _createInvestmentInfo(\\n address _strategy,\\n address _assetToken,\\n address _investmentToken,\\n uint256 _investmentTokensInTransaction,\\n uint256 _limitDepositToken\\n ) internal view returns (InvestmentInfo memory) {\\n InvestmentInfo memory investmentInfo;\\n investmentInfo.strategy = IStrategy(_strategy);\\n investmentInfo.garden = IGarden(investmentInfo.strategy.garden());\\n investmentInfo.assetToken = _assetToken;\\n investmentInfo.investment = _investmentToken;\\n investmentInfo.investmentTokensInGarden = IERC20(_investmentToken).balanceOf(_strategy);\\n investmentInfo.investmentTokensInTransaction = _investmentTokensInTransaction;\\n investmentInfo.limitDepositTokenQuantity = _limitDepositToken;\\n\\n return investmentInfo;\\n }\\n\\n function _getExpectedShares(address, uint256) internal view virtual returns (uint256);\\n\\n function _getExchangeRatePerToken(address) internal view virtual returns (uint256);\\n\\n function _getRedeemCalldata(\\n address, /* _strategy */\\n address, /* _assetToken */\\n uint256 /* _numTokensToSupply */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n /**\\n * Returns calldata for supplying tokens.\\n *\\n * hparam _strategy Address of the strat\\n * hparam _assetToken Address of the token\\n * hparam _numTokensToSupply Number of tokens\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getSupplyCalldata(\\n address, /* _strategy */\\n address, /* _assetToken */\\n uint256 /* _numTokensToSupply */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n function _getSpender(\\n address //_investmentAddress\\n ) internal view virtual returns (address);\\n\\n function _getInvestmentToken(\\n address //_investmentAddress\\n ) internal view virtual returns (address);\\n}\\n\",\"keccak256\":\"0xa4585ca96be145b71adcce3e6cb5814407d9ebb8bf8c14698a5c95d52d07cc2c\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityMinimum(uint256 _minRiskyPairLiquidityEth) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minRiskyPairLiquidityEth() external view returns (uint256);\\n\\n function getUniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0x57cf4ece98219f805a416e8c24728d30d9b37c4126d66785d2617b97e35ffae6\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function nftAddress() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategy(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function reenableEthForStrategies() external;\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x5e460136e0b45024ea1c1f32cde607f3ce75dd5b14cee34007d6bbd08beabc82\",\"license\":\"Apache License\"},\"contracts/interfaces/IIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIntegration\\n * @author Babylon Finance\\n *\\n * Interface for protocol integrations\\n */\\ninterface IIntegration {\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xee03c9274ddf3257e3bfd2bb229fea3412c9105f178e64174f59efeafd53182c\",\"license\":\"Apache License\"},\"contracts/interfaces/ILendIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title ILendIntegration\\n * @author Babylon Finance\\n *\\n * Interface for lending integrations such as Compound, Aave.\\n */\\ninterface ILendIntegration {\\n function supplyTokens(\\n address _strategy,\\n address _assetToken,\\n uint256 _numTokensToSupply,\\n uint256 _minAmountExpected\\n ) external;\\n\\n function redeemTokens(\\n address _strategy,\\n address _assetToken,\\n uint256 _numTokensToRedeem,\\n uint256 _minAmountExpected\\n ) external;\\n\\n function getExpectedShares(address _assetToken, uint256 _numTokensToSupply) external view returns (uint256);\\n\\n function getExchangeRatePerToken(address _assetToken) external view returns (uint256);\\n\\n function getInvestmentToken(address _assetToken) external view returns (address);\\n}\\n\",\"keccak256\":\"0x28ca8cb40b050139b7416224c43de2c14fa7991e0b3769f7bab349e3422fc34f\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital,\\n address _strategyNft\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function strategyNft() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x4396906e436eb68c96715e0a53ae1656ac5d7934ebdaeb58ec3c33953465bc39\",\"license\":\"Apache License\"},\"contracts/interfaces/external/compound/ICToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\ninterface ICToken {\\n function mint(uint256 mintAmount) external returns (uint256);\\n\\n function redeem(uint256 redeemTokens) external returns (uint256);\\n\\n function redeemUnderlying(uint256 redeemAmount) external returns (uint256);\\n\\n function borrow(uint256 borrowAmount) external returns (uint256);\\n\\n function repayBorrow(uint256 repayAmount) external returns (uint256);\\n\\n function exchangeRateStored() external view returns (uint256);\\n\\n function balanceOf(address _owner) external view returns (uint256);\\n\\n function underlying() external view returns (address);\\n\\n function getAccountSnapshot(address account)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function repayBorrowBehalf(address borrower, uint256 amount) external payable returns (uint256);\\n\\n function borrowBalanceCurrent(address account) external view returns (uint256);\\n\\n function exchangeRateCurrent() external returns (uint256);\\n\\n function supplyRatePerBlock() external returns (uint256);\\n}\\n\",\"keccak256\":\"0xa63a0b1dd77787831fdf815ea9530d7f737e4d23f25ea198bc7520cc3f79cfd3\",\"license\":\"MIT\"},\"contracts/interfaces/external/weth/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface IWETH is IERC20 {\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n}\\n\",\"keccak256\":\"0xacc7980a650b7a753ee51f1bbc0ae4f641e84261bcc02cfdaf87ee8136483684\",\"license\":\"MIT\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523480156200001157600080fd5b50604051620017fd380380620017fd833981810160405260408110156200003757600080fd5b50805160209182015160408051808201909152600c81526b18dbdb5c1bdd5b991b195b9960a21b93810193909352909181838282826001600160a01b038116620000c8576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c6572206d75737420626520646566696e6564000000000000604482015290519081900360640190fd5b8251620000dd906001906020860190620002ec565b50600080546001600160a01b039092166001600160a01b03199283161781556001600160601b031960609390931b92909216608052600160035560046020527f1f26cc04db5725a6013f9a871c79fcbf894bb366deda2d7526896a3d7f7bf1e680548216735d3a536e4d6dbd6114cc1ead35777bab948e36431790557f7ad6a3b7b68a4f5cf66df337fd5942d7c746b3a5d321592ec5762ec798359679805482167335a18000230da775cac24873d00ff85bccded5501790557e137c28eabea4eda5601e544e6551e6761ee561d32c4142c29e0f892835a36180548216734ddc2d193948926d02f9b1fe9e1daa0718270ed51790557f2216881abda8ce28bb79ec6ad24ecf589e0594fff84ade38d82ca32ec9eff5c6805482167339aa39c021dfbae8fac545936693ac917d5e75631790557fce6b0bb3482d6fcd115ad33ec4464c30e4c8b24ec6e3e5aa13819b39c576a85c8054821673f650c3d88d12db855b8bf7d11be6c55a4e07dcc91790557fdcea66f53103f73a3eee020f324bf4679e60b5665cd91d355a9467ab00173ae48054821673c11b1268c1a384e55c48c2391d8d480264a3a7f417905573c00e94cb662c3520282e6f5717214004a7f268889091527f10d76dfe0f3b809fe9d2b2241c0475e8ec5f5344571bd48e8a64f26f4f47c64b80549091167370e36f6bf80a52b3b46b3af8e106cc0ed743e8e41790555062000398945050505050565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826200032457600085556200036f565b82601f106200033f57805160ff19168380011785556200036f565b828001600101855582156200036f579182015b828111156200036f57825182559160200191906001019062000352565b506200037d92915062000381565b5090565b5b808211156200037d576000815560010162000382565b60805160601c611447620003b66000398061049f52506114476000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c8063912a18571161008c578063d0d2d3a211610066578063d0d2d3a2146102a7578063eb40e600146102e3578063f14b578814610309578063f77c479114610345576100df565b8063912a1857146102175780639e12fef214610247578063b10198fb14610281576100df565b80633550bd62116100bd5780633550bd62146101a15780633fc8cef3146101e35780634deef649146101eb576100df565b806306fdde03146100e457806307b54c6f1461016157806317d7de7c14610199575b600080fd5b6100ec61034d565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012657818101518382015260200161010e565b50505050905090810190601f1680156101535780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101876004803603602081101561017757600080fd5b50356001600160a01b03166103da565b60408051918252519081900360200190f35b6100ec6103ed565b6101c7600480360360208110156101b757600080fd5b50356001600160a01b0316610482565b604080516001600160a01b039092168252519081900360200190f35b6101c761049d565b6101876004803603604081101561020157600080fd5b506001600160a01b0381351690602001356104c1565b6102456004803603604081101561022d57600080fd5b506001600160a01b03813581169160200135166104d6565b005b61026d6004803603602081101561025d57600080fd5b50356001600160a01b031661057b565b604080519115158252519081900360200190f35b61026d6004803603602081101561029757600080fd5b50356001600160a01b0316610586565b610245600480360360808110156102bd57600080fd5b506001600160a01b0381358116916020810135909116906040810135906060013561059b565b6101c7600480360360208110156102f957600080fd5b50356001600160a01b03166107e4565b6102456004803603608081101561031f57600080fd5b506001600160a01b038135811691602081013590911690604081013590606001356107ef565b6101c7610a65565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103d25780601f106103a7576101008083540402835291602001916103d2565b820191906000526020600020905b8154815290600101906020018083116103b557829003601f168201915b505050505081565b60006103e582610a74565b90505b919050565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156104785780601f1061044d57610100808354040283529160200191610478565b820191906000526020600020905b81548152906001019060200180831161045b57829003601f168201915b5050505050905090565b6004602052600090815260409020546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006104cd8383610bdd565b90505b92915050565b6000546001600160a01b03163314610535576040805162461bcd60e51b815260206004820152601d60248201527f4f6e6c7920636f6e74726f6c6c65722063616e2063616c6c2074686973000000604482015290519081900360640190fd5b6001600160a01b03918216600090815260046020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909216179055565b60006103e582610c0f565b60026020526000908152604090205460ff1681565b60006105b285856105ab87610c2f565b8686610c4d565b90506105bd81610da8565b60008060006105cd888888610e7d565b92509250925083600001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561064a578181015183820152602001610632565b50505050905090810190601f1680156106775780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561069857600080fd5b505af11580156106ac573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156106d557600080fd5b81019080805160405193929190846401000000008211156106f557600080fd5b90830190602082018581111561070a57600080fd5b825164010000000081118282018810171561072457600080fd5b82525081516020918201929091019080838360005b83811015610751578181015183820152602001610739565b50505050905090810190601f16801561077e5780820380516001836020036101000a031916815260200191505b506040525050505061078f84610f05565b8351602080860151604080518a815290516001600160a01b03808d16958116949316927fd17d95895382b096bb1f89ed05a71c3e014d5ecf25944c8f1f27f07b2b9d3194928290030190a45050505050505050565b60006103e582610c2f565b60006107ff85856105ab87610c2f565b905061080a81610fcd565b80516001600160a01b03166397ccdc6061082386610c2f565b86866040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561087b57600080fd5b505af115801561088f573d6000803e3d6000fd5b5050505060008060006108a3888888611058565b92509250925083600001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610920578181015183820152602001610908565b50505050905090810190601f16801561094d5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561096e57600080fd5b505af1158015610982573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156109ab57600080fd5b81019080805160405193929190846401000000008211156109cb57600080fd5b9083019060208201858111156109e057600080fd5b82516401000000008111828201881017156109fa57600080fd5b82525081516020918201929091019080838360005b83811015610a27578181015183820152602001610a0f565b50505050905090810190601f168015610a545780820380516001836020036101000a031916815260200191505b506040525050505061078f84611114565b6000546001600160a01b031681565b6001600160a01b0380821660009081526004602081815260408084205481517f182df0f50000000000000000000000000000000000000000000000000000000081529151949516938593859363182df0f59380830193919290829003018186803b158015610ae157600080fd5b505afa158015610af5573d6000803e3d6000fd5b505050506040513d6020811015610b0b57600080fd5b5051604080517f313ce56700000000000000000000000000000000000000000000000000000000815290519192506000916001600160a01b0387169163313ce567916004808301926020929190829003018186803b158015610b6c57600080fd5b505afa158015610b80573d6000803e3d6000fd5b505050506040513d6020811015610b9657600080fd5b50519050600860ff82161015610bc75760ff600882900316610bbc83600a83900a6111d6565b9450505050506103e8565b60ff600719820116610bbc83600a83900a61122f565b600080610be984610a74565b9050610c07670de0b6b3a7640000610c0183866111d6565b9061122f565b949350505050565b6001600160a01b0390811660009081526004602052604090205416151590565b6001600160a01b039081166000908152600460205260409020541690565b610c55611296565b610c5d611296565b6001600160a01b038716808252604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b891600480820192602092909190829003018186803b158015610cb957600080fd5b505afa158015610ccd573d6000803e3d6000fd5b505050506040513d6020811015610ce357600080fd5b50516001600160a01b039081166020838101919091528782166040808501919091528783166060850181905281517f70a08231000000000000000000000000000000000000000000000000000000008152938b166004850152905190926370a08231926024808301939192829003018186803b158015610d6257600080fd5b505afa158015610d76573d6000803e3d6000fd5b505050506040513d6020811015610d8c57600080fd5b505160a082015260808101939093525060c08201529392505050565b610db58160400151610c0f565b610df05760405162461bcd60e51b81526004018080602001828103825260238152602001806113ef6023913960400191505060405180910390fd5b6000816080015111610e335760405162461bcd60e51b81526004018080602001828103825260348152602001806113bb6034913960400191505060405180910390fd5b80608001518160a001511015610e7a5760405162461bcd60e51b81526004018080602001828103825260318152602001806112d36031913960400191505060405180910390fd5b50565b60408051602480820193909352815180820390930183526044018152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fdb006a75000000000000000000000000000000000000000000000000000000001790526001600160a01b0393841660009081526004909152908120549092169391925090565b80608001518160a001510381606001516001600160a01b03166370a0823183600001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f6557600080fd5b505afa158015610f79573d6000803e3d6000fd5b505050506040513d6020811015610f8f57600080fd5b505114610e7a5760405162461bcd60e51b815260040180806020018281038252602f815260200180611334602f913960400191505060405180910390fd5b610fda8160400151610c0f565b6110155760405162461bcd60e51b81526004018080602001828103825260238152602001806113ef6023913960400191505060405180910390fd5b6000816080015111610e7a5760405162461bcd60e51b81526004018080602001828103825260378152602001806113636037913960400191505060405180910390fd5b6040805160248082018490528251808303909101815260449091018252602081810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa0712d68000000000000000000000000000000000000000000000000000000001790526001600160a01b03808616600090815260049092529281205490928392606092909116734ddc2d193948926d02f9b1fe9e1daa0718270ed58114611103576000611105565b855b90989097509095509350505050565b8060a0015181606001516001600160a01b03166370a0823183600001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561116e57600080fd5b505afa158015611182573d6000803e3d6000fd5b505050506040513d602081101561119857600080fd5b505111610e7a5760405162461bcd60e51b81526004018080602001828103825260308152602001806113046030913960400191505060405180910390fd5b6000826111e5575060006104d0565b828202828482816111f257fe5b04146104cd5760405162461bcd60e51b815260040180806020018281038252602181526020018061139a6021913960400191505060405180910390fd5b6000808211611285576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161128e57fe5b049392505050565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c08101919091529056fe5468652067617264656e20646f6573206e6f74206861766520656e6f75676820696e766573746d656e7420746f6b656e735468652067617264656e20646964206e6f7420726563656976652074686520696e766573746d656e7420746f6b656e735468652067617264656e20646964206e6f742072657475726e2074686520696e766573746d656e7420746f6b656e734d696e20696e766573746d656e7420746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77496e766573746d656e7420746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520696e766573746d656e742061646472657373206973206e6f742076616c6964a2646970667358221220f363320d57628c88cf149beaf89ba7ae31ffaf95c79d2376acd9596d391a3ec664736f6c63430007060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100df5760003560e01c8063912a18571161008c578063d0d2d3a211610066578063d0d2d3a2146102a7578063eb40e600146102e3578063f14b578814610309578063f77c479114610345576100df565b8063912a1857146102175780639e12fef214610247578063b10198fb14610281576100df565b80633550bd62116100bd5780633550bd62146101a15780633fc8cef3146101e35780634deef649146101eb576100df565b806306fdde03146100e457806307b54c6f1461016157806317d7de7c14610199575b600080fd5b6100ec61034d565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012657818101518382015260200161010e565b50505050905090810190601f1680156101535780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101876004803603602081101561017757600080fd5b50356001600160a01b03166103da565b60408051918252519081900360200190f35b6100ec6103ed565b6101c7600480360360208110156101b757600080fd5b50356001600160a01b0316610482565b604080516001600160a01b039092168252519081900360200190f35b6101c761049d565b6101876004803603604081101561020157600080fd5b506001600160a01b0381351690602001356104c1565b6102456004803603604081101561022d57600080fd5b506001600160a01b03813581169160200135166104d6565b005b61026d6004803603602081101561025d57600080fd5b50356001600160a01b031661057b565b604080519115158252519081900360200190f35b61026d6004803603602081101561029757600080fd5b50356001600160a01b0316610586565b610245600480360360808110156102bd57600080fd5b506001600160a01b0381358116916020810135909116906040810135906060013561059b565b6101c7600480360360208110156102f957600080fd5b50356001600160a01b03166107e4565b6102456004803603608081101561031f57600080fd5b506001600160a01b038135811691602081013590911690604081013590606001356107ef565b6101c7610a65565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103d25780601f106103a7576101008083540402835291602001916103d2565b820191906000526020600020905b8154815290600101906020018083116103b557829003601f168201915b505050505081565b60006103e582610a74565b90505b919050565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156104785780601f1061044d57610100808354040283529160200191610478565b820191906000526020600020905b81548152906001019060200180831161045b57829003601f168201915b5050505050905090565b6004602052600090815260409020546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006104cd8383610bdd565b90505b92915050565b6000546001600160a01b03163314610535576040805162461bcd60e51b815260206004820152601d60248201527f4f6e6c7920636f6e74726f6c6c65722063616e2063616c6c2074686973000000604482015290519081900360640190fd5b6001600160a01b03918216600090815260046020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909216179055565b60006103e582610c0f565b60026020526000908152604090205460ff1681565b60006105b285856105ab87610c2f565b8686610c4d565b90506105bd81610da8565b60008060006105cd888888610e7d565b92509250925083600001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561064a578181015183820152602001610632565b50505050905090810190601f1680156106775780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561069857600080fd5b505af11580156106ac573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156106d557600080fd5b81019080805160405193929190846401000000008211156106f557600080fd5b90830190602082018581111561070a57600080fd5b825164010000000081118282018810171561072457600080fd5b82525081516020918201929091019080838360005b83811015610751578181015183820152602001610739565b50505050905090810190601f16801561077e5780820380516001836020036101000a031916815260200191505b506040525050505061078f84610f05565b8351602080860151604080518a815290516001600160a01b03808d16958116949316927fd17d95895382b096bb1f89ed05a71c3e014d5ecf25944c8f1f27f07b2b9d3194928290030190a45050505050505050565b60006103e582610c2f565b60006107ff85856105ab87610c2f565b905061080a81610fcd565b80516001600160a01b03166397ccdc6061082386610c2f565b86866040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561087b57600080fd5b505af115801561088f573d6000803e3d6000fd5b5050505060008060006108a3888888611058565b92509250925083600001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610920578181015183820152602001610908565b50505050905090810190601f16801561094d5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561096e57600080fd5b505af1158015610982573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156109ab57600080fd5b81019080805160405193929190846401000000008211156109cb57600080fd5b9083019060208201858111156109e057600080fd5b82516401000000008111828201881017156109fa57600080fd5b82525081516020918201929091019080838360005b83811015610a27578181015183820152602001610a0f565b50505050905090810190601f168015610a545780820380516001836020036101000a031916815260200191505b506040525050505061078f84611114565b6000546001600160a01b031681565b6001600160a01b0380821660009081526004602081815260408084205481517f182df0f50000000000000000000000000000000000000000000000000000000081529151949516938593859363182df0f59380830193919290829003018186803b158015610ae157600080fd5b505afa158015610af5573d6000803e3d6000fd5b505050506040513d6020811015610b0b57600080fd5b5051604080517f313ce56700000000000000000000000000000000000000000000000000000000815290519192506000916001600160a01b0387169163313ce567916004808301926020929190829003018186803b158015610b6c57600080fd5b505afa158015610b80573d6000803e3d6000fd5b505050506040513d6020811015610b9657600080fd5b50519050600860ff82161015610bc75760ff600882900316610bbc83600a83900a6111d6565b9450505050506103e8565b60ff600719820116610bbc83600a83900a61122f565b600080610be984610a74565b9050610c07670de0b6b3a7640000610c0183866111d6565b9061122f565b949350505050565b6001600160a01b0390811660009081526004602052604090205416151590565b6001600160a01b039081166000908152600460205260409020541690565b610c55611296565b610c5d611296565b6001600160a01b038716808252604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b891600480820192602092909190829003018186803b158015610cb957600080fd5b505afa158015610ccd573d6000803e3d6000fd5b505050506040513d6020811015610ce357600080fd5b50516001600160a01b039081166020838101919091528782166040808501919091528783166060850181905281517f70a08231000000000000000000000000000000000000000000000000000000008152938b166004850152905190926370a08231926024808301939192829003018186803b158015610d6257600080fd5b505afa158015610d76573d6000803e3d6000fd5b505050506040513d6020811015610d8c57600080fd5b505160a082015260808101939093525060c08201529392505050565b610db58160400151610c0f565b610df05760405162461bcd60e51b81526004018080602001828103825260238152602001806113ef6023913960400191505060405180910390fd5b6000816080015111610e335760405162461bcd60e51b81526004018080602001828103825260348152602001806113bb6034913960400191505060405180910390fd5b80608001518160a001511015610e7a5760405162461bcd60e51b81526004018080602001828103825260318152602001806112d36031913960400191505060405180910390fd5b50565b60408051602480820193909352815180820390930183526044018152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fdb006a75000000000000000000000000000000000000000000000000000000001790526001600160a01b0393841660009081526004909152908120549092169391925090565b80608001518160a001510381606001516001600160a01b03166370a0823183600001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f6557600080fd5b505afa158015610f79573d6000803e3d6000fd5b505050506040513d6020811015610f8f57600080fd5b505114610e7a5760405162461bcd60e51b815260040180806020018281038252602f815260200180611334602f913960400191505060405180910390fd5b610fda8160400151610c0f565b6110155760405162461bcd60e51b81526004018080602001828103825260238152602001806113ef6023913960400191505060405180910390fd5b6000816080015111610e7a5760405162461bcd60e51b81526004018080602001828103825260378152602001806113636037913960400191505060405180910390fd5b6040805160248082018490528251808303909101815260449091018252602081810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa0712d68000000000000000000000000000000000000000000000000000000001790526001600160a01b03808616600090815260049092529281205490928392606092909116734ddc2d193948926d02f9b1fe9e1daa0718270ed58114611103576000611105565b855b90989097509095509350505050565b8060a0015181606001516001600160a01b03166370a0823183600001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561116e57600080fd5b505afa158015611182573d6000803e3d6000fd5b505050506040513d602081101561119857600080fd5b505111610e7a5760405162461bcd60e51b81526004018080602001828103825260308152602001806113046030913960400191505060405180910390fd5b6000826111e5575060006104d0565b828202828482816111f257fe5b04146104cd5760405162461bcd60e51b815260040180806020018281038252602181526020018061139a6021913960400191505060405180910390fd5b6000808211611285576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161128e57fe5b049392505050565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c08101919091529056fe5468652067617264656e20646f6573206e6f74206861766520656e6f75676820696e766573746d656e7420746f6b656e735468652067617264656e20646964206e6f7420726563656976652074686520696e766573746d656e7420746f6b656e735468652067617264656e20646964206e6f742072657475726e2074686520696e766573746d656e7420746f6b656e734d696e20696e766573746d656e7420746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77496e766573746d656e7420746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520696e766573746d656e742061646472657373206973206e6f742076616c6964a2646970667358221220f363320d57628c88cf149beaf89ba7ae31ffaf95c79d2376acd9596d391a3ec664736f6c63430007060033", + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"garden\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assetToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"numTokensToRedeem\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"protocolFee\",\"type\":\"uint256\"}],\"name\":\"TokensRedeemed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"garden\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assetToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"numTokensToSupply\",\"type\":\"uint256\"}],\"name\":\"TokensSupplied\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"assetToCToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_assetToken\",\"type\":\"address\"}],\"name\":\"getExchangeRatePerToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_assetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_numTokensToSupply\",\"type\":\"uint256\"}],\"name\":\"getExpectedShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_assetToken\",\"type\":\"address\"}],\"name\":\"getInvestmentToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"initializedByGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_investmentAddress\",\"type\":\"address\"}],\"name\":\"isInvestment\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_assetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_numTokensToRedeem\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minAmountExpected\",\"type\":\"uint256\"}],\"name\":\"redeemTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_assetToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_numTokensToSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minAmountExpected\",\"type\":\"uint256\"}],\"name\":\"supplyTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_assetAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_cTokenAddress\",\"type\":\"address\"}],\"name\":\"updateCTokenMapping\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Protocol Compound lend integration.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of the controller\",\"_weth\":\"Address of the WETH ERC20\"}},\"getExpectedShares(address,uint256)\":{\"params\":{\"_numTokensToSupply\":\"Amount of ERC20 tokens to supply\"},\"returns\":{\"_0\":\"uint256 Amount of supply tokens to receive\"}},\"isInvestment(address)\":{\"params\":{\"_investmentAddress\":\"Investment address to check\"},\"returns\":{\"_0\":\"bool True if the address is a investment\"}}},\"title\":\"CompoundLendIntegration\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates the integration\"},\"getExpectedShares(address,uint256)\":{\"notice\":\"Gets the amount of cTokens expected to get after depositing ERC20 asset.\"},\"getName()\":{\"notice\":\"Returns the name of the integration\"},\"isInvestment(address)\":{\"notice\":\"Checks whether an investment address is valid\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/integrations/lend/CompoundLendIntegration.sol\":\"CompoundLendIntegration\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\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 /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\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, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x7b2b8baa20fd60ab4a328c8e34c64a353651b80ba4b5b157cbb61813f6f85d55\",\"license\":\"MIT\"},\"contracts/integrations/BaseIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IIntegration} from '../interfaces/IIntegration.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\n\\n/**\\n * @title BaseIntegration\\n * @author Babylon Finance\\n *\\n * Abstract class that houses common Integration-related state and functions.\\n */\\nabstract contract BaseIntegration {\\n using SafeCast for int256;\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlySystemContract() {\\n require(IBabController(controller).isSystemContract(msg.sender), 'Only system can call this');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the controller\\n address public controller;\\n // Wrapped ETH address\\n address public immutable weth;\\n // Name of the integration\\n string public name;\\n mapping(address => bool) public initializedByGarden;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) {\\n require(_controller != address(0), 'Controller must be defined');\\n name = _name;\\n controller = _controller;\\n weth = _weth;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the name of the integration\\n */\\n function getName() external view returns (string memory) {\\n return name;\\n }\\n}\\n\",\"keccak256\":\"0x2834e38218ae7abce3038140002a433c22ea9303d65b2d929cd88f6d5f712812\",\"license\":\"Apache License\"},\"contracts/integrations/lend/CompoundLendIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\nimport {ICToken} from '../../interfaces/external/compound/ICToken.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\nimport {LendIntegration} from './LendIntegration.sol';\\n\\n/**\\n * @title CompoundLendIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Compound lend integration.\\n */\\ncontract CompoundLendIntegration is LendIntegration {\\n using SafeMath for uint256;\\n using SafeCast for uint256;\\n\\n /* ============ Modifiers ============ */\\n\\n /**\\n * Throws if the sender is not the protocol\\n */\\n modifier onlyProtocol() {\\n require(msg.sender == controller, 'Only controller can call this');\\n _;\\n }\\n\\n /* ============ Constant ============ */\\n\\n address internal constant cETH = 0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5;\\n // Mapping of asset addresses to cToken addresses\\n mapping(address => address) public assetToCToken;\\n\\n /* ============ Struct ============ */\\n\\n /* ============ Events ============ */\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n constructor(address _controller, address _weth) LendIntegration('compoundlend', _weth, _controller) {\\n assetToCToken[0x6B175474E89094C44Da98b954EedeAC495271d0F] = 0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643; // DAI\\n assetToCToken[0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984] = 0x35A18000230DA775CAc24873d00Ff85BccdeD550; // UNI\\n assetToCToken[0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2] = 0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5; // WETH\\n assetToCToken[0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48] = 0x39AA39c021dfbaE8faC545936693aC917d5E7563; // USDC\\n assetToCToken[0xdAC17F958D2ee523a2206206994597C13D831ec7] = 0xf650C3d88D12dB855b8bf7D11Be6C55A4e07dCC9; // USDT\\n assetToCToken[0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599] = 0xC11b1268C1A384e55C48c2391d8d480264A3A7F4; // WBTC\\n assetToCToken[0xc00e94Cb662C3520282E6f5717214004A7f26888] = 0x70e36f6BF80a52b3B46b3aF8e106CC0ed743E8e4; // COMP\\n }\\n\\n /* ============ External Functions ============ */\\n\\n // Governance function\\n function updateCTokenMapping(address _assetAddress, address _cTokenAddress) external onlyProtocol {\\n assetToCToken[_assetAddress] = _cTokenAddress;\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n function _isInvestment(address _assetToken) internal view override returns (bool) {\\n return assetToCToken[_assetToken] != address(0);\\n }\\n\\n function _getExpectedShares(address _assetToken, uint256 _numTokensToSupply)\\n internal\\n view\\n override\\n returns (uint256)\\n {\\n uint256 oneCTokenInUderlying = _getExchangeRatePerToken(_assetToken);\\n return oneCTokenInUderlying.mul(_numTokensToSupply).div(10**18);\\n }\\n\\n // TODO: Test this\\n function _getExchangeRatePerToken(address _assetToken) internal view override returns (uint256) {\\n address cToken = assetToCToken[_assetToken];\\n uint256 exchangeRateCurrent = ICToken(cToken).exchangeRateStored();\\n // TODO: exchangeRateCurrent reverts wit no reason. Super strange.\\n // uint256 exchangeRateCurrent = ICToken(cToken).exchangeRateCurrent();\\n uint8 assetDecimals = ERC20(_assetToken).decimals();\\n // cTokens always have 8 decimals.\\n if (assetDecimals < 8) {\\n uint256 mantissa = 8 - assetDecimals;\\n return exchangeRateCurrent.mul(10**mantissa);\\n } else {\\n uint256 mantissa = assetDecimals - 8;\\n return exchangeRateCurrent.div(10**mantissa);\\n }\\n }\\n\\n function _getRedeemCalldata(\\n address, /* _strategy */\\n address _assetToken,\\n uint256 _numTokensToSupply\\n )\\n internal\\n view\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n // Encode method data for Garden to invoke\\n bytes memory methodData = abi.encodeWithSignature('redeem(uint256)', _numTokensToSupply);\\n\\n return (assetToCToken[_assetToken], 0, methodData);\\n }\\n\\n /**\\n * Returns calldata for supplying tokens.\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getSupplyCalldata(\\n address, /* _strategy */\\n address _assetToken,\\n uint256 _numTokensToSupply\\n )\\n internal\\n view\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n // Encode method data for Garden to invoke\\n bytes memory methodData = abi.encodeWithSignature('mint(uint256)', _numTokensToSupply);\\n // If it is ETH, send the value\\n return (assetToCToken[_assetToken], assetToCToken[_assetToken] == cETH ? _numTokensToSupply : 0, methodData);\\n }\\n\\n function _getSpender(address _assetToken) internal view override returns (address) {\\n return assetToCToken[_assetToken];\\n }\\n\\n function _getInvestmentToken(address _assetToken) internal view override returns (address) {\\n return assetToCToken[_assetToken];\\n }\\n}\\n\",\"keccak256\":\"0xe809495558535f6dd386332fb2c3b844e0e31a319a5af29bf39cdba41e9e830b\",\"license\":\"Apache License\"},\"contracts/integrations/lend/LendIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\n\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\nimport {ILendIntegration} from '../../interfaces/ILendIntegration.sol';\\n\\nimport {BaseIntegration} from '../BaseIntegration.sol';\\n\\n/**\\n * @title LendIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Base class for integration with passive investments like Yearn, Indexed\\n */\\nabstract contract LendIntegration is BaseIntegration, ReentrancyGuard, ILendIntegration {\\n using SafeMath for uint256;\\n using SafeCast for uint256;\\n\\n /* ============ Struct ============ */\\n struct InvestmentInfo {\\n IStrategy strategy; // Strategy address\\n IGarden garden; // Garden address\\n address assetToken;\\n address investment; // Investment address\\n uint256 investmentTokensInTransaction; // Investment tokens affected by this transaction\\n uint256 investmentTokensInGarden; // Investment tokens garden balance\\n uint256 limitDepositTokenQuantity; // Limit deposit/withdrawal token amount\\n }\\n\\n /* ============ Events ============ */\\n\\n event TokensSupplied(\\n address indexed garden,\\n address indexed strategy,\\n address indexed assetToken,\\n uint256 numTokensToSupply\\n );\\n\\n event TokensRedeemed(\\n address indexed garden,\\n address indexed strategy,\\n address indexed assetToken,\\n uint256 numTokensToRedeem,\\n uint256 protocolFee\\n );\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) BaseIntegration(_name, _weth, _controller) {}\\n\\n /* ============ External Functions ============ */\\n function getInvestmentToken(address _assetToken) external view override returns (address) {\\n return _getInvestmentToken(_assetToken);\\n }\\n\\n /**\\n * Checks whether an investment address is valid\\n *\\n * @param _investmentAddress Investment address to check\\n * @return bool True if the address is a investment\\n */\\n function isInvestment(address _investmentAddress) external view returns (bool) {\\n return _isInvestment(_investmentAddress);\\n }\\n\\n function supplyTokens(\\n address _strategy,\\n address _assetToken,\\n uint256 _numTokensToSupply,\\n uint256 _minAmountExpected\\n ) external override {\\n InvestmentInfo memory investmentInfo =\\n _createInvestmentInfo(\\n _strategy,\\n _assetToken,\\n _getInvestmentToken(_assetToken),\\n _numTokensToSupply,\\n _minAmountExpected\\n );\\n\\n _validatePreJoinInvestmentData(investmentInfo);\\n\\n investmentInfo.strategy.invokeApprove(_getSpender(_assetToken), _assetToken, _numTokensToSupply);\\n\\n (address targetInvestment, uint256 callValue, bytes memory methodData) =\\n _getSupplyCalldata(_strategy, _assetToken, _numTokensToSupply);\\n\\n investmentInfo.strategy.invokeFromIntegration(targetInvestment, callValue, methodData);\\n _validatePostEnterInvestmentData(investmentInfo);\\n\\n emit TokensSupplied(\\n address(investmentInfo.garden),\\n address(investmentInfo.strategy),\\n _assetToken,\\n _numTokensToSupply\\n );\\n }\\n\\n function redeemTokens(\\n address _strategy,\\n address _assetToken,\\n uint256 _numTokensToRedeem,\\n uint256 _minAmountExpected\\n ) external override {\\n InvestmentInfo memory investmentInfo =\\n _createInvestmentInfo(\\n _strategy,\\n _assetToken,\\n _getInvestmentToken(_assetToken),\\n _numTokensToRedeem,\\n _minAmountExpected\\n );\\n\\n _validatePreExitInvestmentData(investmentInfo);\\n\\n (address targetInvestment, uint256 callValue, bytes memory methodData) =\\n _getRedeemCalldata(_strategy, _assetToken, _numTokensToRedeem);\\n\\n investmentInfo.strategy.invokeFromIntegration(targetInvestment, callValue, methodData);\\n\\n _validatePostExitInvestmentData(investmentInfo);\\n\\n emit TokensSupplied(\\n address(investmentInfo.garden),\\n address(investmentInfo.strategy),\\n _assetToken,\\n _numTokensToRedeem\\n );\\n }\\n\\n function getExchangeRatePerToken(address _assetToken) external view override returns (uint256) {\\n return _getExchangeRatePerToken(_assetToken);\\n }\\n\\n /**\\n * Gets the amount of cTokens expected to get after depositing ERC20 asset.\\n *\\n * @param _numTokensToSupply Amount of ERC20 tokens to supply\\n * @return uint256 Amount of supply tokens to receive\\n */\\n function getExpectedShares(address _assetToken, uint256 _numTokensToSupply)\\n external\\n view\\n override\\n returns (uint256)\\n {\\n return _getExpectedShares(_assetToken, _numTokensToSupply);\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Validate pre investment join data. Check investment is valid, token quantity is valid.\\n *\\n * @param _investmentInfo Struct containing investment information used in internal functions\\n */\\n function _validatePreJoinInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\\n require(_isInvestment(_investmentInfo.assetToken), 'The investment address is not valid');\\n require(\\n _investmentInfo.investmentTokensInTransaction > 0,\\n 'Min investment tokens to receive must be greater than 0'\\n );\\n }\\n\\n /**\\n * Validate post enter investment data. Check investment is valid, token quantity is valid.\\n *\\n * @param _investmentInfo Struct containing investment information used in internal functions\\n */\\n function _validatePostEnterInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\\n require(\\n (IERC20(_investmentInfo.investment).balanceOf(address(_investmentInfo.strategy)) >\\n _investmentInfo.investmentTokensInGarden),\\n 'The garden did not receive the investment tokens'\\n );\\n }\\n\\n /**\\n * Validate post exit investment data. Check investment is valid, token quantity is valid.\\n *\\n * @param _investmentInfo Struct containing investment information used in internal functions\\n */\\n function _validatePostExitInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\\n require(\\n IERC20(_investmentInfo.investment).balanceOf(address(_investmentInfo.strategy)) ==\\n _investmentInfo.investmentTokensInGarden - _investmentInfo.investmentTokensInTransaction,\\n 'The garden did not return the investment tokens'\\n );\\n }\\n\\n /**\\n * Validate pre investment data. Check investment is valid, token quantity is valid.\\n *\\n * @param _investmentInfo Struct containing investment information used in internal functions\\n */\\n function _validatePreExitInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\\n require(_isInvestment(_investmentInfo.assetToken), 'The investment address is not valid');\\n require(\\n _investmentInfo.investmentTokensInTransaction > 0,\\n 'Investment tokens to exchange must be greater than 0'\\n );\\n require(\\n _investmentInfo.investmentTokensInGarden >= _investmentInfo.investmentTokensInTransaction,\\n 'The garden does not have enough investment tokens'\\n );\\n }\\n\\n function _isInvestment(\\n address //_investmentAddress\\n ) internal view virtual returns (bool);\\n\\n /**\\n * Create and return InvestmentInfo struct\\n *\\n * return InvestmentInfo Struct containing data for the investment\\n */\\n function _createInvestmentInfo(\\n address _strategy,\\n address _assetToken,\\n address _investmentToken,\\n uint256 _investmentTokensInTransaction,\\n uint256 _limitDepositToken\\n ) internal view returns (InvestmentInfo memory) {\\n InvestmentInfo memory investmentInfo;\\n investmentInfo.strategy = IStrategy(_strategy);\\n investmentInfo.garden = IGarden(investmentInfo.strategy.garden());\\n investmentInfo.assetToken = _assetToken;\\n investmentInfo.investment = _investmentToken;\\n investmentInfo.investmentTokensInGarden = IERC20(_investmentToken).balanceOf(_strategy);\\n investmentInfo.investmentTokensInTransaction = _investmentTokensInTransaction;\\n investmentInfo.limitDepositTokenQuantity = _limitDepositToken;\\n\\n return investmentInfo;\\n }\\n\\n function _getExpectedShares(address, uint256) internal view virtual returns (uint256);\\n\\n function _getExchangeRatePerToken(address) internal view virtual returns (uint256);\\n\\n function _getRedeemCalldata(\\n address, /* _strategy */\\n address, /* _assetToken */\\n uint256 /* _numTokensToSupply */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n /**\\n * Returns calldata for supplying tokens.\\n *\\n * hparam _strategy Address of the strat\\n * hparam _assetToken Address of the token\\n * hparam _numTokensToSupply Number of tokens\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getSupplyCalldata(\\n address, /* _strategy */\\n address, /* _assetToken */\\n uint256 /* _numTokensToSupply */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n function _getSpender(\\n address //_investmentAddress\\n ) internal view virtual returns (address);\\n\\n function _getInvestmentToken(\\n address //_investmentAddress\\n ) internal view virtual returns (address);\\n}\\n\",\"keccak256\":\"0xffe594fd5e659943607ec107a6692780bed30fbc371430fba17f1d504ba433f3\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editGardenNFT(address _newGardenNFT) external;\\n\\n function editStrategyNFT(address _newStrategyNFT) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function editUniswapFactory(address _newUniswapFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\\n\\n function maxContributorsPerGarden() external view returns (uint256);\\n\\n function gardenCreationIsOpen() external view returns (bool);\\n\\n function openPublicGardenCreation() external;\\n\\n function setMaxContributorsPerGarden(uint256 _newMax) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function gardenNFT() external view returns (address);\\n\\n function strategyNFT() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\\n\\n function uniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0xdee5a27301c24f507d312f32249487fa9b0a756062a7e479405a1d1ee9ee7bb8\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function isGardenStrategy(address _strategy) external view returns (bool);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategyActiveInGarden(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to,\\n bool _withPenalty\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x88f1786ffee23e386aaa1735177912e1b5a7cdd440dafe52fb139fe50fd621b4\",\"license\":\"Apache License\"},\"contracts/interfaces/IIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIntegration\\n * @author Babylon Finance\\n *\\n * Interface for protocol integrations\\n */\\ninterface IIntegration {\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xee03c9274ddf3257e3bfd2bb229fea3412c9105f178e64174f59efeafd53182c\",\"license\":\"Apache License\"},\"contracts/interfaces/ILendIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title ILendIntegration\\n * @author Babylon Finance\\n *\\n * Interface for lending integrations such as Compound, Aave.\\n */\\ninterface ILendIntegration {\\n function supplyTokens(\\n address _strategy,\\n address _assetToken,\\n uint256 _numTokensToSupply,\\n uint256 _minAmountExpected\\n ) external;\\n\\n function redeemTokens(\\n address _strategy,\\n address _assetToken,\\n uint256 _numTokensToRedeem,\\n uint256 _minAmountExpected\\n ) external;\\n\\n function getExpectedShares(address _assetToken, uint256 _numTokensToSupply) external view returns (uint256);\\n\\n function getExchangeRatePerToken(address _assetToken) external view returns (uint256);\\n\\n function getInvestmentToken(address _assetToken) external view returns (address);\\n}\\n\",\"keccak256\":\"0x28ca8cb40b050139b7416224c43de2c14fa7991e0b3769f7bab349e3422fc34f\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n address,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x850597ec9a68eb86f31f13b6b77d3b31350b4ed3d0019dedfbd3550ad1a1d9e2\",\"license\":\"Apache License\"},\"contracts/interfaces/external/compound/ICToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\ninterface ICToken {\\n function mint(uint256 mintAmount) external returns (uint256);\\n\\n function redeem(uint256 redeemTokens) external returns (uint256);\\n\\n function redeemUnderlying(uint256 redeemAmount) external returns (uint256);\\n\\n function borrow(uint256 borrowAmount) external returns (uint256);\\n\\n function repayBorrow(uint256 repayAmount) external returns (uint256);\\n\\n function exchangeRateStored() external view returns (uint256);\\n\\n function balanceOf(address _owner) external view returns (uint256);\\n\\n function underlying() external view returns (address);\\n\\n function getAccountSnapshot(address account)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function repayBorrowBehalf(address borrower, uint256 amount) external payable returns (uint256);\\n\\n function borrowBalanceCurrent(address account) external view returns (uint256);\\n\\n function exchangeRateCurrent() external returns (uint256);\\n\\n function supplyRatePerBlock() external returns (uint256);\\n}\\n\",\"keccak256\":\"0xa63a0b1dd77787831fdf815ea9530d7f737e4d23f25ea198bc7520cc3f79cfd3\",\"license\":\"MIT\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b50604051620017fd380380620017fd833981810160405260408110156200003757600080fd5b50805160209182015160408051808201909152600c81526b18dbdb5c1bdd5b991b195b9960a21b93810193909352909181838282826001600160a01b038116620000c8576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c6572206d75737420626520646566696e6564000000000000604482015290519081900360640190fd5b8251620000dd906001906020860190620002ec565b50600080546001600160a01b039092166001600160a01b03199283161781556001600160601b031960609390931b92909216608052600160035560046020527f1f26cc04db5725a6013f9a871c79fcbf894bb366deda2d7526896a3d7f7bf1e680548216735d3a536e4d6dbd6114cc1ead35777bab948e36431790557f7ad6a3b7b68a4f5cf66df337fd5942d7c746b3a5d321592ec5762ec798359679805482167335a18000230da775cac24873d00ff85bccded5501790557e137c28eabea4eda5601e544e6551e6761ee561d32c4142c29e0f892835a36180548216734ddc2d193948926d02f9b1fe9e1daa0718270ed51790557f2216881abda8ce28bb79ec6ad24ecf589e0594fff84ade38d82ca32ec9eff5c6805482167339aa39c021dfbae8fac545936693ac917d5e75631790557fce6b0bb3482d6fcd115ad33ec4464c30e4c8b24ec6e3e5aa13819b39c576a85c8054821673f650c3d88d12db855b8bf7d11be6c55a4e07dcc91790557fdcea66f53103f73a3eee020f324bf4679e60b5665cd91d355a9467ab00173ae48054821673c11b1268c1a384e55c48c2391d8d480264a3a7f417905573c00e94cb662c3520282e6f5717214004a7f268889091527f10d76dfe0f3b809fe9d2b2241c0475e8ec5f5344571bd48e8a64f26f4f47c64b80549091167370e36f6bf80a52b3b46b3af8e106cc0ed743e8e41790555062000398945050505050565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826200032457600085556200036f565b82601f106200033f57805160ff19168380011785556200036f565b828001600101855582156200036f579182015b828111156200036f57825182559160200191906001019062000352565b506200037d92915062000381565b5090565b5b808211156200037d576000815560010162000382565b60805160601c611447620003b66000398061049f52506114476000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c8063912a18571161008c578063d0d2d3a211610066578063d0d2d3a2146102a7578063eb40e600146102e3578063f14b578814610309578063f77c479114610345576100df565b8063912a1857146102175780639e12fef214610247578063b10198fb14610281576100df565b80633550bd62116100bd5780633550bd62146101a15780633fc8cef3146101e35780634deef649146101eb576100df565b806306fdde03146100e457806307b54c6f1461016157806317d7de7c14610199575b600080fd5b6100ec61034d565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012657818101518382015260200161010e565b50505050905090810190601f1680156101535780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101876004803603602081101561017757600080fd5b50356001600160a01b03166103da565b60408051918252519081900360200190f35b6100ec6103ed565b6101c7600480360360208110156101b757600080fd5b50356001600160a01b0316610482565b604080516001600160a01b039092168252519081900360200190f35b6101c761049d565b6101876004803603604081101561020157600080fd5b506001600160a01b0381351690602001356104c1565b6102456004803603604081101561022d57600080fd5b506001600160a01b03813581169160200135166104d6565b005b61026d6004803603602081101561025d57600080fd5b50356001600160a01b031661057b565b604080519115158252519081900360200190f35b61026d6004803603602081101561029757600080fd5b50356001600160a01b0316610586565b610245600480360360808110156102bd57600080fd5b506001600160a01b0381358116916020810135909116906040810135906060013561059b565b6101c7600480360360208110156102f957600080fd5b50356001600160a01b03166107e4565b6102456004803603608081101561031f57600080fd5b506001600160a01b038135811691602081013590911690604081013590606001356107ef565b6101c7610a65565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103d25780601f106103a7576101008083540402835291602001916103d2565b820191906000526020600020905b8154815290600101906020018083116103b557829003601f168201915b505050505081565b60006103e582610a74565b90505b919050565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156104785780601f1061044d57610100808354040283529160200191610478565b820191906000526020600020905b81548152906001019060200180831161045b57829003601f168201915b5050505050905090565b6004602052600090815260409020546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006104cd8383610bdd565b90505b92915050565b6000546001600160a01b03163314610535576040805162461bcd60e51b815260206004820152601d60248201527f4f6e6c7920636f6e74726f6c6c65722063616e2063616c6c2074686973000000604482015290519081900360640190fd5b6001600160a01b03918216600090815260046020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909216179055565b60006103e582610c0f565b60026020526000908152604090205460ff1681565b60006105b285856105ab87610c2f565b8686610c4d565b90506105bd81610da8565b60008060006105cd888888610e7d565b92509250925083600001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561064a578181015183820152602001610632565b50505050905090810190601f1680156106775780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561069857600080fd5b505af11580156106ac573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156106d557600080fd5b81019080805160405193929190846401000000008211156106f557600080fd5b90830190602082018581111561070a57600080fd5b825164010000000081118282018810171561072457600080fd5b82525081516020918201929091019080838360005b83811015610751578181015183820152602001610739565b50505050905090810190601f16801561077e5780820380516001836020036101000a031916815260200191505b506040525050505061078f84610f05565b8351602080860151604080518a815290516001600160a01b03808d16958116949316927fd17d95895382b096bb1f89ed05a71c3e014d5ecf25944c8f1f27f07b2b9d3194928290030190a45050505050505050565b60006103e582610c2f565b60006107ff85856105ab87610c2f565b905061080a81610fcd565b80516001600160a01b03166397ccdc6061082386610c2f565b86866040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561087b57600080fd5b505af115801561088f573d6000803e3d6000fd5b5050505060008060006108a3888888611058565b92509250925083600001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610920578181015183820152602001610908565b50505050905090810190601f16801561094d5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561096e57600080fd5b505af1158015610982573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156109ab57600080fd5b81019080805160405193929190846401000000008211156109cb57600080fd5b9083019060208201858111156109e057600080fd5b82516401000000008111828201881017156109fa57600080fd5b82525081516020918201929091019080838360005b83811015610a27578181015183820152602001610a0f565b50505050905090810190601f168015610a545780820380516001836020036101000a031916815260200191505b506040525050505061078f84611114565b6000546001600160a01b031681565b6001600160a01b0380821660009081526004602081815260408084205481517f182df0f50000000000000000000000000000000000000000000000000000000081529151949516938593859363182df0f59380830193919290829003018186803b158015610ae157600080fd5b505afa158015610af5573d6000803e3d6000fd5b505050506040513d6020811015610b0b57600080fd5b5051604080517f313ce56700000000000000000000000000000000000000000000000000000000815290519192506000916001600160a01b0387169163313ce567916004808301926020929190829003018186803b158015610b6c57600080fd5b505afa158015610b80573d6000803e3d6000fd5b505050506040513d6020811015610b9657600080fd5b50519050600860ff82161015610bc75760ff600882900316610bbc83600a83900a6111d6565b9450505050506103e8565b60ff600719820116610bbc83600a83900a61122f565b600080610be984610a74565b9050610c07670de0b6b3a7640000610c0183866111d6565b9061122f565b949350505050565b6001600160a01b0390811660009081526004602052604090205416151590565b6001600160a01b039081166000908152600460205260409020541690565b610c55611296565b610c5d611296565b6001600160a01b038716808252604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b891600480820192602092909190829003018186803b158015610cb957600080fd5b505afa158015610ccd573d6000803e3d6000fd5b505050506040513d6020811015610ce357600080fd5b50516001600160a01b039081166020838101919091528782166040808501919091528783166060850181905281517f70a08231000000000000000000000000000000000000000000000000000000008152938b166004850152905190926370a08231926024808301939192829003018186803b158015610d6257600080fd5b505afa158015610d76573d6000803e3d6000fd5b505050506040513d6020811015610d8c57600080fd5b505160a082015260808101939093525060c08201529392505050565b610db58160400151610c0f565b610df05760405162461bcd60e51b81526004018080602001828103825260238152602001806113ef6023913960400191505060405180910390fd5b6000816080015111610e335760405162461bcd60e51b81526004018080602001828103825260348152602001806113bb6034913960400191505060405180910390fd5b80608001518160a001511015610e7a5760405162461bcd60e51b81526004018080602001828103825260318152602001806112d36031913960400191505060405180910390fd5b50565b60408051602480820193909352815180820390930183526044018152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fdb006a75000000000000000000000000000000000000000000000000000000001790526001600160a01b0393841660009081526004909152908120549092169391925090565b80608001518160a001510381606001516001600160a01b03166370a0823183600001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f6557600080fd5b505afa158015610f79573d6000803e3d6000fd5b505050506040513d6020811015610f8f57600080fd5b505114610e7a5760405162461bcd60e51b815260040180806020018281038252602f815260200180611334602f913960400191505060405180910390fd5b610fda8160400151610c0f565b6110155760405162461bcd60e51b81526004018080602001828103825260238152602001806113ef6023913960400191505060405180910390fd5b6000816080015111610e7a5760405162461bcd60e51b81526004018080602001828103825260378152602001806113636037913960400191505060405180910390fd5b6040805160248082018490528251808303909101815260449091018252602081810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa0712d68000000000000000000000000000000000000000000000000000000001790526001600160a01b03808616600090815260049092529281205490928392606092909116734ddc2d193948926d02f9b1fe9e1daa0718270ed58114611103576000611105565b855b90989097509095509350505050565b8060a0015181606001516001600160a01b03166370a0823183600001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561116e57600080fd5b505afa158015611182573d6000803e3d6000fd5b505050506040513d602081101561119857600080fd5b505111610e7a5760405162461bcd60e51b81526004018080602001828103825260308152602001806113046030913960400191505060405180910390fd5b6000826111e5575060006104d0565b828202828482816111f257fe5b04146104cd5760405162461bcd60e51b815260040180806020018281038252602181526020018061139a6021913960400191505060405180910390fd5b6000808211611285576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161128e57fe5b049392505050565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c08101919091529056fe5468652067617264656e20646f6573206e6f74206861766520656e6f75676820696e766573746d656e7420746f6b656e735468652067617264656e20646964206e6f7420726563656976652074686520696e766573746d656e7420746f6b656e735468652067617264656e20646964206e6f742072657475726e2074686520696e766573746d656e7420746f6b656e734d696e20696e766573746d656e7420746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77496e766573746d656e7420746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520696e766573746d656e742061646472657373206973206e6f742076616c6964a26469706673582212204b45fbfef26d31ebf4a96f50a9677e355bcc6005e7b426eaba46cbf37cf6f3e564736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100df5760003560e01c8063912a18571161008c578063d0d2d3a211610066578063d0d2d3a2146102a7578063eb40e600146102e3578063f14b578814610309578063f77c479114610345576100df565b8063912a1857146102175780639e12fef214610247578063b10198fb14610281576100df565b80633550bd62116100bd5780633550bd62146101a15780633fc8cef3146101e35780634deef649146101eb576100df565b806306fdde03146100e457806307b54c6f1461016157806317d7de7c14610199575b600080fd5b6100ec61034d565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012657818101518382015260200161010e565b50505050905090810190601f1680156101535780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101876004803603602081101561017757600080fd5b50356001600160a01b03166103da565b60408051918252519081900360200190f35b6100ec6103ed565b6101c7600480360360208110156101b757600080fd5b50356001600160a01b0316610482565b604080516001600160a01b039092168252519081900360200190f35b6101c761049d565b6101876004803603604081101561020157600080fd5b506001600160a01b0381351690602001356104c1565b6102456004803603604081101561022d57600080fd5b506001600160a01b03813581169160200135166104d6565b005b61026d6004803603602081101561025d57600080fd5b50356001600160a01b031661057b565b604080519115158252519081900360200190f35b61026d6004803603602081101561029757600080fd5b50356001600160a01b0316610586565b610245600480360360808110156102bd57600080fd5b506001600160a01b0381358116916020810135909116906040810135906060013561059b565b6101c7600480360360208110156102f957600080fd5b50356001600160a01b03166107e4565b6102456004803603608081101561031f57600080fd5b506001600160a01b038135811691602081013590911690604081013590606001356107ef565b6101c7610a65565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103d25780601f106103a7576101008083540402835291602001916103d2565b820191906000526020600020905b8154815290600101906020018083116103b557829003601f168201915b505050505081565b60006103e582610a74565b90505b919050565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156104785780601f1061044d57610100808354040283529160200191610478565b820191906000526020600020905b81548152906001019060200180831161045b57829003601f168201915b5050505050905090565b6004602052600090815260409020546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006104cd8383610bdd565b90505b92915050565b6000546001600160a01b03163314610535576040805162461bcd60e51b815260206004820152601d60248201527f4f6e6c7920636f6e74726f6c6c65722063616e2063616c6c2074686973000000604482015290519081900360640190fd5b6001600160a01b03918216600090815260046020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909216179055565b60006103e582610c0f565b60026020526000908152604090205460ff1681565b60006105b285856105ab87610c2f565b8686610c4d565b90506105bd81610da8565b60008060006105cd888888610e7d565b92509250925083600001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561064a578181015183820152602001610632565b50505050905090810190601f1680156106775780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561069857600080fd5b505af11580156106ac573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156106d557600080fd5b81019080805160405193929190846401000000008211156106f557600080fd5b90830190602082018581111561070a57600080fd5b825164010000000081118282018810171561072457600080fd5b82525081516020918201929091019080838360005b83811015610751578181015183820152602001610739565b50505050905090810190601f16801561077e5780820380516001836020036101000a031916815260200191505b506040525050505061078f84610f05565b8351602080860151604080518a815290516001600160a01b03808d16958116949316927fd17d95895382b096bb1f89ed05a71c3e014d5ecf25944c8f1f27f07b2b9d3194928290030190a45050505050505050565b60006103e582610c2f565b60006107ff85856105ab87610c2f565b905061080a81610fcd565b80516001600160a01b03166397ccdc6061082386610c2f565b86866040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561087b57600080fd5b505af115801561088f573d6000803e3d6000fd5b5050505060008060006108a3888888611058565b92509250925083600001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610920578181015183820152602001610908565b50505050905090810190601f16801561094d5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561096e57600080fd5b505af1158015610982573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156109ab57600080fd5b81019080805160405193929190846401000000008211156109cb57600080fd5b9083019060208201858111156109e057600080fd5b82516401000000008111828201881017156109fa57600080fd5b82525081516020918201929091019080838360005b83811015610a27578181015183820152602001610a0f565b50505050905090810190601f168015610a545780820380516001836020036101000a031916815260200191505b506040525050505061078f84611114565b6000546001600160a01b031681565b6001600160a01b0380821660009081526004602081815260408084205481517f182df0f50000000000000000000000000000000000000000000000000000000081529151949516938593859363182df0f59380830193919290829003018186803b158015610ae157600080fd5b505afa158015610af5573d6000803e3d6000fd5b505050506040513d6020811015610b0b57600080fd5b5051604080517f313ce56700000000000000000000000000000000000000000000000000000000815290519192506000916001600160a01b0387169163313ce567916004808301926020929190829003018186803b158015610b6c57600080fd5b505afa158015610b80573d6000803e3d6000fd5b505050506040513d6020811015610b9657600080fd5b50519050600860ff82161015610bc75760ff600882900316610bbc83600a83900a6111d6565b9450505050506103e8565b60ff600719820116610bbc83600a83900a61122f565b600080610be984610a74565b9050610c07670de0b6b3a7640000610c0183866111d6565b9061122f565b949350505050565b6001600160a01b0390811660009081526004602052604090205416151590565b6001600160a01b039081166000908152600460205260409020541690565b610c55611296565b610c5d611296565b6001600160a01b038716808252604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b891600480820192602092909190829003018186803b158015610cb957600080fd5b505afa158015610ccd573d6000803e3d6000fd5b505050506040513d6020811015610ce357600080fd5b50516001600160a01b039081166020838101919091528782166040808501919091528783166060850181905281517f70a08231000000000000000000000000000000000000000000000000000000008152938b166004850152905190926370a08231926024808301939192829003018186803b158015610d6257600080fd5b505afa158015610d76573d6000803e3d6000fd5b505050506040513d6020811015610d8c57600080fd5b505160a082015260808101939093525060c08201529392505050565b610db58160400151610c0f565b610df05760405162461bcd60e51b81526004018080602001828103825260238152602001806113ef6023913960400191505060405180910390fd5b6000816080015111610e335760405162461bcd60e51b81526004018080602001828103825260348152602001806113bb6034913960400191505060405180910390fd5b80608001518160a001511015610e7a5760405162461bcd60e51b81526004018080602001828103825260318152602001806112d36031913960400191505060405180910390fd5b50565b60408051602480820193909352815180820390930183526044018152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fdb006a75000000000000000000000000000000000000000000000000000000001790526001600160a01b0393841660009081526004909152908120549092169391925090565b80608001518160a001510381606001516001600160a01b03166370a0823183600001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f6557600080fd5b505afa158015610f79573d6000803e3d6000fd5b505050506040513d6020811015610f8f57600080fd5b505114610e7a5760405162461bcd60e51b815260040180806020018281038252602f815260200180611334602f913960400191505060405180910390fd5b610fda8160400151610c0f565b6110155760405162461bcd60e51b81526004018080602001828103825260238152602001806113ef6023913960400191505060405180910390fd5b6000816080015111610e7a5760405162461bcd60e51b81526004018080602001828103825260378152602001806113636037913960400191505060405180910390fd5b6040805160248082018490528251808303909101815260449091018252602081810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa0712d68000000000000000000000000000000000000000000000000000000001790526001600160a01b03808616600090815260049092529281205490928392606092909116734ddc2d193948926d02f9b1fe9e1daa0718270ed58114611103576000611105565b855b90989097509095509350505050565b8060a0015181606001516001600160a01b03166370a0823183600001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561116e57600080fd5b505afa158015611182573d6000803e3d6000fd5b505050506040513d602081101561119857600080fd5b505111610e7a5760405162461bcd60e51b81526004018080602001828103825260308152602001806113046030913960400191505060405180910390fd5b6000826111e5575060006104d0565b828202828482816111f257fe5b04146104cd5760405162461bcd60e51b815260040180806020018281038252602181526020018061139a6021913960400191505060405180910390fd5b6000808211611285576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161128e57fe5b049392505050565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c08101919091529056fe5468652067617264656e20646f6573206e6f74206861766520656e6f75676820696e766573746d656e7420746f6b656e735468652067617264656e20646964206e6f7420726563656976652074686520696e766573746d656e7420746f6b656e735468652067617264656e20646964206e6f742072657475726e2074686520696e766573746d656e7420746f6b656e734d696e20696e766573746d656e7420746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77496e766573746d656e7420746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520696e766573746d656e742061646472657373206973206e6f742076616c6964a26469706673582212204b45fbfef26d31ebf4a96f50a9677e355bcc6005e7b426eaba46cbf37cf6f3e564736f6c63430007060033", "devdoc": { "author": "Babylon Finance Protocol Compound lend integration.", "kind": "dev", @@ -406,7 +406,7 @@ "storageLayout": { "storage": [ { - "astId": 18742, + "astId": 17657, "contract": "contracts/integrations/lend/CompoundLendIntegration.sol:CompoundLendIntegration", "label": "controller", "offset": 0, @@ -414,7 +414,7 @@ "type": "t_address" }, { - "astId": 18746, + "astId": 17661, "contract": "contracts/integrations/lend/CompoundLendIntegration.sol:CompoundLendIntegration", "label": "name", "offset": 0, @@ -422,7 +422,7 @@ "type": "t_string_storage" }, { - "astId": 18750, + "astId": 17665, "contract": "contracts/integrations/lend/CompoundLendIntegration.sol:CompoundLendIntegration", "label": "initializedByGarden", "offset": 0, @@ -430,7 +430,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 7995, + "astId": 5603, "contract": "contracts/integrations/lend/CompoundLendIntegration.sol:CompoundLendIntegration", "label": "_status", "offset": 0, @@ -438,7 +438,7 @@ "type": "t_uint256" }, { - "astId": 19066, + "astId": 17979, "contract": "contracts/integrations/lend/CompoundLendIntegration.sol:CompoundLendIntegration", "label": "assetToCToken", "offset": 0, diff --git a/deployments/artifacts/mainnet/DepositVaultOperation.json b/deployments/artifacts/mainnet/DepositVaultOperation.json index fefede6de..6a79fd7d8 100644 --- a/deployments/artifacts/mainnet/DepositVaultOperation.json +++ b/deployments/artifacts/mainnet/DepositVaultOperation.json @@ -1,5 +1,5 @@ { - "address": "0xcb5A91A89c164a05AECDF3459b370Bd62032503c", + "address": "0xF45f5EF9D2Bd46E3386ee9c33a1ffbe66b491D07", "abi": [ { "inputs": [ @@ -196,30 +196,30 @@ "type": "function" } ], - "transactionHash": "0xa6c0b9c4aca7b5feda5c849cb639bc0647d31a622fa267c020c3becf8a9259ef", + "transactionHash": "0x62cba91c9d2a0f8ba7ebf808fb23f6d7304a48ddeae1c5f720d8857729f3ea55", "receipt": { "to": null, "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", - "contractAddress": "0xcb5A91A89c164a05AECDF3459b370Bd62032503c", - "transactionIndex": 206, - "gasUsed": "1549657", + "contractAddress": "0xF45f5EF9D2Bd46E3386ee9c33a1ffbe66b491D07", + "transactionIndex": 39, + "gasUsed": "1439280", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x1bea588d7a894e188114d73c389cb339fafac0a2c390c6c41b681b125ef41ce0", - "transactionHash": "0xa6c0b9c4aca7b5feda5c849cb639bc0647d31a622fa267c020c3becf8a9259ef", + "blockHash": "0x0212158d68078de1899fc4a8a814326913c2cfe2a451297fcd2f49eedafdfa79", + "transactionHash": "0x62cba91c9d2a0f8ba7ebf808fb23f6d7304a48ddeae1c5f720d8857729f3ea55", "logs": [], - "blockNumber": 12361044, - "cumulativeGasUsed": "12575212", + "blockNumber": 12451351, + "cumulativeGasUsed": "3399174", "status": 1, "byzantium": true }, "args": [ "vault", - "0xffe7c30daDb1B132b86aB7bbede496615d54c8Ac" + "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F" ], - "solcInputHash": "a02a2075cf667a20c416d2d0a5e8f337", - "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_capital\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"}],\"name\":\"executeOperation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_percentage\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"}],\"name\":\"exitOperation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"}],\"name\":\"getNAV\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"validateOperation\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Executes a deposit vault operation\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of the controller\",\"_name\":\"Name of the integration\"}},\"executeOperation(address,uint256,uint8,address,address,address)\":{\"params\":{\"_capital\":\"Amount of capital received from the garden\"}},\"exitOperation(uint256,address,address,address)\":{\"params\":{\"_percentage\":\"of capital to exit from the strategy\"}},\"getNAV(address,address,address)\":{\"returns\":{\"_0\":\"_nav NAV of the strategy\"}},\"validateOperation(address,address,address,uint256)\":{\"params\":{\"_data\":\"Operation data\"}}},\"title\":\"DepositVaultOperation\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates the integration\"},\"executeOperation(address,uint256,uint8,address,address,address)\":{\"notice\":\"Executes the deposit vault operation\"},\"exitOperation(uint256,address,address,address)\":{\"notice\":\"Exits the deposit vault operation.\"},\"getNAV(address,address,address)\":{\"notice\":\"Gets the NAV of the deposit vault op in the reserve asset\"},\"getName()\":{\"notice\":\"Returns the name of the operation\"},\"validateOperation(address,address,address,uint256)\":{\"notice\":\"Sets operation data for the deposit vault operation\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/strategies/operations/DepositVaultOperation.sol\":\"DepositVaultOperation\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityMinimum(uint256 _minRiskyPairLiquidityEth) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minRiskyPairLiquidityEth() external view returns (uint256);\\n\\n function getUniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0x57cf4ece98219f805a416e8c24728d30d9b37c4126d66785d2617b97e35ffae6\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function nftAddress() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategy(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function reenableEthForStrategies() external;\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x5e460136e0b45024ea1c1f32cde607f3ce75dd5b14cee34007d6bbd08beabc82\",\"license\":\"Apache License\"},\"contracts/interfaces/IOperation.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from './IGarden.sol';\\nimport {IStrategy} from './IStrategy.sol';\\n\\n/**\\n * @title IOperation\\n * @author Babylon Finance\\n *\\n * Interface for an strategy operation\\n */\\ninterface IOperation {\\n function validateOperation(\\n address _data,\\n IGarden _garden,\\n address _integration,\\n uint256 _index\\n ) external view;\\n\\n function executeOperation(\\n address _asset,\\n uint256 _capital,\\n uint8 _assetStatus,\\n address _data,\\n IGarden _garden,\\n address _integration\\n )\\n external\\n returns (\\n address,\\n uint256,\\n uint8\\n );\\n\\n function exitOperation(\\n uint256 _percentage,\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external;\\n\\n function getNAV(\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external view returns (uint256);\\n\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x856e173e6c8e1fdbe54988df58d0805a23a6a2f8408bd4f90a488a1978e762ed\",\"license\":\"Apache License\"},\"contracts/interfaces/IPassiveIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPassiveIntegration\\n * @author Babylon Finance\\n *\\n * Interface for passive investments protocol integrations\\n */\\ninterface IPassiveIntegration {\\n function enterInvestment(\\n address _strategy,\\n address _investmentAddress,\\n uint256 _investmentTokensOut,\\n address _tokenIn,\\n uint256 _maxAmountIn\\n ) external;\\n\\n function exitInvestment(\\n address _strategy,\\n address _investmentAddress,\\n uint256 _investmentTokenIn,\\n address _tokenOut,\\n uint256 _minAmountOut\\n ) external;\\n\\n function isInvestment(address _investmentAddress) external view returns (bool);\\n\\n function getExpectedShares(address _investmentAddress, uint256 _ethAmount) external view returns (uint256);\\n\\n function getPricePerShare(address _investmentAddress) external view returns (uint256);\\n\\n function getInvestmentAsset(address _investmentAddress) external view returns (address);\\n}\\n\",\"keccak256\":\"0xfd83ed02b6f3b4e2c7cbd460165f943f313082c93d76d2c4b4ff67859805559d\",\"license\":\"Apache License\"},\"contracts/interfaces/IPriceOracle.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol IPriceOracle)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPriceOracle\\n * @author Babylon Finance\\n *\\n * Interface for interacting with PriceOracle\\n */\\ninterface IPriceOracle {\\n /* ============ Functions ============ */\\n\\n function getPrice(address _assetOne, address _assetTwo) external view returns (uint256);\\n\\n function updateAdapters(address _assetOne, address _assetTwo) external;\\n}\\n\",\"keccak256\":\"0xa22e0e5e166f6f6714553b736ee921b916c37bc5b557042bf6042cc010d2a041\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital,\\n address _strategyNft\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function strategyNft() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x4396906e436eb68c96715e0a53ae1656ac5d7934ebdaeb58ec3c33953465bc39\",\"license\":\"Apache License\"},\"contracts/interfaces/ITradeIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title ITrade\\n * @author Babylon Finance\\n *\\n * Interface for trading protocol integrations\\n */\\ninterface ITradeIntegration {\\n function trade(\\n address _strategy,\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken,\\n uint256 _minReceiveQuantity\\n ) external;\\n\\n function getConversionRates(\\n address _sourceToken,\\n address _destinationToken,\\n uint256 _sourceQuantity\\n ) external returns (uint256, uint256);\\n}\\n\",\"keccak256\":\"0x95df25f2cbfd3d82a9e22c9202f9fc2c497e90fd6e5fcfb00c4162f6447c0cbd\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"contracts/strategies/operations/DepositVaultOperation.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Operation} from './Operation.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\\nimport {IPassiveIntegration} from '../../interfaces/IPassiveIntegration.sol';\\n\\n/**\\n * @title DepositVaultOperation\\n * @author Babylon Finance\\n *\\n * Executes a deposit vault operation\\n */\\ncontract DepositVaultOperation is Operation {\\n using SafeMath for uint256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _controller Address of the controller\\n */\\n constructor(string memory _name, address _controller) Operation(_name, _controller) {}\\n\\n /**\\n * Sets operation data for the deposit vault operation\\n *\\n * @param _data Operation data\\n */\\n function validateOperation(\\n address _data,\\n IGarden, /* _garden */\\n address _integration,\\n uint256 /* _index */\\n ) external view override onlyStrategy {\\n require(IPassiveIntegration(_integration).isInvestment(_data), 'Must be a valid yield vault');\\n }\\n\\n /**\\n * Executes the deposit vault operation\\n * @param _capital Amount of capital received from the garden\\n */\\n function executeOperation(\\n address _asset,\\n uint256 _capital,\\n uint8, /* _assetStatus */\\n address _data,\\n IGarden, /* _garden */\\n address _integration\\n )\\n external\\n override\\n onlyStrategy\\n returns (\\n address,\\n uint256,\\n uint8\\n )\\n {\\n address yieldVault = _data;\\n address vaultAsset = IPassiveIntegration(_integration).getInvestmentAsset(yieldVault);\\n if (vaultAsset != _asset) {\\n IStrategy(msg.sender).trade(_asset, _capital, vaultAsset);\\n }\\n uint256 exactAmount = IPassiveIntegration(_integration).getExpectedShares(yieldVault, _capital);\\n uint256 minAmountExpected = exactAmount.sub(exactAmount.preciseMul(SLIPPAGE_ALLOWED));\\n IPassiveIntegration(_integration).enterInvestment(\\n msg.sender,\\n yieldVault,\\n minAmountExpected,\\n vaultAsset,\\n IERC20(vaultAsset).balanceOf(msg.sender)\\n );\\n return (yieldVault, IERC20(yieldVault).balanceOf(msg.sender), 0); // liquid\\n }\\n\\n /**\\n * Exits the deposit vault operation.\\n * @param _percentage of capital to exit from the strategy\\n */\\n function exitOperation(\\n uint256 _percentage,\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external override onlyStrategy {\\n require(_percentage <= HUNDRED_PERCENT, 'Unwind Percentage <= 100%');\\n address yieldVault = _data;\\n address vaultAsset = IPassiveIntegration(_integration).getInvestmentAsset(yieldVault);\\n uint256 amountVault = IERC20(yieldVault).balanceOf(msg.sender).preciseMul(_percentage);\\n IPassiveIntegration(_integration).exitInvestment(\\n msg.sender,\\n yieldVault,\\n amountVault,\\n vaultAsset,\\n IPassiveIntegration(_integration).getPricePerShare(yieldVault).mul(\\n amountVault.sub(amountVault.preciseMul(SLIPPAGE_ALLOWED))\\n )\\n );\\n if (vaultAsset != _garden.reserveAsset()) {\\n IStrategy(msg.sender).trade(vaultAsset, IERC20(vaultAsset).balanceOf(msg.sender), _garden.reserveAsset());\\n }\\n }\\n\\n /**\\n * Gets the NAV of the deposit vault op in the reserve asset\\n *\\n * @return _nav NAV of the strategy\\n */\\n function getNAV(\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external view override onlyStrategy returns (uint256) {\\n if (!IStrategy(msg.sender).isStrategyActive()) {\\n return 0;\\n }\\n address vaultAsset = IPassiveIntegration(_integration).getInvestmentAsset(_data);\\n uint256 price = _getPrice(_garden.reserveAsset(), vaultAsset);\\n uint256 NAV =\\n IPassiveIntegration(_integration).getPricePerShare(_data).mul(IERC20(_data).balanceOf(msg.sender)).div(\\n price\\n );\\n require(NAV != 0, 'NAV has to be bigger 0');\\n return NAV;\\n }\\n}\\n\",\"keccak256\":\"0xea61455c586aa0a39ce62147f9d4c5c43c0ded03a14cb9bfbe2e714c2ca5b9b6\",\"license\":\"Apache License\"},\"contracts/strategies/operations/Operation.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {IOperation} from '../../interfaces/IOperation.sol';\\nimport {ITradeIntegration} from '../../interfaces/ITradeIntegration.sol';\\nimport {IPriceOracle} from '../../interfaces/IPriceOracle.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\n\\n/**\\n * @title LongStrategy\\n * @author Babylon Finance\\n *\\n * Holds the data for a long strategy\\n */\\nabstract contract Operation is IOperation {\\n using SafeMath for uint256;\\n /* ============ Modifiers ============ */\\n\\n modifier onlyStrategy() {\\n IStrategy strategy = IStrategy(msg.sender);\\n IGarden garden = strategy.garden();\\n require(IBabController(controller).isSystemContract(address(garden)), 'Only a garden can call this');\\n require(garden.isStrategy(msg.sender), 'Sender must be a strategy');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n uint256 internal constant SLIPPAGE_ALLOWED = 1e16; // 1%\\n uint256 internal constant HUNDRED_PERCENT = 1e18; // 100%\\n address internal constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\\n\\n // Address of the controller\\n address public controller;\\n // Name of the operation\\n string public name;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _controller Address of the controller\\n */\\n constructor(string memory _name, address _controller) {\\n require(_controller != address(0), 'Controller must be defined');\\n name = _name;\\n controller = _controller;\\n }\\n\\n /* ============ Virtual External Functions ============ */\\n\\n function validateOperation(\\n address _data,\\n IGarden _garden,\\n address _integration,\\n uint256 _index\\n ) external view virtual override;\\n\\n function executeOperation(\\n address _asset,\\n uint256 _capital,\\n uint8 _assetStatus,\\n address _data,\\n IGarden _garden,\\n address _integration\\n )\\n external\\n virtual\\n override\\n returns (\\n address,\\n uint256,\\n uint8\\n );\\n\\n function exitOperation(\\n uint256 _percentage,\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external virtual override;\\n\\n function getNAV(\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external view virtual override returns (uint256);\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the name of the operation\\n */\\n function getName() external view override returns (string memory) {\\n return name;\\n }\\n\\n /**\\n * Returns the price of the pair through the price oracle\\n */\\n function _getPrice(address _assetOne, address _assetTwo) internal view returns (uint256) {\\n IPriceOracle oracle = IPriceOracle(IBabController(controller).priceOracle());\\n return oracle.getPrice(_assetOne, _assetTwo);\\n }\\n\\n function _normalizeDecimals(address _asset, uint256 _quantity) internal view returns (uint256) {\\n uint8 tokenDecimals = ERC20(_asset).decimals();\\n return tokenDecimals != 18 ? _quantity.mul(10**(18 - tokenDecimals)) : _quantity;\\n }\\n}\\n\",\"keccak256\":\"0x9b65b8d307d5c35ba537bf051095d28fbb3128c593091cc1ac16de22b4370d8e\",\"license\":\"Apache License\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b5060405162001c7438038062001c74833981810160405260408110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001519150829050816001600160a01b03811662000150576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c6572206d75737420626520646566696e6564000000000000604482015290519081900360640190fd5b81516200016590600190602085019062000190565b50600080546001600160a01b0319166001600160a01b0392909216919091179055506200023c915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001c8576000855562000213565b82601f10620001e357805160ff191683800117855562000213565b8280016001018555821562000213579182015b8281111562000213578251825591602001919060010190620001f6565b506200022192915062000225565b5090565b5b8082111562000221576000815560010162000226565b611a28806200024c6000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80634222326a1161005b5780634222326a1461014757806355d9750b14610191578063c8cd307514610209578063f77c4791146102455761007d565b806306fdde031461008257806317d7de7c146100ff578063419ea18a14610107575b600080fd5b61008a610269565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100c45781810151838201526020016100ac565b50505050905090810190601f1680156100f15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61008a6102f6565b6101456004803603608081101561011d57600080fd5b508035906001600160a01b03602082013581169160408101358216916060909101351661038b565b005b61017f6004803603606081101561015d57600080fd5b506001600160a01b038135811691602081013582169160409091013516610a4a565b60408051918252519081900360200190f35b6101de600480360360c08110156101a757600080fd5b506001600160a01b03813581169160208101359160ff604083013516916060810135821691608082013581169160a0013516610eff565b604080516001600160a01b039094168452602084019290925260ff1682820152519081900360600190f35b6101456004803603608081101561021f57600080fd5b506001600160a01b0381358116916020810135821691604082013516906060013561148b565b61024d611758565b604080516001600160a01b039092168252519081900360200190f35b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102ee5780601f106102c3576101008083540402835291602001916102ee565b820191906000526020600020905b8154815290600101906020018083116102d157829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156103815780601f1061035657610100808354040283529160200191610381565b820191906000526020600020905b81548152906001019060200180831161036457829003601f168201915b5050505050905090565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156103cb57600080fd5b505afa1580156103df573d6000803e3d6000fd5b505050506040513d60208110156103f557600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561044657600080fd5b505afa15801561045a573d6000803e3d6000fd5b505050506040513d602081101561047057600080fd5b50516104c3576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b15801561050957600080fd5b505afa15801561051d573d6000803e3d6000fd5b505050506040513d602081101561053357600080fd5b5051610586576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b670de0b6b3a76400008611156105e3576040805162461bcd60e51b815260206004820152601960248201527f556e77696e642050657263656e74616765203c3d203130302500000000000000604482015290519081900360640190fd5b60008590506000846001600160a01b031663f337f630836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561063757600080fd5b505afa15801561064b573d6000803e3d6000fd5b505050506040513d602081101561066157600080fd5b5051604080517f70a082310000000000000000000000000000000000000000000000000000000081523360048201529051919250600091610700918b916001600160a01b038716916370a08231916024808301926020929190829003018186803b1580156106ce57600080fd5b505afa1580156106e2573d6000803e3d6000fd5b505050506040513d60208110156106f857600080fd5b505190611767565b90506001600160a01b03861663871be911338584866107b261073361072c84662386f26fc10000611767565b8990611788565b8d6001600160a01b031663ec422afd8c6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561078057600080fd5b505afa158015610794573d6000803e3d6000fd5b505050506040513d60208110156107aa57600080fd5b5051906117e5565b6040518663ffffffff1660e01b815260040180866001600160a01b03168152602001856001600160a01b03168152602001848152602001836001600160a01b0316815260200182815260200195505050505050600060405180830381600087803b15801561081f57600080fd5b505af1158015610833573d6000803e3d6000fd5b50505050866001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561087057600080fd5b505afa158015610884573d6000803e3d6000fd5b505050506040513d602081101561089a57600080fd5b50516001600160a01b03838116911614610a3f57336001600160a01b0316630e32db5283846001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561090b57600080fd5b505afa15801561091f573d6000803e3d6000fd5b505050506040513d602081101561093557600080fd5b505160408051631f0b96b960e31b815290516001600160a01b038d169163f85cb5c8916004808301926020929190829003018186803b15801561097757600080fd5b505afa15801561098b573d6000803e3d6000fd5b505050506040513d60208110156109a157600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b1681526001600160a01b039485166004820152602481019390935292166044820152905160648083019260209291908290030181600087803b158015610a1257600080fd5b505af1158015610a26573d6000803e3d6000fd5b505050506040513d6020811015610a3c57600080fd5b50505b505050505050505050565b6000803390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015610a8b57600080fd5b505afa158015610a9f573d6000803e3d6000fd5b505050506040513d6020811015610ab557600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b158015610b0657600080fd5b505afa158015610b1a573d6000803e3d6000fd5b505050506040513d6020811015610b3057600080fd5b5051610b83576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b158015610bc957600080fd5b505afa158015610bdd573d6000803e3d6000fd5b505050506040513d6020811015610bf357600080fd5b5051610c46576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b336001600160a01b031663e4df5e1a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c7f57600080fd5b505afa158015610c93573d6000803e3d6000fd5b505050506040513d6020811015610ca957600080fd5b5051610cb85760009250610ef6565b6000846001600160a01b031663f337f630886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610d0757600080fd5b505afa158015610d1b573d6000803e3d6000fd5b505050506040513d6020811015610d3157600080fd5b505160408051631f0b96b960e31b81529051919250600091610db0916001600160a01b038a169163f85cb5c891600480820192602092909190829003018186803b158015610d7e57600080fd5b505afa158015610d92573d6000803e3d6000fd5b505050506040513d6020811015610da857600080fd5b50518361183e565b90506000610e9d82610e978b6001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610e0857600080fd5b505afa158015610e1c573d6000803e3d6000fd5b505050506040513d6020811015610e3257600080fd5b5051604080517fec422afd0000000000000000000000000000000000000000000000000000000081526001600160a01b038f811660048301529151918d169163ec422afd91602480820192602092909190829003018186803b15801561078057600080fd5b9061196a565b905080610ef1576040805162461bcd60e51b815260206004820152601660248201527f4e41562068617320746f20626520626967676572203000000000000000000000604482015290519081900360640190fd5b945050505b50509392505050565b6000806000803390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015610f4357600080fd5b505afa158015610f57573d6000803e3d6000fd5b505050506040513d6020811015610f6d57600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b158015610fbe57600080fd5b505afa158015610fd2573d6000803e3d6000fd5b505050506040513d6020811015610fe857600080fd5b505161103b576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b15801561108157600080fd5b505afa158015611095573d6000803e3d6000fd5b505050506040513d60208110156110ab57600080fd5b50516110fe576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b60008890506000876001600160a01b031663f337f630836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561115257600080fd5b505afa158015611166573d6000803e3d6000fd5b505050506040513d602081101561117c57600080fd5b505190506001600160a01b03808216908e161461123057604080517f0e32db520000000000000000000000000000000000000000000000000000000081526001600160a01b038f81166004830152602482018f90528316604482015290513391630e32db529160648083019260209291908290030181600087803b15801561120357600080fd5b505af1158015611217573d6000803e3d6000fd5b505050506040513d602081101561122d57600080fd5b50505b6000886001600160a01b0316634deef649848f6040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060206040518083038186803b15801561128757600080fd5b505afa15801561129b573d6000803e3d6000fd5b505050506040513d60208110156112b157600080fd5b5051905060006112d26112cb83662386f26fc10000611767565b8390611788565b9050896001600160a01b031663976a99be33868487886001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561133457600080fd5b505afa158015611348573d6000803e3d6000fd5b505050506040513d602081101561135e57600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e089901b1681526001600160a01b03968716600482015294861660248601526044850193909352931660648301526084820192909252905160a480830192600092919082900301818387803b1580156113de57600080fd5b505af11580156113f2573d6000803e3d6000fd5b5050505083846001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561144457600080fd5b505afa158015611458573d6000803e3d6000fd5b505050506040513d602081101561146e57600080fd5b505190995097506000965050505050505096509650969350505050565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156114cb57600080fd5b505afa1580156114df573d6000803e3d6000fd5b505050506040513d60208110156114f557600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561154657600080fd5b505afa15801561155a573d6000803e3d6000fd5b505050506040513d602081101561157057600080fd5b50516115c3576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b15801561160957600080fd5b505afa15801561161d573d6000803e3d6000fd5b505050506040513d602081101561163357600080fd5b5051611686576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b836001600160a01b0316639e12fef2876040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156116d357600080fd5b505afa1580156116e7573d6000803e3d6000fd5b505050506040513d60208110156116fd57600080fd5b5051611750576040805162461bcd60e51b815260206004820152601b60248201527f4d75737420626520612076616c6964207969656c64207661756c740000000000604482015290519081900360640190fd5b505050505050565b6000546001600160a01b031681565b600061177f670de0b6b3a7640000610e9785856117e5565b90505b92915050565b6000828211156117df576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000826117f457506000611782565b8282028284828161180157fe5b041461177f5760405162461bcd60e51b81526004018080602001828103825260218152602001806119d26021913960400191505060405180910390fd5b60008054604080517f2630c12f000000000000000000000000000000000000000000000000000000008152905183926001600160a01b031691632630c12f916004808301926020929190829003018186803b15801561189c57600080fd5b505afa1580156118b0573d6000803e3d6000fd5b505050506040513d60208110156118c657600080fd5b5051604080517fac41865a0000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152868116602483015291519293509083169163ac41865a91604480820192602092909190829003018186803b15801561193657600080fd5b505afa15801561194a573d6000803e3d6000fd5b505050506040513d602081101561196057600080fd5b5051949350505050565b60008082116119c0576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816119c957fe5b04939250505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220f15281613f21a8613a01856895ffa02befe792756d133abb45d801a56466397064736f6c63430007060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80634222326a1161005b5780634222326a1461014757806355d9750b14610191578063c8cd307514610209578063f77c4791146102455761007d565b806306fdde031461008257806317d7de7c146100ff578063419ea18a14610107575b600080fd5b61008a610269565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100c45781810151838201526020016100ac565b50505050905090810190601f1680156100f15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61008a6102f6565b6101456004803603608081101561011d57600080fd5b508035906001600160a01b03602082013581169160408101358216916060909101351661038b565b005b61017f6004803603606081101561015d57600080fd5b506001600160a01b038135811691602081013582169160409091013516610a4a565b60408051918252519081900360200190f35b6101de600480360360c08110156101a757600080fd5b506001600160a01b03813581169160208101359160ff604083013516916060810135821691608082013581169160a0013516610eff565b604080516001600160a01b039094168452602084019290925260ff1682820152519081900360600190f35b6101456004803603608081101561021f57600080fd5b506001600160a01b0381358116916020810135821691604082013516906060013561148b565b61024d611758565b604080516001600160a01b039092168252519081900360200190f35b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102ee5780601f106102c3576101008083540402835291602001916102ee565b820191906000526020600020905b8154815290600101906020018083116102d157829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156103815780601f1061035657610100808354040283529160200191610381565b820191906000526020600020905b81548152906001019060200180831161036457829003601f168201915b5050505050905090565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156103cb57600080fd5b505afa1580156103df573d6000803e3d6000fd5b505050506040513d60208110156103f557600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561044657600080fd5b505afa15801561045a573d6000803e3d6000fd5b505050506040513d602081101561047057600080fd5b50516104c3576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b15801561050957600080fd5b505afa15801561051d573d6000803e3d6000fd5b505050506040513d602081101561053357600080fd5b5051610586576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b670de0b6b3a76400008611156105e3576040805162461bcd60e51b815260206004820152601960248201527f556e77696e642050657263656e74616765203c3d203130302500000000000000604482015290519081900360640190fd5b60008590506000846001600160a01b031663f337f630836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561063757600080fd5b505afa15801561064b573d6000803e3d6000fd5b505050506040513d602081101561066157600080fd5b5051604080517f70a082310000000000000000000000000000000000000000000000000000000081523360048201529051919250600091610700918b916001600160a01b038716916370a08231916024808301926020929190829003018186803b1580156106ce57600080fd5b505afa1580156106e2573d6000803e3d6000fd5b505050506040513d60208110156106f857600080fd5b505190611767565b90506001600160a01b03861663871be911338584866107b261073361072c84662386f26fc10000611767565b8990611788565b8d6001600160a01b031663ec422afd8c6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561078057600080fd5b505afa158015610794573d6000803e3d6000fd5b505050506040513d60208110156107aa57600080fd5b5051906117e5565b6040518663ffffffff1660e01b815260040180866001600160a01b03168152602001856001600160a01b03168152602001848152602001836001600160a01b0316815260200182815260200195505050505050600060405180830381600087803b15801561081f57600080fd5b505af1158015610833573d6000803e3d6000fd5b50505050866001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561087057600080fd5b505afa158015610884573d6000803e3d6000fd5b505050506040513d602081101561089a57600080fd5b50516001600160a01b03838116911614610a3f57336001600160a01b0316630e32db5283846001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561090b57600080fd5b505afa15801561091f573d6000803e3d6000fd5b505050506040513d602081101561093557600080fd5b505160408051631f0b96b960e31b815290516001600160a01b038d169163f85cb5c8916004808301926020929190829003018186803b15801561097757600080fd5b505afa15801561098b573d6000803e3d6000fd5b505050506040513d60208110156109a157600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b1681526001600160a01b039485166004820152602481019390935292166044820152905160648083019260209291908290030181600087803b158015610a1257600080fd5b505af1158015610a26573d6000803e3d6000fd5b505050506040513d6020811015610a3c57600080fd5b50505b505050505050505050565b6000803390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015610a8b57600080fd5b505afa158015610a9f573d6000803e3d6000fd5b505050506040513d6020811015610ab557600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b158015610b0657600080fd5b505afa158015610b1a573d6000803e3d6000fd5b505050506040513d6020811015610b3057600080fd5b5051610b83576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b158015610bc957600080fd5b505afa158015610bdd573d6000803e3d6000fd5b505050506040513d6020811015610bf357600080fd5b5051610c46576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b336001600160a01b031663e4df5e1a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c7f57600080fd5b505afa158015610c93573d6000803e3d6000fd5b505050506040513d6020811015610ca957600080fd5b5051610cb85760009250610ef6565b6000846001600160a01b031663f337f630886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610d0757600080fd5b505afa158015610d1b573d6000803e3d6000fd5b505050506040513d6020811015610d3157600080fd5b505160408051631f0b96b960e31b81529051919250600091610db0916001600160a01b038a169163f85cb5c891600480820192602092909190829003018186803b158015610d7e57600080fd5b505afa158015610d92573d6000803e3d6000fd5b505050506040513d6020811015610da857600080fd5b50518361183e565b90506000610e9d82610e978b6001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610e0857600080fd5b505afa158015610e1c573d6000803e3d6000fd5b505050506040513d6020811015610e3257600080fd5b5051604080517fec422afd0000000000000000000000000000000000000000000000000000000081526001600160a01b038f811660048301529151918d169163ec422afd91602480820192602092909190829003018186803b15801561078057600080fd5b9061196a565b905080610ef1576040805162461bcd60e51b815260206004820152601660248201527f4e41562068617320746f20626520626967676572203000000000000000000000604482015290519081900360640190fd5b945050505b50509392505050565b6000806000803390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015610f4357600080fd5b505afa158015610f57573d6000803e3d6000fd5b505050506040513d6020811015610f6d57600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b158015610fbe57600080fd5b505afa158015610fd2573d6000803e3d6000fd5b505050506040513d6020811015610fe857600080fd5b505161103b576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b15801561108157600080fd5b505afa158015611095573d6000803e3d6000fd5b505050506040513d60208110156110ab57600080fd5b50516110fe576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b60008890506000876001600160a01b031663f337f630836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561115257600080fd5b505afa158015611166573d6000803e3d6000fd5b505050506040513d602081101561117c57600080fd5b505190506001600160a01b03808216908e161461123057604080517f0e32db520000000000000000000000000000000000000000000000000000000081526001600160a01b038f81166004830152602482018f90528316604482015290513391630e32db529160648083019260209291908290030181600087803b15801561120357600080fd5b505af1158015611217573d6000803e3d6000fd5b505050506040513d602081101561122d57600080fd5b50505b6000886001600160a01b0316634deef649848f6040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060206040518083038186803b15801561128757600080fd5b505afa15801561129b573d6000803e3d6000fd5b505050506040513d60208110156112b157600080fd5b5051905060006112d26112cb83662386f26fc10000611767565b8390611788565b9050896001600160a01b031663976a99be33868487886001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561133457600080fd5b505afa158015611348573d6000803e3d6000fd5b505050506040513d602081101561135e57600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e089901b1681526001600160a01b03968716600482015294861660248601526044850193909352931660648301526084820192909252905160a480830192600092919082900301818387803b1580156113de57600080fd5b505af11580156113f2573d6000803e3d6000fd5b5050505083846001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561144457600080fd5b505afa158015611458573d6000803e3d6000fd5b505050506040513d602081101561146e57600080fd5b505190995097506000965050505050505096509650969350505050565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156114cb57600080fd5b505afa1580156114df573d6000803e3d6000fd5b505050506040513d60208110156114f557600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561154657600080fd5b505afa15801561155a573d6000803e3d6000fd5b505050506040513d602081101561157057600080fd5b50516115c3576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b15801561160957600080fd5b505afa15801561161d573d6000803e3d6000fd5b505050506040513d602081101561163357600080fd5b5051611686576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b836001600160a01b0316639e12fef2876040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156116d357600080fd5b505afa1580156116e7573d6000803e3d6000fd5b505050506040513d60208110156116fd57600080fd5b5051611750576040805162461bcd60e51b815260206004820152601b60248201527f4d75737420626520612076616c6964207969656c64207661756c740000000000604482015290519081900360640190fd5b505050505050565b6000546001600160a01b031681565b600061177f670de0b6b3a7640000610e9785856117e5565b90505b92915050565b6000828211156117df576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000826117f457506000611782565b8282028284828161180157fe5b041461177f5760405162461bcd60e51b81526004018080602001828103825260218152602001806119d26021913960400191505060405180910390fd5b60008054604080517f2630c12f000000000000000000000000000000000000000000000000000000008152905183926001600160a01b031691632630c12f916004808301926020929190829003018186803b15801561189c57600080fd5b505afa1580156118b0573d6000803e3d6000fd5b505050506040513d60208110156118c657600080fd5b5051604080517fac41865a0000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152868116602483015291519293509083169163ac41865a91604480820192602092909190829003018186803b15801561193657600080fd5b505afa15801561194a573d6000803e3d6000fd5b505050506040513d602081101561196057600080fd5b5051949350505050565b60008082116119c0576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816119c957fe5b04939250505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220f15281613f21a8613a01856895ffa02befe792756d133abb45d801a56466397064736f6c63430007060033", + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_capital\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"}],\"name\":\"executeOperation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_percentage\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"}],\"name\":\"exitOperation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"}],\"name\":\"getNAV\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"validateOperation\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Executes a deposit vault operation\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of the controller\",\"_name\":\"Name of the integration\"}},\"executeOperation(address,uint256,uint8,address,address,address)\":{\"params\":{\"_capital\":\"Amount of capital received from the garden\"}},\"exitOperation(uint256,address,address,address)\":{\"params\":{\"_percentage\":\"of capital to exit from the strategy\"}},\"getNAV(address,address,address)\":{\"returns\":{\"_0\":\"_nav NAV of the strategy\"}},\"validateOperation(address,address,address,uint256)\":{\"params\":{\"_data\":\"Operation data\"}}},\"title\":\"DepositVaultOperation\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates the integration\"},\"executeOperation(address,uint256,uint8,address,address,address)\":{\"notice\":\"Executes the deposit vault operation\"},\"exitOperation(uint256,address,address,address)\":{\"notice\":\"Exits the deposit vault operation.\"},\"getNAV(address,address,address)\":{\"notice\":\"Gets the NAV of the deposit vault op in the reserve asset\"},\"getName()\":{\"notice\":\"Returns the name of the operation\"},\"validateOperation(address,address,address,uint256)\":{\"notice\":\"Sets operation data for the deposit vault operation\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/strategies/operations/DepositVaultOperation.sol\":\"DepositVaultOperation\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editGardenNFT(address _newGardenNFT) external;\\n\\n function editStrategyNFT(address _newStrategyNFT) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function editUniswapFactory(address _newUniswapFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\\n\\n function maxContributorsPerGarden() external view returns (uint256);\\n\\n function gardenCreationIsOpen() external view returns (bool);\\n\\n function openPublicGardenCreation() external;\\n\\n function setMaxContributorsPerGarden(uint256 _newMax) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function gardenNFT() external view returns (address);\\n\\n function strategyNFT() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\\n\\n function uniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0xdee5a27301c24f507d312f32249487fa9b0a756062a7e479405a1d1ee9ee7bb8\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function isGardenStrategy(address _strategy) external view returns (bool);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategyActiveInGarden(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to,\\n bool _withPenalty\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x88f1786ffee23e386aaa1735177912e1b5a7cdd440dafe52fb139fe50fd621b4\",\"license\":\"Apache License\"},\"contracts/interfaces/IOperation.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from './IGarden.sol';\\nimport {IStrategy} from './IStrategy.sol';\\n\\n/**\\n * @title IOperation\\n * @author Babylon Finance\\n *\\n * Interface for an strategy operation\\n */\\ninterface IOperation {\\n function validateOperation(\\n address _data,\\n IGarden _garden,\\n address _integration,\\n uint256 _index\\n ) external view;\\n\\n function executeOperation(\\n address _asset,\\n uint256 _capital,\\n uint8 _assetStatus,\\n address _data,\\n IGarden _garden,\\n address _integration\\n )\\n external\\n returns (\\n address,\\n uint256,\\n uint8\\n );\\n\\n function exitOperation(\\n uint256 _percentage,\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external;\\n\\n function getNAV(\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external view returns (uint256);\\n\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x856e173e6c8e1fdbe54988df58d0805a23a6a2f8408bd4f90a488a1978e762ed\",\"license\":\"Apache License\"},\"contracts/interfaces/IPassiveIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPassiveIntegration\\n * @author Babylon Finance\\n *\\n * Interface for passive investments protocol integrations\\n */\\ninterface IPassiveIntegration {\\n function enterInvestment(\\n address _strategy,\\n address _investmentAddress,\\n uint256 _investmentTokensOut,\\n address _tokenIn,\\n uint256 _maxAmountIn\\n ) external;\\n\\n function exitInvestment(\\n address _strategy,\\n address _investmentAddress,\\n uint256 _investmentTokenIn,\\n address _tokenOut,\\n uint256 _minAmountOut\\n ) external;\\n\\n function isInvestment(address _investmentAddress) external view returns (bool);\\n\\n function getExpectedShares(address _investmentAddress, uint256 _ethAmount) external view returns (uint256);\\n\\n function getPricePerShare(address _investmentAddress) external view returns (uint256);\\n\\n function getInvestmentAsset(address _investmentAddress) external view returns (address);\\n}\\n\",\"keccak256\":\"0xfd83ed02b6f3b4e2c7cbd460165f943f313082c93d76d2c4b4ff67859805559d\",\"license\":\"Apache License\"},\"contracts/interfaces/IPriceOracle.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol IPriceOracle)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPriceOracle\\n * @author Babylon Finance\\n *\\n * Interface for interacting with PriceOracle\\n */\\ninterface IPriceOracle {\\n /* ============ Functions ============ */\\n\\n function getPrice(address _assetOne, address _assetTwo) external view returns (uint256);\\n\\n function updateAdapters(address _assetOne, address _assetTwo) external;\\n}\\n\",\"keccak256\":\"0xa22e0e5e166f6f6714553b736ee921b916c37bc5b557042bf6042cc010d2a041\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n address,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x850597ec9a68eb86f31f13b6b77d3b31350b4ed3d0019dedfbd3550ad1a1d9e2\",\"license\":\"Apache License\"},\"contracts/interfaces/ITradeIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title ITrade\\n * @author Babylon Finance\\n *\\n * Interface for trading protocol integrations\\n */\\ninterface ITradeIntegration {\\n function trade(\\n address _strategy,\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken,\\n uint256 _minReceiveQuantity\\n ) external;\\n\\n function getConversionRates(\\n address _sourceToken,\\n address _destinationToken,\\n uint256 _sourceQuantity\\n ) external returns (uint256, uint256);\\n}\\n\",\"keccak256\":\"0x95df25f2cbfd3d82a9e22c9202f9fc2c497e90fd6e5fcfb00c4162f6447c0cbd\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"contracts/strategies/operations/DepositVaultOperation.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Operation} from './Operation.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\\nimport {IPassiveIntegration} from '../../interfaces/IPassiveIntegration.sol';\\n\\n/**\\n * @title DepositVaultOperation\\n * @author Babylon Finance\\n *\\n * Executes a deposit vault operation\\n */\\ncontract DepositVaultOperation is Operation {\\n using SafeMath for uint256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _controller Address of the controller\\n */\\n constructor(string memory _name, address _controller) Operation(_name, _controller) {}\\n\\n /**\\n * Sets operation data for the deposit vault operation\\n *\\n * @param _data Operation data\\n */\\n function validateOperation(\\n address _data,\\n IGarden, /* _garden */\\n address _integration,\\n uint256 /* _index */\\n ) external view override onlyStrategy {\\n require(IPassiveIntegration(_integration).isInvestment(_data), 'Must be a valid yield vault');\\n }\\n\\n /**\\n * Executes the deposit vault operation\\n * @param _capital Amount of capital received from the garden\\n */\\n function executeOperation(\\n address _asset,\\n uint256 _capital,\\n uint8, /* _assetStatus */\\n address _data,\\n IGarden, /* _garden */\\n address _integration\\n )\\n external\\n override\\n onlyStrategy\\n returns (\\n address,\\n uint256,\\n uint8\\n )\\n {\\n address yieldVault = _data;\\n address vaultAsset = IPassiveIntegration(_integration).getInvestmentAsset(yieldVault);\\n if (vaultAsset != _asset) {\\n IStrategy(msg.sender).trade(_asset, _capital, vaultAsset);\\n }\\n uint256 exactAmount = IPassiveIntegration(_integration).getExpectedShares(yieldVault, _capital);\\n uint256 minAmountExpected = exactAmount.sub(exactAmount.preciseMul(SLIPPAGE_ALLOWED));\\n IPassiveIntegration(_integration).enterInvestment(\\n msg.sender,\\n yieldVault,\\n minAmountExpected,\\n vaultAsset,\\n IERC20(vaultAsset).balanceOf(msg.sender)\\n );\\n return (yieldVault, IERC20(yieldVault).balanceOf(msg.sender), 0); // liquid\\n }\\n\\n /**\\n * Exits the deposit vault operation.\\n * @param _percentage of capital to exit from the strategy\\n */\\n function exitOperation(\\n uint256 _percentage,\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external override onlyStrategy {\\n require(_percentage <= HUNDRED_PERCENT, 'Unwind Percentage <= 100%');\\n address yieldVault = _data;\\n address vaultAsset = IPassiveIntegration(_integration).getInvestmentAsset(yieldVault);\\n uint256 amountVault = IERC20(yieldVault).balanceOf(msg.sender).preciseMul(_percentage);\\n IPassiveIntegration(_integration).exitInvestment(\\n msg.sender,\\n yieldVault,\\n amountVault,\\n vaultAsset,\\n IPassiveIntegration(_integration).getPricePerShare(yieldVault).mul(\\n amountVault.sub(amountVault.preciseMul(SLIPPAGE_ALLOWED))\\n )\\n );\\n if (vaultAsset != _garden.reserveAsset()) {\\n IStrategy(msg.sender).trade(vaultAsset, IERC20(vaultAsset).balanceOf(msg.sender), _garden.reserveAsset());\\n }\\n }\\n\\n /**\\n * Gets the NAV of the deposit vault op in the reserve asset\\n *\\n * @return _nav NAV of the strategy\\n */\\n function getNAV(\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external view override returns (uint256) {\\n if (!IStrategy(msg.sender).isStrategyActive()) {\\n return 0;\\n }\\n address vaultAsset = IPassiveIntegration(_integration).getInvestmentAsset(_data);\\n uint256 price = _getPrice(_garden.reserveAsset(), vaultAsset);\\n uint256 NAV =\\n IPassiveIntegration(_integration).getPricePerShare(_data).mul(IERC20(_data).balanceOf(msg.sender)).div(\\n price\\n );\\n require(NAV != 0, 'NAV has to be bigger 0');\\n return NAV;\\n }\\n}\\n\",\"keccak256\":\"0x1aa803cc89a2854f8fbbb66bb5230fe7417a8046b1f7a32f47bfc2f54888d9b2\",\"license\":\"Apache License\"},\"contracts/strategies/operations/Operation.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {IOperation} from '../../interfaces/IOperation.sol';\\nimport {ITradeIntegration} from '../../interfaces/ITradeIntegration.sol';\\nimport {IPriceOracle} from '../../interfaces/IPriceOracle.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\n\\n/**\\n * @title LongStrategy\\n * @author Babylon Finance\\n *\\n * Holds the data for a long strategy\\n */\\nabstract contract Operation is IOperation {\\n using SafeMath for uint256;\\n /* ============ Modifiers ============ */\\n\\n modifier onlyStrategy() {\\n IStrategy strategy = IStrategy(msg.sender);\\n IGarden garden = strategy.garden();\\n require(IBabController(controller).isSystemContract(address(garden)), 'Only a garden can call this');\\n require(garden.isStrategyActiveInGarden(msg.sender), 'Sender must be a strategy');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n uint256 internal constant SLIPPAGE_ALLOWED = 1e16; // 1%\\n uint256 internal constant HUNDRED_PERCENT = 1e18; // 100%\\n address internal constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\\n\\n // Address of the controller\\n address public controller;\\n // Name of the operation\\n string public name;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _controller Address of the controller\\n */\\n constructor(string memory _name, address _controller) {\\n require(_controller != address(0), 'Controller must be defined');\\n name = _name;\\n controller = _controller;\\n }\\n\\n /* ============ Virtual External Functions ============ */\\n\\n function validateOperation(\\n address _data,\\n IGarden _garden,\\n address _integration,\\n uint256 _index\\n ) external view virtual override;\\n\\n function executeOperation(\\n address _asset,\\n uint256 _capital,\\n uint8 _assetStatus,\\n address _data,\\n IGarden _garden,\\n address _integration\\n )\\n external\\n virtual\\n override\\n returns (\\n address,\\n uint256,\\n uint8\\n );\\n\\n function exitOperation(\\n uint256 _percentage,\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external virtual override;\\n\\n function getNAV(\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external view virtual override returns (uint256);\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the name of the operation\\n */\\n function getName() external view override returns (string memory) {\\n return name;\\n }\\n\\n /**\\n * Returns the price of the pair through the price oracle\\n */\\n function _getPrice(address _assetOne, address _assetTwo) internal view returns (uint256) {\\n IPriceOracle oracle = IPriceOracle(IBabController(controller).priceOracle());\\n return oracle.getPrice(_assetOne, _assetTwo);\\n }\\n\\n function _normalizeDecimals(address _asset, uint256 _quantity) internal view returns (uint256) {\\n uint8 tokenDecimals = ERC20(_asset).decimals();\\n return tokenDecimals != 18 ? _quantity.mul(10**(18 - tokenDecimals)) : _quantity;\\n }\\n}\\n\",\"keccak256\":\"0x0baba132298f5c3b3082ee381eed5314ab4587179905af9635e038c1b1845418\",\"license\":\"Apache License\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b5060405162001a7438038062001a74833981810160405260408110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001519150829050816001600160a01b03811662000150576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c6572206d75737420626520646566696e6564000000000000604482015290519081900360640190fd5b81516200016590600190602085019062000190565b50600080546001600160a01b0319166001600160a01b0392909216919091179055506200023c915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001c8576000855562000213565b82601f10620001e357805160ff191683800117855562000213565b8280016001018555821562000213579182015b8281111562000213578251825591602001919060010190620001f6565b506200022192915062000225565b5090565b5b8082111562000221576000815560010162000226565b611828806200024c6000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80634222326a1161005b5780634222326a1461014757806355d9750b14610191578063c8cd307514610209578063f77c4791146102455761007d565b806306fdde031461008257806317d7de7c146100ff578063419ea18a14610107575b600080fd5b61008a610269565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100c45781810151838201526020016100ac565b50505050905090810190601f1680156100f15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61008a6102f6565b6101456004803603608081101561011d57600080fd5b508035906001600160a01b03602082013581169160408101358216916060909101351661038b565b005b61017f6004803603606081101561015d57600080fd5b506001600160a01b038135811691602081013582169160409091013516610a49565b60408051918252519081900360200190f35b6101de600480360360c08110156101a757600080fd5b506001600160a01b03813581169160208101359160ff604083013516916060810135821691608082013581169160a0013516610d01565b604080516001600160a01b039094168452602084019290925260ff1682820152519081900360600190f35b6101456004803603608081101561021f57600080fd5b506001600160a01b0381358116916020810135821691604082013516906060013561128c565b61024d611558565b604080516001600160a01b039092168252519081900360200190f35b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102ee5780601f106102c3576101008083540402835291602001916102ee565b820191906000526020600020905b8154815290600101906020018083116102d157829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156103815780601f1061035657610100808354040283529160200191610381565b820191906000526020600020905b81548152906001019060200180831161036457829003601f168201915b5050505050905090565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156103cb57600080fd5b505afa1580156103df573d6000803e3d6000fd5b505050506040513d60208110156103f557600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561044657600080fd5b505afa15801561045a573d6000803e3d6000fd5b505050506040513d602081101561047057600080fd5b50516104c3576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b6040805162bd5cf960e51b815233600482015290516001600160a01b038316916317ab9f20916024808301926020929190829003018186803b15801561050857600080fd5b505afa15801561051c573d6000803e3d6000fd5b505050506040513d602081101561053257600080fd5b5051610585576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b670de0b6b3a76400008611156105e2576040805162461bcd60e51b815260206004820152601960248201527f556e77696e642050657263656e74616765203c3d203130302500000000000000604482015290519081900360640190fd5b60008590506000846001600160a01b031663f337f630836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561063657600080fd5b505afa15801561064a573d6000803e3d6000fd5b505050506040513d602081101561066057600080fd5b5051604080517f70a0823100000000000000000000000000000000000000000000000000000000815233600482015290519192506000916106ff918b916001600160a01b038716916370a08231916024808301926020929190829003018186803b1580156106cd57600080fd5b505afa1580156106e1573d6000803e3d6000fd5b505050506040513d60208110156106f757600080fd5b505190611567565b90506001600160a01b03861663871be911338584866107b161073261072b84662386f26fc10000611567565b8990611588565b8d6001600160a01b031663ec422afd8c6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561077f57600080fd5b505afa158015610793573d6000803e3d6000fd5b505050506040513d60208110156107a957600080fd5b5051906115e5565b6040518663ffffffff1660e01b815260040180866001600160a01b03168152602001856001600160a01b03168152602001848152602001836001600160a01b0316815260200182815260200195505050505050600060405180830381600087803b15801561081e57600080fd5b505af1158015610832573d6000803e3d6000fd5b50505050866001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561086f57600080fd5b505afa158015610883573d6000803e3d6000fd5b505050506040513d602081101561089957600080fd5b50516001600160a01b03838116911614610a3e57336001600160a01b0316630e32db5283846001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561090a57600080fd5b505afa15801561091e573d6000803e3d6000fd5b505050506040513d602081101561093457600080fd5b505160408051631f0b96b960e31b815290516001600160a01b038d169163f85cb5c8916004808301926020929190829003018186803b15801561097657600080fd5b505afa15801561098a573d6000803e3d6000fd5b505050506040513d60208110156109a057600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b1681526001600160a01b039485166004820152602481019390935292166044820152905160648083019260209291908290030181600087803b158015610a1157600080fd5b505af1158015610a25573d6000803e3d6000fd5b505050506040513d6020811015610a3b57600080fd5b50505b505050505050505050565b6000336001600160a01b031663e4df5e1a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a8457600080fd5b505afa158015610a98573d6000803e3d6000fd5b505050506040513d6020811015610aae57600080fd5b5051610abc57506000610cfa565b6000826001600160a01b031663f337f630866040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610b0b57600080fd5b505afa158015610b1f573d6000803e3d6000fd5b505050506040513d6020811015610b3557600080fd5b505160408051631f0b96b960e31b81529051919250600091610bb4916001600160a01b0388169163f85cb5c891600480820192602092909190829003018186803b158015610b8257600080fd5b505afa158015610b96573d6000803e3d6000fd5b505050506040513d6020811015610bac57600080fd5b50518361163e565b90506000610ca182610c9b896001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610c0c57600080fd5b505afa158015610c20573d6000803e3d6000fd5b505050506040513d6020811015610c3657600080fd5b5051604080517fec422afd0000000000000000000000000000000000000000000000000000000081526001600160a01b038d811660048301529151918b169163ec422afd91602480820192602092909190829003018186803b15801561077f57600080fd5b9061176a565b905080610cf5576040805162461bcd60e51b815260206004820152601660248201527f4e41562068617320746f20626520626967676572203000000000000000000000604482015290519081900360640190fd5b925050505b9392505050565b6000806000803390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015610d4557600080fd5b505afa158015610d59573d6000803e3d6000fd5b505050506040513d6020811015610d6f57600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b158015610dc057600080fd5b505afa158015610dd4573d6000803e3d6000fd5b505050506040513d6020811015610dea57600080fd5b5051610e3d576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b6040805162bd5cf960e51b815233600482015290516001600160a01b038316916317ab9f20916024808301926020929190829003018186803b158015610e8257600080fd5b505afa158015610e96573d6000803e3d6000fd5b505050506040513d6020811015610eac57600080fd5b5051610eff576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b60008890506000876001600160a01b031663f337f630836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f5357600080fd5b505afa158015610f67573d6000803e3d6000fd5b505050506040513d6020811015610f7d57600080fd5b505190506001600160a01b03808216908e161461103157604080517f0e32db520000000000000000000000000000000000000000000000000000000081526001600160a01b038f81166004830152602482018f90528316604482015290513391630e32db529160648083019260209291908290030181600087803b15801561100457600080fd5b505af1158015611018573d6000803e3d6000fd5b505050506040513d602081101561102e57600080fd5b50505b6000886001600160a01b0316634deef649848f6040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060206040518083038186803b15801561108857600080fd5b505afa15801561109c573d6000803e3d6000fd5b505050506040513d60208110156110b257600080fd5b5051905060006110d36110cc83662386f26fc10000611567565b8390611588565b9050896001600160a01b031663976a99be33868487886001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561113557600080fd5b505afa158015611149573d6000803e3d6000fd5b505050506040513d602081101561115f57600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e089901b1681526001600160a01b03968716600482015294861660248601526044850193909352931660648301526084820192909252905160a480830192600092919082900301818387803b1580156111df57600080fd5b505af11580156111f3573d6000803e3d6000fd5b5050505083846001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561124557600080fd5b505afa158015611259573d6000803e3d6000fd5b505050506040513d602081101561126f57600080fd5b505190995097506000965050505050505096509650969350505050565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156112cc57600080fd5b505afa1580156112e0573d6000803e3d6000fd5b505050506040513d60208110156112f657600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561134757600080fd5b505afa15801561135b573d6000803e3d6000fd5b505050506040513d602081101561137157600080fd5b50516113c4576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b6040805162bd5cf960e51b815233600482015290516001600160a01b038316916317ab9f20916024808301926020929190829003018186803b15801561140957600080fd5b505afa15801561141d573d6000803e3d6000fd5b505050506040513d602081101561143357600080fd5b5051611486576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b836001600160a01b0316639e12fef2876040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156114d357600080fd5b505afa1580156114e7573d6000803e3d6000fd5b505050506040513d60208110156114fd57600080fd5b5051611550576040805162461bcd60e51b815260206004820152601b60248201527f4d75737420626520612076616c6964207969656c64207661756c740000000000604482015290519081900360640190fd5b505050505050565b6000546001600160a01b031681565b600061157f670de0b6b3a7640000610c9b85856115e5565b90505b92915050565b6000828211156115df576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000826115f457506000611582565b8282028284828161160157fe5b041461157f5760405162461bcd60e51b81526004018080602001828103825260218152602001806117d26021913960400191505060405180910390fd5b60008054604080517f2630c12f000000000000000000000000000000000000000000000000000000008152905183926001600160a01b031691632630c12f916004808301926020929190829003018186803b15801561169c57600080fd5b505afa1580156116b0573d6000803e3d6000fd5b505050506040513d60208110156116c657600080fd5b5051604080517fac41865a0000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152868116602483015291519293509083169163ac41865a91604480820192602092909190829003018186803b15801561173657600080fd5b505afa15801561174a573d6000803e3d6000fd5b505050506040513d602081101561176057600080fd5b5051949350505050565b60008082116117c0576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816117c957fe5b04939250505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a26469706673582212208b306ef3b8844208f172a18fdbc157539492c0d8a4b742106b8fac39ee57064464736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80634222326a1161005b5780634222326a1461014757806355d9750b14610191578063c8cd307514610209578063f77c4791146102455761007d565b806306fdde031461008257806317d7de7c146100ff578063419ea18a14610107575b600080fd5b61008a610269565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100c45781810151838201526020016100ac565b50505050905090810190601f1680156100f15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61008a6102f6565b6101456004803603608081101561011d57600080fd5b508035906001600160a01b03602082013581169160408101358216916060909101351661038b565b005b61017f6004803603606081101561015d57600080fd5b506001600160a01b038135811691602081013582169160409091013516610a49565b60408051918252519081900360200190f35b6101de600480360360c08110156101a757600080fd5b506001600160a01b03813581169160208101359160ff604083013516916060810135821691608082013581169160a0013516610d01565b604080516001600160a01b039094168452602084019290925260ff1682820152519081900360600190f35b6101456004803603608081101561021f57600080fd5b506001600160a01b0381358116916020810135821691604082013516906060013561128c565b61024d611558565b604080516001600160a01b039092168252519081900360200190f35b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102ee5780601f106102c3576101008083540402835291602001916102ee565b820191906000526020600020905b8154815290600101906020018083116102d157829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156103815780601f1061035657610100808354040283529160200191610381565b820191906000526020600020905b81548152906001019060200180831161036457829003601f168201915b5050505050905090565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156103cb57600080fd5b505afa1580156103df573d6000803e3d6000fd5b505050506040513d60208110156103f557600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561044657600080fd5b505afa15801561045a573d6000803e3d6000fd5b505050506040513d602081101561047057600080fd5b50516104c3576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b6040805162bd5cf960e51b815233600482015290516001600160a01b038316916317ab9f20916024808301926020929190829003018186803b15801561050857600080fd5b505afa15801561051c573d6000803e3d6000fd5b505050506040513d602081101561053257600080fd5b5051610585576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b670de0b6b3a76400008611156105e2576040805162461bcd60e51b815260206004820152601960248201527f556e77696e642050657263656e74616765203c3d203130302500000000000000604482015290519081900360640190fd5b60008590506000846001600160a01b031663f337f630836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561063657600080fd5b505afa15801561064a573d6000803e3d6000fd5b505050506040513d602081101561066057600080fd5b5051604080517f70a0823100000000000000000000000000000000000000000000000000000000815233600482015290519192506000916106ff918b916001600160a01b038716916370a08231916024808301926020929190829003018186803b1580156106cd57600080fd5b505afa1580156106e1573d6000803e3d6000fd5b505050506040513d60208110156106f757600080fd5b505190611567565b90506001600160a01b03861663871be911338584866107b161073261072b84662386f26fc10000611567565b8990611588565b8d6001600160a01b031663ec422afd8c6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561077f57600080fd5b505afa158015610793573d6000803e3d6000fd5b505050506040513d60208110156107a957600080fd5b5051906115e5565b6040518663ffffffff1660e01b815260040180866001600160a01b03168152602001856001600160a01b03168152602001848152602001836001600160a01b0316815260200182815260200195505050505050600060405180830381600087803b15801561081e57600080fd5b505af1158015610832573d6000803e3d6000fd5b50505050866001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561086f57600080fd5b505afa158015610883573d6000803e3d6000fd5b505050506040513d602081101561089957600080fd5b50516001600160a01b03838116911614610a3e57336001600160a01b0316630e32db5283846001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561090a57600080fd5b505afa15801561091e573d6000803e3d6000fd5b505050506040513d602081101561093457600080fd5b505160408051631f0b96b960e31b815290516001600160a01b038d169163f85cb5c8916004808301926020929190829003018186803b15801561097657600080fd5b505afa15801561098a573d6000803e3d6000fd5b505050506040513d60208110156109a057600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b1681526001600160a01b039485166004820152602481019390935292166044820152905160648083019260209291908290030181600087803b158015610a1157600080fd5b505af1158015610a25573d6000803e3d6000fd5b505050506040513d6020811015610a3b57600080fd5b50505b505050505050505050565b6000336001600160a01b031663e4df5e1a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a8457600080fd5b505afa158015610a98573d6000803e3d6000fd5b505050506040513d6020811015610aae57600080fd5b5051610abc57506000610cfa565b6000826001600160a01b031663f337f630866040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610b0b57600080fd5b505afa158015610b1f573d6000803e3d6000fd5b505050506040513d6020811015610b3557600080fd5b505160408051631f0b96b960e31b81529051919250600091610bb4916001600160a01b0388169163f85cb5c891600480820192602092909190829003018186803b158015610b8257600080fd5b505afa158015610b96573d6000803e3d6000fd5b505050506040513d6020811015610bac57600080fd5b50518361163e565b90506000610ca182610c9b896001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610c0c57600080fd5b505afa158015610c20573d6000803e3d6000fd5b505050506040513d6020811015610c3657600080fd5b5051604080517fec422afd0000000000000000000000000000000000000000000000000000000081526001600160a01b038d811660048301529151918b169163ec422afd91602480820192602092909190829003018186803b15801561077f57600080fd5b9061176a565b905080610cf5576040805162461bcd60e51b815260206004820152601660248201527f4e41562068617320746f20626520626967676572203000000000000000000000604482015290519081900360640190fd5b925050505b9392505050565b6000806000803390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015610d4557600080fd5b505afa158015610d59573d6000803e3d6000fd5b505050506040513d6020811015610d6f57600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b158015610dc057600080fd5b505afa158015610dd4573d6000803e3d6000fd5b505050506040513d6020811015610dea57600080fd5b5051610e3d576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b6040805162bd5cf960e51b815233600482015290516001600160a01b038316916317ab9f20916024808301926020929190829003018186803b158015610e8257600080fd5b505afa158015610e96573d6000803e3d6000fd5b505050506040513d6020811015610eac57600080fd5b5051610eff576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b60008890506000876001600160a01b031663f337f630836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f5357600080fd5b505afa158015610f67573d6000803e3d6000fd5b505050506040513d6020811015610f7d57600080fd5b505190506001600160a01b03808216908e161461103157604080517f0e32db520000000000000000000000000000000000000000000000000000000081526001600160a01b038f81166004830152602482018f90528316604482015290513391630e32db529160648083019260209291908290030181600087803b15801561100457600080fd5b505af1158015611018573d6000803e3d6000fd5b505050506040513d602081101561102e57600080fd5b50505b6000886001600160a01b0316634deef649848f6040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060206040518083038186803b15801561108857600080fd5b505afa15801561109c573d6000803e3d6000fd5b505050506040513d60208110156110b257600080fd5b5051905060006110d36110cc83662386f26fc10000611567565b8390611588565b9050896001600160a01b031663976a99be33868487886001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561113557600080fd5b505afa158015611149573d6000803e3d6000fd5b505050506040513d602081101561115f57600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e089901b1681526001600160a01b03968716600482015294861660248601526044850193909352931660648301526084820192909252905160a480830192600092919082900301818387803b1580156111df57600080fd5b505af11580156111f3573d6000803e3d6000fd5b5050505083846001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561124557600080fd5b505afa158015611259573d6000803e3d6000fd5b505050506040513d602081101561126f57600080fd5b505190995097506000965050505050505096509650969350505050565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156112cc57600080fd5b505afa1580156112e0573d6000803e3d6000fd5b505050506040513d60208110156112f657600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561134757600080fd5b505afa15801561135b573d6000803e3d6000fd5b505050506040513d602081101561137157600080fd5b50516113c4576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b6040805162bd5cf960e51b815233600482015290516001600160a01b038316916317ab9f20916024808301926020929190829003018186803b15801561140957600080fd5b505afa15801561141d573d6000803e3d6000fd5b505050506040513d602081101561143357600080fd5b5051611486576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b836001600160a01b0316639e12fef2876040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156114d357600080fd5b505afa1580156114e7573d6000803e3d6000fd5b505050506040513d60208110156114fd57600080fd5b5051611550576040805162461bcd60e51b815260206004820152601b60248201527f4d75737420626520612076616c6964207969656c64207661756c740000000000604482015290519081900360640190fd5b505050505050565b6000546001600160a01b031681565b600061157f670de0b6b3a7640000610c9b85856115e5565b90505b92915050565b6000828211156115df576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000826115f457506000611582565b8282028284828161160157fe5b041461157f5760405162461bcd60e51b81526004018080602001828103825260218152602001806117d26021913960400191505060405180910390fd5b60008054604080517f2630c12f000000000000000000000000000000000000000000000000000000008152905183926001600160a01b031691632630c12f916004808301926020929190829003018186803b15801561169c57600080fd5b505afa1580156116b0573d6000803e3d6000fd5b505050506040513d60208110156116c657600080fd5b5051604080517fac41865a0000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152868116602483015291519293509083169163ac41865a91604480820192602092909190829003018186803b15801561173657600080fd5b505afa15801561174a573d6000803e3d6000fd5b505050506040513d602081101561176057600080fd5b5051949350505050565b60008082116117c0576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816117c957fe5b04939250505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a26469706673582212208b306ef3b8844208f172a18fdbc157539492c0d8a4b742106b8fac39ee57064464736f6c63430007060033", "devdoc": { "author": "Babylon Finance Executes a deposit vault operation", "kind": "dev", @@ -281,7 +281,7 @@ "storageLayout": { "storage": [ { - "astId": 33459, + "astId": 33052, "contract": "contracts/strategies/operations/DepositVaultOperation.sol:DepositVaultOperation", "label": "controller", "offset": 0, @@ -289,7 +289,7 @@ "type": "t_address" }, { - "astId": 33461, + "astId": 33054, "contract": "contracts/strategies/operations/DepositVaultOperation.sol:DepositVaultOperation", "label": "name", "offset": 0, diff --git a/deployments/artifacts/mainnet/GardenFactory.json b/deployments/artifacts/mainnet/GardenFactory.json index 47aa9b5fb..965f2387b 100644 --- a/deployments/artifacts/mainnet/GardenFactory.json +++ b/deployments/artifacts/mainnet/GardenFactory.json @@ -1,8 +1,14 @@ { - "address": "0x10EE25121d1850B1DBb21E83fDCE5Bb82Af9AE80", + "address": "0xbe178FC57dbDB35b0231158d3E46cE5428e93CbA", "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "address", + "name": "_controller", + "type": "address" + } + ], "stateMutability": "nonpayable", "type": "constructor" }, @@ -13,11 +19,6 @@ "name": "_reserveAsset", "type": "address" }, - { - "internalType": "address", - "name": "_controller", - "type": "address" - }, { "internalType": "address", "name": "_creator", @@ -47,6 +48,11 @@ "internalType": "uint256[]", "name": "_gardenParams", "type": "uint256[]" + }, + { + "internalType": "uint256", + "name": "_initialContribution", + "type": "uint256" } ], "name": "createGarden", @@ -57,40 +63,42 @@ "type": "address" } ], - "stateMutability": "payable", + "stateMutability": "nonpayable", "type": "function" } ], - "transactionHash": "0x7c340610ba957e3b28ce7c093345bf777e27a48529ecf6474609fc4bfc630f0d", + "transactionHash": "0xd892cb8adfefef480e7ef82d1221f69196df3364c6c11b532411057d219aefb9", "receipt": { "to": null, - "from": "0x311FEE0d859FA936FaEd456758dCD8047C4fFEd7", - "contractAddress": "0xe500Dd633b3FF1BF8497777eF6E4BcA8108A9511", - "transactionIndex": 5, - "gasUsed": "8244806", + "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", + "contractAddress": "0xbe178FC57dbDB35b0231158d3E46cE5428e93CbA", + "transactionIndex": 84, + "gasUsed": "5829677", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x9c0f66536498eb3a86fd2f722d0478ed632397fec462b539e2555d1833c3bebe", - "transactionHash": "0x7c340610ba957e3b28ce7c093345bf777e27a48529ecf6474609fc4bfc630f0d", + "blockHash": "0xc7b6bca9fc9b3e03cfdbd05b4e1b473115e91b35b4fda33ca7269fdb935dda59", + "transactionHash": "0xd892cb8adfefef480e7ef82d1221f69196df3364c6c11b532411057d219aefb9", "logs": [], - "blockNumber": 8516148, - "cumulativeGasUsed": "8406040", + "blockNumber": 12451210, + "cumulativeGasUsed": "12056131", "status": 1, "byzantium": true }, - "args": [], - "solcInputHash": "1cde26e1be086ba932a8865ced5ceef3", - "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_reserveAsset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_creator\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_tokenURI\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_seed\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_gardenParams\",\"type\":\"uint256[]\"}],\"name\":\"createGarden\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Factory to create garden contracts\",\"kind\":\"dev\",\"methods\":{\"createGarden(address,address,address,string,string,string,uint256,uint256[])\":{\"params\":{\"_controller\":\"Address of the controller\",\"_creator\":\"Address of the creator\",\"_gardenParams\":\"Array of numeric params in the garden\",\"_name\":\"Name of the Garden\",\"_reserveAsset\":\"Address of the reserve asset ERC20\",\"_seed\":\"Seed to regenerate the garden NFT\",\"_symbol\":\"Symbol of the Garden\",\"_tokenURI\":\"URL of the garden NFT JSON\"}}},\"title\":\"GardenFactory\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"createGarden(address,address,address,string,string,string,uint256,uint256[])\":{\"notice\":\"Creates a garden using minimal proxies\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/gardens/GardenFactory.sol\":\"GardenFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts may inherit from this and call {_registerInterface} to declare\\n * their support of an interface.\\n */\\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\\n /*\\n * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7\\n */\\n bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;\\n\\n /**\\n * @dev Mapping of interface ids to whether or not it's supported.\\n */\\n mapping(bytes4 => bool) private _supportedInterfaces;\\n\\n function __ERC165_init() internal initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\n // Derived contracts need only register support for their own interfaces,\\n // we register support for ERC165 itself here\\n _registerInterface(_INTERFACE_ID_ERC165);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n *\\n * Time complexity O(1), guaranteed to always use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return _supportedInterfaces[interfaceId];\\n }\\n\\n /**\\n * @dev Registers the contract as an implementer of the interface defined by\\n * `interfaceId`. Support of the actual ERC165 interface is automatic and\\n * registering its interface id is not required.\\n *\\n * See {IERC165-supportsInterface}.\\n *\\n * Requirements:\\n *\\n * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).\\n */\\n function _registerInterface(bytes4 interfaceId) internal virtual {\\n require(interfaceId != 0xffffffff, \\\"ERC165: invalid interface id\\\");\\n _supportedInterfaces[interfaceId] = true;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xc6dbbc2f50a7c104377798a37b2acd1a41c1242544b0bb7a9a7c863f0520eb50\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165Upgradeable {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x4784c3f8a520a739dd25d76f514833a653990902d0e21601aed45bda44c87524\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 SafeMathUpgradeable {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0x0dd1e9b19801e3e7d900fbf4182d81e1afd23ad7be39504e33df6bbcba91d724\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity >=0.4.24 <0.8.0;\\n\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || _isConstructor() || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /// @dev Returns true if and only if the function is running in the constructor\\n function _isConstructor() private view returns (bool) {\\n return !AddressUpgradeable.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xd8e4eb08dcc1d1860fb347ba5ffd595242b9a1b66d49a47f2b4cb51c3f35017e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"./IERC20Upgradeable.sol\\\";\\nimport \\\"../../math/SafeMathUpgradeable.sol\\\";\\nimport \\\"../../proxy/Initializable.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 ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable {\\n using SafeMathUpgradeable 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 function __ERC20_init(string memory name_, string memory symbol_) internal initializer {\\n __Context_init_unchained();\\n __ERC20_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n uint256[44] private __gap;\\n}\\n\",\"keccak256\":\"0x506dd0718f9ace50588c13848167df5e04ae16abb56341afb10c31ff149bc79b\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\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(address sender, address recipient, uint256 amount) 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\":\"0xa1931c47a617014f858580db625aa0dcf343796f39acd4b5b51effc092a1f0a9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"./IERC721Upgradeable.sol\\\";\\nimport \\\"./IERC721MetadataUpgradeable.sol\\\";\\nimport \\\"./IERC721EnumerableUpgradeable.sol\\\";\\nimport \\\"./IERC721ReceiverUpgradeable.sol\\\";\\nimport \\\"../../introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../../math/SafeMathUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../../utils/EnumerableMapUpgradeable.sol\\\";\\nimport \\\"../../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../../proxy/Initializable.sol\\\";\\n\\n/**\\n * @title ERC721 Non-Fungible Token Standard basic implementation\\n * @dev see https://eips.ethereum.org/EIPS/eip-721\\n */\\ncontract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable, IERC721EnumerableUpgradeable {\\n using SafeMathUpgradeable for uint256;\\n using AddressUpgradeable for address;\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.UintSet;\\n using EnumerableMapUpgradeable for EnumerableMapUpgradeable.UintToAddressMap;\\n using StringsUpgradeable for uint256;\\n\\n // Equals to `bytes4(keccak256(\\\"onERC721Received(address,address,uint256,bytes)\\\"))`\\n // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector`\\n bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;\\n\\n // Mapping from holder address to their (enumerable) set of owned tokens\\n mapping (address => EnumerableSetUpgradeable.UintSet) private _holderTokens;\\n\\n // Enumerable mapping from token ids to their owners\\n EnumerableMapUpgradeable.UintToAddressMap private _tokenOwners;\\n\\n // Mapping from token ID to approved address\\n mapping (uint256 => address) private _tokenApprovals;\\n\\n // Mapping from owner to operator approvals\\n mapping (address => mapping (address => bool)) private _operatorApprovals;\\n\\n // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Optional mapping for token URIs\\n mapping (uint256 => string) private _tokenURIs;\\n\\n // Base URI\\n string private _baseURI;\\n\\n /*\\n * bytes4(keccak256('balanceOf(address)')) == 0x70a08231\\n * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e\\n * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3\\n * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc\\n * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465\\n * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5\\n * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd\\n * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e\\n * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde\\n *\\n * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^\\n * 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;\\n\\n /*\\n * bytes4(keccak256('name()')) == 0x06fdde03\\n * bytes4(keccak256('symbol()')) == 0x95d89b41\\n * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd\\n *\\n * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f;\\n\\n /*\\n * bytes4(keccak256('totalSupply()')) == 0x18160ddd\\n * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59\\n * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7\\n *\\n * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;\\n\\n /**\\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\\n */\\n function __ERC721_init(string memory name_, string memory symbol_) internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __ERC721_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC721_init_unchained(string memory name_, string memory symbol_) internal initializer {\\n _name = name_;\\n _symbol = symbol_;\\n\\n // register the supported interfaces to conform to ERC721 via ERC165\\n _registerInterface(_INTERFACE_ID_ERC721);\\n _registerInterface(_INTERFACE_ID_ERC721_METADATA);\\n _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE);\\n }\\n\\n /**\\n * @dev See {IERC721-balanceOf}.\\n */\\n function balanceOf(address owner) public view virtual override returns (uint256) {\\n require(owner != address(0), \\\"ERC721: balance query for the zero address\\\");\\n return _holderTokens[owner].length();\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n return _tokenOwners.get(tokenId, \\\"ERC721: owner query for nonexistent token\\\");\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-name}.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-symbol}.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-tokenURI}.\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n require(_exists(tokenId), \\\"ERC721Metadata: URI query for nonexistent token\\\");\\n\\n string memory _tokenURI = _tokenURIs[tokenId];\\n string memory base = baseURI();\\n\\n // If there is no base URI, return the token URI.\\n if (bytes(base).length == 0) {\\n return _tokenURI;\\n }\\n // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).\\n if (bytes(_tokenURI).length > 0) {\\n return string(abi.encodePacked(base, _tokenURI));\\n }\\n // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI.\\n return string(abi.encodePacked(base, tokenId.toString()));\\n }\\n\\n /**\\n * @dev Returns the base URI set via {_setBaseURI}. This will be\\n * automatically added as a prefix in {tokenURI} to each token's URI, or\\n * to the token ID if no specific URI is set for that token ID.\\n */\\n function baseURI() public view virtual returns (string memory) {\\n return _baseURI;\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\\n return _holderTokens[owner].at(index);\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds\\n return _tokenOwners.length();\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenByIndex}.\\n */\\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\\n (uint256 tokenId, ) = _tokenOwners.at(index);\\n return tokenId;\\n }\\n\\n /**\\n * @dev See {IERC721-approve}.\\n */\\n function approve(address to, uint256 tokenId) public virtual override {\\n address owner = ERC721Upgradeable.ownerOf(tokenId);\\n require(to != owner, \\\"ERC721: approval to current owner\\\");\\n\\n require(_msgSender() == owner || ERC721Upgradeable.isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not owner nor approved for all\\\"\\n );\\n\\n _approve(to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-getApproved}.\\n */\\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\\n require(_exists(tokenId), \\\"ERC721: approved query for nonexistent token\\\");\\n\\n return _tokenApprovals[tokenId];\\n }\\n\\n /**\\n * @dev See {IERC721-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n require(operator != _msgSender(), \\\"ERC721: approve to caller\\\");\\n\\n _operatorApprovals[_msgSender()][operator] = approved;\\n emit ApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC721-isApprovedForAll}.\\n */\\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[owner][operator];\\n }\\n\\n /**\\n * @dev See {IERC721-transferFrom}.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) public virtual override {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: transfer caller is not owner nor approved\\\");\\n\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: transfer caller is not owner nor approved\\\");\\n _safeTransfer(from, to, tokenId, _data);\\n }\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * `_data` is additional data, it has no specified format and it is sent in call to `to`.\\n *\\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\\n * implement alternative mechanisms to perform token transfer, such as signature-based.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual {\\n _transfer(from, to, tokenId);\\n require(_checkOnERC721Received(from, to, tokenId, _data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Returns whether `tokenId` exists.\\n *\\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\\n *\\n * Tokens start existing when they are minted (`_mint`),\\n * and stop existing when they are burned (`_burn`).\\n */\\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\\n return _tokenOwners.contains(tokenId);\\n }\\n\\n /**\\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\\n require(_exists(tokenId), \\\"ERC721: operator query for nonexistent token\\\");\\n address owner = ERC721Upgradeable.ownerOf(tokenId);\\n return (spender == owner || getApproved(tokenId) == spender || ERC721Upgradeable.isApprovedForAll(owner, spender));\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n d*\\n * - `tokenId` must not exist.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeMint(address to, uint256 tokenId) internal virtual {\\n _safeMint(to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\\n */\\n function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual {\\n _mint(to, tokenId);\\n require(_checkOnERC721Received(address(0), to, tokenId, _data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Mints `tokenId` and transfers it to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - `to` cannot be the zero address.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _mint(address to, uint256 tokenId) internal virtual {\\n require(to != address(0), \\\"ERC721: mint to the zero address\\\");\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n _beforeTokenTransfer(address(0), to, tokenId);\\n\\n _holderTokens[to].add(tokenId);\\n\\n _tokenOwners.set(tokenId, to);\\n\\n emit Transfer(address(0), to, tokenId);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _burn(uint256 tokenId) internal virtual {\\n address owner = ERC721Upgradeable.ownerOf(tokenId); // internal owner\\n\\n _beforeTokenTransfer(owner, address(0), tokenId);\\n\\n // Clear approvals\\n _approve(address(0), tokenId);\\n\\n // Clear metadata (if any)\\n if (bytes(_tokenURIs[tokenId]).length != 0) {\\n delete _tokenURIs[tokenId];\\n }\\n\\n _holderTokens[owner].remove(tokenId);\\n\\n _tokenOwners.remove(tokenId);\\n\\n emit Transfer(owner, address(0), tokenId);\\n }\\n\\n /**\\n * @dev Transfers `tokenId` from `from` to `to`.\\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _transfer(address from, address to, uint256 tokenId) internal virtual {\\n require(ERC721Upgradeable.ownerOf(tokenId) == from, \\\"ERC721: transfer of token that is not own\\\"); // internal owner\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId);\\n\\n // Clear approvals from the previous owner\\n _approve(address(0), tokenId);\\n\\n _holderTokens[from].remove(tokenId);\\n _holderTokens[to].add(tokenId);\\n\\n _tokenOwners.set(tokenId, to);\\n\\n emit Transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {\\n require(_exists(tokenId), \\\"ERC721Metadata: URI set of nonexistent token\\\");\\n _tokenURIs[tokenId] = _tokenURI;\\n }\\n\\n /**\\n * @dev Internal function to set the base URI for all token IDs. It is\\n * automatically added as a prefix to the value returned in {tokenURI},\\n * or to the token ID if {tokenURI} is empty.\\n */\\n function _setBaseURI(string memory baseURI_) internal virtual {\\n _baseURI = baseURI_;\\n }\\n\\n /**\\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\\n * The call is not executed if the target address is not a contract.\\n *\\n * @param from address representing the previous owner of the given token ID\\n * @param to target address that will receive the tokens\\n * @param tokenId uint256 ID of the token to be transferred\\n * @param _data bytes optional data to send along with the call\\n * @return bool whether the call correctly returned the expected magic value\\n */\\n function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data)\\n private returns (bool)\\n {\\n if (!to.isContract()) {\\n return true;\\n }\\n bytes memory returndata = to.functionCall(abi.encodeWithSelector(\\n IERC721ReceiverUpgradeable(to).onERC721Received.selector,\\n _msgSender(),\\n from,\\n tokenId,\\n _data\\n ), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n bytes4 retval = abi.decode(returndata, (bytes4));\\n return (retval == _ERC721_RECEIVED);\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * Emits an {Approval} event.\\n */\\n function _approve(address to, uint256 tokenId) internal virtual {\\n _tokenApprovals[tokenId] = to;\\n emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId); // internal owner\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\\n * transferred to `to`.\\n * - When `from` is zero, `tokenId` will be minted for `to`.\\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { }\\n uint256[41] private __gap;\\n}\\n\",\"keccak256\":\"0x83d830f0835976a5b7bb9c416edf06c865208127eb35445dd6c49b20481d7282\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721EnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"./IERC721Upgradeable.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721EnumerableUpgradeable is IERC721Upgradeable {\\n\\n /**\\n * @dev Returns the total amount of tokens stored by the contract.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns a token ID owned by `owner` at a given `index` of its token list.\\n * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);\\n\\n /**\\n * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.\\n * Use along with {totalSupply} to enumerate all tokens.\\n */\\n function tokenByIndex(uint256 index) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x529f3ab127aace61d7d47f3df7a6a2c42dc79bbb3a0ca459d6a861f33698aee6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721MetadataUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"./IERC721Upgradeable.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721MetadataUpgradeable is IERC721Upgradeable {\\n\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xa981b1f67f60771c18d39e21bad0a2f0f952e2c3faa90b45b982060fc14ee2bd\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721ReceiverUpgradeable {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.\\n */\\n function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0x53552243cd7de0d57a876cbaee3485d4bdc2b1c7d58ff15447cd623a3ddb5cd0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"../../introspection/IERC165Upgradeable.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721Upgradeable is IERC165Upgradeable {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x3dab19bb4a63bcbda1ee153ca291694f92f9009fad28626126b15a8503b0e5ff\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 { size := extcodesize(account) }\\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, \\\"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, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfc5ea91fa9ceb1961023b2a6c978b902888c52b90847ac7813fe3b79524165f6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xbbf8a21b9a66c48d45ff771b8563c6df19ba451d63dfb8380a865c1e1f29d1a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/EnumerableMapUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 *\\n * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are\\n * supported.\\n */\\nlibrary EnumerableMapUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Map type with\\n // bytes32 keys and values.\\n // The Map implementation uses private functions, and user-facing\\n // implementations (such as Uint256ToAddressMap) are just wrappers around\\n // the underlying Map.\\n // This means that we can only create new EnumerableMaps for types that fit\\n // in bytes32.\\n\\n struct MapEntry {\\n bytes32 _key;\\n bytes32 _value;\\n }\\n\\n struct Map {\\n // Storage of map keys and values\\n MapEntry[] _entries;\\n\\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 (bytes32 => 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(Map storage map, bytes32 key, bytes32 value) private 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 if (keyIndex == 0) { // Equivalent to !contains(map, key)\\n map._entries.push(MapEntry({ _key: key, _value: value }));\\n // The entry is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n map._indexes[key] = map._entries.length;\\n return true;\\n } else {\\n map._entries[keyIndex - 1]._value = value;\\n return false;\\n }\\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(Map storage map, bytes32 key) private 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 if (keyIndex != 0) { // Equivalent to contains(map, key)\\n // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one\\n // in the array, and then remove the last entry (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = keyIndex - 1;\\n uint256 lastIndex = map._entries.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 MapEntry 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 map._entries.pop();\\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(Map storage map, bytes32 key) private 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(Map storage map) private view returns (uint256) {\\n return map._entries.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(Map storage map, uint256 index) private view returns (bytes32, bytes32) {\\n require(map._entries.length > index, \\\"EnumerableMap: index out of bounds\\\");\\n\\n MapEntry storage entry = map._entries[index];\\n return (entry._key, entry._value);\\n }\\n\\n /**\\n * @dev Tries to returns the value associated with `key`. O(1).\\n * Does not revert if `key` is not in the map.\\n */\\n function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key)\\n return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based\\n }\\n\\n /**\\n * @dev Returns the value associated with `key`. O(1).\\n *\\n * Requirements:\\n *\\n * - `key` must be in the map.\\n */\\n function _get(Map storage map, bytes32 key) private view returns (bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n require(keyIndex != 0, \\\"EnumerableMap: nonexistent key\\\"); // Equivalent to contains(map, key)\\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\\n }\\n\\n /**\\n * @dev Same as {_get}, with a custom error message when `key` is not in the map.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {_tryGet}.\\n */\\n function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key)\\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\\n }\\n\\n // UintToAddressMap\\n\\n struct UintToAddressMap {\\n Map _inner;\\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(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) {\\n return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the key was removed from the map, that is if it was present.\\n */\\n function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) {\\n return _remove(map._inner, bytes32(key));\\n }\\n\\n /**\\n * @dev Returns true if the key is in the map. O(1).\\n */\\n function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) {\\n return _contains(map._inner, bytes32(key));\\n }\\n\\n /**\\n * @dev Returns the number of elements in the map. O(1).\\n */\\n function length(UintToAddressMap storage map) internal view returns (uint256) {\\n return _length(map._inner);\\n }\\n\\n /**\\n * @dev Returns the element 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 *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) {\\n (bytes32 key, bytes32 value) = _at(map._inner, index);\\n return (uint256(key), address(uint160(uint256(value))));\\n }\\n\\n /**\\n * @dev Tries to returns the value associated with `key`. O(1).\\n * Does not revert if `key` is not in the map.\\n *\\n * _Available since v3.4._\\n */\\n function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) {\\n (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key));\\n return (success, address(uint160(uint256(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.\\n */\\n function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {\\n return address(uint160(uint256(_get(map._inner, bytes32(key)))));\\n }\\n\\n /**\\n * @dev Same as {get}, with a custom error message when `key` is not in the map.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryGet}.\\n */\\n function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) {\\n return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage))));\\n }\\n}\\n\",\"keccak256\":\"0x6a8e34d051fc71ce49a8a47d050c5b7e77909008c6be7d6780ee9ed87d2d3797\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\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 (bytes32 => 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(Set storage set, bytes32 value) private 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(Set storage set, bytes32 value) private 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) { // 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 bytes32 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(Set storage set, bytes32 value) private 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(Set storage set) private 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(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\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(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\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(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\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(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\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 return _add(set._inner, bytes32(uint256(uint160(value))));\\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 return _remove(set._inner, bytes32(uint256(uint160(value))));\\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 _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\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 return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\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(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\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(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\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(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x20714cf126a1a984613579156d3cbc726db8025d8400e1db1d2bb714edaba335\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n uint256 index = digits - 1;\\n temp = value;\\n while (temp != 0) {\\n buffer[index--] = bytes1(uint8(48 + temp % 10));\\n temp /= 10;\\n }\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0x8d1ac29b8a8ed3cfebe5d8774b465441ae8931aaca549f84408e0b29a1191964\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Clones.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for\\n * deploying minimal proxy contracts, also known as \\\"clones\\\".\\n *\\n * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies\\n * > a minimal bytecode implementation that delegates all calls to a known, fixed address.\\n *\\n * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`\\n * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the\\n * deterministic method.\\n *\\n * _Available since v3.4._\\n */\\nlibrary Clones {\\n /**\\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `master`.\\n *\\n * This function uses the create opcode, which should never revert.\\n */\\n function clone(address master) internal returns (address instance) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\\n mstore(add(ptr, 0x14), shl(0x60, master))\\n mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\\n instance := create(0, ptr, 0x37)\\n }\\n require(instance != address(0), \\\"ERC1167: create failed\\\");\\n }\\n\\n /**\\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `master`.\\n *\\n * This function uses the create2 opcode and a `salt` to deterministically deploy\\n * the clone. Using the same `master` and `salt` multiple time will revert, since\\n * the clones cannot be deployed twice at the same address.\\n */\\n function cloneDeterministic(address master, bytes32 salt) internal returns (address instance) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\\n mstore(add(ptr, 0x14), shl(0x60, master))\\n mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\\n instance := create2(0, ptr, 0x37, salt)\\n }\\n require(instance != address(0), \\\"ERC1167: create2 failed\\\");\\n }\\n\\n /**\\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\\n */\\n function predictDeterministicAddress(address master, bytes32 salt, address deployer) internal pure returns (address predicted) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\\n mstore(add(ptr, 0x14), shl(0x60, master))\\n mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000)\\n mstore(add(ptr, 0x38), shl(0x60, deployer))\\n mstore(add(ptr, 0x4c), salt)\\n mstore(add(ptr, 0x6c), keccak256(ptr, 0x37))\\n predicted := keccak256(add(ptr, 0x37), 0x55)\\n }\\n }\\n\\n /**\\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\\n */\\n function predictDeterministicAddress(address master, bytes32 salt) internal view returns (address predicted) {\\n return predictDeterministicAddress(master, salt, address(this));\\n }\\n}\\n\",\"keccak256\":\"0x0d24348f536f928d8b42789737bf34762faee065667ab530ea20969a9d9920d1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.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 using SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n // solhint-disable-next-line max-line-length\\n require((value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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 * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 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. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\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 { size := extcodesize(account) }\\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, \\\"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, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Counters.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../math/SafeMath.sol\\\";\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath}\\n * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never\\n * directly accessed.\\n */\\nlibrary Counters {\\n using SafeMath for uint256;\\n\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n // The {SafeMath} overflow check can be skipped here, see the comment at the top\\n counter._value += 1;\\n }\\n\\n function decrement(Counter storage counter) internal {\\n counter._value = counter._value.sub(1);\\n }\\n}\\n\",\"keccak256\":\"0x21662e4254ce4ac8570b30cc7ab31435966b3cb778a56ba4d09276881cfb2437\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\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 /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\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, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x7b2b8baa20fd60ab4a328c8e34c64a353651b80ba4b5b157cbb61813f6f85d55\",\"license\":\"MIT\"},\"contracts/gardens/Garden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport {ERC20Upgradeable} from '@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SafeDecimalMath} from '../lib/SafeDecimalMath.sol';\\nimport {Safe3296} from '../lib/Safe3296.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\nimport {Errors, _require} from '../lib/BabylonErrors.sol';\\nimport {AddressArrayUtils} from '../lib/AddressArrayUtils.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\nimport {Math} from '../lib/Math.sol';\\n\\nimport {IRewardsDistributor} from '../interfaces/IRewardsDistributor.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IStrategyFactory} from '../interfaces/IStrategyFactory.sol';\\nimport {IGardenValuer} from '../interfaces/IGardenValuer.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {IGardenNFT} from '../interfaces/IGardenNFT.sol';\\nimport {IIshtarGate} from '../interfaces/IIshtarGate.sol';\\nimport {IWETH} from '../interfaces/external/weth/IWETH.sol';\\n\\n/**\\n * @title BaseGarden\\n * @author Babylon Finance\\n *\\n * Class that holds common garden-related state and functions\\n */\\ncontract Garden is ERC20Upgradeable, ReentrancyGuard, IGarden {\\n using SafeCast for int256;\\n using SignedSafeMath for int256;\\n using PreciseUnitMath for int256;\\n using SafeDecimalMath for int256;\\n\\n using SafeCast for uint256;\\n using SafeMath for uint256;\\n using PreciseUnitMath for uint256;\\n using SafeDecimalMath for uint256;\\n\\n using Address for address;\\n using AddressArrayUtils for address[];\\n\\n using SafeERC20 for IERC20;\\n\\n /* ============ Events ============ */\\n event PrincipalChanged(uint256 _newAmount, uint256 _oldAmount);\\n event GardenDeposit(\\n address indexed _to,\\n uint256 reserveToken,\\n uint256 reserveTokenQuantity,\\n uint256 protocolFees,\\n uint256 timestamp\\n );\\n event GardenWithdrawal(\\n address indexed _from,\\n address indexed _to,\\n uint256 reserveToken,\\n uint256 reserveTokenQuantity,\\n uint256 protocolFees,\\n uint256 timestamp\\n );\\n\\n event RewardsForContributor(address indexed _contributor, uint256 indexed _amount);\\n event BABLRewardsForContributor(address indexed _contributor, uint96 _rewards);\\n\\n /* ============ State Constants ============ */\\n\\n // Wrapped ETH address\\n address private constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\\n uint256 public constant EARLY_WITHDRAWAL_PENALTY = 15e16;\\n uint256 public constant MAX_DEPOSITS_FUND_V1 = 1e21; // Max deposit per garden is 1000 eth for v1\\n uint256 public constant MAX_TOTAL_STRATEGIES = 20; // Max number of strategies\\n uint256 internal constant TEN_PERCENT = 1e17;\\n uint256 internal constant MAX_KEEPER_FEE = (1e6 * 1e3 gwei);\\n uint256 internal constant ABSOLUTE_MIN_CONTRIBUTION = 1e17;\\n\\n /* ============ Structs ============ */\\n\\n struct Contributor {\\n uint256 lastDepositAt;\\n uint256 initialDepositAt;\\n uint256 claimedAt;\\n uint256 claimedBABL;\\n uint256 claimedRewards;\\n uint256 withdrawnSince;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Reserve Asset of the garden\\n address public override reserveAsset;\\n\\n // Address of the controller\\n address public override controller;\\n // Address of the nft\\n address public override nftAddress;\\n // The person that creates the garden\\n address public override creator;\\n // Whether the garden is currently active or not\\n bool public override active;\\n bool public override guestListEnabled;\\n\\n // Keeps track of the reserve balance. In case we receive some through other means\\n uint256 public override principal;\\n uint256 public override reserveAssetRewardsSetAside;\\n uint256 public override reserveAssetPrincipalWindow;\\n int256 public override absoluteReturns; // Total profits or losses of this garden\\n\\n // Indicates the minimum liquidity the asset needs to have to be tradable by this garden\\n uint256 public override minLiquidityAsset;\\n\\n uint256 public depositHardlock; // Window of time after deposits when withdraws are disabled for that user\\n // Window of time after an investment strategy finishes when the capital is available for withdrawals\\n uint256 public withdrawalWindowAfterStrategyCompletes;\\n uint256 public withdrawalsOpenUntil; // Indicates until when the withdrawals are open and the ETH is set aside\\n\\n // Contributors\\n mapping(address => Contributor) public contributors;\\n uint256 public override totalContributors;\\n uint256 public override maxContributors;\\n uint256 public maxDepositLimit; // Limits the amount of deposits\\n\\n uint256 public override gardenInitializedAt; // Garden Initialized at timestamp\\n // TODO: Explain what pid is\\n uint256 public pid;\\n\\n // Min contribution in the garden\\n uint256 public override minContribution; //wei\\n uint256 public minGardenTokenSupply;\\n\\n // Strategies variables\\n uint256 public override totalStake;\\n uint256 public override minVotersQuorum = TEN_PERCENT; // 10%. (0.01% = 1e14, 1% = 1e16)\\n uint256 public override minStrategyDuration; // Min duration for an strategy\\n uint256 public override maxStrategyDuration; // Max duration for an strategy\\n // Window for the strategy to cooldown after approval before receiving capital\\n uint256 public override strategyCooldownPeriod;\\n\\n address[] private strategies; // Strategies that are either in candidate or active state\\n address[] private finalizedStrategies; // Strategies that have finalized execution\\n mapping(address => bool) public strategyMapping;\\n\\n // Keeper debt in WETH if any, repaid upon every strategy finalization\\n uint256 public keeperDebt;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * When a new Garden is created.\\n * All parameter validations are on the BabController contract. Validations are performed already on the\\n * BabController.\\n *\\n * @param _reserveAsset Address of the reserve asset ERC20\\n * @param _controller Address of the controller\\n * @param _creator Address of the creator\\n * @param _name Name of the Garden\\n * @param _symbol Symbol of the Garden\\n * @param _gardenParams Array of numeric garden params\\n * @param _nftAddress Garden NFT address\\n */\\n function initialize(\\n address _reserveAsset,\\n address _controller,\\n address _creator,\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _gardenParams,\\n address _nftAddress\\n ) public payable initializer {\\n _require(_creator != address(0), Errors.ADDRESS_IS_ZERO);\\n _require(_controller != address(0), Errors.ADDRESS_IS_ZERO);\\n _require(_reserveAsset != address(0), Errors.ADDRESS_IS_ZERO);\\n _require(_gardenParams.length == 9, Errors.GARDEN_PARAMS_LENGTH);\\n _require(IBabController(_controller).isValidReserveAsset(_reserveAsset), Errors.MUST_BE_RESERVE_ASSET);\\n __ERC20_init(_name, _symbol);\\n\\n controller = _controller;\\n reserveAsset = _reserveAsset;\\n creator = _creator;\\n maxContributors = 100;\\n nftAddress = _nftAddress;\\n guestListEnabled = true;\\n\\n _start(\\n msg.value,\\n _gardenParams[0],\\n _gardenParams[1],\\n _gardenParams[2],\\n _gardenParams[3],\\n _gardenParams[4],\\n _gardenParams[5],\\n _gardenParams[6],\\n _gardenParams[7],\\n _gardenParams[8]\\n );\\n active = true;\\n\\n // Deposit\\n IWETH(WETH).deposit{value: msg.value}();\\n _mintGardenTokens(creator, creator, msg.value, msg.value, 0);\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * FUND LEAD ONLY. Starts the Garden with allowed reserve assets,\\n * fees and issuance premium. Only callable by the Garden's creator\\n *\\n * @param _creatorDeposit Deposit by the creator\\n * @param _maxDepositLimit Max deposit limit\\n * @param _minGardenTokenSupply Min garden token supply\\n * @param _minLiquidityAsset Number that represents min amount of liquidity denominated in ETH\\n * @param _depositHardlock Number that represents the time deposits are locked for an user after he deposits\\n * @param _minContribution Min contribution to the garden\\n * @param _strategyCooldownPeriod How long after the strategy has been activated, will it be ready to be executed\\n * @param _minVotersQuorum Percentage of votes needed to activate an strategy (0.01% = 1e14, 1% = 1e16)\\n * @param _minStrategyDuration Min duration of an strategy\\n * @param _maxStrategyDuration Max duration of an strategy\\n */\\n function _start(\\n uint256 _creatorDeposit,\\n uint256 _maxDepositLimit,\\n uint256 _minGardenTokenSupply,\\n uint256 _minLiquidityAsset,\\n uint256 _depositHardlock,\\n uint256 _minContribution,\\n uint256 _strategyCooldownPeriod,\\n uint256 _minVotersQuorum,\\n uint256 _minStrategyDuration,\\n uint256 _maxStrategyDuration\\n ) private {\\n _require(_minContribution >= ABSOLUTE_MIN_CONTRIBUTION, Errors.MIN_CONTRIBUTION);\\n _require(_creatorDeposit >= _minContribution, Errors.MIN_CONTRIBUTION);\\n _require(_creatorDeposit >= _minGardenTokenSupply, Errors.MIN_LIQUIDITY);\\n _require(_creatorDeposit <= _maxDepositLimit, Errors.MAX_DEPOSIT_LIMIT);\\n _require(_maxDepositLimit <= MAX_DEPOSITS_FUND_V1, Errors.MAX_DEPOSIT_LIMIT);\\n IBabController babController = IBabController(controller);\\n _require(_minGardenTokenSupply > 0, Errors.MIN_TOKEN_SUPPLY);\\n _require(_depositHardlock > 0, Errors.DEPOSIT_HARDLOCK);\\n _require(_minLiquidityAsset >= babController.minRiskyPairLiquidityEth(), Errors.MIN_LIQUIDITY);\\n _require(\\n _strategyCooldownPeriod <= IBabController(controller).getMaxCooldownPeriod() &&\\n _strategyCooldownPeriod >= IBabController(controller).getMinCooldownPeriod(),\\n Errors.NOT_IN_RANGE\\n );\\n _require(_minVotersQuorum >= TEN_PERCENT && _minVotersQuorum <= TEN_PERCENT.mul(5), Errors.VALUE_TOO_LOW);\\n _require(_maxStrategyDuration >= _minStrategyDuration, Errors.DURATION_RANGE);\\n _require(_minStrategyDuration >= 1 days && _maxStrategyDuration <= 500 days, Errors.DURATION_RANGE);\\n minContribution = _minContribution;\\n strategyCooldownPeriod = _strategyCooldownPeriod;\\n minVotersQuorum = _minVotersQuorum;\\n minStrategyDuration = _minStrategyDuration;\\n maxStrategyDuration = _maxStrategyDuration;\\n minGardenTokenSupply = _minGardenTokenSupply;\\n maxDepositLimit = _maxDepositLimit;\\n gardenInitializedAt = block.timestamp;\\n minLiquidityAsset = _minLiquidityAsset;\\n depositHardlock = _depositHardlock;\\n withdrawalWindowAfterStrategyCompletes = 7 days;\\n }\\n\\n /**\\n * Deposits the reserve asset into the garden and mints the Garden token of the given quantity\\n * to the specified _to address.\\n *\\n * @param _reserveAssetQuantity Quantity of the reserve asset that are received\\n * @param _minGardenTokenReceiveQuantity Min quantity of Garden token to receive after issuance\\n * @param _to Address to mint Garden tokens to\\n */\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) public payable override nonReentrant {\\n _onlyActive();\\n _require(\\n guestListEnabled &&\\n IIshtarGate(IBabController(controller).ishtarGate()).canJoinAGarden(address(this), msg.sender),\\n Errors.USER_CANNOT_JOIN\\n );\\n _require(msg.value >= minContribution, Errors.MIN_CONTRIBUTION);\\n // if deposit limit is 0, then there is no deposit limit\\n if (maxDepositLimit > 0) {\\n _require(principal.add(msg.value) <= maxDepositLimit, Errors.MAX_DEPOSIT_LIMIT);\\n }\\n _require(totalContributors < maxContributors, Errors.MAX_CONTRIBUTORS);\\n _require(msg.value == _reserveAssetQuantity, Errors.MSG_VALUE_DO_NOT_MATCH);\\n // Always wrap to WETH\\n IWETH(WETH).deposit{value: msg.value}();\\n // Check this here to avoid having relayers\\n reenableEthForStrategies();\\n\\n _validateReserveAsset(reserveAsset, _reserveAssetQuantity);\\n\\n (uint256 protocolFees, uint256 netFlowQuantity) = _getFees(_reserveAssetQuantity, true);\\n\\n // Check that total supply is greater than min supply needed for issuance\\n _require(totalSupply() >= minGardenTokenSupply, Errors.MIN_TOKEN_SUPPLY);\\n\\n // gardenTokenQuantity has to be at least _minGardenTokenReceiveQuantity\\n _require(netFlowQuantity >= _minGardenTokenReceiveQuantity, Errors.MIN_TOKEN_SUPPLY);\\n\\n // Send Protocol Fee\\n payProtocolFeeFromGarden(reserveAsset, protocolFees);\\n\\n // Mint tokens\\n _mintGardenTokens(msg.sender, _to, netFlowQuantity, principal.add(netFlowQuantity), protocolFees);\\n }\\n\\n /**\\n * Withdraws the ETH relative to the token participation in the garden and sends it back to the sender.\\n *\\n * @param _gardenTokenQuantity Quantity of the garden token to withdrawal\\n * @param _minReserveReceiveQuantity Min quantity of reserve asset to receive\\n * @param _to Address to send component assets to\\n */\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to\\n ) external override nonReentrant {\\n _onlyContributor();\\n _withdraw(_gardenTokenQuantity, _minReserveReceiveQuantity, _to);\\n }\\n\\n /**\\n * Requests an immediate withdrawal taking the EARLY_WITHDRAWAL_PENALTY that stays invested.\\n *\\n * @param _gardenTokenQuantity Quantity of the garden token to withdrawal\\n * @param _to Address to send component assets to\\n */\\n function withdrawWithPenalty(uint256 _gardenTokenQuantity, address payable _to) external nonReentrant {\\n _onlyContributor();\\n // Check that cannot do a normal withdrawal\\n _require(!_canWithdrawEthAmount(msg.sender, _gardenTokenQuantity), Errors.NORMAL_WITHDRAWAL_POSSIBLE);\\n uint256 netReserveFlows = _gardenTokenQuantity.sub(_gardenTokenQuantity.preciseMul(EARLY_WITHDRAWAL_PENALTY));\\n (, uint256 largestCapital, address maxStrategy) = _getActiveCapital();\\n // Check that strategy has enough capital to support the withdrawal\\n _require(\\n IStrategy(maxStrategy).minRebalanceCapital() <= largestCapital.sub(netReserveFlows),\\n Errors.WITHDRAWAL_WITH_PENALTY\\n );\\n IStrategy(maxStrategy).unwindStrategy(netReserveFlows);\\n // We burn their penalty\\n _burn(msg.sender, _gardenTokenQuantity.preciseMul(EARLY_WITHDRAWAL_PENALTY));\\n // TODO: replace the 1\\n _withdraw(netReserveFlows, 1, _to);\\n }\\n\\n /**\\n * User can claim the rewards from the strategies that his principal\\n * was invested in.\\n */\\n function claimReturns(address[] calldata _finalizedStrategies) external override nonReentrant {\\n _onlyContributor();\\n Contributor storage contributor = contributors[msg.sender];\\n _require(block.timestamp > contributor.claimedAt, Errors.ALREADY_CLAIMED); // race condition check\\n\\n IRewardsDistributor rewardsDistributor = IRewardsDistributor(IBabController(controller).rewardsDistributor());\\n (uint256 reserveRewards, uint256 bablRewards) =\\n rewardsDistributor.getRewards(address(this), msg.sender, _finalizedStrategies);\\n\\n if (reserveRewards > 0 && address(this).balance >= reserveRewards) {\\n contributor.claimedRewards = contributor.claimedRewards.add(reserveRewards); // Rewards claimed properly\\n // Send ETH\\n Address.sendValue(msg.sender, reserveRewards);\\n reserveAssetRewardsSetAside = reserveAssetRewardsSetAside.sub(reserveRewards);\\n emit RewardsForContributor(msg.sender, reserveRewards);\\n contributor.claimedAt = block.timestamp; // Checkpoint of this claim\\n }\\n if (bablRewards > 0) {\\n contributor.claimedBABL = contributor.claimedBABL.add(bablRewards); // BABL Rewards claimed properly\\n // Send BABL rewards\\n\\n rewardsDistributor.sendTokensToContributor(msg.sender, uint96(bablRewards));\\n emit BABLRewardsForContributor(msg.sender, uint96(bablRewards));\\n contributor.claimedAt = block.timestamp; // Checkpoint of this claim\\n }\\n }\\n\\n /**\\n * When an strategy finishes execution, we want to make that eth available for withdrawals\\n * from members of the garden.\\n *\\n * @param _amount Amount of WETH to convert to ETH to set aside until the window ends\\n * @param _rewards Amount of WETH to convert to ETH to set aside forever\\n * @param _returns Profits or losses that the strategy received\\n */\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _rewards,\\n int256 _returns,\\n address _strategy\\n ) external override {\\n _require(\\n (strategyMapping[msg.sender] && address(IStrategy(msg.sender).garden()) == address(this)) ||\\n msg.sender == controller,\\n Errors.ONLY_STRATEGY_OR_CONTROLLER\\n );\\n // Updates reserve asset\\n uint256 _newTotal = principal.toInt256().add(_returns).toUint256();\\n _updatePrincipal(_newTotal);\\n if (withdrawalsOpenUntil > block.timestamp) {\\n withdrawalsOpenUntil = block.timestamp.add(\\n withdrawalWindowAfterStrategyCompletes.sub(withdrawalsOpenUntil.sub(block.timestamp))\\n );\\n } else {\\n withdrawalsOpenUntil = block.timestamp.add(withdrawalWindowAfterStrategyCompletes);\\n }\\n reserveAssetRewardsSetAside = reserveAssetRewardsSetAside.add(_rewards);\\n reserveAssetPrincipalWindow = reserveAssetPrincipalWindow.add(_amount);\\n // Both are converted to weth\\n IWETH(WETH).withdraw(_amount.add(_rewards));\\n\\n // Mark strategy as finalized\\n absoluteReturns.add(_returns);\\n strategies = strategies.remove(_strategy);\\n finalizedStrategies.push(_strategy);\\n strategyMapping[_strategy] = false;\\n }\\n\\n /**\\n * When the window of withdrawals finishes, we need to make the capital available again for investments\\n * We still keep the profits aside.\\n */\\n function reenableEthForStrategies() public override {\\n if (\\n block.timestamp >= withdrawalsOpenUntil &&\\n address(this).balance > minContribution &&\\n address(this).balance >= reserveAssetPrincipalWindow\\n ) {\\n withdrawalsOpenUntil = 0;\\n IWETH(WETH).deposit{value: reserveAssetPrincipalWindow}();\\n reserveAssetPrincipalWindow = 0;\\n }\\n }\\n\\n /**\\n * Pays gas costs back to the keeper from executing transactions including the past debt\\n * @param _keeper Keeper that executed the transaction\\n * @param _fee The fee paid to keeper to compensate the gas cost\\n */\\n function payKeeper(address payable _keeper, uint256 _fee) external override {\\n _require(IBabController(controller).isValidKeeper(_keeper), Errors.ONLY_KEEPER);\\n keeperDebt = keeperDebt.add(_fee);\\n // Pay Keeper in WETH\\n // TOOD: Update principal\\n // TOOD: Reserve asset may be not WETH\\n if (keeperDebt > 0 && IERC20(reserveAsset).balanceOf(address(this)) >= keeperDebt) {\\n IERC20(reserveAsset).safeTransfer(_keeper, keeperDebt);\\n _updatePrincipal(principal.sub(keeperDebt));\\n keeperDebt = 0;\\n }\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Makes a previously private garden public\\n */\\n function makeGardenPublic() external override {\\n _require(msg.sender == creator, Errors.ONLY_CREATOR);\\n _require(guestListEnabled && IBabController(controller).allowPublicGardens(), Errors.GARDEN_ALREADY_PUBLIC);\\n guestListEnabled = false;\\n }\\n\\n /**\\n * PRIVILEGED Manager, protocol FUNCTION. When a Garden is active, deposits are enabled.\\n */\\n function setActive(bool _newValue) external override {\\n _require(msg.sender == controller, Errors.ONLY_CONTROLLER);\\n _require(active != _newValue, Errors.ONLY_INACTIVE);\\n active = _newValue;\\n }\\n\\n /* ============ Strategy Functions ============ */\\n /**\\n * Creates a new strategy calling the factory and adds it to the array\\n * @param _name Name of the strategy\\n * @param _symbol Symbol of the strategy\\n * @param _stratParams Num params for the strategy\\n * @param _opTypes Type for every operation in the strategy\\n * @param _opIntegrations Integration to use for every operation\\n * @param _opDatas Param for every operation in the strategy\\n */\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external override {\\n _onlyActive();\\n _onlyContributor();\\n _require(\\n IIshtarGate(IBabController(controller).ishtarGate()).canAddStrategiesInAGarden(address(this), msg.sender),\\n Errors.USER_CANNOT_ADD_STRATEGIES\\n );\\n _require(strategies.length < MAX_TOTAL_STRATEGIES, Errors.VALUE_TOO_HIGH);\\n _require(_stratParams.length == 5, Errors.STRAT_PARAMS_LENGTH);\\n address strategy =\\n IStrategyFactory(IBabController(controller).strategyFactory()).createStrategy(\\n _name,\\n _symbol,\\n msg.sender,\\n address(this),\\n controller,\\n _stratParams\\n );\\n strategyMapping[strategy] = true;\\n totalStake = totalStake.add(_stratParams[1]);\\n strategies.push(strategy);\\n IStrategy(strategy).setData(_opTypes, _opIntegrations, _opDatas);\\n }\\n\\n /**\\n * Rebalances available capital of the garden between the strategies that are active.\\n * We enter into the strategy and add it to the executed strategies array.\\n * @param _fee The fee paid to keeper to compensate the gas cost for each strategy executed\\n */\\n function rebalanceStrategies(uint256 _fee) external override {\\n _onlyActive();\\n _require(IBabController(controller).isValidKeeper(msg.sender), Errors.ONLY_KEEPER);\\n // We assume that calling keeper functions should be less expensive\\n // than 1 million gas and the gas price should be lower than 1000 gwei.\\n _require(_fee <= MAX_KEEPER_FEE, Errors.FEE_TOO_HIGH);\\n\\n uint256 liquidReserveAsset = ERC20Upgradeable(reserveAsset).balanceOf(address(this));\\n for (uint256 i = 0; i < strategies.length; i++) {\\n IStrategy strategy = IStrategy(strategies[i]);\\n uint256 percentage = strategy.totalVotes().toUint256().preciseDiv(totalStake);\\n uint256 toAllocate = liquidReserveAsset.preciseMul(percentage);\\n if (\\n block.timestamp < strategy.executedAt().add(strategy.duration()).sub(1 days) &&\\n toAllocate >= strategy.minRebalanceCapital() &&\\n toAllocate.add(strategy.capitalAllocated()) <= strategy.maxCapitalRequested()\\n ) {\\n strategy.executeStrategy(toAllocate, _fee);\\n }\\n }\\n }\\n\\n /**\\n * Allocates garden capital to an strategy\\n *\\n * @param _capital Amount of capital to allocate to the strategy\\n */\\n function allocateCapitalToStrategy(uint256 _capital) external override {\\n _onlyStrategy();\\n _onlyActive();\\n uint256 liquidReserveAsset = IERC20(reserveAsset).balanceOf(address(this));\\n uint256 protocolMgmtFee = IBabController(controller).protocolManagementFee().preciseMul(_capital);\\n _require(_capital.add(protocolMgmtFee) <= liquidReserveAsset, Errors.MIN_LIQUIDITY);\\n\\n // Take protocol mgmt fee\\n IERC20(reserveAsset).safeTransfer(IBabController(controller).treasury(), protocolMgmtFee);\\n\\n // Send Capital to strategy\\n IERC20(reserveAsset).safeTransfer(msg.sender, _capital);\\n }\\n\\n // Any tokens (other than the target) that are sent here by mistake are recoverable by the protocol\\n // Exchange for WETH\\n function sweep(address _token) external {\\n _onlyContributor();\\n _require(_token != reserveAsset, Errors.MUST_BE_RESERVE_ASSET);\\n uint256 balance = IERC20(_token).balanceOf(address(this));\\n _require(balance > 0, Errors.BALANCE_TOO_LOW);\\n IERC20(_token).safeTransfer(IBabController(controller).treasury(), balance);\\n }\\n\\n /*\\n * Remove an expire candidate from the strategy Array\\n * @param _strategy Strategy to remove\\n */\\n function expireCandidateStrategy(address _strategy) external override {\\n _onlyStrategy();\\n strategies = strategies.remove(_strategy);\\n strategyMapping[_strategy] = false;\\n }\\n\\n /*\\n * Burns the stake of the strategist of a given strategy\\n * @param _strategy Strategy\\n */\\n function burnStrategistStake(address _strategist, uint256 _amount) external override {\\n _onlyStrategy();\\n if (_amount >= balanceOf(_strategist)) {\\n // Avoid underflow condition\\n _amount = balanceOf(_strategist);\\n }\\n _burn(_strategist, _amount);\\n }\\n\\n /* ============ External Getter Functions ============ */\\n\\n /**\\n * Gets current strategies\\n *\\n * @return address[] Returns list of addresses\\n */\\n\\n function getStrategies() external view override returns (address[] memory) {\\n return strategies;\\n }\\n\\n /**\\n * Gets finalized strategies\\n *\\n * @return address[] Returns list of addresses\\n */\\n\\n function getFinalizedStrategies() external view override returns (address[] memory) {\\n return finalizedStrategies;\\n }\\n\\n function isStrategy(address _strategy) external view override returns (bool) {\\n return strategyMapping[_strategy];\\n }\\n\\n function getContributor(address _contributor)\\n external\\n view\\n override\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n )\\n {\\n Contributor storage contributor = contributors[_contributor];\\n return (\\n contributor.lastDepositAt,\\n contributor.initialDepositAt,\\n contributor.claimedAt,\\n contributor.claimedBABL,\\n contributor.claimedRewards,\\n contributor.withdrawnSince\\n );\\n }\\n\\n /**\\n * Get the expected reserve asset to be withdrawaled\\n *\\n * @param _gardenTokenQuantity Quantity of Garden tokens to withdrawal\\n *\\n * @return uint256 Expected reserve asset quantity withdrawaled\\n */\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity)\\n external\\n view\\n override\\n returns (uint256)\\n {\\n (, uint256 netReserveFlows) =\\n _getFees(_getWithdrawalReserveQuantity(reserveAsset, _gardenTokenQuantity), false);\\n\\n return netReserveFlows;\\n }\\n\\n /**\\n * Checks balance locked for strategists and voters in active strategies\\n *\\n * @param _contributor Address of the account\\n *\\n * @return uint256 Returns the amount of locked garden tokens for the account\\n */\\n function getLockedBalance(address _contributor) external view override returns (uint256) {\\n uint256 lockedAmount;\\n for (uint256 i = 0; i < strategies.length; i++) {\\n IStrategy strategy = IStrategy(strategies[i]);\\n uint256 votes = uint256(Math.abs(strategy.getUserVotes(_contributor)));\\n if (votes > 0) {\\n lockedAmount = lockedAmount.add(votes);\\n }\\n }\\n // Avoid overflows if off-chain voting system fails\\n if (balanceOf(_contributor) < lockedAmount) lockedAmount = balanceOf(_contributor);\\n return lockedAmount;\\n }\\n\\n function getGardenTokenMintQuantity(\\n uint256 _reserveAssetQuantity,\\n bool isDeposit // Value of reserve asset net of fees\\n ) public view override returns (uint256) {\\n // Get valuation of the Garden with the quote asset as the reserve asset.\\n // Reverts if price is not found\\n uint8 reserveAssetDecimals = ERC20Upgradeable(reserveAsset).decimals();\\n uint256 baseUnits = uint256(10)**reserveAssetDecimals;\\n uint256 normalizedReserveQuantity = _reserveAssetQuantity.preciseDiv(baseUnits);\\n // First deposit\\n if (totalSupply() == 0) {\\n return normalizedReserveQuantity;\\n }\\n uint256 gardenValuationPerToken =\\n IGardenValuer(IBabController(controller).gardenValuer()).calculateGardenValuation(\\n address(this),\\n reserveAsset\\n );\\n\\n gardenValuationPerToken = gardenValuationPerToken.preciseDiv(baseUnits);\\n if (isDeposit) {\\n gardenValuationPerToken = gardenValuationPerToken.sub(normalizedReserveQuantity.preciseDiv(totalSupply()));\\n }\\n return normalizedReserveQuantity.preciseDiv(gardenValuationPerToken);\\n }\\n\\n // solhint-disable-next-line\\n receive() external payable {}\\n\\n /* ============ Modifiers ============ */\\n\\n // Replaced by internal functions due to contract size limit of 24KB\\n\\n /* ============ Internal Functions ============ */\\n\\n function _onlyContributor() internal {\\n _require(balanceOf(msg.sender) > 0, Errors.ONLY_CONTRIBUTOR);\\n }\\n\\n /**\\n * Throws if the sender is not an strategy of this garden\\n */\\n function _onlyStrategy() internal {\\n _require(strategyMapping[msg.sender], Errors.ONLY_STRATEGY);\\n }\\n\\n /**\\n * Throws if the garden is not active\\n */\\n function _onlyActive() internal {\\n _require(active, Errors.ONLY_ACTIVE);\\n }\\n\\n /**\\n * Function that mints the appropriate garden tokens along with the Garden NFT\\n * @param _from Address that triggered the transaction\\n * @param _to Address to mint the tokens\\n * @param _reserveAssetQuantity Amount of garden tokens\\n * @param _newPrincipal New principal for that user\\n * @param _protocolFees Protocol Fees Paid\\n */\\n function _mintGardenTokens(\\n address _from,\\n address _to,\\n uint256 _reserveAssetQuantity,\\n uint256 _newPrincipal,\\n uint256 _protocolFees\\n ) private {\\n uint256 previousBalance = balanceOf(_to);\\n uint256 amountToMint = getGardenTokenMintQuantity(_reserveAssetQuantity, true);\\n _mint(_to, amountToMint);\\n _updateContributorDepositInfo(_from, previousBalance);\\n _updatePrincipal(_newPrincipal);\\n // Mint the garden NFT\\n IGardenNFT(nftAddress).grantGardenNFT(_to);\\n _require(totalSupply() > 0, Errors.MIN_LIQUIDITY);\\n emit GardenDeposit(_to, msg.value, _reserveAssetQuantity, _protocolFees, block.timestamp);\\n }\\n\\n /**\\n * Check if the fund has ETH amount available for withdrawals.\\n * If it returns false, reserve pool would be available.\\n * @param _contributor Address of the contributors\\n * @param _amount Amount of ETH to withdraw\\n */\\n function _canWithdrawEthAmount(address _contributor, uint256 _amount) private view returns (bool) {\\n // ETH rewards cannot be withdrawn. Only claimed\\n _require(address(this).balance >= reserveAssetPrincipalWindow, Errors.NOT_ENOUGH_ETH);\\n uint256 liquidWeth = IERC20(reserveAsset).balanceOf(address(this));\\n\\n // Weth already available\\n if (liquidWeth >= _amount) {\\n return true;\\n }\\n\\n // Withdrawal open\\n if (block.timestamp <= withdrawalsOpenUntil) {\\n IRewardsDistributor rewardsDistributor =\\n IRewardsDistributor(IBabController(controller).rewardsDistributor());\\n // Pro rata withdrawals\\n uint256 contributorPower =\\n rewardsDistributor.getContributorPower(\\n address(this),\\n _contributor,\\n contributors[_contributor].initialDepositAt,\\n block.timestamp\\n );\\n return reserveAssetPrincipalWindow.preciseMul(contributorPower) >= _amount;\\n }\\n return false;\\n }\\n\\n /**\\n * Gets the total active capital currently invested in strategies\\n *\\n * @return uint256 Total amount active\\n * @return uint256 Total amount active in the largest strategy\\n * @return address Address of the largest strategy\\n */\\n function _getActiveCapital()\\n private\\n view\\n returns (\\n uint256,\\n uint256,\\n address\\n )\\n {\\n uint256 totalActiveCapital;\\n uint256 maxAllocation;\\n address maxStrategy = address(0);\\n for (uint8 i = 0; i < strategies.length; i++) {\\n IStrategy strategy = IStrategy(strategies[i]);\\n if (strategy.isStrategyActive()) {\\n uint256 allocation = strategy.capitalAllocated();\\n totalActiveCapital = totalActiveCapital.add(allocation);\\n if (allocation > maxAllocation) {\\n maxAllocation = allocation;\\n maxStrategy = strategies[i];\\n }\\n }\\n }\\n return (totalActiveCapital, maxAllocation, maxStrategy);\\n }\\n\\n /**\\n * Function that allows the principal to be updated\\n *\\n * @param _amount Amount of the reserve balance\\n */\\n function _updatePrincipal(uint256 _amount) private {\\n uint256 oldAmount = principal;\\n principal = _amount;\\n emit PrincipalChanged(_amount, oldAmount);\\n }\\n\\n /**\\n * Pays the _feeQuantity from the _garden denominated in _token to the protocol fee recipient\\n * @param _token Address of the token to pay with\\n * @param _feeQuantity Fee to transfer\\n */\\n function payProtocolFeeFromGarden(address _token, uint256 _feeQuantity) private {\\n if (_feeQuantity > 0) {\\n IERC20(_token).safeTransfer(IBabController(controller).treasury(), _feeQuantity);\\n }\\n }\\n\\n // Disable garden token transfers. Allow minting and burning.\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 _amount\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, _amount);\\n _require(\\n from == address(0) || to == address(0) || IBabController(controller).gardenTokensTransfersEnabled(),\\n Errors.GARDEN_TRANSFERS_DISABLED\\n );\\n }\\n\\n /**\\n * Aux function to withdraw from a garden\\n */\\n function _withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to\\n ) private {\\n // Withdrawal amount has to be equal or less than msg.sender balance\\n _require(_gardenTokenQuantity <= balanceOf(msg.sender), Errors.MSG_SENDER_TOKENS_DO_NOT_MATCH);\\n // Flashloan protection\\n _require(\\n block.timestamp.sub(contributors[msg.sender].lastDepositAt) >= depositHardlock,\\n Errors.DEPOSIT_HARDLOCK\\n );\\n _require(\\n _gardenTokenQuantity <= balanceOf(msg.sender).sub(this.getLockedBalance(msg.sender)),\\n Errors.TOKENS_STAKED\\n ); // Strategists and Voters cannot withdraw locked stake while in active strategies\\n\\n // Check this here to avoid having relayers\\n reenableEthForStrategies();\\n\\n uint256 reserveAssetQuantity = _getWithdrawalReserveQuantity(reserveAsset, _gardenTokenQuantity);\\n\\n (uint256 protocolFees, uint256 netFlowQuantity) = _getFees(reserveAssetQuantity, false);\\n\\n uint256 newGardenTokenSupply = totalSupply().sub(_gardenTokenQuantity);\\n\\n _require(_canWithdrawEthAmount(msg.sender, netFlowQuantity), Errors.MIN_LIQUIDITY);\\n\\n _validateReserveAsset(reserveAsset, netFlowQuantity);\\n\\n // Check that new supply is more than min supply needed for withdrawal\\n // Note: A min supply amount is needed to avoid division by 0 when withdrawaling garden token to 0\\n _require(newGardenTokenSupply >= minGardenTokenSupply, Errors.MIN_TOKEN_SUPPLY);\\n\\n _require(netFlowQuantity >= _minReserveReceiveQuantity, Errors.MIN_TOKEN_SUPPLY);\\n\\n _burn(msg.sender, _gardenTokenQuantity);\\n\\n // Check that the withdrawal is possible\\n // Unwrap WETH if ETH balance lower than netFlowQuantity\\n if (address(this).balance < netFlowQuantity) {\\n IWETH(WETH).withdraw(netFlowQuantity.sub(address(this).balance));\\n }\\n _updateContributorWithdrawalInfo(netFlowQuantity);\\n // Send ETH\\n Address.sendValue(_to, netFlowQuantity);\\n payProtocolFeeFromGarden(reserveAsset, protocolFees);\\n\\n uint256 outflow = netFlowQuantity.add(protocolFees);\\n\\n // Required withdrawable quantity is greater than existing collateral\\n _require(principal >= outflow, Errors.BALANCE_TOO_LOW);\\n _updatePrincipal(principal.sub(outflow));\\n\\n emit GardenWithdrawal(msg.sender, _to, netFlowQuantity, _gardenTokenQuantity, protocolFees, block.timestamp);\\n }\\n\\n function _validateReserveAsset(address _reserveAsset, uint256 _quantity) private view {\\n _require(_quantity > 0, Errors.GREATER_THAN_ZERO);\\n _require(IBabController(controller).isValidReserveAsset(_reserveAsset), Errors.MUST_BE_RESERVE_ASSET);\\n }\\n\\n /**\\n * Returns the fees attributed to the manager and the protocol. The fees are calculated as follows:\\n *\\n * Protocol Fee = (% direct fee %) * reserveAssetQuantity\\n *\\n * @param _reserveAssetQuantity Quantity of reserve asset to calculate fees from\\n * @param _isDeposit Boolean that is true when it is a deposit\\n *\\n * @return uint256 Fees paid to the protocol in reserve asset\\n * @return uint256 Net reserve to user net of fees\\n */\\n function _getFees(uint256 _reserveAssetQuantity, bool _isDeposit) private view returns (uint256, uint256) {\\n // Get protocol fee percentages\\n uint256 protocolFeePercentage =\\n _isDeposit\\n ? IBabController(controller).protocolDepositGardenTokenFee()\\n : IBabController(controller).protocolWithdrawalGardenTokenFee();\\n\\n // Calculate total notional fees\\n uint256 protocolFees = protocolFeePercentage.preciseMul(_reserveAssetQuantity);\\n\\n uint256 netReserveFlow = _reserveAssetQuantity.sub(protocolFees);\\n\\n return (protocolFees, netReserveFlow);\\n }\\n\\n function _getWithdrawalReserveQuantity(address _reserveAsset, uint256 _gardenTokenQuantity)\\n private\\n view\\n returns (uint256)\\n {\\n // Get valuation of the Garden with the quote asset as the reserve asset. Returns value in precise units (10e18)\\n // Reverts if price is not found\\n uint256 gardenValuationPerToken =\\n IGardenValuer(IBabController(controller).gardenValuer()).calculateGardenValuation(\\n address(this),\\n _reserveAsset\\n );\\n\\n uint256 totalWithdrawalValueInPreciseUnits = _gardenTokenQuantity.preciseMul(gardenValuationPerToken);\\n // Get reserve asset decimals\\n uint8 reserveAssetDecimals = ERC20Upgradeable(_reserveAsset).decimals();\\n uint256 prePremiumReserveQuantity = totalWithdrawalValueInPreciseUnits.preciseMul(10**reserveAssetDecimals);\\n\\n return prePremiumReserveQuantity;\\n }\\n\\n /**\\n * Updates the contributor info in the array\\n */\\n function _updateContributorDepositInfo(address _contributor, uint256 previousBalance) private {\\n Contributor storage contributor = contributors[_contributor];\\n // If new contributor, create one, increment count, and set the current TS\\n if (previousBalance == 0 || contributor.initialDepositAt == 0) {\\n totalContributors = totalContributors.add(1);\\n contributor.initialDepositAt = block.timestamp;\\n }\\n // We make checkpoints around contributor deposits to avoid fast loans and give the right rewards afterwards\\n\\n contributor.lastDepositAt = block.timestamp;\\n IRewardsDistributor rewardsDistributor = IRewardsDistributor(IBabController(controller).rewardsDistributor());\\n rewardsDistributor.updateGardenPower(address(this), pid);\\n rewardsDistributor.setContributorTimestampParams(address(this), _contributor, previousBalance, true, pid); // true = deposit\\n pid++;\\n }\\n\\n /**\\n * Updates the contributor info in the array\\n */\\n function _updateContributorWithdrawalInfo(uint256 _netflowQuantity) private {\\n Contributor storage contributor = contributors[msg.sender];\\n // If sold everything\\n if (balanceOf(msg.sender) == 0) {\\n contributor.lastDepositAt = 0;\\n contributor.initialDepositAt = 0;\\n contributor.withdrawnSince = 0;\\n //delete contributor.timeListPointer;\\n totalContributors = totalContributors.sub(1);\\n } else {\\n contributor.withdrawnSince = contributor.withdrawnSince.add(_netflowQuantity);\\n }\\n IRewardsDistributor rewardsDistributor = IRewardsDistributor(IBabController(controller).rewardsDistributor());\\n rewardsDistributor.updateGardenPower(address(this), pid);\\n rewardsDistributor.setContributorTimestampParams(address(this), msg.sender, 0, false, pid); // false = withdraw\\n pid++;\\n }\\n}\\n\",\"keccak256\":\"0x974a0c5086dfbfb71464e5bf5a7c210ffbf842aa1a3b26a73ebe436dfeb5ff84\",\"license\":\"Apache License\"},\"contracts/gardens/GardenFactory.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {Clones} from '@openzeppelin/contracts/proxy/Clones.sol';\\n\\nimport {IGardenFactory} from '../interfaces/IGardenFactory.sol';\\nimport {Garden} from './Garden.sol';\\nimport {GardenNFT} from './GardenNFT.sol';\\n\\n/**\\n * @title GardenFactory\\n * @author Babylon Finance\\n *\\n * Factory to create garden contracts\\n */\\ncontract GardenFactory is IGardenFactory {\\n address private immutable garden;\\n address private immutable gardenNFT;\\n\\n constructor() {\\n garden = address(new Garden());\\n gardenNFT = address(new GardenNFT());\\n }\\n\\n /**\\n * Creates a garden using minimal proxies\\n * @param _reserveAsset Address of the reserve asset ERC20\\n * @param _controller Address of the controller\\n * @param _creator Address of the creator\\n * @param _name Name of the Garden\\n * @param _symbol Symbol of the Garden\\n * @param _tokenURI URL of the garden NFT JSON\\n * @param _seed Seed to regenerate the garden NFT\\n * @param _gardenParams Array of numeric params in the garden\\n */\\n function createGarden(\\n address _reserveAsset,\\n address _controller,\\n address _creator,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable override returns (address) {\\n address payable clone = payable(Clones.clone(garden));\\n address cloneNFT = Clones.clone(gardenNFT);\\n GardenNFT(cloneNFT).initialize(_controller, address(clone), _name, _symbol, _tokenURI, _seed);\\n Garden(clone).initialize{value: msg.value}(\\n _reserveAsset,\\n _controller,\\n _creator,\\n _name,\\n _symbol,\\n _gardenParams,\\n cloneNFT\\n );\\n return clone;\\n }\\n}\\n\",\"keccak256\":\"0x37f1264819bd015c28b253ed0b1f2fe63f0e46e363b428046d7c2508cb0cf3a0\",\"license\":\"Apache License\"},\"contracts/gardens/GardenNFT.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {ERC721Upgradeable} from '@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol';\\nimport {Counters} from '@openzeppelin/contracts/utils/Counters.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {IGardenNFT} from '../interfaces/IGardenNFT.sol';\\n\\n/**\\n * @title GardenNFT\\n * @author Babylon Finance\\n *\\n * Contract the NFT for each Garden\\n */\\ncontract GardenNFT is ERC721Upgradeable, IGardenNFT {\\n using Counters for Counters.Counter;\\n\\n /* ============ Events ============ */\\n\\n event GardenNFTAwarded(address indexed _member, uint256 indexed _newItemId);\\n event GardenURIUpdated(string _newValue, string _oldValue);\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlyGarden {\\n require(msg.sender == address(garden), 'Only the garden can mint the NFT');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the Controller contract\\n IBabController public controller;\\n IGarden public garden;\\n\\n // Address of the Garden JSON (Shared JSON for each garden)\\n string public tokenURI;\\n uint256 public seed;\\n\\n Counters.Counter private _tokenIds;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Sets the protocol controller\\n *\\n * @param _controller Address of controller contract\\n * @param _garden Address of the garden this NFT belongs to\\n * @param _name Name of the garden\\n * @param _symbol Symbol of the garden\\n * @param _tokenURI Initial token URI\\n * @param _seed Seed to regenerated the Babylong Garden in 3D\\n */\\n function initialize(\\n address _controller,\\n address _garden,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed\\n ) external override initializer {\\n require(address(_controller) != address(0), 'Controller must exist');\\n __ERC721_init(_name, _symbol);\\n controller = IBabController(_controller);\\n garden = IGarden(_garden);\\n seed = _seed;\\n tokenURI = _tokenURI;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Awards the garden NFT to a user and gives him access to a specific garden\\n *\\n * @param _user Address of the user\\n */\\n function grantGardenNFT(address _user) external override onlyGarden returns (uint256) {\\n require(address(_user) != address(0), 'User must exist');\\n return _createOrGetGardenNFT(_user);\\n }\\n\\n /**\\n * Updates the token URI of the garden NFT\\n *\\n * @param _tokenURI Address of the tokenURI\\n */\\n function updateGardenURI(string memory _tokenURI) external override {\\n require(msg.sender == controller.owner(), 'Only owner can call this');\\n string memory oldURI = tokenURI;\\n tokenURI = _tokenURI;\\n emit GardenURIUpdated(tokenURI, oldURI);\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Gives a new nft to the user or retrieve the existing one\\n *\\n * @param _user Address of the user\\n */\\n function _createOrGetGardenNFT(address _user) private returns (uint256) {\\n uint256 newItemId = 0;\\n if (balanceOf(_user) == 0) {\\n _tokenIds.increment();\\n newItemId = _tokenIds.current();\\n _safeMint(_user, newItemId);\\n _setTokenURI(newItemId, tokenURI);\\n emit GardenNFTAwarded(_user, newItemId);\\n } else {\\n newItemId = tokenOfOwnerByIndex(_user, 0);\\n }\\n return newItemId;\\n }\\n}\\n\",\"keccak256\":\"0x2d63da8507a7f4b699b21db0ee5256cb954b4616321c7e11a7bc470fc9f69b32\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityMinimum(uint256 _minRiskyPairLiquidityEth) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minRiskyPairLiquidityEth() external view returns (uint256);\\n\\n function getUniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0x57cf4ece98219f805a416e8c24728d30d9b37c4126d66785d2617b97e35ffae6\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function nftAddress() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategy(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function reenableEthForStrategies() external;\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x5e460136e0b45024ea1c1f32cde607f3ce75dd5b14cee34007d6bbd08beabc82\",\"license\":\"Apache License\"},\"contracts/interfaces/IGardenFactory.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IIntegration} from './IIntegration.sol';\\n\\n/**\\n * @title IGardenFactory\\n * @author Babylon Finance\\n *\\n * Interface for the garden factory\\n */\\ninterface IGardenFactory {\\n function createGarden(\\n address _reserveAsset,\\n address _controller,\\n address _creator,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable returns (address);\\n}\\n\",\"keccak256\":\"0x2c6f55bf6843e5baf2896cdb8088ea1f4a96fcc425ea0818e0238edc1036fbf8\",\"license\":\"Apache License\"},\"contracts/interfaces/IGardenNFT.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from './IGarden.sol';\\nimport {IBabController} from './IBabController.sol';\\n\\n/**\\n * @title IGardenNFT\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden NFT.\\n */\\ninterface IGardenNFT {\\n function initialize(\\n address _controller,\\n address _garden,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed\\n ) external;\\n\\n function grantGardenNFT(address _user) external returns (uint256);\\n\\n function updateGardenURI(string memory _tokenURI) external;\\n}\\n\",\"keccak256\":\"0xd9a12fa9bc2ea2b27b5c5083e54cd997d12e29d26c13ed410f638481eb7b30e5\",\"license\":\"Apache License\"},\"contracts/interfaces/IGardenValuer.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\ninterface IGardenValuer {\\n function calculateGardenValuation(address _garden, address _quoteAsset) external view returns (uint256);\\n\\n function getLossesGarden(address _garden, uint256 _since) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xdf2ef07a358cfabb034d966e3e6c7dbf963bd4473c910ca2abcfcf5cce72c75c\",\"license\":\"Apache License\"},\"contracts/interfaces/IIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIntegration\\n * @author Babylon Finance\\n *\\n * Interface for protocol integrations\\n */\\ninterface IIntegration {\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xee03c9274ddf3257e3bfd2bb229fea3412c9105f178e64174f59efeafd53182c\",\"license\":\"Apache License\"},\"contracts/interfaces/IIshtarGate.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIshtarGate\\n * @author Babylon Finance\\n *\\n * Interface for interacting with the Gate Guestlist NFT\\n */\\ninterface IIshtarGate {\\n /* ============ Functions ============ */\\n\\n function setGardenAccess(\\n address _user,\\n address _garden,\\n uint8 _permission\\n ) external returns (uint256);\\n\\n function setCreatorPermissions(address _user, bool _canCreate) external returns (uint256);\\n\\n function grantGardenAccessBatch(\\n address _garden,\\n address[] calldata _users,\\n uint8[] calldata _perms\\n ) external returns (bool);\\n\\n function maxNumberOfInvites() external view returns (uint256);\\n\\n function tokenURI() external view returns (string memory);\\n\\n function setMaxNumberOfInvites(uint256 _maxNumberOfInvites) external;\\n\\n function updateGardenURI(string memory _tokenURI) external;\\n\\n function grantCreatorsInBatch(address[] calldata _users, bool[] calldata _perms) external returns (bool);\\n\\n function canCreate(address _user) external view returns (bool);\\n\\n function canJoinAGarden(address _garden, address _user) external view returns (bool);\\n\\n function canVoteInAGarden(address _garden, address _user) external view returns (bool);\\n\\n function canAddStrategiesInAGarden(address _garden, address _user) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x0731159ca37445441424ec07de68ac1347a6a3c4559eed6db7682a6018660d63\",\"license\":\"Apache License\"},\"contracts/interfaces/IRewardsDistributor.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IRewardsDistributor\\n * @author Babylon Finance\\n *\\n * Interface for the distribute rewards of the BABL Mining Program.\\n */\\n\\ninterface IRewardsDistributor {\\n // Structs\\n struct PrincipalPerTimestamp {\\n uint256 principal;\\n uint256 time;\\n uint256 timeListPointer;\\n }\\n\\n function protocolPrincipal() external view returns (uint256);\\n\\n function pid() external view returns (uint256);\\n\\n // solhint-disable-next-line\\n function EPOCH_DURATION() external pure returns (uint256);\\n\\n // solhint-disable-next-line\\n function START_TIME() external view returns (uint256);\\n\\n // solhint-disable-next-line\\n function Q1_REWARDS() external pure returns (uint256);\\n\\n // solhint-disable-next-line\\n function DECAY_RATE() external pure returns (uint256);\\n\\n function addProtocolPrincipal(uint256 _capital) external;\\n\\n function substractProtocolPrincipal(uint256 _capital) external;\\n\\n function getStrategyRewards(address _strategy) external returns (uint96);\\n\\n function sendTokensToContributor(address _to, uint96 _amount) external;\\n\\n function getRewards(\\n address _garden,\\n address _contributor,\\n address[] calldata _finalizedStrategies\\n ) external view returns (uint256, uint96);\\n\\n function getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) external view returns (uint256);\\n\\n /**\\n function getContributor(address _garden, address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256[] memory,\\n uint256\\n );\\n */\\n function updateGardenPower(address _garden, uint256 _pid) external;\\n\\n function setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw,\\n uint256 _pid\\n ) external;\\n\\n function tokenSupplyPerQuarter(uint256 quarter) external view returns (uint96);\\n\\n function checkProtocol(uint256 _time)\\n external\\n view\\n returns (\\n uint256 principal,\\n uint256 time,\\n uint256 quarterBelonging,\\n uint256 timeListPointer,\\n uint256 power\\n );\\n\\n function checkQuarter(uint256 _num)\\n external\\n view\\n returns (\\n uint256 quarterPrincipal,\\n uint256 quarterNumber,\\n uint256 quarterPower,\\n uint96 supplyPerQuarter\\n );\\n}\\n\",\"keccak256\":\"0xc68eb7826b0174d4f6dff50320abb2cd958a978d4537c57867dd828dc2798662\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital,\\n address _strategyNft\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function strategyNft() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x4396906e436eb68c96715e0a53ae1656ac5d7934ebdaeb58ec3c33953465bc39\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategyFactory.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IIntegration} from './IIntegration.sol';\\n\\n/**\\n * @title IStrategyFactory\\n * @author Babylon Finance\\n *\\n * Interface for the strategy factory\\n */\\ninterface IStrategyFactory {\\n function createStrategy(\\n string memory _name,\\n string memory _symbol,\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256[] calldata _stratParams\\n ) external returns (address);\\n}\\n\",\"keccak256\":\"0x770627bcf3ecf7c51b1ccc6b7c52bb291082e06ac134beccc02a40620273c1d5\",\"license\":\"Apache License\"},\"contracts/interfaces/external/weth/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface IWETH is IERC20 {\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n}\\n\",\"keccak256\":\"0xacc7980a650b7a753ee51f1bbc0ae4f641e84261bcc02cfdaf87ee8136483684\",\"license\":\"MIT\"},\"contracts/lib/AddressArrayUtils.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n/**\\n * @title AddressArrayUtils\\n * @author Set Protocol\\n *\\n * Utility functions to handle Address Arrays\\n */\\nlibrary AddressArrayUtils {\\n /**\\n * Finds the index of the first occurrence of the given element.\\n * @param A The input array to search\\n * @param a The value to find\\n * @return Returns (index and isIn) for the first occurrence starting from index 0\\n */\\n function indexOf(address[] memory A, address a) internal pure returns (uint256, bool) {\\n uint256 length = A.length;\\n for (uint256 i = 0; i < length; i++) {\\n if (A[i] == a) {\\n return (i, true);\\n }\\n }\\n return (uint256(-1), false);\\n }\\n\\n /**\\n * Returns true if the value is present in the list. Uses indexOf internally.\\n * @param A The input array to search\\n * @param a The value to find\\n * @return Returns isIn for the first occurrence starting from index 0\\n */\\n function contains(address[] memory A, address a) internal pure returns (bool) {\\n (, bool isIn) = indexOf(A, a);\\n return isIn;\\n }\\n\\n /**\\n * Returns true if there are 2 elements that are the same in an array\\n * @param A The input array to search\\n * @return Returns boolean for the first occurrence of a duplicate\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n require(A.length > 0, 'A is empty');\\n\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n address current = A[i];\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (current == A[j]) {\\n return true;\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @param A The input array to search\\n * @param a The address to remove\\n * @return Returns the array with the object removed.\\n */\\n function remove(address[] memory A, address a) internal pure returns (address[] memory) {\\n (uint256 index, bool isIn) = indexOf(A, a);\\n if (!isIn) {\\n revert('Address not in array.');\\n } else {\\n (address[] memory _A, ) = pop(A, index);\\n return _A;\\n }\\n }\\n\\n /**\\n * Removes specified index from array\\n * @param A The input array to search\\n * @param index The index to remove\\n * @return Returns the new array and the removed entry\\n */\\n function pop(address[] memory A, uint256 index) internal pure returns (address[] memory, address) {\\n uint256 length = A.length;\\n require(index < A.length, 'Index must be < A length');\\n address[] memory newAddresses = new address[](length - 1);\\n for (uint256 i = 0; i < index; i++) {\\n newAddresses[i] = A[i];\\n }\\n for (uint256 j = index + 1; j < length; j++) {\\n newAddresses[j - 1] = A[j];\\n }\\n return (newAddresses, A[index]);\\n }\\n\\n /**\\n * Returns the combination of the two arrays\\n * @param A The first array\\n * @param B The second array\\n * @return Returns A extended by B\\n */\\n function extend(address[] memory A, address[] memory B) internal pure returns (address[] memory) {\\n uint256 aLength = A.length;\\n uint256 bLength = B.length;\\n address[] memory newAddresses = new address[](aLength + bLength);\\n for (uint256 i = 0; i < aLength; i++) {\\n newAddresses[i] = A[i];\\n }\\n for (uint256 j = 0; j < bLength; j++) {\\n newAddresses[aLength + j] = B[j];\\n }\\n return newAddresses;\\n }\\n}\\n\",\"keccak256\":\"0x409127cd8cadb573e5de48fd992efbd8b0f1e243d235abc3c5f2fa873195c16a\",\"license\":\"Apache License\"},\"contracts/lib/BabylonErrors.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n// solhint-disable\\n\\n/**\\n * @notice Forked from https://github.com/balancer-labs/balancer-core-v2/blob/master/contracts/lib/helpers/BalancerErrors.sol\\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 // 'BAB#{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 \\\"BAB#\\\" part is a known constant\\n // (0x42414223): 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(0x42414223000000, 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 // Max deposit limit needs to be under the limit\\n uint256 internal constant MAX_DEPOSIT_LIMIT = 0;\\n // Creator needs to deposit\\n uint256 internal constant MIN_CONTRIBUTION = 1;\\n // Min Garden token supply >= 0\\n uint256 internal constant MIN_TOKEN_SUPPLY = 2;\\n // Deposit hardlock needs to be at least 1 block\\n uint256 internal constant DEPOSIT_HARDLOCK = 3;\\n // Needs to be at least the minimum\\n uint256 internal constant MIN_LIQUIDITY = 4;\\n // _reserveAssetQuantity is not equal to msg.value\\n uint256 internal constant MSG_VALUE_DO_NOT_MATCH = 5;\\n // Withdrawal amount has to be equal or less than msg.sender balance\\n uint256 internal constant MSG_SENDER_TOKENS_DO_NOT_MATCH = 6;\\n // Tokens are staked\\n uint256 internal constant TOKENS_STAKED = 7;\\n // Balance too low\\n uint256 internal constant BALANCE_TOO_LOW = 8;\\n // msg.sender doesn't have enough tokens\\n uint256 internal constant MSG_SENDER_TOKENS_TOO_LOW = 9;\\n // There is an open redemption window already\\n uint256 internal constant REDEMPTION_OPENED_ALREADY = 10;\\n // Cannot request twice in the same window\\n uint256 internal constant ALREADY_REQUESTED = 11;\\n // Rewards and profits already claimed\\n uint256 internal constant ALREADY_CLAIMED = 12;\\n // Value have to be greater than zero\\n uint256 internal constant GREATER_THAN_ZERO = 13;\\n // Must be reserve asset\\n uint256 internal constant MUST_BE_RESERVE_ASSET = 14;\\n // Only contributors allowed\\n uint256 internal constant ONLY_CONTRIBUTOR = 15;\\n // Only controller allowed\\n uint256 internal constant ONLY_CONTROLLER = 16;\\n // Only creator allowed\\n uint256 internal constant ONLY_CREATOR = 17;\\n // Only keeper allowed\\n uint256 internal constant ONLY_KEEPER = 18;\\n // Fee is too high\\n uint256 internal constant FEE_TOO_HIGH = 19;\\n // Only strategy allowed\\n uint256 internal constant ONLY_STRATEGY = 20;\\n // Only active allowed\\n uint256 internal constant ONLY_ACTIVE = 21;\\n // Only inactive allowed\\n uint256 internal constant ONLY_INACTIVE = 22;\\n // Address should be not zero address\\n uint256 internal constant ADDRESS_IS_ZERO = 23;\\n // Not within range\\n uint256 internal constant NOT_IN_RANGE = 24;\\n // Value is too low\\n uint256 internal constant VALUE_TOO_LOW = 25;\\n // Value is too high\\n uint256 internal constant VALUE_TOO_HIGH = 26;\\n // Only strategy or protocol allowed\\n uint256 internal constant ONLY_STRATEGY_OR_CONTROLLER = 27;\\n // Normal withdraw possible\\n uint256 internal constant NORMAL_WITHDRAWAL_POSSIBLE = 28;\\n // User does not have permissions to join garden\\n uint256 internal constant USER_CANNOT_JOIN = 29;\\n // User does not have permissions to add strategies in garden\\n uint256 internal constant USER_CANNOT_ADD_STRATEGIES = 30;\\n // Only Protocol or garden\\n uint256 internal constant ONLY_PROTOCOL_OR_GARDEN = 31;\\n // Only Strategist\\n uint256 internal constant ONLY_STRATEGIST = 32;\\n // Only Integration\\n uint256 internal constant ONLY_INTEGRATION = 33;\\n // Only garden and data not set\\n uint256 internal constant ONLY_GARDEN_AND_DATA_NOT_SET = 34;\\n // Only active garden\\n uint256 internal constant ONLY_ACTIVE_GARDEN = 35;\\n // Contract is not a garden\\n uint256 internal constant NOT_A_GARDEN = 36;\\n // Not enough tokens\\n uint256 internal constant STRATEGIST_TOKENS_TOO_LOW = 37;\\n // Stake is too low\\n uint256 internal constant STAKE_HAS_TO_AT_LEAST_ONE = 38;\\n // Duration must be in range\\n uint256 internal constant DURATION_MUST_BE_IN_RANGE = 39;\\n // Max Capital Requested\\n uint256 internal constant MAX_CAPITAL_REQUESTED = 41;\\n // Votes are already resolved\\n uint256 internal constant VOTES_ALREADY_RESOLVED = 42;\\n // Voting window is closed\\n uint256 internal constant VOTING_WINDOW_IS_OVER = 43;\\n // Strategy needs to be active\\n uint256 internal constant STRATEGY_NEEDS_TO_BE_ACTIVE = 44;\\n // Max capital reached\\n uint256 internal constant MAX_CAPITAL_REACHED = 45;\\n // Capital is less then rebalance\\n uint256 internal constant CAPITAL_IS_LESS_THAN_REBALANCE = 46;\\n // Strategy is in cooldown period\\n uint256 internal constant STRATEGY_IN_COOLDOWN = 47;\\n // Strategy is not executed\\n uint256 internal constant STRATEGY_IS_NOT_EXECUTED = 48;\\n // Strategy is not over yet\\n uint256 internal constant STRATEGY_IS_NOT_OVER_YET = 49;\\n // Strategy is already finalized\\n uint256 internal constant STRATEGY_IS_ALREADY_FINALIZED = 50;\\n // No capital to unwind\\n uint256 internal constant STRATEGY_NO_CAPITAL_TO_UNWIND = 51;\\n // Strategy needs to be inactive\\n uint256 internal constant STRATEGY_NEEDS_TO_BE_INACTIVE = 52;\\n // Duration needs to be less\\n uint256 internal constant DURATION_NEEDS_TO_BE_LESS = 53;\\n // Can't sweep reserve asset\\n uint256 internal constant CANNOT_SWEEP_RESERVE_ASSET = 54;\\n // Voting window is opened\\n uint256 internal constant VOTING_WINDOW_IS_OPENED = 55;\\n // Strategy is executed\\n uint256 internal constant STRATEGY_IS_EXECUTED = 56;\\n // Min Rebalance Capital\\n uint256 internal constant MIN_REBALANCE_CAPITAL = 57;\\n // Not a valid strategy NFT\\n uint256 internal constant NOT_STRATEGY_NFT = 58;\\n // Garden Transfers Disabled\\n uint256 internal constant GARDEN_TRANSFERS_DISABLED = 59;\\n // Tokens are hardlocked\\n uint256 internal constant TOKENS_HARDLOCKED = 60;\\n // Max contributors reached\\n uint256 internal constant MAX_CONTRIBUTORS = 61;\\n // BABL Transfers Disabled\\n uint256 internal constant BABL_TRANSFERS_DISABLED = 62;\\n // Strategy duration range error\\n uint256 internal constant DURATION_RANGE = 63;\\n // Checks the min amount of voters\\n uint256 internal constant MIN_VOTERS_CHECK = 64;\\n // Ge contributor power error\\n uint256 internal constant GET_CONTRIBUTOR_POWER = 65;\\n // Not enough ETH set aside\\n uint256 internal constant NOT_ENOUGH_ETH = 66;\\n // Garden is already public\\n uint256 internal constant GARDEN_ALREADY_PUBLIC = 67;\\n // Withdrawal with penalty\\n uint256 internal constant WITHDRAWAL_WITH_PENALTY = 68;\\n // Withdrawal with penalty\\n uint256 internal constant ONLY_MINING_ACTIVE = 69;\\n // Overflow in supply\\n uint256 internal constant OVERFLOW_IN_SUPPLY = 70;\\n // Overflow in power\\n uint256 internal constant OVERFLOW_IN_POWER = 71;\\n // Not a system contract\\n uint256 internal constant NOT_A_SYSTEM_CONTRACT = 72;\\n // Strategy vs Garden mismatch\\n uint256 internal constant STRATEGY_GARDEN_MISMATCH = 73;\\n // Minimum quarters is 1\\n uint256 internal constant QUARTERS_MIN_1 = 74;\\n // Too many strategy operations\\n uint256 internal constant TOO_MANY_OPS = 75;\\n // Only operations\\n uint256 internal constant ONLY_OPERATION = 76;\\n // Strat params wrong length\\n uint256 internal constant STRAT_PARAMS_LENGTH = 77;\\n // Garden params wrong length\\n uint256 internal constant GARDEN_PARAMS_LENGTH = 78;\\n}\\n\",\"keccak256\":\"0xdbb485a596718830e08a89b785cddc69d0dc7f3f43a1a8a19268336f8d925067\",\"license\":\"Apache License\"},\"contracts/lib/Math.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n// Libraries\\nimport './SafeDecimalMath.sol';\\n\\n// https://docs.synthetix.io/contracts/source/libraries/math\\nlibrary Math {\\n using SafeMath for uint256;\\n using SafeDecimalMath for uint256;\\n\\n /**\\n * @dev Uses \\\"exponentiation by squaring\\\" algorithm where cost is 0(logN)\\n * vs 0(N) for naive repeated multiplication.\\n * Calculates x^n with x as fixed-point and n as regular unsigned int.\\n * Calculates to 18 digits of precision with SafeDecimalMath.unit()\\n */\\n function powDecimal(uint256 x, uint256 n) internal pure returns (uint256) {\\n // https://mpark.github.io/programming/2014/08/18/exponentiation-by-squaring/\\n\\n uint256 result = SafeDecimalMath.unit();\\n while (n > 0) {\\n if (n % 2 != 0) {\\n result = result.multiplyDecimal(x);\\n }\\n x = x.multiplyDecimal(x);\\n n /= 2;\\n }\\n return result;\\n }\\n\\n function abs(int256 x) internal pure returns (int256) {\\n return x >= 0 ? x : -x;\\n }\\n}\\n\",\"keccak256\":\"0xc2ff8055f98dd7253df98838d870391067d9c622a68f263c942616ca8122bd93\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"contracts/lib/Safe3296.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nlibrary Safe3296 {\\n using SafeMath for uint256;\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint32\\n *\\n * @dev internal function to convert from uint256 to uint32\\n */\\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\\n require(n < 2**32, errorMessage);\\n return uint32(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint96\\n *\\n * @dev internal function to convert from uint256 to uint96\\n */\\n function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) {\\n require(n < 2**96, errorMessage);\\n return uint96(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to add two uint96 numbers\\n *\\n * @dev internal safe math function to add two uint96 numbers\\n */\\n function add96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n uint96 c = a + b;\\n require(c >= a, errorMessage);\\n return c;\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to subtract two uint96 numbers\\n *\\n * @dev internal safe math function to subtract two uint96 numbers\\n */\\n function sub96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n}\\n\",\"keccak256\":\"0x9ebf0856ab07500c9a8250d1be4b578a3e0ff454da7de67e3ab5632a7e6903c3\",\"license\":\"Apache License\"},\"contracts/lib/SafeDecimalMath.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nlibrary SafeDecimalMath {\\n using SafeMath for uint256;\\n\\n /* Number of decimal places in the representations. */\\n uint8 public constant decimals = 18;\\n uint8 public constant highPrecisionDecimals = 27;\\n\\n /* The number representing 1.0. */\\n uint256 public constant UNIT = 10**uint256(decimals);\\n\\n /* The number representing 1.0 for higher fidelity numbers. */\\n uint256 public constant PRECISE_UNIT = 10**uint256(highPrecisionDecimals);\\n uint256 private constant UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR = 10**uint256(highPrecisionDecimals - decimals);\\n\\n /**\\n * @return Provides an interface to UNIT.\\n */\\n function unit() external pure returns (uint256) {\\n return UNIT;\\n }\\n\\n /**\\n * @return Provides an interface to PRECISE_UNIT.\\n */\\n function preciseUnit() external pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @return The result of multiplying x and y, interpreting the operands as fixed-point\\n * decimals.\\n *\\n * @dev A unit factor is divided out after the product of x and y is evaluated,\\n * so that product must be less than 2**256. As this is an integer division,\\n * the internal division always rounds down. This helps save on gas. Rounding\\n * is more expensive on gas.\\n */\\n function multiplyDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\\n /* Divide by UNIT to remove the extra factor introduced by the product. */\\n return x.mul(y) / UNIT;\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of the specified precision unit.\\n *\\n * @dev The operands should be in the form of a the specified unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function _multiplyDecimalRound(\\n uint256 x,\\n uint256 y,\\n uint256 precisionUnit\\n ) private pure returns (uint256) {\\n /* Divide by UNIT to remove the extra factor introduced by the product. */\\n uint256 quotientTimesTen = x.mul(y) / (precisionUnit / 10);\\n\\n if (quotientTimesTen % 10 >= 5) {\\n quotientTimesTen += 10;\\n }\\n\\n return quotientTimesTen / 10;\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of a precise unit.\\n *\\n * @dev The operands should be in the precise unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function multiplyDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _multiplyDecimalRound(x, y, PRECISE_UNIT);\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of a standard unit.\\n *\\n * @dev The operands should be in the standard unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function multiplyDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _multiplyDecimalRound(x, y, UNIT);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is a high\\n * precision decimal.\\n *\\n * @dev y is divided after the product of x and the standard precision unit\\n * is evaluated, so the product of x and UNIT must be less than 2**256. As\\n * this is an integer division, the result is always rounded down.\\n * This helps save on gas. Rounding is more expensive on gas.\\n */\\n function divideDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\\n /* Reintroduce the UNIT factor that will be divided out by y. */\\n return x.mul(UNIT).div(y);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * decimal in the precision unit specified in the parameter.\\n *\\n * @dev y is divided after the product of x and the specified precision unit\\n * is evaluated, so the product of x and the specified precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function _divideDecimalRound(\\n uint256 x,\\n uint256 y,\\n uint256 precisionUnit\\n ) private pure returns (uint256) {\\n uint256 resultTimesTen = x.mul(precisionUnit * 10).div(y);\\n\\n if (resultTimesTen % 10 >= 5) {\\n resultTimesTen += 10;\\n }\\n\\n return resultTimesTen / 10;\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * standard precision decimal.\\n *\\n * @dev y is divided after the product of x and the standard precision unit\\n * is evaluated, so the product of x and the standard precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function divideDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _divideDecimalRound(x, y, UNIT);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * high precision decimal.\\n *\\n * @dev y is divided after the product of x and the high precision unit\\n * is evaluated, so the product of x and the high precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function divideDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _divideDecimalRound(x, y, PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Convert a standard decimal representation to a high precision one.\\n */\\n function decimalToPreciseDecimal(uint256 i) internal pure returns (uint256) {\\n return i.mul(UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR);\\n }\\n\\n /**\\n * @dev Convert a high precision decimal to a standard decimal representation.\\n */\\n function preciseDecimalToDecimal(uint256 i) internal pure returns (uint256) {\\n uint256 quotientTimesTen = i / (UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR / 10);\\n\\n if (quotientTimesTen % 10 >= 5) {\\n quotientTimesTen += 10;\\n }\\n\\n return quotientTimesTen / 10;\\n }\\n}\\n\",\"keccak256\":\"0x1372be4fa0c5813417396f128f5aa45da1cd7679e2d247a8e17d1ba5f0141253\",\"license\":\"Apache License\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c060405234801561001057600080fd5b5060405161001d90610088565b604051809103906000f080158015610039573d6000803e3d6000fd5b5060601b6001600160601b03191660805260405161005690610095565b604051809103906000f080158015610072573d6000803e3d6000fd5b5060601b6001600160601b03191660a0526100a2565b6160288061080f83390190565b612b2e8061683783390190565b60805160601c60a05160601c6107446100cb600039806102a352508061027652506107446000f3fe60806040526004361061001e5760003560e01c8063ec3f059a14610023575b600080fd5b610252600480360361010081101561003a57600080fd5b6001600160a01b038235811692602081013582169260408201359092169181019060808101606082013564010000000081111561007657600080fd5b82018360208201111561008857600080fd5b803590602001918460018302840111640100000000831117156100aa57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156100fd57600080fd5b82018360208201111561010f57600080fd5b8035906020019184600183028401116401000000008311171561013157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561018457600080fd5b82018360208201111561019657600080fd5b803590602001918460018302840111640100000000831117156101b857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295843595909490935060408101925060200135905064010000000081111561021357600080fd5b82018360208201111561022557600080fd5b8035906020019184602083028401116401000000008311171561024757600080fd5b50909250905061026e565b604080516001600160a01b039092168252519081900360200190f35b60008061029a7f0000000000000000000000000000000000000000000000000000000000000000610634565b905060006102c77f0000000000000000000000000000000000000000000000000000000000000000610634565b9050806001600160a01b031663ded96d488c848c8c8c8c6040518763ffffffff1660e01b815260040180876001600160a01b03168152602001866001600160a01b03168152602001806020018060200180602001858152602001848103845288818151815260200191508051906020019080838360005b8381101561035657818101518382015260200161033e565b50505050905090810190601f1680156103835780820380516001836020036101000a031916815260200191505b50848103835287518152875160209182019189019080838360005b838110156103b657818101518382015260200161039e565b50505050905090810190601f1680156103e35780820380516001836020036101000a031916815260200191505b50848103825286518152865160209182019188019080838360005b838110156104165781810151838201526020016103fe565b50505050905090810190601f1680156104435780820380516001836020036101000a031916815260200191505b509950505050505050505050600060405180830381600087803b15801561046957600080fd5b505af115801561047d573d6000803e3d6000fd5b50505050816001600160a01b031663dfa5e83b348e8e8e8e8e8c8c8a6040518a63ffffffff1660e01b815260040180896001600160a01b03168152602001886001600160a01b03168152602001876001600160a01b03168152602001806020018060200180602001856001600160a01b03168152602001848103845289818151815260200191508051906020019080838360005b83811015610529578181015183820152602001610511565b50505050905090810190601f1680156105565780820380516001836020036101000a031916815260200191505b5084810383528851815288516020918201918a019080838360005b83811015610589578181015183820152602001610571565b50505050905090810190601f1680156105b65780820380516001836020036101000a031916815260200191505b508481038252878782818152602001925060200280828437600081840152601f19601f8201169050808301925050509b5050505050505050505050506000604051808303818588803b15801561060b57600080fd5b505af115801561061f573d6000803e3d6000fd5b50949f9e505050505050505050505050505050565b60006040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528260601b60148201527f5af43d82803e903d91602b57fd5bf3000000000000000000000000000000000060288201526037816000f09150506001600160a01b03811661070957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f455243313136373a20637265617465206661696c656400000000000000000000604482015290519081900360640190fd5b91905056fea2646970667358221220bd029e33af9394468d88a55b14b956e844e32fe6ca7edd31147d7ba5820840ee64736f6c63430007060033608060405267016345785d8a0000607b5534801561001c57600080fd5b506001606555615ff680620000326000396000f3fe6080604052600436106103fd5760003560e01c80638b0e9f3f1161020d578063b55b6b0511610128578063cb12233b116100bb578063f10684541161008a578063f77c47911161006f578063f77c479114611217578063f82816261461122c578063f85cb5c81461124157610404565b8063f1068454146111ed578063f251fc8c1461120257610404565b8063cb12233b14610fe0578063dd62ed3e14610ff5578063dfa5e83b14611030578063e2073f90146111d857610404565b8063b9e67539116100f7578063b9e6753914610f6e578063ba5d307814610f83578063bc2f32f214610f98578063c408689314610fad57610404565b8063b55b6b0514610efd578063b59adc5914610f12578063b63c44e714610f44578063b918ee2514610f5957610404565b8063a63c643d116101a0578063acec338a1161016f578063acec338a14610e24578063b2644e6614610e50578063b304b81514610e83578063b49a60bb14610ee857610404565b8063a63c643d14610d88578063a9059cbb14610d9d578063a9b5ca4d14610dd6578063aaffadf314610e0f57610404565b806395d89b41116101dc57806395d89b4114610cd75780639ab6374214610cec578063a37aa3c314610d25578063a457c2d714610d4f57610404565b80638b0e9f3f14610c665780638dbdbe6d14610c7b5780638ee330b014610cad57806395cdbedb14610cc257610404565b806339509351116103185780635bf8633a116102ab5780637550ed181161027a578063792e42e21161025f578063792e42e214610c275780637ce9059c14610c3c57806386fa506314610c5157610404565b80637550ed1814610bfd57806376e7985414610c1257610404565b80635bf8633a14610b8b57806360d442ca14610ba057806365f985b614610bb557806370a0823114610bca57610404565b80633deddb3f116102e75780633deddb3f14610b225780634422b0dc14610b3757806345357cc114610b615780634edfb99a14610b7657610404565b80633950935114610a065780633a82192514610a3f5780633ad8d04d14610a725780633d8270f514610aef57610404565b80631f6d494211610390578063297ce5981161035f578063297ce5981461095a5780632befcc5c1461096f5780632e8ebaae146109a8578063313ce567146109db57610404565b80631f6d49421461084257806322385e38146108a857806323b872dd146108d2578063250caaa81461091557610404565b8063095ea7b3116103cc578063095ea7b3146105225780630ad58d2f1461055b57806318160ddd1461059a5780631e6ea56f146105c157610404565b806301681a621461040957806302d05d3f1461043e57806302fb0c5e1461046f57806306fdde031461049857610404565b3661040457005b600080fd5b34801561041557600080fd5b5061043c6004803603602081101561042c57600080fd5b50356001600160a01b0316611256565b005b34801561044a57600080fd5b5061045361138c565b604080516001600160a01b039092168252519081900360200190f35b34801561047b57600080fd5b5061048461139b565b604080519115158252519081900360200190f35b3480156104a457600080fd5b506104ad6113ab565b6040805160208082528351818301528351919283929083019185019080838360005b838110156104e75781810151838201526020016104cf565b50505050905090810190601f1680156105145780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561052e57600080fd5b506104846004803603604081101561054557600080fd5b506001600160a01b038135169060200135611441565b34801561056757600080fd5b5061043c6004803603606081101561057e57600080fd5b50803590602081013590604001356001600160a01b031661145f565b3480156105a657600080fd5b506105af6114d9565b60408051918252519081900360200190f35b3480156105cd57600080fd5b5061043c600480360360c08110156105e457600080fd5b8101906020810181356401000000008111156105ff57600080fd5b82018360208201111561061157600080fd5b8035906020019184600183028401116401000000008311171561063357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561068657600080fd5b82018360208201111561069857600080fd5b803590602001918460018302840111640100000000831117156106ba57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561070d57600080fd5b82018360208201111561071f57600080fd5b8035906020019184602083028401116401000000008311171561074157600080fd5b91939092909160208101903564010000000081111561075f57600080fd5b82018360208201111561077157600080fd5b8035906020019184602083028401116401000000008311171561079357600080fd5b9193909290916020810190356401000000008111156107b157600080fd5b8201836020820111156107c357600080fd5b803590602001918460208302840111640100000000831117156107e557600080fd5b91939092909160208101903564010000000081111561080357600080fd5b82018360208201111561081557600080fd5b8035906020019184602083028401116401000000008311171561083757600080fd5b5090925090506114df565b34801561084e57600080fd5b506108756004803603602081101561086557600080fd5b50356001600160a01b0316611a44565b604080519687526020870195909552858501939093526060850191909152608084015260a0830152519081900360c00190f35b3480156108b457600080fd5b506105af600480360360208110156108cb57600080fd5b5035611a79565b3480156108de57600080fd5b50610484600480360360608110156108f557600080fd5b506001600160a01b03813581169160208101359091169060400135611aa7565b34801561092157600080fd5b5061043c6004803603608081101561093857600080fd5b50803590602081013590604081013590606001356001600160a01b0316611b2f565b34801561096657600080fd5b506105af611df2565b34801561097b57600080fd5b5061043c6004803603604081101561099257600080fd5b506001600160a01b038135169060200135611df8565b3480156109b457600080fd5b50610484600480360360208110156109cb57600080fd5b50356001600160a01b0316611e25565b3480156109e757600080fd5b506109f0611e43565b6040805160ff9092168252519081900360200190f35b348015610a1257600080fd5b5061048460048036036040811015610a2957600080fd5b506001600160a01b038135169060200135611e4c565b348015610a4b57600080fd5b5061048460048036036020811015610a6257600080fd5b50356001600160a01b0316611e9a565b348015610a7e57600080fd5b5061043c60048036036020811015610a9557600080fd5b810190602081018135640100000000811115610ab057600080fd5b820183602082011115610ac257600080fd5b80359060200191846020830284011164010000000083111715610ae457600080fd5b509092509050611eaf565b348015610afb57600080fd5b5061087560048036036020811015610b1257600080fd5b50356001600160a01b0316612208565b348015610b2e57600080fd5b506105af612245565b348015610b4357600080fd5b5061043c60048036036020811015610b5a57600080fd5b503561224b565b348015610b6d57600080fd5b5061043c612428565b348015610b8257600080fd5b506104846124c8565b348015610b9757600080fd5b506104536124d8565b348015610bac57600080fd5b506105af6124e7565b348015610bc157600080fd5b506105af6124ed565b348015610bd657600080fd5b506105af60048036036020811015610bed57600080fd5b50356001600160a01b03166124f3565b348015610c0957600080fd5b506105af61250e565b348015610c1e57600080fd5b506105af612514565b348015610c3357600080fd5b506105af612519565b348015610c4857600080fd5b506105af61251f565b348015610c5d57600080fd5b506105af612525565b348015610c7257600080fd5b506105af61252b565b61043c60048036036060811015610c9157600080fd5b50803590602081013590604001356001600160a01b0316612531565b348015610cb957600080fd5b506105af61281d565b348015610cce57600080fd5b506105af612823565b348015610ce357600080fd5b506104ad612829565b348015610cf857600080fd5b5061043c60048036036040811015610d0f57600080fd5b506001600160a01b03813516906020013561288a565b348015610d3157600080fd5b5061043c60048036036020811015610d4857600080fd5b50356129f1565b348015610d5b57600080fd5b5061048460048036036040811015610d7257600080fd5b506001600160a01b038135169060200135612e84565b348015610d9457600080fd5b506105af612eec565b348015610da957600080fd5b5061048460048036036040811015610dc057600080fd5b506001600160a01b038135169060200135612ef2565b348015610de257600080fd5b5061043c60048036036040811015610df957600080fd5b50803590602001356001600160a01b0316612f06565b348015610e1b57600080fd5b506105af6130bb565b348015610e3057600080fd5b5061043c60048036036020811015610e4757600080fd5b503515156130c1565b348015610e5c57600080fd5b5061043c60048036036020811015610e7357600080fd5b50356001600160a01b0316613118565b348015610e8f57600080fd5b50610e986131c1565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610ed4578181015183820152602001610ebc565b505050509050019250505060405180910390f35b348015610ef457600080fd5b50610e98613222565b348015610f0957600080fd5b506105af613282565b348015610f1e57600080fd5b506105af60048036036040811015610f3557600080fd5b50803590602001351515613288565b348015610f5057600080fd5b506105af613483565b348015610f6557600080fd5b506105af613489565b348015610f7a57600080fd5b506105af613495565b348015610f8f57600080fd5b506105af61349b565b348015610fa457600080fd5b506105af6134a1565b348015610fb957600080fd5b506105af60048036036020811015610fd057600080fd5b50356001600160a01b03166134ae565b348015610fec57600080fd5b506105af6135ab565b34801561100157600080fd5b506105af6004803603604081101561101857600080fd5b506001600160a01b03813581169160200135166135b1565b61043c600480360360e081101561104657600080fd5b6001600160a01b038235811692602081013582169260408201359092169181019060808101606082013564010000000081111561108257600080fd5b82018360208201111561109457600080fd5b803590602001918460018302840111640100000000831117156110b657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561110957600080fd5b82018360208201111561111b57600080fd5b8035906020019184600183028401116401000000008311171561113d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561119057600080fd5b8201836020820111156111a257600080fd5b803590602001918460208302840111640100000000831117156111c457600080fd5b9193509150356001600160a01b03166135dc565b3480156111e457600080fd5b506105af613936565b3480156111f957600080fd5b506105af61393c565b34801561120e57600080fd5b506105af613942565b34801561122357600080fd5b50610453613948565b34801561123857600080fd5b5061043c613957565b34801561124d57600080fd5b50610453613a19565b61125e613a28565b60665461127b906001600160a01b0383811691161415600e613a3a565b6000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156112ca57600080fd5b505afa1580156112de573d6000803e3d6000fd5b505050506040513d60208110156112f457600080fd5b505190506113058115156008613a3a565b606754604080516361d027b360e01b81529051611388926001600160a01b0316916361d027b3916004808301926020929190829003018186803b15801561134b57600080fd5b505afa15801561135f573d6000803e3d6000fd5b505050506040513d602081101561137557600080fd5b50516001600160a01b0384169083613a48565b5050565b6069546001600160a01b031681565b606954600160a01b900460ff1681565b60368054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156114375780601f1061140c57610100808354040283529160200191611437565b820191906000526020600020905b81548152906001019060200180831161141a57829003601f168201915b5050505050905090565b600061145561144e613ac8565b8484613acc565b5060015b92915050565b600260655414156114b7576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026065556114c4613a28565b6114cf838383613bb8565b5050600160655550565b60355490565b6114e7613e5e565b6114ef613a28565b606754604080517fc8ed947f0000000000000000000000000000000000000000000000000000000081529051611614926001600160a01b03169163c8ed947f916004808301926020929190829003018186803b15801561154e57600080fd5b505afa158015611562573d6000803e3d6000fd5b505050506040513d602081101561157857600080fd5b5051604080517f5066c71400000000000000000000000000000000000000000000000000000000815230600482015233602482015290516001600160a01b0390921691635066c71491604480820192602092909190829003018186803b1580156115e157600080fd5b505afa1580156115f5573d6000803e3d6000fd5b505050506040513d602081101561160b57600080fd5b5051601e613a3a565b607f5461162590601411601a613a3a565b61163360058814604d613a3a565b606754604080517f9ef3571000000000000000000000000000000000000000000000000000000000815290516000926001600160a01b031691639ef35710916004808301926020929190829003018186803b15801561169157600080fd5b505afa1580156116a5573d6000803e3d6000fd5b505050506040513d60208110156116bb57600080fd5b81019080805190602001909291905050506001600160a01b03166399d5ea718c8c3330606760009054906101000a90046001600160a01b03168f8f6040518863ffffffff1660e01b8152600401808060200180602001886001600160a01b03168152602001876001600160a01b03168152602001866001600160a01b031681526020018060200184810384528b818151815260200191508051906020019080838360005b8381101561177757818101518382015260200161175f565b50505050905090810190601f1680156117a45780820380516001836020036101000a031916815260200191505b5084810383528a5181528a516020918201918c019080838360005b838110156117d75781810151838201526020016117bf565b50505050905090810190601f1680156118045780820380516001836020036101000a031916815260200191505b508481038252868682818152602001925060200280828437600081840152601f19601f8201169050808301925050509a5050505050505050505050602060405180830381600087803b15801561185957600080fd5b505af115801561186d573d6000803e3d6000fd5b505050506040513d602081101561188357600080fd5b50516001600160a01b0381166000908152608160205260409020805460ff191660019081179091559091506118d7908a908a908181106118bf57fe5b90506020020135607a54613e7690919063ffffffff16565b607a55607f80546001810182556000919091527f66925e85f1a4743fd8d60ba595ed74887b7caf321dd83b21e04d77c11538340801805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517fc2ea0bc40000000000000000000000000000000000000000000000000000000081526060600482019081526064820189905263c2ea0bc4918a918a918a918a918a918a918190602481019060448101906084018a60208b0280828437600083820152601f01601f19169091018581038452888152602090810191508990890280828437600083820152601f01601f19169091018581038352868152602090810191508790870280828437600081840152601f19601f8201169050808301925050509950505050505050505050600060405180830381600087803b158015611a1f57600080fd5b505af1158015611a33573d6000803e3d6000fd5b505050505050505050505050505050565b607260205260009081526040902080546001820154600283015460038401546004850154600590950154939492939192909186565b6066546000908190611a9f90611a98906001600160a01b031685613ed0565b6000614054565b949350505050565b6000611ab4848484614184565b611b2484611ac0613ac8565b611b1f85604051806060016040528060288152602001615eb8602891396001600160a01b038a16600090815260346020526040812090611afe613ac8565b6001600160a01b0316815260208101919091526040016000205491906142e1565b613acc565b5060015b9392505050565b33600090815260816020526040902054611be39060ff168015611bc75750306001600160a01b0316336001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015611b9057600080fd5b505afa158015611ba4573d6000803e3d6000fd5b505050506040513d6020811015611bba57600080fd5b50516001600160a01b0316145b80611bdc57506067546001600160a01b031633145b601b613a3a565b6000611c02611bfd84611bf7606a54614378565b906143dc565b614441565b9050611c0d81614498565b426071541115611c4a57611c42611c3b611c32426071546144df90919063ffffffff16565b607054906144df565b4290613e76565b607155611c5c565b607054611c58904290613e76565b6071555b606b54611c699085613e76565b606b55606c54611c799086613e76565b606c5573c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2632e1a7d4d611ca08787613e76565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015611cd657600080fd5b505af1158015611cea573d6000803e3d6000fd5b5050606d54611cfc92509050846143dc565b50611d6a82607f805480602002602001604051908101604052809291908181526020018280548015611d5757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611d39575b505050505061453c90919063ffffffff16565b8051611d7e91607f91602090910190615c81565b505060808054600181019091557f59f3fb058c6bba7a4e76396639fc4dd21bd59163db798899cf56cef48b3c9ec90180546001600160a01b0390921673ffffffffffffffffffffffffffffffffffffffff19909216821790556000908152608160205260409020805460ff19169055505050565b607d5481565b611e006145b9565b611e09826124f3565b8110611e1b57611e18826124f3565b90505b61138882826145d7565b6001600160a01b031660009081526081602052604090205460ff1690565b60385460ff1690565b6000611455611e59613ac8565b84611b1f8560346000611e6a613ac8565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490613e76565b60816020526000908152604090205460ff1681565b60026065541415611f07576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611f14613a28565b3360009081526072602052604090206002810154611f35904211600c613a3a565b6067546040805162fca95560e61b815290516000926001600160a01b031691633f2a5540916004808301926020929190829003018186803b158015611f7957600080fd5b505afa158015611f8d573d6000803e3d6000fd5b505050506040513d6020811015611fa357600080fd5b50516040517f69795e93000000000000000000000000000000000000000000000000000000008152306004820181815233602484018190526060604485019081526064850189905294955060009485946001600160a01b038816946369795e93949093928c928c929190608401846020850280828437600081840152601f19601f82011690508083019250505095505050505050604080518083038186803b15801561204e57600080fd5b505afa158015612062573d6000803e3d6000fd5b505050506040513d604081101561207857600080fd5b5080516020909101519092506bffffffffffffffffffffffff16905081158015906120a35750814710155b1561210a5760048401546120b79083613e76565b60048501556120c633836146d3565b606b546120d390836144df565b606b55604051829033907f4dacaff8a707e7b54321fbdedb3b65d1f3316b59787949c034bae8946d6ff4e190600090a34260028501555b80156121fb57600384015461211f9082613e76565b6003850155604080517f6bf15bbd0000000000000000000000000000000000000000000000000000000081523360048201526bffffffffffffffffffffffff8316602482015290516001600160a01b03851691636bf15bbd91604480830192600092919082900301818387803b15801561219857600080fd5b505af11580156121ac573d6000803e3d6000fd5b5050604080516bffffffffffffffffffffffff8516815290513393507f475c0834f68d797672d1b72d49bd010f85eecfd60d3fb7afb7ede1a03530f4a492509081900360200190a24260028501555b5050600160655550505050565b6001600160a01b03166000908152607260205260409020805460018201546002830154600384015460048501546005909501549395929491939092565b607e5481565b6122536145b9565b61225b613e5e565b606654604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156122a657600080fd5b505afa1580156122ba573d6000803e3d6000fd5b505050506040513d60208110156122d057600080fd5b5051606754604080517f31375477000000000000000000000000000000000000000000000000000000008152905192935060009261236e9286926001600160a01b0390911691633137547791600480820192602092909190829003018186803b15801561233c57600080fd5b505afa158015612350573d6000803e3d6000fd5b505050506040513d602081101561236657600080fd5b5051906147b8565b90506123878261237e8584613e76565b11156004613a3a565b606754604080516361d027b360e01b8152905161240c926001600160a01b0316916361d027b3916004808301926020929190829003018186803b1580156123cd57600080fd5b505afa1580156123e1573d6000803e3d6000fd5b505050506040513d60208110156123f757600080fd5b50516066546001600160a01b03169083613a48565b606654612423906001600160a01b03163385613a48565b505050565b607154421015801561243b575060785447115b80156124495750606c544710155b156124c657600060718190555073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0606c546040518263ffffffff1660e01b81526004016000604051808303818588803b1580156124a757600080fd5b505af11580156124bb573d6000803e3d6000fd5b50506000606c555050505b565b606954600160a81b900460ff1681565b6068546001600160a01b031681565b60825481565b60705481565b6001600160a01b031660009081526033602052604090205490565b606f5481565b601481565b606d5481565b60715481565b60745481565b607a5481565b60026065541415612589576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612596613e5e565b6069546126c390600160a81b900460ff1680156126bc5750606760009054906101000a90046001600160a01b03166001600160a01b031663c8ed947f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156125fc57600080fd5b505afa158015612610573d6000803e3d6000fd5b505050506040513d602081101561262657600080fd5b5051604080517fc7ec5d5d00000000000000000000000000000000000000000000000000000000815230600482015233602482015290516001600160a01b039092169163c7ec5d5d91604480820192602092909190829003018186803b15801561268f57600080fd5b505afa1580156126a3573d6000803e3d6000fd5b505050506040513d60208110156126b957600080fd5b50515b601d613a3a565b6126d36078543410156001613a3a565b607554156126ff576126ff6075546126f634606a54613e7690919063ffffffff16565b11156000613a3a565b61271060745460735410603d613a3a565b61271d8334146005613a3a565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561276c57600080fd5b505af1158015612780573d6000803e3d6000fd5b505050505061278d612428565b6066546127a3906001600160a01b0316846147d6565b6000806127b1856001614054565b915091506127cc6079546127c36114d9565b10156002613a3a565b6127da848210156002613a3a565b6066546127f0906001600160a01b03168361484f565b61281133848361280b85606a54613e7690919063ffffffff16565b8661489b565b50506001606555505050565b606c5481565b607c5481565b60378054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156114375780601f1061140c57610100808354040283529160200191611437565b6067546040805163411137c360e01b81526001600160a01b038581166004830152915161290f93929092169163411137c391602480820192602092909190829003018186803b1580156128dc57600080fd5b505afa1580156128f0573d6000803e3d6000fd5b505050506040513d602081101561290657600080fd5b50516012613a3a565b60825461291c9082613e76565b6082819055158015906129a75750608254606654604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561297857600080fd5b505afa15801561298c573d6000803e3d6000fd5b505050506040513d60208110156129a257600080fd5b505110155b15611388576082546066546129c9916001600160a01b03909116908490613a48565b6129e86129e3608254606a546144df90919063ffffffff16565b614498565b60006082555050565b6129f9613e5e565b6067546040805163411137c360e01b81523360048201529051612a45926001600160a01b03169163411137c3916024808301926020929190829003018186803b1580156128dc57600080fd5b612a5b670de0b6b3a76400008211156013613a3a565b606654604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015612aa657600080fd5b505afa158015612aba573d6000803e3d6000fd5b505050506040513d6020811015612ad057600080fd5b5051905060005b607f54811015612423576000607f8281548110612af057fe5b9060005260206000200160009054906101000a90046001600160a01b031690506000612b8b607a54612b85846001600160a01b0316630d15fd776040518163ffffffff1660e01b815260040160206040518083038186803b158015612b5457600080fd5b505afa158015612b68573d6000803e3d6000fd5b505050506040513d6020811015612b7e57600080fd5b5051614441565b906149d9565b90506000612b9985836147b8565b9050612c9b62015180612c95856001600160a01b0316630fb5a6b46040518163ffffffff1660e01b815260040160206040518083038186803b158015612bde57600080fd5b505afa158015612bf2573d6000803e3d6000fd5b505050506040513d6020811015612c0857600080fd5b5051604080517f825deffe00000000000000000000000000000000000000000000000000000000815290516001600160a01b0389169163825deffe916004808301926020929190829003018186803b158015612c6357600080fd5b505afa158015612c77573d6000803e3d6000fd5b505050506040513d6020811015612c8d57600080fd5b505190613e76565b906144df565b42108015612d0d5750826001600160a01b031663302733566040518163ffffffff1660e01b815260040160206040518083038186803b158015612cdd57600080fd5b505afa158015612cf1573d6000803e3d6000fd5b505050506040513d6020811015612d0757600080fd5b50518110155b8015612e0d5750826001600160a01b03166393baae416040518163ffffffff1660e01b815260040160206040518083038186803b158015612d4d57600080fd5b505afa158015612d61573d6000803e3d6000fd5b505050506040513d6020811015612d7757600080fd5b5051604080517f03cddb2c0000000000000000000000000000000000000000000000000000000081529051612e0a916001600160a01b038716916303cddb2c91600480820192602092909190829003018186803b158015612dd757600080fd5b505afa158015612deb573d6000803e3d6000fd5b505050506040513d6020811015612e0157600080fd5b50518390613e76565b11155b15612e7957826001600160a01b031663f101e82b82886040518363ffffffff1660e01b81526004018083815260200182815260200192505050600060405180830381600087803b158015612e6057600080fd5b505af1158015612e74573d6000803e3d6000fd5b505050505b505050600101612ad7565b6000611455612e91613ac8565b84611b1f85604051806060016040528060258152602001615f9c6025913960346000612ebb613ac8565b6001600160a01b03908116825260208083019390935260409182016000908120918d168152925290205491906142e1565b606e5481565b6000611455612eff613ac8565b8484614184565b60026065541415612f5e576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612f6b613a28565b612f80612f7833846149f1565b15601c613a3a565b6000612f9e612f9784670214e8348c4f00006147b8565b84906144df565b9050600080612fab614be4565b909350915061302d9050612fbf83856144df565b826001600160a01b031663302733566040518163ffffffff1660e01b815260040160206040518083038186803b158015612ff857600080fd5b505afa15801561300c573d6000803e3d6000fd5b505050506040513d602081101561302257600080fd5b505111156044613a3a565b806001600160a01b03166342296724846040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561307357600080fd5b505af1158015613087573d6000803e3d6000fd5b505050506130af336130aa670214e8348c4f0000886147b890919063ffffffff16565b6145d7565b61281183600186613bb8565b60785481565b6067546130da906001600160a01b031633146010613a3a565b6069546130fa9060ff600160a01b90910416151582151514156016613a3a565b60698054911515600160a01b0260ff60a01b19909216919091179055565b6131206145b9565b61318b81607f805480602002602001604051908101604052809291908181526020018280548015611d57576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311611d3957505050505061453c90919063ffffffff16565b805161319f91607f91602090910190615c81565b506001600160a01b03166000908152608160205260409020805460ff19169055565b6060608080548060200260200160405190810160405280929190818152602001828054801561143757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116131fb575050505050905090565b6060607f805480602002602001604051908101604052809291908181526020018280548015611437576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116131fb575050505050905090565b60795481565b600080606660009054906101000a90046001600160a01b03166001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156132d957600080fd5b505afa1580156132ed573d6000803e3d6000fd5b505050506040513d602081101561330357600080fd5b5051905060ff8116600a0a600061331a86836149d9565b90506133246114d9565b613332579250611459915050565b606754604080517f294d237c00000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163294d237c916004808301926020929190829003018186803b15801561339057600080fd5b505afa1580156133a4573d6000803e3d6000fd5b505050506040513d60208110156133ba57600080fd5b505160665460408051635e0a3b9d60e11b81523060048201526001600160a01b0392831660248201529051919092169163bc14773a916044808301926020929190829003018186803b15801561340f57600080fd5b505afa158015613423573d6000803e3d6000fd5b505050506040513d602081101561343957600080fd5b5051905061344781846149d9565b9050851561346e5761346b61346461345d6114d9565b84906149d9565b82906144df565b90505b61347882826149d9565b979650505050505050565b60755481565b670214e8348c4f000081565b606b5481565b606a5481565b683635c9adc5dea0000081565b60008060005b607f54811015613591576000607f82815481106134cd57fe5b6000918252602080832090910154604080517f950c78220000000000000000000000000000000000000000000000000000000081526001600160a01b038a81166004830152915191909216945061357292859263950c78229260248083019392829003018186803b15801561354157600080fd5b505afa158015613555573d6000803e3d6000fd5b505050506040513d602081101561356b57600080fd5b5051614d62565b90508015613587576135848482613e76565b93505b50506001016134b4565b508061359c846124f3565b101561145957611b28836124f3565b60765481565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b600054610100900460ff16806135f557506135f5614d73565b80613603575060005460ff16155b61363e5760405162461bcd60e51b815260040180806020018281038252602e815260200180615e69602e913960400191505060405180910390fd5b600054610100900460ff16158015613669576000805460ff1961ff0019909116610100171660011790555b61367f6001600160a01b03881615156017613a3a565b6136956001600160a01b03891615156017613a3a565b6136ab6001600160a01b038a1615156017613a3a565b6136b960098414604e613a3a565b61373c886001600160a01b031663f979cdd98b6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561370957600080fd5b505afa15801561371d573d6000803e3d6000fd5b505050506040513d602081101561373357600080fd5b5051600e613a3a565b6137468686614d84565b6067805473ffffffffffffffffffffffffffffffffffffffff199081166001600160a01b038b8116919091179092556066805482168c8416179055606980546064607455606880548416878616179055600160a81b9216928a169290921760ff60a81b19161790556138693485856000816137bd57fe5b90506020020135868660018181106137d157fe5b90506020020135878760028181106137e557fe5b90506020020135888860038181106137f957fe5b905060200201358989600481811061380d57fe5b905060200201358a8a600581811061382157fe5b905060200201358b8b600681811061383557fe5b905060200201358c8c600781811061384957fe5b905060200201358d8d600881811061385d57fe5b90506020020135614e39565b6069805460ff60a01b1916600160a01b179055604080517fd0e30db0000000000000000000000000000000000000000000000000000000008152905173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc29163d0e30db091349160048082019260009290919082900301818588803b1580156138e457600080fd5b505af11580156138f8573d6000803e3d6000fd5b505060695461391993506001600160a01b031691508190503480600061489b565b801561392b576000805461ff00191690555b505050505050505050565b607b5481565b60775481565b60735481565b6067546001600160a01b031681565b606954613970906001600160a01b031633146011613a3a565b606954613a0a90600160a81b900460ff168015613a035750606760009054906101000a90046001600160a01b03166001600160a01b0316637f80e05b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156139d657600080fd5b505afa1580156139ea573d6000803e3d6000fd5b505050506040513d6020811015613a0057600080fd5b50515b6043613a3a565b6069805460ff60a81b19169055565b6066546001600160a01b031681565b6124c66000613a36336124f3565b11600f5b8161138857611388816150df565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612423908490615132565b3390565b6001600160a01b038316613b115760405162461bcd60e51b8152600401808060200182810382526024815260200180615f266024913960400191505060405180910390fd5b6001600160a01b038216613b565760405162461bcd60e51b8152600401808060200182810382526022815260200180615dc66022913960400191505060405180910390fd5b6001600160a01b03808416600081815260346020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b613bce613bc4336124f3565b8411156006613a3a565b606f5433600090815260726020526040902054613bfa9190613bf19042906144df565b10156003613a3a565b604080517fc40868930000000000000000000000000000000000000000000000000000000081523360048201529051613c9791613c8d91309163c4086893916024808301926020929190829003018186803b158015613c5857600080fd5b505afa158015613c6c573d6000803e3d6000fd5b505050506040513d6020811015613c8257600080fd5b5051612c95336124f3565b8411156007613a3a565b613c9f612428565b606654600090613cb8906001600160a01b031685613ed0565b9050600080613cc8836000614054565b915091506000613cda87612c956114d9565b9050613cf0613ce933846149f1565b6004613a3a565b606654613d06906001600160a01b0316836147d6565b613d166079548210156002613a3a565b613d24868310156002613a3a565b613d2e33886145d7565b81471015613da95773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2632e1a7d4d613d5a84476144df565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015613d9057600080fd5b505af1158015613da4573d6000803e3d6000fd5b505050505b613db2826151e3565b613dbc85836146d3565b606654613dd2906001600160a01b03168461484f565b6000613dde8385613e76565b9050613df081606a5410156008613a3a565b606a54613e01906129e390836144df565b60408051848152602081018a905280820186905242606082015290516001600160a01b0388169133917f25b65b867b695d9502ad64f047cea91edc82a4d945f78fb241dd9f58d10cbb359181900360800190a35050505050505050565b6069546124c690600160a01b900460ff166015613a3a565b600082820183811015611b28576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600080606760009054906101000a90046001600160a01b03166001600160a01b031663294d237c6040518163ffffffff1660e01b815260040160206040518083038186803b158015613f2157600080fd5b505afa158015613f35573d6000803e3d6000fd5b505050506040513d6020811015613f4b57600080fd5b505160408051635e0a3b9d60e11b81523060048201526001600160a01b0387811660248301529151919092169163bc14773a916044808301926020929190829003018186803b158015613f9d57600080fd5b505afa158015613fb1573d6000803e3d6000fd5b505050506040513d6020811015613fc757600080fd5b505190506000613fd784836147b8565b90506000856001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561401457600080fd5b505afa158015614028573d6000803e3d6000fd5b505050506040513d602081101561403e57600080fd5b5051905060006134788360ff8416600a0a6147b8565b6000806000836140dd57606760009054906101000a90046001600160a01b03166001600160a01b031663259072e16040518163ffffffff1660e01b815260040160206040518083038186803b1580156140ac57600080fd5b505afa1580156140c0573d6000803e3d6000fd5b505050506040513d60208110156140d657600080fd5b5051614158565b606760009054906101000a90046001600160a01b03166001600160a01b03166350d9f37f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561412b57600080fd5b505afa15801561413f573d6000803e3d6000fd5b505050506040513d602081101561415557600080fd5b50515b9050600061416682876147b8565b9050600061417487836144df565b91945090925050505b9250929050565b6001600160a01b0383166141c95760405162461bcd60e51b8152600401808060200182810382526025815260200180615f016025913960400191505060405180910390fd5b6001600160a01b03821661420e5760405162461bcd60e51b8152600401808060200182810382526023815260200180615d816023913960400191505060405180910390fd5b6142198383836153a5565b61425681604051806060016040528060268152602001615de8602691396001600160a01b03861660009081526033602052604090205491906142e1565b6001600160a01b0380851660009081526033602052604080822093909355908416815220546142859082613e76565b6001600160a01b0380841660008181526033602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156143705760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561433557818101518382015260200161431d565b50505050905090810190601f1680156143625780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60007f800000000000000000000000000000000000000000000000000000000000000082106143d85760405162461bcd60e51b8152600401808060200182810382526028815260200180615f4a6028913960400191505060405180910390fd5b5090565b60008282018183128015906143f15750838112155b80614406575060008312801561440657508381125b611b285760405162461bcd60e51b8152600401808060200182810382526021815260200180615e0e6021913960400191505060405180910390fd5b6000808212156143d8576040805162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f736974697665604482015290519081900360640190fd5b606a805490829055604080518381526020810183905281517f6d470be450a2499ac2a545ef5196797015e58ec3729cdf2c2b1ab85a221debd7929181900390910190a15050565b600082821115614536576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b606060008061454b8585615458565b91509150806145a1576040805162461bcd60e51b815260206004820152601560248201527f41646472657373206e6f7420696e2061727261792e0000000000000000000000604482015290519081900360640190fd5b60006145ad86846154bb565b50935061145992505050565b336000908152608160205260409020546124c69060ff166014613a3a565b6001600160a01b03821661461c5760405162461bcd60e51b8152600401808060200182810382526021815260200180615ee06021913960400191505060405180910390fd5b614628826000836153a5565b61466581604051806060016040528060228152602001615da4602291396001600160a01b03851660009081526033602052604090205491906142e1565b6001600160a01b03831660009081526033602052604090205560355461468b90826144df565b6035556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b80471015614728576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015290519081900360640190fd5b6040516000906001600160a01b0384169083908381818185875af1925050503d8060008114614773576040519150601f19603f3d011682016040523d82523d6000602084013e614778565b606091505b50509050806124235760405162461bcd60e51b815260040180806020018281038252603a815260200180615e2f603a913960400191505060405180910390fd5b6000611b28670de0b6b3a76400006147d0858561561f565b90615678565b6147e460008211600d613a3a565b606754604080517ff979cdd90000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152915161138893929092169163f979cdd991602480820192602092909190829003018186803b15801561370957600080fd5b801561138857606754604080516361d027b360e01b81529051611388926001600160a01b0316916361d027b3916004808301926020929190829003018186803b15801561134b57600080fd5b60006148a6856124f3565b905060006148b5856001613288565b90506148c186826156df565b6148cb87836157d1565b6148d484614498565b606854604080517f45b497470000000000000000000000000000000000000000000000000000000081526001600160a01b038981166004830152915191909216916345b497479160248083019260209291908290030181600087803b15801561493c57600080fd5b505af1158015614950573d6000803e3d6000fd5b505050506040513d602081101561496657600080fd5b5061497e905060006149766114d9565b116004613a3a565b604080513481526020810187905280820185905242606082015290516001600160a01b038816917f38574f2bc5e150a9fd6f2ced17988994c3d1d8cafd2b73402da66a97164e8e3f919081900360800190a250505050505050565b6000611b28826147d085670de0b6b3a764000061561f565b6000614a03606c544710156042613a3a565b606654604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015614a4e57600080fd5b505afa158015614a62573d6000803e3d6000fd5b505050506040513d6020811015614a7857600080fd5b50519050828110614a8d576001915050611459565b6071544211614bda576067546040805162fca95560e61b815290516000926001600160a01b031691633f2a5540916004808301926020929190829003018186803b158015614ada57600080fd5b505afa158015614aee573d6000803e3d6000fd5b505050506040513d6020811015614b0457600080fd5b50516001600160a01b0386811660008181526072602090815260408083206001015481517f7602bdde0000000000000000000000000000000000000000000000000000000081523060048201526024810195909552604485015242606485015251949550909392851692637602bdde926084808201939291829003018186803b158015614b9057600080fd5b505afa158015614ba4573d6000803e3d6000fd5b505050506040513d6020811015614bba57600080fd5b5051606c549091508590614bce90836147b8565b10159350505050611459565b5060009392505050565b60008080808080805b607f5460ff82161015614d55576000607f8260ff1681548110614c0c57fe5b60009182526020918290200154604080517fe4df5e1a00000000000000000000000000000000000000000000000000000000815290516001600160a01b039092169350839263e4df5e1a92600480840193829003018186803b158015614c7157600080fd5b505afa158015614c85573d6000803e3d6000fd5b505050506040513d6020811015614c9b57600080fd5b505115614d4c576000816001600160a01b03166303cddb2c6040518163ffffffff1660e01b815260040160206040518083038186803b158015614cdd57600080fd5b505afa158015614cf1573d6000803e3d6000fd5b505050506040513d6020811015614d0757600080fd5b50519050614d158682613e76565b955084811115614d4a57809450607f8360ff1681548110614d3257fe5b6000918252602090912001546001600160a01b031693505b505b50600101614bed565b5091945092509050909192565b6000808212156143d8575060000390565b6000614d7e30615986565b15905090565b600054610100900460ff1680614d9d5750614d9d614d73565b80614dab575060005460ff16155b614de65760405162461bcd60e51b815260040180806020018281038252602e815260200180615e69602e913960400191505060405180910390fd5b600054610100900460ff16158015614e11576000805460ff1961ff0019909116610100171660011790555b614e1961598c565b614e238383615a2e565b8015612423576000805461ff0019169055505050565b614e4f67016345785d8a00008610156001613a3a565b614e5d858b10156001613a3a565b614e6b888b10156004613a3a565b614e79898b11156000613a3a565b614e90683635c9adc5dea000008a11156000613a3a565b6067546001600160a01b0316614ea98915156002613a3a565b614eb7600088116003613a3a565b614f29816001600160a01b03166334514b146040518163ffffffff1660e01b815260040160206040518083038186803b158015614ef357600080fd5b505afa158015614f07573d6000803e3d6000fd5b505050506040513d6020811015614f1d57600080fd5b50518910156004613a3a565b606754604080517f8e20fb070000000000000000000000000000000000000000000000000000000081529051615043926001600160a01b031691638e20fb07916004808301926020929190829003018186803b158015614f8857600080fd5b505afa158015614f9c573d6000803e3d6000fd5b505050506040513d6020811015614fb257600080fd5b5051861180159061503c5750606760009054906101000a90046001600160a01b03166001600160a01b0316636b2fb6786040518163ffffffff1660e01b815260040160206040518083038186803b15801561500c57600080fd5b505afa158015615020573d6000803e3d6000fd5b505050506040513d602081101561503657600080fd5b50518610155b6018613a3a565b61507767016345785d8a00008510158015615070575061506c67016345785d8a0000600561561f565b8511155b6019613a3a565b61508583831015603f613a3a565b6150a662015180841015801561509f57506302932e008311155b603f613a3a565b50607894909455607e92909255607b55607c55607d5560799290925560759290925542607655606e91909155606f555062093a80607055565b62461bcd60e51b6000908152602060045260076024526642414223000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b6000615187826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316615b069092919063ffffffff16565b805190915015612423578080602001905160208110156151a657600080fd5b50516124235760405162461bcd60e51b815260040180806020018281038252602a815260200180615f72602a913960400191505060405180910390fd5b336000818152607260205260409020906151fc906124f3565b61522957600080825560018083018290556005830191909155607354615221916144df565b60735561523e565b60058101546152389083613e76565b60058201555b6067546040805162fca95560e61b815290516000926001600160a01b031691633f2a5540916004808301926020929190829003018186803b15801561528257600080fd5b505afa158015615296573d6000803e3d6000fd5b505050506040513d60208110156152ac57600080fd5b50516077546040805163df14e06f60e01b81523060048201526024810192909252519192506001600160a01b0383169163df14e06f9160448082019260009290919082900301818387803b15801561530357600080fd5b505af1158015615317573d6000803e3d6000fd5b505060775460408051632db4b3a760e01b815230600482015233602482015260006044820181905260648201819052608482019390935290516001600160a01b0386169450632db4b3a7935060a4808301939282900301818387803b15801561537f57600080fd5b505af1158015615393573d6000803e3d6000fd5b50506077805460010190555050505050565b6153b0838383612423565b6124236001600160a01b03841615806153d057506001600160a01b038316155b806154515750606760009054906101000a90046001600160a01b03166001600160a01b031663393bfe496040518163ffffffff1660e01b815260040160206040518083038186803b15801561542457600080fd5b505afa158015615438573d6000803e3d6000fd5b505050506040513d602081101561544e57600080fd5b50515b603b613a3a565b81516000908190815b818110156154ab57846001600160a01b031686828151811061547f57fe5b60200260200101516001600160a01b031614156154a35792506001915061417d9050565b600101615461565b5060001995600095509350505050565b8151606090600090808410615517576040805162461bcd60e51b815260206004820152601860248201527f496e646578206d757374206265203c2041206c656e6774680000000000000000604482015290519081900360640190fd5b60006001820367ffffffffffffffff8111801561553357600080fd5b5060405190808252806020026020018201604052801561555d578160200160208202803683370190505b50905060005b858110156155ab5786818151811061557757fe5b602002602001015182828151811061558b57fe5b6001600160a01b0390921660209283029190910190910152600101615563565b50600185015b828110156155fc578681815181106155c557fe5b60200260200101518260018303815181106155dc57fe5b6001600160a01b03909216602092830291909101909101526001016155b1565b508086868151811061560a57fe5b60200260200101519350935050509250929050565b60008261562e57506000611459565b8282028284828161563b57fe5b0414611b285760405162461bcd60e51b8152600401808060200182810382526021815260200180615e976021913960400191505060405180910390fd5b60008082116156ce576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816156d757fe5b049392505050565b6001600160a01b03821661573a576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b615746600083836153a5565b6035546157539082613e76565b6035556001600160a01b0382166000908152603360205260409020546157799082613e76565b6001600160a01b03831660008181526033602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b03821660009081526072602052604090208115806157f857506001810154155b156158155760735461580b906001613e76565b6073554260018201555b4281556067546040805162fca95560e61b815290516000926001600160a01b031691633f2a5540916004808301926020929190829003018186803b15801561585c57600080fd5b505afa158015615870573d6000803e3d6000fd5b505050506040513d602081101561588657600080fd5b50516077546040805163df14e06f60e01b81523060048201526024810192909252519192506001600160a01b0383169163df14e06f9160448082019260009290919082900301818387803b1580156158dd57600080fd5b505af11580156158f1573d6000803e3d6000fd5b505060775460408051632db4b3a760e01b81523060048201526001600160a01b0389811660248301526044820189905260016064830152608482019390935290519185169350632db4b3a7925060a48082019260009290919082900301818387803b15801561595f57600080fd5b505af1158015615973573d6000803e3d6000fd5b5050607780546001019055505050505050565b3b151590565b600054610100900460ff16806159a557506159a5614d73565b806159b3575060005460ff16155b6159ee5760405162461bcd60e51b815260040180806020018281038252602e815260200180615e69602e913960400191505060405180910390fd5b600054610100900460ff16158015615a19576000805460ff1961ff0019909116610100171660011790555b8015615a2b576000805461ff00191690555b50565b600054610100900460ff1680615a475750615a47614d73565b80615a55575060005460ff16155b615a905760405162461bcd60e51b815260040180806020018281038252602e815260200180615e69602e913960400191505060405180910390fd5b600054610100900460ff16158015615abb576000805460ff1961ff0019909116610100171660011790555b8251615ace906036906020860190615cef565b508151615ae2906037906020850190615cef565b506038805460ff191660121790558015612423576000805461ff0019169055505050565b6060611a9f848460008585615b1a85615986565b615b6b576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b60208310615ba95780518252601f199092019160209182019101615b8a565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114615c0b576040519150601f19603f3d011682016040523d82523d6000602084013e615c10565b606091505b509150915061347882828660608315615c2a575081611b28565b825115615c3a5782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561433557818101518382015260200161431d565b828054828255906000526020600020908101928215615ce3579160200282015b82811115615ce3578251825473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909116178255602090920191600190910190615ca1565b506143d8929150615d6b565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282615d255760008555615ce3565b82601f10615d3e57805160ff1916838001178555615ce3565b82800160010185558215615ce3579182015b82811115615ce3578251825591602001919060010190615d50565b5b808211156143d85760008155600101615d6c56fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63655369676e6564536166654d6174683a206164646974696f6e206f766572666c6f77416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737353616665436173743a2076616c756520646f65736e27742066697420696e20616e20696e743235365361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212203c680385640782628cc8e8cd0920d8d1a859093bc90b3a43c75f95a2aa89387464736f6c63430007060033608060405234801561001057600080fd5b50612b0e806100206000396000f3fe608060405234801561001057600080fd5b50600436106101985760003560e01c80636352211e116100e3578063b88d4fde1161008c578063ded96d4811610066578063ded96d48146105d3578063e985e9c5146107a2578063f77c4791146107d057610198565b8063b88d4fde1461044a578063c87b56dd14610510578063d83e2c971461052d57610198565b80637d94792a116100bd5780637d94792a1461040c57806395d89b4114610414578063a22cb4651461041c57610198565b80636352211e146103c15780636c0360eb146103de57806370a08231146103e657610198565b80632f745c591161014557806345b497471161011f57806345b49747146103765780634f6ccce71461039c57806356ba88b8146103b957610198565b80632f745c591461030c5780633c130d901461033857806342842e0e1461034057610198565b8063095ea7b311610176578063095ea7b31461028e57806318160ddd146102bc57806323b872dd146102d657610198565b806301ffc9a71461019d57806306fdde03146101d8578063081812fc14610255575b600080fd5b6101c4600480360360208110156101b357600080fd5b50356001600160e01b0319166107d8565b604080519115158252519081900360200190f35b6101e06107fb565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561021a578181015183820152602001610202565b50505050905090810190601f1680156102475780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102726004803603602081101561026b57600080fd5b5035610891565b604080516001600160a01b039092168252519081900360200190f35b6102ba600480360360408110156102a457600080fd5b506001600160a01b0381351690602001356108f3565b005b6102c46109ce565b60408051918252519081900360200190f35b6102ba600480360360608110156102ec57600080fd5b506001600160a01b038135811691602081013590911690604001356109df565b6102c46004803603604081101561032257600080fd5b506001600160a01b038135169060200135610a36565b6101e0610a61565b6102ba6004803603606081101561035657600080fd5b506001600160a01b03813581169160208101359091169060400135610aef565b6102c46004803603602081101561038c57600080fd5b50356001600160a01b0316610b0a565b6102c4600480360360208110156103b257600080fd5b5035610bd0565b610272610be6565b610272600480360360208110156103d757600080fd5b5035610bf5565b6101e0610c1d565b6102c4600480360360208110156103fc57600080fd5b50356001600160a01b0316610c7e565b6102c4610ce6565b6101e0610cec565b6102ba6004803603604081101561043257600080fd5b506001600160a01b0381351690602001351515610d4d565b6102ba6004803603608081101561046057600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561049b57600080fd5b8201836020820111156104ad57600080fd5b803590602001918460018302840111640100000000831117156104cf57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610e52945050505050565b6101e06004803603602081101561052657600080fd5b5035610eb0565b6102ba6004803603602081101561054357600080fd5b81019060208101813564010000000081111561055e57600080fd5b82018360208201111561057057600080fd5b8035906020019184600183028401116401000000008311171561059257600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611131945050505050565b6102ba600480360360c08110156105e957600080fd5b6001600160a01b03823581169260208101359091169181019060608101604082013564010000000081111561061d57600080fd5b82018360208201111561062f57600080fd5b8035906020019184600183028401116401000000008311171561065157600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156106a457600080fd5b8201836020820111156106b657600080fd5b803590602001918460018302840111640100000000831117156106d857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561072b57600080fd5b82018360208201111561073d57600080fd5b8035906020019184600183028401116401000000008311171561075f57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050913592506113c9915050565b6101c4600480360360408110156107b857600080fd5b506001600160a01b038135811691602001351661152c565b61027261155a565b6001600160e01b0319811660009081526033602052604090205460ff165b919050565b606a8054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108875780601f1061085c57610100808354040283529160200191610887565b820191906000526020600020905b81548152906001019060200180831161086a57829003601f168201915b5050505050905090565b600061089c82611569565b6108d75760405162461bcd60e51b815260040180806020018281038252602c8152602001806129d7602c913960400191505060405180910390fd5b506000908152606860205260409020546001600160a01b031690565b60006108fe82610bf5565b9050806001600160a01b0316836001600160a01b031614156109515760405162461bcd60e51b8152600401808060200182810382526021815260200180612a876021913960400191505060405180910390fd5b806001600160a01b0316610963611576565b6001600160a01b0316148061098457506109848161097f611576565b61152c565b6109bf5760405162461bcd60e51b81526004018080602001828103825260388152602001806128fc6038913960400191505060405180910390fd5b6109c9838361157a565b505050565b60006109da60666115f5565b905090565b6109f06109ea611576565b82611600565b610a2b5760405162461bcd60e51b8152600401808060200182810382526031815260200180612aa86031913960400191505060405180910390fd5b6109c98383836116a4565b6001600160a01b0382166000908152606560205260408120610a5890836117f0565b90505b92915050565b6099805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610ae75780601f10610abc57610100808354040283529160200191610ae7565b820191906000526020600020905b815481529060010190602001808311610aca57829003601f168201915b505050505081565b6109c983838360405180602001604052806000815250610e52565b6098546000906001600160a01b03163314610b6c576040805162461bcd60e51b815260206004820181905260248201527f4f6e6c79207468652067617264656e2063616e206d696e7420746865204e4654604482015290519081900360640190fd5b6001600160a01b038216610bc7576040805162461bcd60e51b815260206004820152600f60248201527f55736572206d7573742065786973740000000000000000000000000000000000604482015290519081900360640190fd5b610a5b826117fc565b600080610bde60668461190a565b509392505050565b6098546001600160a01b031681565b6000610a5b8260405180606001604052806029815260200161295e6029913960669190611926565b606d8054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108875780601f1061085c57610100808354040283529160200191610887565b60006001600160a01b038216610cc55760405162461bcd60e51b815260040180806020018281038252602a815260200180612934602a913960400191505060405180910390fd5b6001600160a01b0382166000908152606560205260409020610a5b906115f5565b609a5481565b606b8054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108875780601f1061085c57610100808354040283529160200191610887565b610d55611576565b6001600160a01b0316826001600160a01b03161415610dbb576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b8060696000610dc8611576565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155610e0c611576565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b610e63610e5d611576565b83611600565b610e9e5760405162461bcd60e51b8152600401808060200182810382526031815260200180612aa86031913960400191505060405180910390fd5b610eaa8484848461193d565b50505050565b6060610ebb82611569565b610ef65760405162461bcd60e51b815260040180806020018281038252602f815260200180612a58602f913960400191505060405180910390fd5b6000828152606c602090815260408083208054825160026001831615610100026000190190921691909104601f810185900485028201850190935282815292909190830182828015610f895780601f10610f5e57610100808354040283529160200191610f89565b820191906000526020600020905b815481529060010190602001808311610f6c57829003601f168201915b505050505090506000610f9a610c1d565b9050805160001415610fae575090506107f6565b81511561106f5780826040516020018083805190602001908083835b60208310610fe95780518252601f199092019160209182019101610fca565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106110315780518252601f199092019160209182019101611012565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052925050506107f6565b806110798561198f565b6040516020018083805190602001908083835b602083106110ab5780518252601f19909201916020918201910161108c565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106110f35780518252601f1990920191602091820191016110d4565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405292505050919050565b609760009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561117f57600080fd5b505afa158015611193573d6000803e3d6000fd5b505050506040513d60208110156111a957600080fd5b50516001600160a01b03163314611207576040805162461bcd60e51b815260206004820152601860248201527f4f6e6c79206f776e65722063616e2063616c6c20746869730000000000000000604482015290519081900360640190fd5b60998054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152600093909290918301828280156112935780601f1061126857610100808354040283529160200191611293565b820191906000526020600020905b81548152906001019060200180831161127657829003601f168201915b505085519394506112af93609993506020870192509050612790565b506040805181815260998054600260001961010060018416150201909116049282018390527f9f69133a51dffac4755e07ebb33840d3f9fc8ed9053110df928ba94b831d3a649290918491819060208201906060830190869080156113555780601f1061132a57610100808354040283529160200191611355565b820191906000526020600020905b81548152906001019060200180831161133857829003601f168201915b5050838103825284518152845160209182019186019080838360005b83811015611389578181015183820152602001611371565b50505050905090810190601f1680156113b65780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a15050565b600054610100900460ff16806113e257506113e2611a9e565b806113f0575060005460ff16155b61142b5760405162461bcd60e51b815260040180806020018281038252602e815260200180612987602e913960400191505060405180910390fd5b600054610100900460ff16158015611456576000805460ff1961ff0019909116610100171660011790555b6001600160a01b0387166114b1576040805162461bcd60e51b815260206004820152601560248201527f436f6e74726f6c6c6572206d7573742065786973740000000000000000000000604482015290519081900360640190fd5b6114bb8585611aaf565b609780546001600160a01b03808a1673ffffffffffffffffffffffffffffffffffffffff19928316179092556098805492891692909116919091179055609a8290558251611510906099906020860190612790565b508015611523576000805461ff00191690555b50505050505050565b6001600160a01b03918216600090815260696020908152604080832093909416825291909152205460ff1690565b6097546001600160a01b031681565b6000610a5b606683611b6c565b3390565b6000818152606860205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841690811790915581906115bc82610bf5565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000610a5b82611b78565b600061160b82611569565b6116465760405162461bcd60e51b815260040180806020018281038252602c8152602001806128d0602c913960400191505060405180910390fd5b600061165183610bf5565b9050806001600160a01b0316846001600160a01b0316148061168c5750836001600160a01b031661168184610891565b6001600160a01b0316145b8061169c575061169c818561152c565b949350505050565b826001600160a01b03166116b782610bf5565b6001600160a01b0316146116fc5760405162461bcd60e51b8152600401808060200182810382526029815260200180612a2f6029913960400191505060405180910390fd5b6001600160a01b0382166117415760405162461bcd60e51b81526004018080602001828103825260248152602001806128866024913960400191505060405180910390fd5b61174c8383836109c9565b61175760008261157a565b6001600160a01b03831660009081526065602052604090206117799082611b7c565b506001600160a01b038216600090815260656020526040902061179c9082611b88565b506117a960668284611b94565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000610a588383611baa565b60008061180883610c7e565b6118ff57611816609b611c0e565b611820609b611b78565b905061182c8382611c17565b6099805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181526118c4938593919290918301828280156118ba5780601f1061188f576101008083540402835291602001916118ba565b820191906000526020600020905b81548152906001019060200180831161189d57829003601f168201915b5050505050611c35565b60405181906001600160a01b038516907f4d515e69e2844aba841b8ecc898590f7a7648dd9d9aa7eebea35e23c13568e0190600090a3610a5b565b610a58836000610a36565b60008080806119198686611c98565b9097909650945050505050565b6000611933848484611d13565b90505b9392505050565b6119488484846116a4565b61195484848484611ddd565b610eaa5760405162461bcd60e51b81526004018080602001828103825260328152602001806128546032913960400191505060405180910390fd5b6060816119d0575060408051808201909152600181527f300000000000000000000000000000000000000000000000000000000000000060208201526107f6565b8160005b81156119e857600101600a820491506119d4565b60008167ffffffffffffffff81118015611a0157600080fd5b506040519080825280601f01601f191660200182016040528015611a2c576020820181803683370190505b50859350905060001982015b8315611a9557600a840660300160f81b82828060019003935081518110611a5b57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a84049350611a38565b50949350505050565b6000611aa930611f6f565b15905090565b600054610100900460ff1680611ac85750611ac8611a9e565b80611ad6575060005460ff16155b611b115760405162461bcd60e51b815260040180806020018281038252602e815260200180612987602e913960400191505060405180910390fd5b600054610100900460ff16158015611b3c576000805460ff1961ff0019909116610100171660011790555b611b44611f75565b611b4c612017565b611b5683836120cd565b80156109c9576000805461ff0019169055505050565b6000610a5883836121fd565b5490565b6000610a588383612215565b6000610a5883836122db565b600061193384846001600160a01b038516612325565b81546000908210611bec5760405162461bcd60e51b81526004018080602001828103825260228152602001806128326022913960400191505060405180910390fd5b826000018281548110611bfb57fe5b9060005260206000200154905092915050565b80546001019055565b611c318282604051806020016040528060008152506123bc565b5050565b611c3e82611569565b611c795760405162461bcd60e51b815260040180806020018281038252602c815260200180612a03602c913960400191505060405180910390fd5b6000828152606c6020908152604090912082516109c992840190612790565b815460009081908310611cdc5760405162461bcd60e51b81526004018080602001828103825260228152602001806129b56022913960400191505060405180910390fd5b6000846000018481548110611ced57fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b60008281526001840160205260408120548281611dae5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611d73578181015183820152602001611d5b565b50505050905090810190601f168015611da05780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50846000016001820381548110611dc157fe5b9060005260206000209060020201600101549150509392505050565b6000611df1846001600160a01b0316611f6f565b611dfd5750600161169c565b6000611f35630a85bd0160e11b611e12611576565b88878760405160240180856001600160a01b03168152602001846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611e79578181015183820152602001611e61565b50505050905090810190601f168015611ea65780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051806060016040528060328152602001612854603291396001600160a01b038816919061240e565b90506000818060200190516020811015611f4e57600080fd5b50516001600160e01b031916630a85bd0160e11b1492505050949350505050565b3b151590565b600054610100900460ff1680611f8e5750611f8e611a9e565b80611f9c575060005460ff16155b611fd75760405162461bcd60e51b815260040180806020018281038252602e815260200180612987602e913960400191505060405180910390fd5b600054610100900460ff16158015612002576000805460ff1961ff0019909116610100171660011790555b8015612014576000805461ff00191690555b50565b600054610100900460ff16806120305750612030611a9e565b8061203e575060005460ff16155b6120795760405162461bcd60e51b815260040180806020018281038252602e815260200180612987602e913960400191505060405180910390fd5b600054610100900460ff161580156120a4576000805460ff1961ff0019909116610100171660011790555b6120027f01ffc9a70000000000000000000000000000000000000000000000000000000061241d565b600054610100900460ff16806120e657506120e6611a9e565b806120f4575060005460ff16155b61212f5760405162461bcd60e51b815260040180806020018281038252602e815260200180612987602e913960400191505060405180910390fd5b600054610100900460ff1615801561215a576000805460ff1961ff0019909116610100171660011790555b825161216d90606a906020860190612790565b50815161218190606b906020850190612790565b506121ab7f80ac58cd0000000000000000000000000000000000000000000000000000000061241d565b6121d47f5b5e139f0000000000000000000000000000000000000000000000000000000061241d565b611b567f780e9d630000000000000000000000000000000000000000000000000000000061241d565b60009081526001919091016020526040902054151590565b600081815260018301602052604081205480156122d1578354600019808301919081019060009087908390811061224857fe5b906000526020600020015490508087600001848154811061226557fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061229557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610a5b565b6000915050610a5b565b60006122e783836121fd565b61231d57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a5b565b506000610a5b565b60008281526001840160205260408120548061238a575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055611936565b8285600001600183038154811061239d57fe5b9060005260206000209060020201600101819055506000915050611936565b6123c683836124a1565b6123d36000848484611ddd565b6109c95760405162461bcd60e51b81526004018080602001828103825260328152602001806128546032913960400191505060405180910390fd5b606061193384846000856125cf565b6001600160e01b0319808216141561247c576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152603360205260409020805460ff19166001179055565b6001600160a01b0382166124fc576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b61250581611569565b15612557576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b612563600083836109c9565b6001600160a01b03821660009081526065602052604090206125859082611b88565b5061259260668284611b94565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6060824710156126105760405162461bcd60e51b81526004018080602001828103825260268152602001806128aa6026913960400191505060405180910390fd5b61261985611f6f565b61266a576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106126a85780518252601f199092019160209182019101612689565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461270a576040519150601f19603f3d011682016040523d82523d6000602084013e61270f565b606091505b509150915061271f82828661272a565b979650505050505050565b60608315612739575081611936565b8251156127495782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315611d73578181015183820152602001611d5b565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826127c6576000855561280c565b82601f106127df57805160ff191683800117855561280c565b8280016001018555821561280c579182015b8281111561280c5782518255916020019190600101906127f1565b5061281892915061281c565b5090565b5b80821115612818576000815560010161281d56fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724552433732313a207472616e7366657220746f20746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e64734552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732314d657461646174613a2055524920736574206f66206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314d657461646174613a2055524920717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564a2646970667358221220f39cec1b28f4b791f530432fbcd26f305534c37bbf07db82f42edc625c32f06764736f6c63430007060033", - "deployedBytecode": "0x60806040526004361061001e5760003560e01c8063ec3f059a14610023575b600080fd5b610252600480360361010081101561003a57600080fd5b6001600160a01b038235811692602081013582169260408201359092169181019060808101606082013564010000000081111561007657600080fd5b82018360208201111561008857600080fd5b803590602001918460018302840111640100000000831117156100aa57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156100fd57600080fd5b82018360208201111561010f57600080fd5b8035906020019184600183028401116401000000008311171561013157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561018457600080fd5b82018360208201111561019657600080fd5b803590602001918460018302840111640100000000831117156101b857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295843595909490935060408101925060200135905064010000000081111561021357600080fd5b82018360208201111561022557600080fd5b8035906020019184602083028401116401000000008311171561024757600080fd5b50909250905061026e565b604080516001600160a01b039092168252519081900360200190f35b60008061029a7f0000000000000000000000000000000000000000000000000000000000000000610634565b905060006102c77f0000000000000000000000000000000000000000000000000000000000000000610634565b9050806001600160a01b031663ded96d488c848c8c8c8c6040518763ffffffff1660e01b815260040180876001600160a01b03168152602001866001600160a01b03168152602001806020018060200180602001858152602001848103845288818151815260200191508051906020019080838360005b8381101561035657818101518382015260200161033e565b50505050905090810190601f1680156103835780820380516001836020036101000a031916815260200191505b50848103835287518152875160209182019189019080838360005b838110156103b657818101518382015260200161039e565b50505050905090810190601f1680156103e35780820380516001836020036101000a031916815260200191505b50848103825286518152865160209182019188019080838360005b838110156104165781810151838201526020016103fe565b50505050905090810190601f1680156104435780820380516001836020036101000a031916815260200191505b509950505050505050505050600060405180830381600087803b15801561046957600080fd5b505af115801561047d573d6000803e3d6000fd5b50505050816001600160a01b031663dfa5e83b348e8e8e8e8e8c8c8a6040518a63ffffffff1660e01b815260040180896001600160a01b03168152602001886001600160a01b03168152602001876001600160a01b03168152602001806020018060200180602001856001600160a01b03168152602001848103845289818151815260200191508051906020019080838360005b83811015610529578181015183820152602001610511565b50505050905090810190601f1680156105565780820380516001836020036101000a031916815260200191505b5084810383528851815288516020918201918a019080838360005b83811015610589578181015183820152602001610571565b50505050905090810190601f1680156105b65780820380516001836020036101000a031916815260200191505b508481038252878782818152602001925060200280828437600081840152601f19601f8201169050808301925050509b5050505050505050505050506000604051808303818588803b15801561060b57600080fd5b505af115801561061f573d6000803e3d6000fd5b50949f9e505050505050505050505050505050565b60006040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528260601b60148201527f5af43d82803e903d91602b57fd5bf3000000000000000000000000000000000060288201526037816000f09150506001600160a01b03811661070957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f455243313136373a20637265617465206661696c656400000000000000000000604482015290519081900360640190fd5b91905056fea2646970667358221220bd029e33af9394468d88a55b14b956e844e32fe6ca7edd31147d7ba5820840ee64736f6c63430007060033", + "args": [ + "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F" + ], + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_reserveAsset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_creator\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_tokenURI\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_seed\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_gardenParams\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_initialContribution\",\"type\":\"uint256\"}],\"name\":\"createGarden\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Factory to create garden contracts\",\"kind\":\"dev\",\"methods\":{\"createGarden(address,address,string,string,string,uint256,uint256[],uint256)\":{\"params\":{\"_creator\":\"Address of the creator\",\"_gardenParams\":\"Array of numeric params in the garden\",\"_initialContribution\":\"Initial Contribution by the Gardener\",\"_name\":\"Name of the Garden\",\"_reserveAsset\":\"Address of the reserve asset ERC20\",\"_seed\":\"Seed to regenerate the garden NFT\",\"_symbol\":\"Symbol of the Garden\",\"_tokenURI\":\"URL of the garden NFT JSON\"}}},\"title\":\"GardenFactory\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"createGarden(address,address,string,string,string,uint256,uint256[],uint256)\":{\"notice\":\"Creates a garden using minimal proxies\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/gardens/GardenFactory.sol\":\"GardenFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 SafeMathUpgradeable {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0x0dd1e9b19801e3e7d900fbf4182d81e1afd23ad7be39504e33df6bbcba91d724\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity >=0.4.24 <0.8.0;\\n\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || _isConstructor() || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /// @dev Returns true if and only if the function is running in the constructor\\n function _isConstructor() private view returns (bool) {\\n return !AddressUpgradeable.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xd8e4eb08dcc1d1860fb347ba5ffd595242b9a1b66d49a47f2b4cb51c3f35017e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"./IERC20Upgradeable.sol\\\";\\nimport \\\"../../math/SafeMathUpgradeable.sol\\\";\\nimport \\\"../../proxy/Initializable.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 ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable {\\n using SafeMathUpgradeable 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 function __ERC20_init(string memory name_, string memory symbol_) internal initializer {\\n __Context_init_unchained();\\n __ERC20_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n uint256[44] private __gap;\\n}\\n\",\"keccak256\":\"0x506dd0718f9ace50588c13848167df5e04ae16abb56341afb10c31ff149bc79b\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\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(address sender, address recipient, uint256 amount) 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\":\"0xa1931c47a617014f858580db625aa0dcf343796f39acd4b5b51effc092a1f0a9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 { size := extcodesize(account) }\\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, \\\"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, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfc5ea91fa9ceb1961023b2a6c978b902888c52b90847ac7813fe3b79524165f6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xbbf8a21b9a66c48d45ff771b8563c6df19ba451d63dfb8380a865c1e1f29d1a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts may inherit from this and call {_registerInterface} to declare\\n * their support of an interface.\\n */\\nabstract contract ERC165 is IERC165 {\\n /*\\n * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7\\n */\\n bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;\\n\\n /**\\n * @dev Mapping of interface ids to whether or not it's supported.\\n */\\n mapping(bytes4 => bool) private _supportedInterfaces;\\n\\n constructor () internal {\\n // Derived contracts need only register support for their own interfaces,\\n // we register support for ERC165 itself here\\n _registerInterface(_INTERFACE_ID_ERC165);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n *\\n * Time complexity O(1), guaranteed to always use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return _supportedInterfaces[interfaceId];\\n }\\n\\n /**\\n * @dev Registers the contract as an implementer of the interface defined by\\n * `interfaceId`. Support of the actual ERC165 interface is automatic and\\n * registering its interface id is not required.\\n *\\n * See {IERC165-supportsInterface}.\\n *\\n * Requirements:\\n *\\n * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).\\n */\\n function _registerInterface(bytes4 interfaceId) internal virtual {\\n require(interfaceId != 0xffffffff, \\\"ERC165: invalid interface id\\\");\\n _supportedInterfaces[interfaceId] = true;\\n }\\n}\\n\",\"keccak256\":\"0x24141d2f6b98d4cb77a8936eae8cbaad2e261d9062bdc08036096f4550092501\",\"license\":\"MIT\"},\"@openzeppelin/contracts/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xf70bc25d981e4ec9673a995ad2995d5d493ea188d3d8f388bba9c227ce09fb82\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Clones.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for\\n * deploying minimal proxy contracts, also known as \\\"clones\\\".\\n *\\n * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies\\n * > a minimal bytecode implementation that delegates all calls to a known, fixed address.\\n *\\n * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`\\n * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the\\n * deterministic method.\\n *\\n * _Available since v3.4._\\n */\\nlibrary Clones {\\n /**\\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `master`.\\n *\\n * This function uses the create opcode, which should never revert.\\n */\\n function clone(address master) internal returns (address instance) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\\n mstore(add(ptr, 0x14), shl(0x60, master))\\n mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\\n instance := create(0, ptr, 0x37)\\n }\\n require(instance != address(0), \\\"ERC1167: create failed\\\");\\n }\\n\\n /**\\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `master`.\\n *\\n * This function uses the create2 opcode and a `salt` to deterministically deploy\\n * the clone. Using the same `master` and `salt` multiple time will revert, since\\n * the clones cannot be deployed twice at the same address.\\n */\\n function cloneDeterministic(address master, bytes32 salt) internal returns (address instance) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\\n mstore(add(ptr, 0x14), shl(0x60, master))\\n mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\\n instance := create2(0, ptr, 0x37, salt)\\n }\\n require(instance != address(0), \\\"ERC1167: create2 failed\\\");\\n }\\n\\n /**\\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\\n */\\n function predictDeterministicAddress(address master, bytes32 salt, address deployer) internal pure returns (address predicted) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\\n mstore(add(ptr, 0x14), shl(0x60, master))\\n mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000)\\n mstore(add(ptr, 0x38), shl(0x60, deployer))\\n mstore(add(ptr, 0x4c), salt)\\n mstore(add(ptr, 0x6c), keccak256(ptr, 0x37))\\n predicted := keccak256(add(ptr, 0x37), 0x55)\\n }\\n }\\n\\n /**\\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\\n */\\n function predictDeterministicAddress(address master, bytes32 salt) internal view returns (address predicted) {\\n return predictDeterministicAddress(master, salt, address(this));\\n }\\n}\\n\",\"keccak256\":\"0x0d24348f536f928d8b42789737bf34762faee065667ab530ea20969a9d9920d1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.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 using SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n // solhint-disable-next-line max-line-length\\n require((value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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 * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 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. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC721.sol\\\";\\nimport \\\"./IERC721Metadata.sol\\\";\\nimport \\\"./IERC721Enumerable.sol\\\";\\nimport \\\"./IERC721Receiver.sol\\\";\\nimport \\\"../../introspection/ERC165.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/EnumerableSet.sol\\\";\\nimport \\\"../../utils/EnumerableMap.sol\\\";\\nimport \\\"../../utils/Strings.sol\\\";\\n\\n/**\\n * @title ERC721 Non-Fungible Token Standard basic implementation\\n * @dev see https://eips.ethereum.org/EIPS/eip-721\\n */\\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {\\n using SafeMath for uint256;\\n using Address for address;\\n using EnumerableSet for EnumerableSet.UintSet;\\n using EnumerableMap for EnumerableMap.UintToAddressMap;\\n using Strings for uint256;\\n\\n // Equals to `bytes4(keccak256(\\\"onERC721Received(address,address,uint256,bytes)\\\"))`\\n // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector`\\n bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;\\n\\n // Mapping from holder address to their (enumerable) set of owned tokens\\n mapping (address => EnumerableSet.UintSet) private _holderTokens;\\n\\n // Enumerable mapping from token ids to their owners\\n EnumerableMap.UintToAddressMap private _tokenOwners;\\n\\n // Mapping from token ID to approved address\\n mapping (uint256 => address) private _tokenApprovals;\\n\\n // Mapping from owner to operator approvals\\n mapping (address => mapping (address => bool)) private _operatorApprovals;\\n\\n // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Optional mapping for token URIs\\n mapping (uint256 => string) private _tokenURIs;\\n\\n // Base URI\\n string private _baseURI;\\n\\n /*\\n * bytes4(keccak256('balanceOf(address)')) == 0x70a08231\\n * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e\\n * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3\\n * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc\\n * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465\\n * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5\\n * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd\\n * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e\\n * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde\\n *\\n * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^\\n * 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;\\n\\n /*\\n * bytes4(keccak256('name()')) == 0x06fdde03\\n * bytes4(keccak256('symbol()')) == 0x95d89b41\\n * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd\\n *\\n * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f;\\n\\n /*\\n * bytes4(keccak256('totalSupply()')) == 0x18160ddd\\n * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59\\n * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7\\n *\\n * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;\\n\\n /**\\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\\n */\\n constructor (string memory name_, string memory symbol_) public {\\n _name = name_;\\n _symbol = symbol_;\\n\\n // register the supported interfaces to conform to ERC721 via ERC165\\n _registerInterface(_INTERFACE_ID_ERC721);\\n _registerInterface(_INTERFACE_ID_ERC721_METADATA);\\n _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE);\\n }\\n\\n /**\\n * @dev See {IERC721-balanceOf}.\\n */\\n function balanceOf(address owner) public view virtual override returns (uint256) {\\n require(owner != address(0), \\\"ERC721: balance query for the zero address\\\");\\n return _holderTokens[owner].length();\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n return _tokenOwners.get(tokenId, \\\"ERC721: owner query for nonexistent token\\\");\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-name}.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-symbol}.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-tokenURI}.\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n require(_exists(tokenId), \\\"ERC721Metadata: URI query for nonexistent token\\\");\\n\\n string memory _tokenURI = _tokenURIs[tokenId];\\n string memory base = baseURI();\\n\\n // If there is no base URI, return the token URI.\\n if (bytes(base).length == 0) {\\n return _tokenURI;\\n }\\n // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).\\n if (bytes(_tokenURI).length > 0) {\\n return string(abi.encodePacked(base, _tokenURI));\\n }\\n // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI.\\n return string(abi.encodePacked(base, tokenId.toString()));\\n }\\n\\n /**\\n * @dev Returns the base URI set via {_setBaseURI}. This will be\\n * automatically added as a prefix in {tokenURI} to each token's URI, or\\n * to the token ID if no specific URI is set for that token ID.\\n */\\n function baseURI() public view virtual returns (string memory) {\\n return _baseURI;\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\\n return _holderTokens[owner].at(index);\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds\\n return _tokenOwners.length();\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenByIndex}.\\n */\\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\\n (uint256 tokenId, ) = _tokenOwners.at(index);\\n return tokenId;\\n }\\n\\n /**\\n * @dev See {IERC721-approve}.\\n */\\n function approve(address to, uint256 tokenId) public virtual override {\\n address owner = ERC721.ownerOf(tokenId);\\n require(to != owner, \\\"ERC721: approval to current owner\\\");\\n\\n require(_msgSender() == owner || ERC721.isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not owner nor approved for all\\\"\\n );\\n\\n _approve(to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-getApproved}.\\n */\\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\\n require(_exists(tokenId), \\\"ERC721: approved query for nonexistent token\\\");\\n\\n return _tokenApprovals[tokenId];\\n }\\n\\n /**\\n * @dev See {IERC721-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n require(operator != _msgSender(), \\\"ERC721: approve to caller\\\");\\n\\n _operatorApprovals[_msgSender()][operator] = approved;\\n emit ApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC721-isApprovedForAll}.\\n */\\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[owner][operator];\\n }\\n\\n /**\\n * @dev See {IERC721-transferFrom}.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) public virtual override {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: transfer caller is not owner nor approved\\\");\\n\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: transfer caller is not owner nor approved\\\");\\n _safeTransfer(from, to, tokenId, _data);\\n }\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * `_data` is additional data, it has no specified format and it is sent in call to `to`.\\n *\\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\\n * implement alternative mechanisms to perform token transfer, such as signature-based.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual {\\n _transfer(from, to, tokenId);\\n require(_checkOnERC721Received(from, to, tokenId, _data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Returns whether `tokenId` exists.\\n *\\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\\n *\\n * Tokens start existing when they are minted (`_mint`),\\n * and stop existing when they are burned (`_burn`).\\n */\\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\\n return _tokenOwners.contains(tokenId);\\n }\\n\\n /**\\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\\n require(_exists(tokenId), \\\"ERC721: operator query for nonexistent token\\\");\\n address owner = ERC721.ownerOf(tokenId);\\n return (spender == owner || getApproved(tokenId) == spender || ERC721.isApprovedForAll(owner, spender));\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n d*\\n * - `tokenId` must not exist.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeMint(address to, uint256 tokenId) internal virtual {\\n _safeMint(to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\\n */\\n function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual {\\n _mint(to, tokenId);\\n require(_checkOnERC721Received(address(0), to, tokenId, _data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Mints `tokenId` and transfers it to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - `to` cannot be the zero address.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _mint(address to, uint256 tokenId) internal virtual {\\n require(to != address(0), \\\"ERC721: mint to the zero address\\\");\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n _beforeTokenTransfer(address(0), to, tokenId);\\n\\n _holderTokens[to].add(tokenId);\\n\\n _tokenOwners.set(tokenId, to);\\n\\n emit Transfer(address(0), to, tokenId);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _burn(uint256 tokenId) internal virtual {\\n address owner = ERC721.ownerOf(tokenId); // internal owner\\n\\n _beforeTokenTransfer(owner, address(0), tokenId);\\n\\n // Clear approvals\\n _approve(address(0), tokenId);\\n\\n // Clear metadata (if any)\\n if (bytes(_tokenURIs[tokenId]).length != 0) {\\n delete _tokenURIs[tokenId];\\n }\\n\\n _holderTokens[owner].remove(tokenId);\\n\\n _tokenOwners.remove(tokenId);\\n\\n emit Transfer(owner, address(0), tokenId);\\n }\\n\\n /**\\n * @dev Transfers `tokenId` from `from` to `to`.\\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _transfer(address from, address to, uint256 tokenId) internal virtual {\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer of token that is not own\\\"); // internal owner\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId);\\n\\n // Clear approvals from the previous owner\\n _approve(address(0), tokenId);\\n\\n _holderTokens[from].remove(tokenId);\\n _holderTokens[to].add(tokenId);\\n\\n _tokenOwners.set(tokenId, to);\\n\\n emit Transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {\\n require(_exists(tokenId), \\\"ERC721Metadata: URI set of nonexistent token\\\");\\n _tokenURIs[tokenId] = _tokenURI;\\n }\\n\\n /**\\n * @dev Internal function to set the base URI for all token IDs. It is\\n * automatically added as a prefix to the value returned in {tokenURI},\\n * or to the token ID if {tokenURI} is empty.\\n */\\n function _setBaseURI(string memory baseURI_) internal virtual {\\n _baseURI = baseURI_;\\n }\\n\\n /**\\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\\n * The call is not executed if the target address is not a contract.\\n *\\n * @param from address representing the previous owner of the given token ID\\n * @param to target address that will receive the tokens\\n * @param tokenId uint256 ID of the token to be transferred\\n * @param _data bytes optional data to send along with the call\\n * @return bool whether the call correctly returned the expected magic value\\n */\\n function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data)\\n private returns (bool)\\n {\\n if (!to.isContract()) {\\n return true;\\n }\\n bytes memory returndata = to.functionCall(abi.encodeWithSelector(\\n IERC721Receiver(to).onERC721Received.selector,\\n _msgSender(),\\n from,\\n tokenId,\\n _data\\n ), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n bytes4 retval = abi.decode(returndata, (bytes4));\\n return (retval == _ERC721_RECEIVED);\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * Emits an {Approval} event.\\n */\\n function _approve(address to, uint256 tokenId) internal virtual {\\n _tokenApprovals[tokenId] = to;\\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId); // internal owner\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\\n * transferred to `to`.\\n * - When `from` is zero, `tokenId` will be minted for `to`.\\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { }\\n}\\n\",\"keccak256\":\"0x118ed7540f56b21ff92e21ebaa73584048e98d2ac04ca67571329bb8dbd9032f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"../../introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x2d99a0deb6648c34fbc66d6ac4a2d64798d7a5321b45624f6736fadc63da1962\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"./IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Enumerable is IERC721 {\\n\\n /**\\n * @dev Returns the total amount of tokens stored by the contract.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns a token ID owned by `owner` at a given `index` of its token list.\\n * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);\\n\\n /**\\n * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.\\n * Use along with {totalSupply} to enumerate all tokens.\\n */\\n function tokenByIndex(uint256 index) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xe6bd1b1218338b6f9fe17776f48623b4ac3d8a40405f74a44bc23c00abe2ca13\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"./IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xccb917776f826ac6b68bd5a15a5f711e3967848a52ba11e6104d9a4f593314a7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721Receiver {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.\\n */\\n function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0x52146049d6709c870e8ddcd988b5155cb6c5d640cfcd8978aee52bc1ba2ec4eb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\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 { size := extcodesize(account) }\\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, \\\"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, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Counters.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../math/SafeMath.sol\\\";\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath}\\n * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never\\n * directly accessed.\\n */\\nlibrary Counters {\\n using SafeMath for uint256;\\n\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n // The {SafeMath} overflow check can be skipped here, see the comment at the top\\n counter._value += 1;\\n }\\n\\n function decrement(Counter storage counter) internal {\\n counter._value = counter._value.sub(1);\\n }\\n}\\n\",\"keccak256\":\"0x21662e4254ce4ac8570b30cc7ab31435966b3cb778a56ba4d09276881cfb2437\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/EnumerableMap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 *\\n * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are\\n * supported.\\n */\\nlibrary EnumerableMap {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Map type with\\n // bytes32 keys and values.\\n // The Map implementation uses private functions, and user-facing\\n // implementations (such as Uint256ToAddressMap) are just wrappers around\\n // the underlying Map.\\n // This means that we can only create new EnumerableMaps for types that fit\\n // in bytes32.\\n\\n struct MapEntry {\\n bytes32 _key;\\n bytes32 _value;\\n }\\n\\n struct Map {\\n // Storage of map keys and values\\n MapEntry[] _entries;\\n\\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 (bytes32 => 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(Map storage map, bytes32 key, bytes32 value) private 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 if (keyIndex == 0) { // Equivalent to !contains(map, key)\\n map._entries.push(MapEntry({ _key: key, _value: value }));\\n // The entry is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n map._indexes[key] = map._entries.length;\\n return true;\\n } else {\\n map._entries[keyIndex - 1]._value = value;\\n return false;\\n }\\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(Map storage map, bytes32 key) private 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 if (keyIndex != 0) { // Equivalent to contains(map, key)\\n // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one\\n // in the array, and then remove the last entry (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = keyIndex - 1;\\n uint256 lastIndex = map._entries.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 MapEntry 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 map._entries.pop();\\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(Map storage map, bytes32 key) private 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(Map storage map) private view returns (uint256) {\\n return map._entries.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(Map storage map, uint256 index) private view returns (bytes32, bytes32) {\\n require(map._entries.length > index, \\\"EnumerableMap: index out of bounds\\\");\\n\\n MapEntry storage entry = map._entries[index];\\n return (entry._key, entry._value);\\n }\\n\\n /**\\n * @dev Tries to returns the value associated with `key`. O(1).\\n * Does not revert if `key` is not in the map.\\n */\\n function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key)\\n return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based\\n }\\n\\n /**\\n * @dev Returns the value associated with `key`. O(1).\\n *\\n * Requirements:\\n *\\n * - `key` must be in the map.\\n */\\n function _get(Map storage map, bytes32 key) private view returns (bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n require(keyIndex != 0, \\\"EnumerableMap: nonexistent key\\\"); // Equivalent to contains(map, key)\\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\\n }\\n\\n /**\\n * @dev Same as {_get}, with a custom error message when `key` is not in the map.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {_tryGet}.\\n */\\n function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key)\\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\\n }\\n\\n // UintToAddressMap\\n\\n struct UintToAddressMap {\\n Map _inner;\\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(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) {\\n return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the key was removed from the map, that is if it was present.\\n */\\n function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) {\\n return _remove(map._inner, bytes32(key));\\n }\\n\\n /**\\n * @dev Returns true if the key is in the map. O(1).\\n */\\n function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) {\\n return _contains(map._inner, bytes32(key));\\n }\\n\\n /**\\n * @dev Returns the number of elements in the map. O(1).\\n */\\n function length(UintToAddressMap storage map) internal view returns (uint256) {\\n return _length(map._inner);\\n }\\n\\n /**\\n * @dev Returns the element 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 *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) {\\n (bytes32 key, bytes32 value) = _at(map._inner, index);\\n return (uint256(key), address(uint160(uint256(value))));\\n }\\n\\n /**\\n * @dev Tries to returns the value associated with `key`. O(1).\\n * Does not revert if `key` is not in the map.\\n *\\n * _Available since v3.4._\\n */\\n function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) {\\n (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key));\\n return (success, address(uint160(uint256(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.\\n */\\n function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {\\n return address(uint160(uint256(_get(map._inner, bytes32(key)))));\\n }\\n\\n /**\\n * @dev Same as {get}, with a custom error message when `key` is not in the map.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryGet}.\\n */\\n function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) {\\n return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage))));\\n }\\n}\\n\",\"keccak256\":\"0x4b087f06b6670a131a5a14e53b1d2a5ef19c034cc5ec42eeebcf9554325744ad\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\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 (bytes32 => 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(Set storage set, bytes32 value) private 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(Set storage set, bytes32 value) private 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) { // 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 bytes32 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(Set storage set, bytes32 value) private 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(Set storage set) private 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(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\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(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\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(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\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(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\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 return _add(set._inner, bytes32(uint256(uint160(value))));\\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 return _remove(set._inner, bytes32(uint256(uint160(value))));\\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 _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\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 return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\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(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\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(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\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(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x1562cd9922fbf739edfb979f506809e2743789cbde3177515542161c3d04b164\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\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 /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\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, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x7b2b8baa20fd60ab4a328c8e34c64a353651b80ba4b5b157cbb61813f6f85d55\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n uint256 index = digits - 1;\\n temp = value;\\n while (temp != 0) {\\n buffer[index--] = bytes1(uint8(48 + temp % 10));\\n temp /= 10;\\n }\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xa1e12f97981f1d0964b1c048978606a57127c56c438bab61cdfe269cad859a74\",\"license\":\"MIT\"},\"contracts/gardens/Garden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n//\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport {ERC20Upgradeable} from '@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SafeDecimalMath} from '../lib/SafeDecimalMath.sol';\\nimport {Safe3296} from '../lib/Safe3296.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\nimport {Errors, _require} from '../lib/BabylonErrors.sol';\\nimport {AddressArrayUtils} from '../lib/AddressArrayUtils.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\nimport {Math} from '../lib/Math.sol';\\n\\nimport {IRewardsDistributor} from '../interfaces/IRewardsDistributor.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IStrategyFactory} from '../interfaces/IStrategyFactory.sol';\\nimport {IGardenValuer} from '../interfaces/IGardenValuer.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {IGardenNFT} from '../interfaces/IGardenNFT.sol';\\nimport {IIshtarGate} from '../interfaces/IIshtarGate.sol';\\nimport {IWETH} from '../interfaces/external/weth/IWETH.sol';\\n\\n/**\\n * @title BaseGarden\\n * @author Babylon Finance\\n *\\n * Class that holds common garden-related state and functions\\n */\\ncontract Garden is ERC20Upgradeable, ReentrancyGuard, IGarden {\\n using SafeCast for int256;\\n using SignedSafeMath for int256;\\n using PreciseUnitMath for int256;\\n using SafeDecimalMath for int256;\\n\\n using SafeCast for uint256;\\n using SafeMath for uint256;\\n using PreciseUnitMath for uint256;\\n using SafeDecimalMath for uint256;\\n\\n using Address for address;\\n using AddressArrayUtils for address[];\\n\\n using SafeERC20 for IERC20;\\n\\n /* ============ Events ============ */\\n event GardenDeposit(\\n address indexed _to,\\n uint256 reserveToken,\\n uint256 reserveTokenQuantity,\\n uint256 protocolFees,\\n uint256 timestamp\\n );\\n event GardenWithdrawal(\\n address indexed _from,\\n address indexed _to,\\n uint256 reserveToken,\\n uint256 reserveTokenQuantity,\\n uint256 protocolFees,\\n uint256 timestamp\\n );\\n\\n event RewardsForContributor(address indexed _contributor, uint256 indexed _amount);\\n event BABLRewardsForContributor(address indexed _contributor, uint96 _rewards);\\n\\n /* ============ State Constants ============ */\\n\\n // Wrapped ETH address\\n address private constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\\n uint256 public constant EARLY_WITHDRAWAL_PENALTY = 15e16;\\n uint256 public constant MAX_TOTAL_STRATEGIES = 20; // Max number of strategies\\n uint256 private constant TEN_PERCENT = 1e17;\\n uint256 private constant MAX_KEEPER_FEE = (1e6 * 1e3 gwei);\\n\\n /* ============ Structs ============ */\\n\\n struct Contributor {\\n uint256 lastDepositAt;\\n uint256 initialDepositAt;\\n uint256 claimedAt;\\n uint256 claimedBABL;\\n uint256 claimedRewards;\\n uint256 withdrawnSince;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Reserve Asset of the garden\\n address public override reserveAsset;\\n\\n // Address of the controller\\n address public override controller;\\n\\n // The person that creates the garden\\n address public override creator;\\n // Whether the garden is currently active or not\\n bool public override active;\\n bool public override guestListEnabled;\\n\\n // Keeps track of the reserve balance. In case we receive some through other means\\n uint256 public override principal;\\n uint256 public override reserveAssetRewardsSetAside;\\n uint256 public override reserveAssetPrincipalWindow;\\n int256 public override absoluteReturns; // Total profits or losses of this garden\\n\\n // Indicates the minimum liquidity the asset needs to have to be tradable by this garden\\n uint256 public override minLiquidityAsset;\\n\\n uint256 public depositHardlock; // Window of time after deposits when withdraws are disabled for that user\\n // Window of time after an investment strategy finishes when the capital is available for withdrawals\\n uint256 public withdrawalWindowAfterStrategyCompletes;\\n uint256 public withdrawalsOpenUntil; // Indicates until when the withdrawals are open and the ETH is set aside\\n\\n // Contributors\\n mapping(address => Contributor) public contributors;\\n uint256 public override totalContributors;\\n uint256 public override maxContributors;\\n uint256 public maxDepositLimit; // Limits the amount of deposits\\n\\n uint256 public override gardenInitializedAt; // Garden Initialized at timestamp\\n // Number of garden checkpoints used to control de garden power and each contributor power with accuracy avoiding flash loans and related attack vectors\\n uint256 public pid;\\n\\n // Min contribution in the garden\\n uint256 public override minContribution; //wei\\n uint256 public minGardenTokenSupply;\\n\\n // Strategies variables\\n uint256 public override totalStake;\\n uint256 public override minVotersQuorum = TEN_PERCENT; // 10%. (0.01% = 1e14, 1% = 1e16)\\n uint256 public override minStrategyDuration; // Min duration for an strategy\\n uint256 public override maxStrategyDuration; // Max duration for an strategy\\n // Window for the strategy to cooldown after approval before receiving capital\\n uint256 public override strategyCooldownPeriod;\\n\\n address[] private strategies; // Strategies that are either in candidate or active state\\n address[] private finalizedStrategies; // Strategies that have finalized execution\\n mapping(address => bool) public strategyMapping;\\n mapping(address => bool) public override isGardenStrategy; // Security control mapping\\n\\n // Keeper debt in reserve asset if any, repaid upon every strategy finalization\\n uint256 public keeperDebt;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * When a new Garden is created.\\n * All parameter validations are on the BabController contract. Validations are performed already on the\\n * BabController.\\n * WARN: If the reserve Asset is different than WETH the gardener needs to have approved the controller.\\n *\\n * @param _reserveAsset Address of the reserve asset ERC20\\n * @param _controller Address of the controller\\n * @param _creator Address of the creator\\n * @param _name Name of the Garden\\n * @param _symbol Symbol of the Garden\\n * @param _gardenParams Array of numeric garden params\\n * @param _initialContribution Initial Contribution by the Gardener\\n */\\n function initialize(\\n address _reserveAsset,\\n address _controller,\\n address _creator,\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) public payable initializer {\\n _require(bytes(_name).length < 50, Errors.NAME_TOO_LONG);\\n _require(_creator != address(0), Errors.ADDRESS_IS_ZERO);\\n _require(_controller != address(0), Errors.ADDRESS_IS_ZERO);\\n _require(ERC20Upgradeable(_reserveAsset).decimals() > 0, Errors.ADDRESS_IS_ZERO);\\n _require(_gardenParams.length == 9, Errors.GARDEN_PARAMS_LENGTH);\\n _require(IBabController(_controller).isValidReserveAsset(_reserveAsset), Errors.MUST_BE_RESERVE_ASSET);\\n __ERC20_init(_name, _symbol);\\n\\n controller = _controller;\\n reserveAsset = _reserveAsset;\\n creator = _creator;\\n maxContributors = IBabController(_controller).maxContributorsPerGarden();\\n guestListEnabled = true;\\n\\n _start(\\n _initialContribution,\\n _gardenParams[0],\\n _gardenParams[1],\\n _gardenParams[2],\\n _gardenParams[3],\\n _gardenParams[4],\\n _gardenParams[5],\\n _gardenParams[6],\\n _gardenParams[7],\\n _gardenParams[8]\\n );\\n active = true;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * FUND LEAD ONLY. Starts the Garden with allowed reserve assets,\\n * fees and issuance premium. Only callable by the Garden's creator\\n *\\n * @param _creatorDeposit Deposit by the creator\\n * @param _maxDepositLimit Max deposit limit\\n * @param _minGardenTokenSupply Min garden token supply\\n * @param _minLiquidityAsset Number that represents min amount of liquidity denominated in ETH\\n * @param _depositHardlock Number that represents the time deposits are locked for an user after he deposits\\n * @param _minContribution Min contribution to the garden\\n * @param _strategyCooldownPeriod How long after the strategy has been activated, will it be ready to be executed\\n * @param _minVotersQuorum Percentage of votes needed to activate an strategy (0.01% = 1e14, 1% = 1e16)\\n * @param _minStrategyDuration Min duration of an strategy\\n * @param _maxStrategyDuration Max duration of an strategy\\n */\\n function _start(\\n uint256 _creatorDeposit,\\n uint256 _maxDepositLimit,\\n uint256 _minGardenTokenSupply,\\n uint256 _minLiquidityAsset,\\n uint256 _depositHardlock,\\n uint256 _minContribution,\\n uint256 _strategyCooldownPeriod,\\n uint256 _minVotersQuorum,\\n uint256 _minStrategyDuration,\\n uint256 _maxStrategyDuration\\n ) private {\\n _require(_minContribution > 0, Errors.MIN_CONTRIBUTION);\\n _require(_creatorDeposit >= _minContribution, Errors.MIN_CONTRIBUTION);\\n _require(_creatorDeposit >= _minGardenTokenSupply, Errors.MIN_LIQUIDITY);\\n _require(_creatorDeposit <= _maxDepositLimit, Errors.MAX_DEPOSIT_LIMIT);\\n _require(_maxDepositLimit <= (reserveAsset == WETH ? 1e22 : 1e25), Errors.MAX_DEPOSIT_LIMIT);\\n IBabController babController = IBabController(controller);\\n _require(_minGardenTokenSupply > 0, Errors.MIN_TOKEN_SUPPLY);\\n _require(_depositHardlock > 0, Errors.DEPOSIT_HARDLOCK);\\n _require(_minLiquidityAsset >= babController.minLiquidityPerReserve(reserveAsset), Errors.MIN_LIQUIDITY);\\n _require(\\n _strategyCooldownPeriod <= IBabController(controller).getMaxCooldownPeriod() &&\\n _strategyCooldownPeriod >= IBabController(controller).getMinCooldownPeriod(),\\n Errors.NOT_IN_RANGE\\n );\\n _require(_minVotersQuorum >= TEN_PERCENT && _minVotersQuorum <= TEN_PERCENT.mul(5), Errors.VALUE_TOO_LOW);\\n _require(_maxStrategyDuration >= _minStrategyDuration, Errors.DURATION_RANGE);\\n _require(_minStrategyDuration >= 1 days && _maxStrategyDuration <= 500 days, Errors.DURATION_RANGE);\\n minContribution = _minContribution;\\n strategyCooldownPeriod = _strategyCooldownPeriod;\\n minVotersQuorum = _minVotersQuorum;\\n minStrategyDuration = _minStrategyDuration;\\n maxStrategyDuration = _maxStrategyDuration;\\n minGardenTokenSupply = _minGardenTokenSupply;\\n maxDepositLimit = _maxDepositLimit;\\n gardenInitializedAt = block.timestamp;\\n minLiquidityAsset = _minLiquidityAsset;\\n depositHardlock = _depositHardlock;\\n withdrawalWindowAfterStrategyCompletes = 7 days;\\n }\\n\\n /**\\n * Deposits the reserve asset into the garden and mints the Garden token of the given quantity\\n * to the specified _to address.\\n * WARN: If the reserve Asset is different than WETH the sender needs to have approved the garden.\\n *\\n * @param _reserveAssetQuantity Quantity of the reserve asset that are received\\n * @param _minGardenTokenReceiveQuantity Min quantity of Garden token to receive after issuance\\n * @param _to Address to mint Garden tokens to\\n */\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable override nonReentrant {\\n _onlyActive();\\n _require(\\n !guestListEnabled ||\\n IIshtarGate(IBabController(controller).ishtarGate()).canJoinAGarden(address(this), msg.sender) ||\\n creator == _to,\\n Errors.USER_CANNOT_JOIN\\n );\\n // if deposit limit is 0, then there is no deposit limit\\n if (maxDepositLimit > 0) {\\n _require(principal.add(_reserveAssetQuantity) <= maxDepositLimit, Errors.MAX_DEPOSIT_LIMIT);\\n }\\n _require(totalContributors <= maxContributors, Errors.MAX_CONTRIBUTORS);\\n _receiveReserveAsset(_reserveAssetQuantity);\\n\\n (uint256 protocolFees, uint256 netFlowQuantity) = _getFees(_reserveAssetQuantity, true);\\n\\n // gardenTokenQuantity has to be at least _minGardenTokenReceiveQuantity\\n _require(netFlowQuantity >= _minGardenTokenReceiveQuantity, Errors.MIN_TOKEN_SUPPLY);\\n\\n // Send Protocol Fee\\n payProtocolFeeFromGarden(reserveAsset, protocolFees);\\n\\n // Mint tokens\\n _mintGardenTokens(_to, netFlowQuantity, principal.add(netFlowQuantity), protocolFees);\\n\\n // Check that total supply is greater than min supply needed for issuance\\n _require(totalSupply() >= minGardenTokenSupply, Errors.MIN_TOKEN_SUPPLY);\\n }\\n\\n /**\\n * Withdraws the ETH relative to the token participation in the garden and sends it back to the sender.\\n *\\n * @param _gardenTokenQuantity Quantity of the garden token to withdrawal\\n * @param _minReserveReceiveQuantity Min quantity of reserve asset to receive\\n * @param _to Address to send component assets to\\n * @param _withPenalty Whether or not this is an immediate withdrawal\\n */\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to,\\n bool _withPenalty\\n ) external override nonReentrant {\\n _onlyContributor();\\n if (!_withPenalty) {\\n // Requests an immediate withdrawal taking the EARLY_WITHDRAWAL_PENALTY that stays invested.\\n return _withdraw(_gardenTokenQuantity, _minReserveReceiveQuantity, _to);\\n }\\n // Check that cannot do a normal withdrawal\\n _require(!_canWithdrawReserveAmount(msg.sender, _gardenTokenQuantity), Errors.NORMAL_WITHDRAWAL_POSSIBLE);\\n uint256 netReserveFlows = _gardenTokenQuantity.sub(_gardenTokenQuantity.preciseMul(EARLY_WITHDRAWAL_PENALTY));\\n (, uint256 largestCapital, address maxStrategy) = _getActiveCapital();\\n // Check that strategy has enough capital to support the withdrawal\\n _require(\\n IStrategy(maxStrategy).minRebalanceCapital() <= largestCapital.sub(netReserveFlows),\\n Errors.WITHDRAWAL_WITH_PENALTY\\n );\\n IStrategy(maxStrategy).unwindStrategy(netReserveFlows);\\n // We burn their penalty\\n _burn(msg.sender, _gardenTokenQuantity.preciseMul(EARLY_WITHDRAWAL_PENALTY));\\n // TODO: replace the 1\\n _withdraw(netReserveFlows, 1, _to);\\n }\\n\\n /**\\n * User can claim the rewards from the strategies that his principal\\n * was invested in.\\n */\\n function claimReturns(address[] calldata _finalizedStrategies) external override nonReentrant {\\n _onlyContributor();\\n Contributor storage contributor = contributors[msg.sender];\\n _require(block.timestamp > contributor.claimedAt, Errors.ALREADY_CLAIMED); // race condition check\\n\\n IRewardsDistributor rewardsDistributor = IRewardsDistributor(IBabController(controller).rewardsDistributor());\\n (uint256 reserveRewards, uint256 bablRewards) =\\n rewardsDistributor.getRewards(address(this), msg.sender, _finalizedStrategies);\\n\\n if (reserveRewards > 0 && address(this).balance >= reserveRewards) {\\n contributor.claimedRewards = contributor.claimedRewards.add(reserveRewards); // Rewards claimed properly\\n // Send ETH\\n Address.sendValue(msg.sender, reserveRewards);\\n reserveAssetRewardsSetAside = reserveAssetRewardsSetAside.sub(reserveRewards);\\n emit RewardsForContributor(msg.sender, reserveRewards);\\n contributor.claimedAt = block.timestamp; // Checkpoint of this claim\\n }\\n if (bablRewards > 0) {\\n contributor.claimedBABL = contributor.claimedBABL.add(bablRewards); // BABL Rewards claimed properly\\n // Send BABL rewards\\n\\n rewardsDistributor.sendTokensToContributor(msg.sender, uint96(bablRewards));\\n emit BABLRewardsForContributor(msg.sender, uint96(bablRewards));\\n contributor.claimedAt = block.timestamp; // Checkpoint of this claim\\n }\\n }\\n\\n /**\\n * When an strategy finishes execution, we want to make that eth available for withdrawals\\n * from members of the garden.\\n *\\n * @param _amount Amount of Reserve Asset to set aside until the window ends\\n * @param _rewards Amount of Reserve Asset to set aside forever\\n * @param _returns Profits or losses that the strategy received\\n */\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _rewards,\\n int256 _returns,\\n address _strategy\\n ) external override {\\n _require(\\n (strategyMapping[msg.sender] && address(IStrategy(msg.sender).garden()) == address(this)),\\n Errors.ONLY_STRATEGY\\n );\\n // Updates reserve asset\\n principal = principal.toInt256().add(_returns).toUint256();\\n if (withdrawalsOpenUntil > block.timestamp) {\\n withdrawalsOpenUntil = block.timestamp.add(\\n withdrawalWindowAfterStrategyCompletes.sub(withdrawalsOpenUntil.sub(block.timestamp))\\n );\\n } else {\\n withdrawalsOpenUntil = block.timestamp.add(withdrawalWindowAfterStrategyCompletes);\\n }\\n reserveAssetRewardsSetAside = reserveAssetRewardsSetAside.add(_rewards);\\n reserveAssetPrincipalWindow = reserveAssetPrincipalWindow.add(_amount);\\n // Mark strategy as finalized\\n absoluteReturns = absoluteReturns.add(_returns);\\n strategies = strategies.remove(_strategy);\\n finalizedStrategies.push(_strategy);\\n strategyMapping[_strategy] = false;\\n }\\n\\n /**\\n * Pays gas costs back to the keeper from executing transactions including the past debt\\n * @param _keeper Keeper that executed the transaction\\n * @param _fee The fee paid to keeper to compensate the gas cost\\n */\\n function payKeeper(address payable _keeper, uint256 _fee) external override {\\n _require(IBabController(controller).isValidKeeper(_keeper), Errors.ONLY_KEEPER);\\n _onlyStrategy();\\n keeperDebt = keeperDebt.add(_fee);\\n // Pay Keeper in Reserve Asset\\n if (keeperDebt > 0 && IERC20(reserveAsset).balanceOf(address(this)) >= keeperDebt) {\\n IERC20(reserveAsset).safeTransfer(_keeper, keeperDebt);\\n principal = principal.sub(keeperDebt);\\n keeperDebt = 0;\\n }\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Makes a previously private garden public\\n */\\n function makeGardenPublic() external override {\\n _require(msg.sender == creator, Errors.ONLY_CREATOR);\\n _require(guestListEnabled && IBabController(controller).allowPublicGardens(), Errors.GARDEN_ALREADY_PUBLIC);\\n guestListEnabled = false;\\n }\\n\\n /**\\n * PRIVILEGED Manager, protocol FUNCTION. When a Garden is active, deposits are enabled.\\n */\\n function setActive(bool _newValue) external override {\\n _require(msg.sender == controller, Errors.ONLY_CONTROLLER);\\n _require(active != _newValue, Errors.ONLY_INACTIVE);\\n active = _newValue;\\n }\\n\\n /* ============ Strategy Functions ============ */\\n /**\\n * Creates a new strategy calling the factory and adds it to the array\\n * @param _name Name of the strategy\\n * @param _symbol Symbol of the strategy\\n * @param _stratParams Num params for the strategy\\n * @param _opTypes Type for every operation in the strategy\\n * @param _opIntegrations Integration to use for every operation\\n * @param _opDatas Param for every operation in the strategy\\n */\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external override {\\n _onlyActive();\\n _onlyContributor();\\n _require(\\n IIshtarGate(IBabController(controller).ishtarGate()).canAddStrategiesInAGarden(address(this), msg.sender),\\n Errors.USER_CANNOT_ADD_STRATEGIES\\n );\\n _require(strategies.length < MAX_TOTAL_STRATEGIES, Errors.VALUE_TOO_HIGH);\\n _require(_stratParams.length == 5, Errors.STRAT_PARAMS_LENGTH);\\n address strategy =\\n IStrategyFactory(IBabController(controller).strategyFactory()).createStrategy(\\n _name,\\n _symbol,\\n msg.sender,\\n address(this),\\n _stratParams\\n );\\n strategyMapping[strategy] = true;\\n totalStake = totalStake.add(_stratParams[1]);\\n strategies.push(strategy);\\n IStrategy(strategy).setData(_opTypes, _opIntegrations, _opDatas);\\n isGardenStrategy[strategy] = true;\\n }\\n\\n /**\\n * Rebalances available capital of the garden between the strategies that are active.\\n * We enter into the strategy and add it to the executed strategies array.\\n * @param _fee The fee paid to keeper to compensate the gas cost for each strategy executed\\n */\\n function rebalanceStrategies(uint256 _fee) external override {\\n _onlyActive();\\n _require(IBabController(controller).isValidKeeper(msg.sender), Errors.ONLY_KEEPER);\\n // We assume that calling keeper functions should be less expensive\\n // than 1 million gas and the gas price should be lower than 1000 gwei.\\n _require(_fee <= MAX_KEEPER_FEE, Errors.FEE_TOO_HIGH);\\n\\n uint256 liquidReserveAsset = ERC20Upgradeable(reserveAsset).balanceOf(address(this));\\n for (uint256 i = 0; i < strategies.length; i++) {\\n IStrategy strategy = IStrategy(strategies[i]);\\n uint256 percentage = strategy.totalVotes().toUint256().preciseDiv(totalStake);\\n uint256 toAllocate = liquidReserveAsset.preciseMul(percentage);\\n if (\\n block.timestamp < strategy.executedAt().add(strategy.duration()).sub(1 days) &&\\n toAllocate >= strategy.minRebalanceCapital() &&\\n toAllocate.add(strategy.capitalAllocated()) <= strategy.maxCapitalRequested()\\n ) {\\n strategy.executeStrategy(toAllocate, _fee);\\n }\\n }\\n }\\n\\n /**\\n * Allocates garden capital to an strategy\\n *\\n * @param _capital Amount of capital to allocate to the strategy\\n */\\n function allocateCapitalToStrategy(uint256 _capital) external override {\\n _onlyStrategy();\\n _onlyActive();\\n _reenableReserveForStrategies();\\n uint256 liquidReserveAsset = IERC20(reserveAsset).balanceOf(address(this)).sub(reserveAssetPrincipalWindow);\\n uint256 protocolMgmtFee = IBabController(controller).protocolManagementFee().preciseMul(_capital);\\n _require(_capital.add(protocolMgmtFee) <= liquidReserveAsset, Errors.MIN_LIQUIDITY);\\n\\n // Take protocol mgmt fee\\n payProtocolFeeFromGarden(reserveAsset, protocolMgmtFee);\\n\\n // Send Capital to strategy\\n IERC20(reserveAsset).safeTransfer(msg.sender, _capital);\\n }\\n\\n // Any tokens (other than the target) that are sent here by mistake are recoverable by the protocol\\n function sweep(address _token) external {\\n _require(_token != reserveAsset, Errors.MUST_BE_RESERVE_ASSET);\\n uint256 balance = IERC20(_token).balanceOf(address(this));\\n payProtocolFeeFromGarden(_token, balance);\\n }\\n\\n /*\\n * Remove an expire candidate from the strategy Array\\n * @param _strategy Strategy to remove\\n */\\n function expireCandidateStrategy(address _strategy) external override {\\n _onlyStrategy();\\n strategies = strategies.remove(_strategy);\\n strategyMapping[_strategy] = false;\\n }\\n\\n /*\\n * Burns the stake of the strategist of a given strategy\\n * @param _strategy Strategy\\n */\\n function burnStrategistStake(address _strategist, uint256 _amount) external override {\\n _onlyStrategy();\\n if (_amount >= balanceOf(_strategist)) {\\n // Avoid underflow condition\\n _amount = balanceOf(_strategist);\\n }\\n _burn(_strategist, _amount);\\n }\\n\\n /* ============ External Getter Functions ============ */\\n\\n /**\\n * Gets current strategies\\n *\\n * @return address[] Returns list of addresses\\n */\\n\\n function getStrategies() external view override returns (address[] memory) {\\n return strategies;\\n }\\n\\n /**\\n * Gets finalized strategies\\n *\\n * @return address[] Returns list of addresses\\n */\\n\\n function getFinalizedStrategies() external view override returns (address[] memory) {\\n return finalizedStrategies;\\n }\\n\\n function isStrategyActiveInGarden(address _strategy) external view override returns (bool) {\\n return strategyMapping[_strategy];\\n }\\n\\n function getContributor(address _contributor)\\n external\\n view\\n override\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n )\\n {\\n Contributor storage contributor = contributors[_contributor];\\n return (\\n contributor.lastDepositAt,\\n contributor.initialDepositAt,\\n contributor.claimedAt,\\n contributor.claimedBABL,\\n contributor.claimedRewards,\\n contributor.withdrawnSince\\n );\\n }\\n\\n /**\\n * Get the expected reserve asset to be withdrawaled\\n *\\n * @param _gardenTokenQuantity Quantity of Garden tokens to withdrawal\\n *\\n * @return uint256 Expected reserve asset quantity withdrawaled\\n */\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity)\\n external\\n view\\n override\\n returns (uint256)\\n {\\n (, uint256 netReserveFlows) =\\n _getFees(_getWithdrawalReserveQuantity(reserveAsset, _gardenTokenQuantity), false);\\n\\n return netReserveFlows;\\n }\\n\\n /**\\n * Checks balance locked for strategists and voters in active strategies\\n *\\n * @param _contributor Address of the account\\n *\\n * @return uint256 Returns the amount of locked garden tokens for the account\\n */\\n function getLockedBalance(address _contributor) external view override returns (uint256) {\\n uint256 lockedAmount;\\n for (uint256 i = 0; i < strategies.length; i++) {\\n IStrategy strategy = IStrategy(strategies[i]);\\n uint256 votes = uint256(Math.abs(strategy.getUserVotes(_contributor)));\\n if (votes > 0) {\\n lockedAmount = lockedAmount.add(votes);\\n }\\n }\\n // Avoid overflows if off-chain voting system fails\\n if (balanceOf(_contributor) < lockedAmount) lockedAmount = balanceOf(_contributor);\\n return lockedAmount;\\n }\\n\\n function getGardenTokenMintQuantity(\\n uint256 _reserveAssetQuantity,\\n bool isDeposit // Value of reserve asset net of fees\\n ) public view override returns (uint256) {\\n // Get valuation of the Garden with the quote asset as the reserve asset.\\n // Reverts if price is not found\\n uint256 baseUnits = uint256(10)**ERC20Upgradeable(reserveAsset).decimals();\\n uint256 normalizedReserveQuantity = _reserveAssetQuantity.preciseDiv(baseUnits);\\n // First deposit\\n if (totalSupply() == 0) {\\n return normalizedReserveQuantity;\\n }\\n uint256 gardenValuationPerToken =\\n IGardenValuer(IBabController(controller).gardenValuer()).calculateGardenValuation(\\n address(this),\\n reserveAsset\\n );\\n if (isDeposit) {\\n gardenValuationPerToken = gardenValuationPerToken.sub(normalizedReserveQuantity.preciseDiv(totalSupply()));\\n }\\n return normalizedReserveQuantity.preciseDiv(gardenValuationPerToken);\\n }\\n\\n // solhint-disable-next-line\\n receive() external payable {}\\n\\n /* ============ Modifiers ============ */\\n\\n // Replaced by internal functions due to contract size limit of 24KB\\n\\n /* ============ Internal Functions ============ */\\n\\n function _onlyContributor() private view {\\n _require(balanceOf(msg.sender) > 0, Errors.ONLY_CONTRIBUTOR);\\n }\\n\\n /**\\n * Throws if the sender is not an strategy of this garden\\n */\\n function _onlyStrategy() private view {\\n _require(strategyMapping[msg.sender], Errors.ONLY_STRATEGY);\\n }\\n\\n /**\\n * Throws if the garden is not active\\n */\\n function _onlyActive() private view {\\n _require(active, Errors.ONLY_ACTIVE);\\n }\\n\\n /**\\n * Function that mints the appropriate garden tokens along with the Garden NFT\\n * @param _to Address to mint the tokens\\n * @param _reserveAssetQuantity Amount of garden tokens\\n * @param _newPrincipal New principal for that user\\n * @param _protocolFees Protocol Fees Paid\\n */\\n function _mintGardenTokens(\\n address _to,\\n uint256 _reserveAssetQuantity,\\n uint256 _newPrincipal,\\n uint256 _protocolFees\\n ) private {\\n uint256 previousBalance = balanceOf(_to);\\n _mint(_to, getGardenTokenMintQuantity(_reserveAssetQuantity, true));\\n _updateContributorDepositInfo(_to, previousBalance);\\n principal = _newPrincipal;\\n // Mint the garden NFT\\n IGardenNFT(IBabController(controller).gardenNFT()).grantGardenNFT(_to);\\n _require(totalSupply() > 0, Errors.MIN_LIQUIDITY);\\n emit GardenDeposit(_to, msg.value, _reserveAssetQuantity, _protocolFees, block.timestamp);\\n }\\n\\n /**\\n * When the window of withdrawals finishes, we need to make the capital available again for investments\\n * We still keep the profits aside.\\n */\\n function _reenableReserveForStrategies() private {\\n if (block.timestamp >= withdrawalsOpenUntil) {\\n withdrawalsOpenUntil = 0;\\n reserveAssetPrincipalWindow = 0;\\n }\\n }\\n\\n /**\\n * Check if the fund has reserve amount available for withdrawals.\\n * If it returns false, reserve pool would be available.\\n * @param _contributor Address of the contributors\\n * @param _amount Amount of ETH to withdraw\\n */\\n function _canWithdrawReserveAmount(address _contributor, uint256 _amount) private view returns (bool) {\\n // Reserve rewards cannot be withdrawn. Only claimed\\n uint256 liquidReserve = IERC20(reserveAsset).balanceOf(address(this));\\n _require(liquidReserve >= _amount, Errors.NOT_ENOUGH_RESERVE);\\n\\n // Withdrawal open\\n if (block.timestamp <= withdrawalsOpenUntil) {\\n // There is a window but there is more than needed\\n if (liquidReserve > reserveAssetPrincipalWindow.add(_amount)) {\\n return true;\\n }\\n IRewardsDistributor rewardsDistributor =\\n IRewardsDistributor(IBabController(controller).rewardsDistributor());\\n // Pro rata withdrawals\\n uint256 contributorPower =\\n rewardsDistributor.getContributorPower(\\n address(this),\\n _contributor,\\n contributors[_contributor].initialDepositAt,\\n block.timestamp\\n );\\n return reserveAssetPrincipalWindow.preciseMul(contributorPower) >= _amount;\\n } else {\\n // Not in a withdrawal window. Check that there is enough reserve\\n return liquidReserve >= _amount;\\n }\\n }\\n\\n /**\\n * Gets the total active capital currently invested in strategies\\n *\\n * @return uint256 Total amount active\\n * @return uint256 Total amount active in the largest strategy\\n * @return address Address of the largest strategy\\n */\\n function _getActiveCapital()\\n private\\n view\\n returns (\\n uint256,\\n uint256,\\n address\\n )\\n {\\n uint256 totalActiveCapital;\\n uint256 maxAllocation;\\n address maxStrategy = address(0);\\n for (uint8 i = 0; i < strategies.length; i++) {\\n IStrategy strategy = IStrategy(strategies[i]);\\n if (strategy.isStrategyActive()) {\\n uint256 allocation = strategy.capitalAllocated();\\n totalActiveCapital = totalActiveCapital.add(allocation);\\n if (allocation > maxAllocation) {\\n maxAllocation = allocation;\\n maxStrategy = strategies[i];\\n }\\n }\\n }\\n return (totalActiveCapital, maxAllocation, maxStrategy);\\n }\\n\\n /**\\n * Pays the _feeQuantity from the _garden denominated in _token to the protocol fee recipient\\n * @param _token Address of the token to pay with\\n * @param _feeQuantity Fee to transfer\\n */\\n function payProtocolFeeFromGarden(address _token, uint256 _feeQuantity) private {\\n IERC20(_token).safeTransfer(IBabController(controller).treasury(), _feeQuantity);\\n }\\n\\n // Disable garden token transfers. Allow minting and burning.\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 _amount\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, _amount);\\n _require(\\n from == address(0) ||\\n to == address(0) ||\\n (IBabController(controller).gardenTokensTransfersEnabled() && !guestListEnabled),\\n Errors.GARDEN_TRANSFERS_DISABLED\\n );\\n }\\n\\n /**\\n * Aux function to withdraw from a garden\\n */\\n function _withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to\\n ) private {\\n // Withdrawal amount has to be equal or less than msg.sender balance\\n _require(_gardenTokenQuantity <= balanceOf(msg.sender), Errors.MSG_SENDER_TOKENS_DO_NOT_MATCH);\\n // Flashloan protection\\n _require(\\n block.timestamp.sub(contributors[msg.sender].lastDepositAt) >= depositHardlock,\\n Errors.DEPOSIT_HARDLOCK\\n );\\n _require(\\n _gardenTokenQuantity <= balanceOf(msg.sender).sub(this.getLockedBalance(msg.sender)),\\n Errors.TOKENS_STAKED\\n ); // Strategists and Voters cannot withdraw locked stake while in active strategies\\n\\n _reenableReserveForStrategies();\\n uint256 reserveAssetQuantity = _getWithdrawalReserveQuantity(reserveAsset, _gardenTokenQuantity);\\n\\n (uint256 protocolFees, uint256 netFlowQuantity) = _getFees(reserveAssetQuantity, false);\\n\\n uint256 newGardenTokenSupply = totalSupply().sub(_gardenTokenQuantity);\\n\\n _require(_canWithdrawReserveAmount(msg.sender, netFlowQuantity), Errors.MIN_LIQUIDITY);\\n\\n // Check that new supply is more than min supply needed for withdrawal\\n // Note: A min supply amount is needed to avoid division by 0 when withdrawaling garden token to 0\\n _require(newGardenTokenSupply >= minGardenTokenSupply, Errors.MIN_TOKEN_SUPPLY);\\n _require(netFlowQuantity >= _minReserveReceiveQuantity, Errors.MIN_TOKEN_SUPPLY);\\n\\n _burn(msg.sender, _gardenTokenQuantity);\\n\\n if (reserveAsset == WETH) {\\n // Check that the withdrawal is possible\\n // Unwrap WETH if ETH balance lower than netFlowQuantity\\n if (address(this).balance < netFlowQuantity) {\\n IWETH(WETH).withdraw(netFlowQuantity.sub(address(this).balance));\\n }\\n // Send ETH\\n Address.sendValue(_to, netFlowQuantity);\\n } else {\\n // Ssend reserve asset\\n IERC20(reserveAsset).safeTransfer(msg.sender, netFlowQuantity);\\n }\\n\\n _updateContributorWithdrawalInfo(netFlowQuantity);\\n payProtocolFeeFromGarden(reserveAsset, protocolFees);\\n\\n uint256 outflow = netFlowQuantity.add(protocolFees);\\n\\n // Required withdrawable quantity is greater than existing collateral\\n _require(principal >= outflow, Errors.BALANCE_TOO_LOW);\\n principal = principal.sub(outflow);\\n\\n emit GardenWithdrawal(msg.sender, _to, netFlowQuantity, _gardenTokenQuantity, protocolFees, block.timestamp);\\n }\\n\\n function _receiveReserveAsset(uint256 _reserveAssetQuantity) private {\\n _require(_reserveAssetQuantity >= minContribution, Errors.MIN_CONTRIBUTION);\\n // If reserve asset is WETH wrap it\\n uint256 reserveAssetBalance = IERC20(reserveAsset).balanceOf(address(this));\\n if (reserveAsset == WETH && msg.value > 0) {\\n IWETH(WETH).deposit{value: msg.value}();\\n } else {\\n // Transfer ERC20 to the garden\\n IERC20(reserveAsset).safeTransferFrom(msg.sender, address(this), _reserveAssetQuantity);\\n }\\n // Make sure we received the reserve asset\\n _require(\\n IERC20(reserveAsset).balanceOf(address(this)).sub(reserveAssetBalance) == _reserveAssetQuantity,\\n Errors.MSG_VALUE_DO_NOT_MATCH\\n );\\n }\\n\\n /**\\n * Returns the fees attributed to the manager and the protocol. The fees are calculated as follows:\\n *\\n * Protocol Fee = (% direct fee %) * reserveAssetQuantity\\n *\\n * @param _reserveAssetQuantity Quantity of reserve asset to calculate fees from\\n * @param _isDeposit Boolean that is true when it is a deposit\\n *\\n * @return uint256 Fees paid to the protocol in reserve asset\\n * @return uint256 Net reserve to user net of fees\\n */\\n function _getFees(uint256 _reserveAssetQuantity, bool _isDeposit) private view returns (uint256, uint256) {\\n // Get protocol fee percentages\\n uint256 protocolFeePercentage =\\n _isDeposit\\n ? IBabController(controller).protocolDepositGardenTokenFee()\\n : IBabController(controller).protocolWithdrawalGardenTokenFee();\\n\\n // Calculate total notional fees\\n uint256 protocolFees = protocolFeePercentage.preciseMul(_reserveAssetQuantity);\\n return (protocolFees, _reserveAssetQuantity.sub(protocolFees));\\n }\\n\\n function _getWithdrawalReserveQuantity(address _reserveAsset, uint256 _gardenTokenQuantity)\\n private\\n view\\n returns (uint256)\\n {\\n // Get valuation of the Garden with the quote asset as the reserve asset. Returns value in precise units (10e18)\\n // Reverts if price is not found\\n uint256 gardenValuationPerToken =\\n IGardenValuer(IBabController(controller).gardenValuer()).calculateGardenValuation(\\n address(this),\\n _reserveAsset\\n );\\n\\n uint256 totalWithdrawalValueInPreciseUnits = _gardenTokenQuantity.preciseMul(gardenValuationPerToken);\\n uint256 prePremiumReserveQuantity =\\n totalWithdrawalValueInPreciseUnits.preciseMul(10**ERC20Upgradeable(_reserveAsset).decimals());\\n\\n return prePremiumReserveQuantity;\\n }\\n\\n /**\\n * Updates the contributor info in the array\\n */\\n function _updateContributorDepositInfo(address _contributor, uint256 previousBalance) private {\\n Contributor storage contributor = contributors[_contributor];\\n // If new contributor, create one, increment count, and set the current TS\\n if (previousBalance == 0 || contributor.initialDepositAt == 0) {\\n _require(totalContributors < maxContributors, Errors.MAX_CONTRIBUTORS);\\n totalContributors = totalContributors.add(1);\\n contributor.initialDepositAt = block.timestamp;\\n }\\n // We make checkpoints around contributor deposits to avoid fast loans and give the right rewards afterwards\\n\\n contributor.lastDepositAt = block.timestamp;\\n IRewardsDistributor rewardsDistributor = IRewardsDistributor(IBabController(controller).rewardsDistributor());\\n rewardsDistributor.updateGardenPower(address(this), pid);\\n rewardsDistributor.setContributorTimestampParams(address(this), _contributor, previousBalance, true, pid); // true = deposit\\n pid++;\\n }\\n\\n /**\\n * Updates the contributor info in the array\\n */\\n function _updateContributorWithdrawalInfo(uint256 _netflowQuantity) private {\\n Contributor storage contributor = contributors[msg.sender];\\n // If sold everything\\n if (balanceOf(msg.sender) == 0) {\\n contributor.lastDepositAt = 0;\\n contributor.initialDepositAt = 0;\\n contributor.withdrawnSince = 0;\\n //delete contributor.timeListPointer;\\n totalContributors = totalContributors.sub(1);\\n } else {\\n contributor.withdrawnSince = contributor.withdrawnSince.add(_netflowQuantity);\\n }\\n IRewardsDistributor rewardsDistributor = IRewardsDistributor(IBabController(controller).rewardsDistributor());\\n rewardsDistributor.updateGardenPower(address(this), pid);\\n rewardsDistributor.setContributorTimestampParams(address(this), msg.sender, 0, false, pid); // false = withdraw\\n pid++;\\n }\\n}\\n\",\"keccak256\":\"0x37a30dbfcf56d2f101514d8d13c4d97c62b92b02b94b60b063976dfb65e908cd\",\"license\":\"Apache License\"},\"contracts/gardens/GardenFactory.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {Clones} from '@openzeppelin/contracts/proxy/Clones.sol';\\n\\nimport {IGardenFactory} from '../interfaces/IGardenFactory.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {Garden} from './Garden.sol';\\nimport {GardenNFT} from './GardenNFT.sol';\\n\\n/**\\n * @title GardenFactory\\n * @author Babylon Finance\\n *\\n * Factory to create garden contracts\\n */\\ncontract GardenFactory is IGardenFactory {\\n address private immutable controller;\\n address private immutable garden;\\n\\n constructor(address _controller) {\\n require(_controller != address(0), 'Controller is zero');\\n\\n controller = _controller;\\n garden = address(new Garden());\\n }\\n\\n /**\\n * Creates a garden using minimal proxies\\n * @param _reserveAsset Address of the reserve asset ERC20\\n * @param _creator Address of the creator\\n * @param _name Name of the Garden\\n * @param _symbol Symbol of the Garden\\n * @param _tokenURI URL of the garden NFT JSON\\n * @param _seed Seed to regenerate the garden NFT\\n * @param _gardenParams Array of numeric params in the garden\\n * @param _initialContribution Initial Contribution by the Gardener\\n */\\n function createGarden(\\n address _reserveAsset,\\n address _creator,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external override returns (address) {\\n require(msg.sender == controller, 'Only the controller can create gardens');\\n address payable clone = payable(Clones.clone(garden));\\n Garden(clone).initialize(\\n _reserveAsset,\\n controller,\\n _creator,\\n _name,\\n _symbol,\\n _gardenParams,\\n _initialContribution\\n );\\n GardenNFT(IBabController(controller).gardenNFT()).saveGardenURIAndSeed(clone, _tokenURI, _seed);\\n return clone;\\n }\\n}\\n\",\"keccak256\":\"0xc3314e2c4d13595895ec7a83c2d67195012cf28af555029df015659aae4a4300\",\"license\":\"Apache License\"},\"contracts/gardens/GardenNFT.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n//\\nimport {ERC721} from '@openzeppelin/contracts/token/ERC721/ERC721.sol';\\nimport {Counters} from '@openzeppelin/contracts/utils/Counters.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {IGardenNFT} from '../interfaces/IGardenNFT.sol';\\n\\n/**\\n * @title GardenNFT\\n * @author Babylon Finance\\n *\\n * Contract the NFT for each Garden\\n */\\ncontract GardenNFT is ERC721, IGardenNFT {\\n using Counters for Counters.Counter;\\n\\n /* ============ Events ============ */\\n\\n event GardenNFTAwarded(address indexed _member, uint256 indexed _newItemId);\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlyGarden {\\n require(\\n controller.isSystemContract(msg.sender) && IGarden(msg.sender).controller() == address(controller),\\n 'Only the garden can mint the NFT'\\n );\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the Controller contract\\n IBabController public controller;\\n\\n Counters.Counter private _tokenIds;\\n mapping(address => string) public override gardenTokenURIs;\\n mapping(address => uint256) public override gardenSeeds;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Sets the protocol controller\\n *\\n * @param _controller Address of controller contract\\n * @param _name Name of the garden\\n * @param _symbol Symbol of the garden\\n */\\n constructor(\\n address _controller,\\n string memory _name,\\n string memory _symbol\\n ) ERC721(_name, _symbol) {\\n require(address(_controller) != address(0), 'Controller must exist');\\n controller = IBabController(_controller);\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Awards the garden NFT to a user and gives him access to a specific garden\\n *\\n * @param _user Address of the user\\n */\\n function grantGardenNFT(address _user) external override onlyGarden returns (uint256) {\\n require(address(_user) != address(0), 'User must exist');\\n _tokenIds.increment();\\n uint256 newItemId = _tokenIds.current();\\n _safeMint(_user, newItemId);\\n _setTokenURI(newItemId, gardenTokenURIs[msg.sender]);\\n emit GardenNFTAwarded(_user, newItemId);\\n return newItemId;\\n }\\n\\n /**\\n * Saves the Garden URI and seed\\n *\\n * @param _garden Address of the garden\\n * @param _gardenTokenURI Garden Token URI\\n */\\n function saveGardenURIAndSeed(\\n address _garden,\\n string memory _gardenTokenURI,\\n uint256 _seed\\n ) external override {\\n require(controller.isSystemContract(msg.sender), 'Only a system contract can call this');\\n gardenTokenURIs[_garden] = _gardenTokenURI;\\n gardenSeeds[_garden] = _seed;\\n }\\n}\\n\",\"keccak256\":\"0xceb667327c5e9b4e3e218b7551102c12ce647b0ff82a1eb680b875820209aacc\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editGardenNFT(address _newGardenNFT) external;\\n\\n function editStrategyNFT(address _newStrategyNFT) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function editUniswapFactory(address _newUniswapFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\\n\\n function maxContributorsPerGarden() external view returns (uint256);\\n\\n function gardenCreationIsOpen() external view returns (bool);\\n\\n function openPublicGardenCreation() external;\\n\\n function setMaxContributorsPerGarden(uint256 _newMax) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function gardenNFT() external view returns (address);\\n\\n function strategyNFT() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\\n\\n function uniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0xdee5a27301c24f507d312f32249487fa9b0a756062a7e479405a1d1ee9ee7bb8\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function isGardenStrategy(address _strategy) external view returns (bool);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategyActiveInGarden(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to,\\n bool _withPenalty\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x88f1786ffee23e386aaa1735177912e1b5a7cdd440dafe52fb139fe50fd621b4\",\"license\":\"Apache License\"},\"contracts/interfaces/IGardenFactory.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IIntegration} from './IIntegration.sol';\\n\\n/**\\n * @title IGardenFactory\\n * @author Babylon Finance\\n *\\n * Interface for the garden factory\\n */\\ninterface IGardenFactory {\\n function createGarden(\\n address _reserveAsset,\\n address _creator,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external returns (address);\\n}\\n\",\"keccak256\":\"0x02b610c9190d50e1d940e44e3d23c143fb1e8a6fea7fabf32deea75a85398f83\",\"license\":\"Apache License\"},\"contracts/interfaces/IGardenNFT.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from './IGarden.sol';\\nimport {IBabController} from './IBabController.sol';\\n\\n/**\\n * @title IGardenNFT\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden NFT.\\n */\\ninterface IGardenNFT {\\n function grantGardenNFT(address _user) external returns (uint256);\\n\\n function saveGardenURIAndSeed(\\n address _garden,\\n string memory _gardenTokenURI,\\n uint256 _seed\\n ) external;\\n\\n function gardenTokenURIs(address _garden) external view returns (string memory);\\n\\n function gardenSeeds(address _garden) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf8549547423323ef0c5c18a6b6e5d6803f0f41020aaad34bcc1d0dd819ebc71b\",\"license\":\"Apache License\"},\"contracts/interfaces/IGardenValuer.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\ninterface IGardenValuer {\\n function calculateGardenValuation(address _garden, address _quoteAsset) external view returns (uint256);\\n\\n function getLossesGarden(address _garden, uint256 _since) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xdf2ef07a358cfabb034d966e3e6c7dbf963bd4473c910ca2abcfcf5cce72c75c\",\"license\":\"Apache License\"},\"contracts/interfaces/IIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIntegration\\n * @author Babylon Finance\\n *\\n * Interface for protocol integrations\\n */\\ninterface IIntegration {\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xee03c9274ddf3257e3bfd2bb229fea3412c9105f178e64174f59efeafd53182c\",\"license\":\"Apache License\"},\"contracts/interfaces/IIshtarGate.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIshtarGate\\n * @author Babylon Finance\\n *\\n * Interface for interacting with the Gate Guestlist NFT\\n */\\ninterface IIshtarGate {\\n /* ============ Functions ============ */\\n\\n function setGardenAccess(\\n address _user,\\n address _garden,\\n uint8 _permission\\n ) external returns (uint256);\\n\\n function setCreatorPermissions(address _user, bool _canCreate) external returns (uint256);\\n\\n function grantGardenAccessBatch(\\n address _garden,\\n address[] calldata _users,\\n uint8[] calldata _perms\\n ) external returns (bool);\\n\\n function maxNumberOfInvites() external view returns (uint256);\\n\\n function tokenURI() external view returns (string memory);\\n\\n function setMaxNumberOfInvites(uint256 _maxNumberOfInvites) external;\\n\\n function updateGardenURI(string memory _tokenURI) external;\\n\\n function grantCreatorsInBatch(address[] calldata _users, bool[] calldata _perms) external returns (bool);\\n\\n function canCreate(address _user) external view returns (bool);\\n\\n function canJoinAGarden(address _garden, address _user) external view returns (bool);\\n\\n function canVoteInAGarden(address _garden, address _user) external view returns (bool);\\n\\n function canAddStrategiesInAGarden(address _garden, address _user) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x0731159ca37445441424ec07de68ac1347a6a3c4559eed6db7682a6018660d63\",\"license\":\"Apache License\"},\"contracts/interfaces/IRewardsDistributor.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IRewardsDistributor\\n * @author Babylon Finance\\n *\\n * Interface for the distribute rewards of the BABL Mining Program.\\n */\\n\\ninterface IRewardsDistributor {\\n // Structs\\n struct PrincipalPerTimestamp {\\n uint256 principal;\\n uint256 time;\\n uint256 timeListPointer;\\n }\\n\\n function protocolPrincipal() external view returns (uint256);\\n\\n function pid() external view returns (uint256);\\n\\n // solhint-disable-next-line\\n function EPOCH_DURATION() external pure returns (uint256);\\n\\n // solhint-disable-next-line\\n function START_TIME() external view returns (uint256);\\n\\n // solhint-disable-next-line\\n function Q1_REWARDS() external pure returns (uint256);\\n\\n // solhint-disable-next-line\\n function DECAY_RATE() external pure returns (uint256);\\n\\n function addProtocolPrincipal(uint256 _capital) external;\\n\\n function substractProtocolPrincipal(uint256 _capital) external;\\n\\n function getStrategyRewards(address _strategy) external returns (uint96);\\n\\n function sendTokensToContributor(address _to, uint96 _amount) external;\\n\\n function getRewards(\\n address _garden,\\n address _contributor,\\n address[] calldata _finalizedStrategies\\n ) external view returns (uint256, uint96);\\n\\n function getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) external view returns (uint256);\\n\\n /**\\n function getContributor(address _garden, address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256[] memory,\\n uint256\\n );\\n */\\n function updateGardenPower(address _garden, uint256 _pid) external;\\n\\n function setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw,\\n uint256 _pid\\n ) external;\\n\\n function tokenSupplyPerQuarter(uint256 quarter) external view returns (uint96);\\n\\n function checkProtocol(uint256 _time)\\n external\\n view\\n returns (\\n uint256 principal,\\n uint256 time,\\n uint256 quarterBelonging,\\n uint256 timeListPointer,\\n uint256 power\\n );\\n\\n function checkQuarter(uint256 _num)\\n external\\n view\\n returns (\\n uint256 quarterPrincipal,\\n uint256 quarterNumber,\\n uint256 quarterPower,\\n uint96 supplyPerQuarter\\n );\\n}\\n\",\"keccak256\":\"0xc68eb7826b0174d4f6dff50320abb2cd958a978d4537c57867dd828dc2798662\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n address,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x850597ec9a68eb86f31f13b6b77d3b31350b4ed3d0019dedfbd3550ad1a1d9e2\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategyFactory.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IIntegration} from './IIntegration.sol';\\n\\n/**\\n * @title IStrategyFactory\\n * @author Babylon Finance\\n *\\n * Interface for the strategy factory\\n */\\ninterface IStrategyFactory {\\n function createStrategy(\\n string memory _name,\\n string memory _symbol,\\n address _strategist,\\n address _garden,\\n uint256[] calldata _stratParams\\n ) external returns (address);\\n}\\n\",\"keccak256\":\"0x795c4903f51cf517c84cfbe9e628f7d0f2067c4b91f3cd31d6cff3f9842bb117\",\"license\":\"Apache License\"},\"contracts/interfaces/external/weth/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface IWETH is IERC20 {\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n}\\n\",\"keccak256\":\"0xacc7980a650b7a753ee51f1bbc0ae4f641e84261bcc02cfdaf87ee8136483684\",\"license\":\"MIT\"},\"contracts/lib/AddressArrayUtils.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n/**\\n * @title AddressArrayUtils\\n * @author Set Protocol\\n *\\n * Utility functions to handle Address Arrays\\n */\\nlibrary AddressArrayUtils {\\n /**\\n * Finds the index of the first occurrence of the given element.\\n * @param A The input array to search\\n * @param a The value to find\\n * @return Returns (index and isIn) for the first occurrence starting from index 0\\n */\\n function indexOf(address[] memory A, address a) internal pure returns (uint256, bool) {\\n uint256 length = A.length;\\n for (uint256 i = 0; i < length; i++) {\\n if (A[i] == a) {\\n return (i, true);\\n }\\n }\\n return (uint256(-1), false);\\n }\\n\\n /**\\n * Returns true if the value is present in the list. Uses indexOf internally.\\n * @param A The input array to search\\n * @param a The value to find\\n * @return Returns isIn for the first occurrence starting from index 0\\n */\\n function contains(address[] memory A, address a) internal pure returns (bool) {\\n (, bool isIn) = indexOf(A, a);\\n return isIn;\\n }\\n\\n /**\\n * Returns true if there are 2 elements that are the same in an array\\n * @param A The input array to search\\n * @return Returns boolean for the first occurrence of a duplicate\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n require(A.length > 0, 'A is empty');\\n\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n address current = A[i];\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (current == A[j]) {\\n return true;\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @param A The input array to search\\n * @param a The address to remove\\n * @return Returns the array with the object removed.\\n */\\n function remove(address[] memory A, address a) internal pure returns (address[] memory) {\\n (uint256 index, bool isIn) = indexOf(A, a);\\n if (!isIn) {\\n revert('Address not in array.');\\n } else {\\n (address[] memory _A, ) = pop(A, index);\\n return _A;\\n }\\n }\\n\\n /**\\n * Removes specified index from array\\n * @param A The input array to search\\n * @param index The index to remove\\n * @return Returns the new array and the removed entry\\n */\\n function pop(address[] memory A, uint256 index) internal pure returns (address[] memory, address) {\\n uint256 length = A.length;\\n require(index < A.length, 'Index must be < A length');\\n address[] memory newAddresses = new address[](length - 1);\\n for (uint256 i = 0; i < index; i++) {\\n newAddresses[i] = A[i];\\n }\\n for (uint256 j = index + 1; j < length; j++) {\\n newAddresses[j - 1] = A[j];\\n }\\n return (newAddresses, A[index]);\\n }\\n\\n /**\\n * Returns the combination of the two arrays\\n * @param A The first array\\n * @param B The second array\\n * @return Returns A extended by B\\n */\\n function extend(address[] memory A, address[] memory B) internal pure returns (address[] memory) {\\n uint256 aLength = A.length;\\n uint256 bLength = B.length;\\n address[] memory newAddresses = new address[](aLength + bLength);\\n for (uint256 i = 0; i < aLength; i++) {\\n newAddresses[i] = A[i];\\n }\\n for (uint256 j = 0; j < bLength; j++) {\\n newAddresses[aLength + j] = B[j];\\n }\\n return newAddresses;\\n }\\n}\\n\",\"keccak256\":\"0x409127cd8cadb573e5de48fd992efbd8b0f1e243d235abc3c5f2fa873195c16a\",\"license\":\"Apache License\"},\"contracts/lib/BabylonErrors.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n// solhint-disable\\n\\n/**\\n * @notice Forked from https://github.com/balancer-labs/balancer-core-v2/blob/master/contracts/lib/helpers/BalancerErrors.sol\\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 // 'BAB#{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 \\\"BAB#\\\" part is a known constant\\n // (0x42414223): 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(0x42414223000000, 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 // Max deposit limit needs to be under the limit\\n uint256 internal constant MAX_DEPOSIT_LIMIT = 0;\\n // Creator needs to deposit\\n uint256 internal constant MIN_CONTRIBUTION = 1;\\n // Min Garden token supply >= 0\\n uint256 internal constant MIN_TOKEN_SUPPLY = 2;\\n // Deposit hardlock needs to be at least 1 block\\n uint256 internal constant DEPOSIT_HARDLOCK = 3;\\n // Needs to be at least the minimum\\n uint256 internal constant MIN_LIQUIDITY = 4;\\n // _reserveAssetQuantity is not equal to msg.value\\n uint256 internal constant MSG_VALUE_DO_NOT_MATCH = 5;\\n // Withdrawal amount has to be equal or less than msg.sender balance\\n uint256 internal constant MSG_SENDER_TOKENS_DO_NOT_MATCH = 6;\\n // Tokens are staked\\n uint256 internal constant TOKENS_STAKED = 7;\\n // Balance too low\\n uint256 internal constant BALANCE_TOO_LOW = 8;\\n // msg.sender doesn't have enough tokens\\n uint256 internal constant MSG_SENDER_TOKENS_TOO_LOW = 9;\\n // There is an open redemption window already\\n uint256 internal constant REDEMPTION_OPENED_ALREADY = 10;\\n // Cannot request twice in the same window\\n uint256 internal constant ALREADY_REQUESTED = 11;\\n // Rewards and profits already claimed\\n uint256 internal constant ALREADY_CLAIMED = 12;\\n // Value have to be greater than zero\\n uint256 internal constant GREATER_THAN_ZERO = 13;\\n // Must be reserve asset\\n uint256 internal constant MUST_BE_RESERVE_ASSET = 14;\\n // Only contributors allowed\\n uint256 internal constant ONLY_CONTRIBUTOR = 15;\\n // Only controller allowed\\n uint256 internal constant ONLY_CONTROLLER = 16;\\n // Only creator allowed\\n uint256 internal constant ONLY_CREATOR = 17;\\n // Only keeper allowed\\n uint256 internal constant ONLY_KEEPER = 18;\\n // Fee is too high\\n uint256 internal constant FEE_TOO_HIGH = 19;\\n // Only strategy allowed\\n uint256 internal constant ONLY_STRATEGY = 20;\\n // Only active allowed\\n uint256 internal constant ONLY_ACTIVE = 21;\\n // Only inactive allowed\\n uint256 internal constant ONLY_INACTIVE = 22;\\n // Address should be not zero address\\n uint256 internal constant ADDRESS_IS_ZERO = 23;\\n // Not within range\\n uint256 internal constant NOT_IN_RANGE = 24;\\n // Value is too low\\n uint256 internal constant VALUE_TOO_LOW = 25;\\n // Value is too high\\n uint256 internal constant VALUE_TOO_HIGH = 26;\\n // Only strategy or protocol allowed\\n uint256 internal constant ONLY_STRATEGY_OR_CONTROLLER = 27;\\n // Normal withdraw possible\\n uint256 internal constant NORMAL_WITHDRAWAL_POSSIBLE = 28;\\n // User does not have permissions to join garden\\n uint256 internal constant USER_CANNOT_JOIN = 29;\\n // User does not have permissions to add strategies in garden\\n uint256 internal constant USER_CANNOT_ADD_STRATEGIES = 30;\\n // Only Protocol or garden\\n uint256 internal constant ONLY_PROTOCOL_OR_GARDEN = 31;\\n // Only Strategist\\n uint256 internal constant ONLY_STRATEGIST = 32;\\n // Only Integration\\n uint256 internal constant ONLY_INTEGRATION = 33;\\n // Only garden and data not set\\n uint256 internal constant ONLY_GARDEN_AND_DATA_NOT_SET = 34;\\n // Only active garden\\n uint256 internal constant ONLY_ACTIVE_GARDEN = 35;\\n // Contract is not a garden\\n uint256 internal constant NOT_A_GARDEN = 36;\\n // Not enough tokens\\n uint256 internal constant STRATEGIST_TOKENS_TOO_LOW = 37;\\n // Stake is too low\\n uint256 internal constant STAKE_HAS_TO_AT_LEAST_ONE = 38;\\n // Duration must be in range\\n uint256 internal constant DURATION_MUST_BE_IN_RANGE = 39;\\n // Max Capital Requested\\n uint256 internal constant MAX_CAPITAL_REQUESTED = 41;\\n // Votes are already resolved\\n uint256 internal constant VOTES_ALREADY_RESOLVED = 42;\\n // Voting window is closed\\n uint256 internal constant VOTING_WINDOW_IS_OVER = 43;\\n // Strategy needs to be active\\n uint256 internal constant STRATEGY_NEEDS_TO_BE_ACTIVE = 44;\\n // Max capital reached\\n uint256 internal constant MAX_CAPITAL_REACHED = 45;\\n // Capital is less then rebalance\\n uint256 internal constant CAPITAL_IS_LESS_THAN_REBALANCE = 46;\\n // Strategy is in cooldown period\\n uint256 internal constant STRATEGY_IN_COOLDOWN = 47;\\n // Strategy is not executed\\n uint256 internal constant STRATEGY_IS_NOT_EXECUTED = 48;\\n // Strategy is not over yet\\n uint256 internal constant STRATEGY_IS_NOT_OVER_YET = 49;\\n // Strategy is already finalized\\n uint256 internal constant STRATEGY_IS_ALREADY_FINALIZED = 50;\\n // No capital to unwind\\n uint256 internal constant STRATEGY_NO_CAPITAL_TO_UNWIND = 51;\\n // Strategy needs to be inactive\\n uint256 internal constant STRATEGY_NEEDS_TO_BE_INACTIVE = 52;\\n // Duration needs to be less\\n uint256 internal constant DURATION_NEEDS_TO_BE_LESS = 53;\\n // Can't sweep reserve asset\\n uint256 internal constant CANNOT_SWEEP_RESERVE_ASSET = 54;\\n // Voting window is opened\\n uint256 internal constant VOTING_WINDOW_IS_OPENED = 55;\\n // Strategy is executed\\n uint256 internal constant STRATEGY_IS_EXECUTED = 56;\\n // Min Rebalance Capital\\n uint256 internal constant MIN_REBALANCE_CAPITAL = 57;\\n // Not a valid strategy NFT\\n uint256 internal constant NOT_STRATEGY_NFT = 58;\\n // Garden Transfers Disabled\\n uint256 internal constant GARDEN_TRANSFERS_DISABLED = 59;\\n // Tokens are hardlocked\\n uint256 internal constant TOKENS_HARDLOCKED = 60;\\n // Max contributors reached\\n uint256 internal constant MAX_CONTRIBUTORS = 61;\\n // BABL Transfers Disabled\\n uint256 internal constant BABL_TRANSFERS_DISABLED = 62;\\n // Strategy duration range error\\n uint256 internal constant DURATION_RANGE = 63;\\n // Checks the min amount of voters\\n uint256 internal constant MIN_VOTERS_CHECK = 64;\\n // Ge contributor power error\\n uint256 internal constant CONTRIBUTOR_POWER_CHECK_WINDOW = 65;\\n // Not enough reserve set aside\\n uint256 internal constant NOT_ENOUGH_RESERVE = 66;\\n // Garden is already public\\n uint256 internal constant GARDEN_ALREADY_PUBLIC = 67;\\n // Withdrawal with penalty\\n uint256 internal constant WITHDRAWAL_WITH_PENALTY = 68;\\n // Withdrawal with penalty\\n uint256 internal constant ONLY_MINING_ACTIVE = 69;\\n // Overflow in supply\\n uint256 internal constant OVERFLOW_IN_SUPPLY = 70;\\n // Overflow in power\\n uint256 internal constant OVERFLOW_IN_POWER = 71;\\n // Not a system contract\\n uint256 internal constant NOT_A_SYSTEM_CONTRACT = 72;\\n // Strategy vs Garden mismatch\\n uint256 internal constant STRATEGY_GARDEN_MISMATCH = 73;\\n // Minimum quarters is 1\\n uint256 internal constant QUARTERS_MIN_1 = 74;\\n // Too many strategy operations\\n uint256 internal constant TOO_MANY_OPS = 75;\\n // Only operations\\n uint256 internal constant ONLY_OPERATION = 76;\\n // Strat params wrong length\\n uint256 internal constant STRAT_PARAMS_LENGTH = 77;\\n // Garden params wrong length\\n uint256 internal constant GARDEN_PARAMS_LENGTH = 78;\\n // Token names too long\\n uint256 internal constant NAME_TOO_LONG = 79;\\n // Contributor power overflows over garden power\\n uint256 internal constant CONTRIBUTOR_POWER_OVERFLOW = 80;\\n // Contributor power window out of bounds\\n uint256 internal constant CONTRIBUTOR_POWER_CHECK_DEPOSITS = 81;\\n}\\n\",\"keccak256\":\"0x9c9c2ea9026fe9033762f7221e2d5a91ed6b5f64cc14558b89fbd975cfb2d7b7\",\"license\":\"Apache License\"},\"contracts/lib/Math.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n// Libraries\\nimport './SafeDecimalMath.sol';\\n\\n// https://docs.synthetix.io/contracts/source/libraries/math\\nlibrary Math {\\n using SafeMath for uint256;\\n using SafeDecimalMath for uint256;\\n\\n /**\\n * @dev Uses \\\"exponentiation by squaring\\\" algorithm where cost is 0(logN)\\n * vs 0(N) for naive repeated multiplication.\\n * Calculates x^n with x as fixed-point and n as regular unsigned int.\\n * Calculates to 18 digits of precision with SafeDecimalMath.unit()\\n */\\n function powDecimal(uint256 x, uint256 n) internal pure returns (uint256) {\\n // https://mpark.github.io/programming/2014/08/18/exponentiation-by-squaring/\\n\\n uint256 result = SafeDecimalMath.unit();\\n while (n > 0) {\\n if (n % 2 != 0) {\\n result = result.multiplyDecimal(x);\\n }\\n x = x.multiplyDecimal(x);\\n n /= 2;\\n }\\n return result;\\n }\\n\\n function abs(int256 x) internal pure returns (int256) {\\n return x >= 0 ? x : -x;\\n }\\n}\\n\",\"keccak256\":\"0xc2ff8055f98dd7253df98838d870391067d9c622a68f263c942616ca8122bd93\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"contracts/lib/Safe3296.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nlibrary Safe3296 {\\n using SafeMath for uint256;\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint32\\n *\\n * @dev internal function to convert from uint256 to uint32\\n */\\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\\n require(n < 2**32, errorMessage);\\n return uint32(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint96\\n *\\n * @dev internal function to convert from uint256 to uint96\\n */\\n function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) {\\n require(n < 2**96, errorMessage);\\n return uint96(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to add two uint96 numbers\\n *\\n * @dev internal safe math function to add two uint96 numbers\\n */\\n function add96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n uint96 c = a + b;\\n require(c >= a, errorMessage);\\n return c;\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to subtract two uint96 numbers\\n *\\n * @dev internal safe math function to subtract two uint96 numbers\\n */\\n function sub96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n}\\n\",\"keccak256\":\"0x9ebf0856ab07500c9a8250d1be4b578a3e0ff454da7de67e3ab5632a7e6903c3\",\"license\":\"Apache License\"},\"contracts/lib/SafeDecimalMath.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nlibrary SafeDecimalMath {\\n using SafeMath for uint256;\\n\\n /* Number of decimal places in the representations. */\\n uint8 public constant decimals = 18;\\n uint8 public constant highPrecisionDecimals = 27;\\n\\n /* The number representing 1.0. */\\n uint256 public constant UNIT = 10**uint256(decimals);\\n\\n /* The number representing 1.0 for higher fidelity numbers. */\\n uint256 public constant PRECISE_UNIT = 10**uint256(highPrecisionDecimals);\\n uint256 private constant UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR = 10**uint256(highPrecisionDecimals - decimals);\\n\\n /**\\n * @return Provides an interface to UNIT.\\n */\\n function unit() external pure returns (uint256) {\\n return UNIT;\\n }\\n\\n /**\\n * @return Provides an interface to PRECISE_UNIT.\\n */\\n function preciseUnit() external pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @return The result of multiplying x and y, interpreting the operands as fixed-point\\n * decimals.\\n *\\n * @dev A unit factor is divided out after the product of x and y is evaluated,\\n * so that product must be less than 2**256. As this is an integer division,\\n * the internal division always rounds down. This helps save on gas. Rounding\\n * is more expensive on gas.\\n */\\n function multiplyDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\\n /* Divide by UNIT to remove the extra factor introduced by the product. */\\n return x.mul(y) / UNIT;\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of the specified precision unit.\\n *\\n * @dev The operands should be in the form of a the specified unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function _multiplyDecimalRound(\\n uint256 x,\\n uint256 y,\\n uint256 precisionUnit\\n ) private pure returns (uint256) {\\n /* Divide by UNIT to remove the extra factor introduced by the product. */\\n uint256 quotientTimesTen = x.mul(y) / (precisionUnit / 10);\\n\\n if (quotientTimesTen % 10 >= 5) {\\n quotientTimesTen += 10;\\n }\\n\\n return quotientTimesTen / 10;\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of a precise unit.\\n *\\n * @dev The operands should be in the precise unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function multiplyDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _multiplyDecimalRound(x, y, PRECISE_UNIT);\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of a standard unit.\\n *\\n * @dev The operands should be in the standard unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function multiplyDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _multiplyDecimalRound(x, y, UNIT);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is a high\\n * precision decimal.\\n *\\n * @dev y is divided after the product of x and the standard precision unit\\n * is evaluated, so the product of x and UNIT must be less than 2**256. As\\n * this is an integer division, the result is always rounded down.\\n * This helps save on gas. Rounding is more expensive on gas.\\n */\\n function divideDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\\n /* Reintroduce the UNIT factor that will be divided out by y. */\\n return x.mul(UNIT).div(y);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * decimal in the precision unit specified in the parameter.\\n *\\n * @dev y is divided after the product of x and the specified precision unit\\n * is evaluated, so the product of x and the specified precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function _divideDecimalRound(\\n uint256 x,\\n uint256 y,\\n uint256 precisionUnit\\n ) private pure returns (uint256) {\\n uint256 resultTimesTen = x.mul(precisionUnit * 10).div(y);\\n\\n if (resultTimesTen % 10 >= 5) {\\n resultTimesTen += 10;\\n }\\n\\n return resultTimesTen / 10;\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * standard precision decimal.\\n *\\n * @dev y is divided after the product of x and the standard precision unit\\n * is evaluated, so the product of x and the standard precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function divideDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _divideDecimalRound(x, y, UNIT);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * high precision decimal.\\n *\\n * @dev y is divided after the product of x and the high precision unit\\n * is evaluated, so the product of x and the high precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function divideDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _divideDecimalRound(x, y, PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Convert a standard decimal representation to a high precision one.\\n */\\n function decimalToPreciseDecimal(uint256 i) internal pure returns (uint256) {\\n return i.mul(UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR);\\n }\\n\\n /**\\n * @dev Convert a high precision decimal to a standard decimal representation.\\n */\\n function preciseDecimalToDecimal(uint256 i) internal pure returns (uint256) {\\n uint256 quotientTimesTen = i / (UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR / 10);\\n\\n if (quotientTimesTen % 10 >= 5) {\\n quotientTimesTen += 10;\\n }\\n\\n return quotientTimesTen / 10;\\n }\\n}\\n\",\"keccak256\":\"0x1372be4fa0c5813417396f128f5aa45da1cd7679e2d247a8e17d1ba5f0141253\",\"license\":\"Apache License\"}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b5060405161686c38038061686c8339818101604052602081101561003357600080fd5b50516001600160a01b038116610085576040805162461bcd60e51b8152602060048201526012602482015271436f6e74726f6c6c6572206973207a65726f60701b604482015290519081900360640190fd5b6001600160601b0319606082901b166080526040516100a3906100d6565b604051809103906000f0801580156100bf573d6000803e3d6000fd5b5060601b6001600160601b03191660a052506100e3565b615fef8061087d83390190565b60805160601c60a05160601c610767610116600039806102e3525080610280528061031b52806104c452506107676000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80638d06366f14610030575b600080fd5b610257600480360361010081101561004757600080fd5b6001600160a01b03823581169260208101359091169181019060608101604082013564010000000081111561007b57600080fd5b82018360208201111561008d57600080fd5b803590602001918460018302840111640100000000831117156100af57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561010257600080fd5b82018360208201111561011457600080fd5b8035906020019184600183028401116401000000008311171561013657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561018957600080fd5b82018360208201111561019b57600080fd5b803590602001918460018302840111640100000000831117156101bd57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295843595909490935060408101925060200135905064010000000081111561021857600080fd5b82018360208201111561022a57600080fd5b8035906020019184602083028401116401000000008311171561024c57600080fd5b919350915035610273565b604080516001600160a01b039092168252519081900360200190f35b6000336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146102dc5760405162461bcd60e51b815260040180806020018281038252602681526020018061070c6026913960400191505060405180910390fd5b60006103077f000000000000000000000000000000000000000000000000000000000000000061064b565b9050806001600160a01b0316635fe3d4ce8c7f00000000000000000000000000000000000000000000000000000000000000008d8d8d8b8b8b6040518963ffffffff1660e01b815260040180896001600160a01b03168152602001886001600160a01b03168152602001876001600160a01b03168152602001806020018060200180602001858152602001848103845289818151815260200191508051906020019080838360005b838110156103c75781810151838201526020016103af565b50505050905090810190601f1680156103f45780820380516001836020036101000a031916815260200191505b5084810383528851815288516020918201918a019080838360005b8381101561042757818101518382015260200161040f565b50505050905090810190601f1680156104545780820380516001836020036101000a031916815260200191505b508481038252878782818152602001925060200280828437600081840152601f19601f8201169050808301925050509b505050505050505050505050600060405180830381600087803b1580156104aa57600080fd5b505af11580156104be573d6000803e3d6000fd5b505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ead4c1cf6040518163ffffffff1660e01b815260040160206040518083038186803b15801561051b57600080fd5b505afa15801561052f573d6000803e3d6000fd5b505050506040513d602081101561054557600080fd5b50516040517f616ac7920000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301908152604483018a90526060602484019081528b5160648501528b51929094169363616ac7929386938d938d9390929091608490910190602086019080838360005b838110156105d65781810151838201526020016105be565b50505050905090810190601f1680156106035780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561062457600080fd5b505af1158015610638573d6000803e3d6000fd5b50929d9c50505050505050505050505050565b60006040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528260601b60148201527f5af43d82803e903d91602b57fd5bf3000000000000000000000000000000000060288201526037816000f09150506001600160a01b038116610706576040805162461bcd60e51b815260206004820152601660248201527f455243313136373a20637265617465206661696c656400000000000000000000604482015290519081900360640190fd5b91905056fe4f6e6c792074686520636f6e74726f6c6c65722063616e206372656174652067617264656e73a264697066735822122041520f490fe42d0da8583f2d052d5981c4cd87a620bf3045ea5a36769c82ee9c64736f6c63430007060033608060405267016345785d8a0000607a5534801561001c57600080fd5b506001606555615fbd80620000326000396000f3fe6080604052600436106103bc5760003560e01c806386fa5063116101f2578063b49a60bb1161010d578063cb12233b116100a0578063f251fc8c1161006f578063f251fc8c1461117b578063f77c479114611190578063f8281626146111a5578063f85cb5c8146111ba576103c3565b8063cb12233b14611101578063dd62ed3e14611116578063e2073f9014611151578063f106845414611166576103c3565b8063b918ee25116100dc578063b918ee251461108f578063b9e67539146110a4578063ba5d3078146110b9578063c4086893146110ce576103c3565b8063b49a60bb1461101e578063b55b6b0514611033578063b59adc5914611048578063b63c44e71461107a576103c3565b8063a457c2d711610185578063ac39871711610154578063ac39871714610f13578063acec338a14610f5a578063b2644e6614610f86578063b304b81514610fb9576103c3565b8063a457c2d714610e77578063a63c643d14610eb0578063a9059cbb14610ec5578063aaffadf314610efe576103c3565b806395cdbedb116101c157806395cdbedb14610dea57806395d89b4114610dff5780639ab6374214610e14578063a37aa3c314610e4d576103c3565b806386fa506314610d795780638b0e9f3f14610d8e5780638dbdbe6d14610da35780638ee330b014610dd5576103c3565b8063313ce567116102e25780635fe3d4ce116102755780637550ed18116102445780637550ed1814610d2557806376e7985414610d3a578063792e42e214610d4f5780637ce9059c14610d64576103c3565b80635fe3d4ce14610b2957806360d442ca14610cc857806365f985b614610cdd57806370a0823114610cf2576103c3565b80633d8270f5116102b15780633d8270f514610aa25780633deddb3f14610ad55780634422b0dc14610aea5780634edfb99a14610b14576103c3565b8063313ce5671461098e57806339509351146109b95780633a821925146109f25780633ad8d04d14610a25576103c3565b806318160ddd1161035a57806323b872dd1161032957806323b872dd146108b8578063250caaa8146108fb578063297ce598146109405780632befcc5c14610955576103c3565b806318160ddd146105805780631e6ea56f146105a75780631f6d49421461082857806322385e381461088e576103c3565b806306061dfa1161039657806306061dfa1461045757806306fdde031461048a578063095ea7b31461051457806317ab9f201461054d576103c3565b806301681a62146103c857806302d05d3f146103fd57806302fb0c5e1461042e576103c3565b366103c357005b600080fd5b3480156103d457600080fd5b506103fb600480360360208110156103eb57600080fd5b50356001600160a01b03166111cf565b005b34801561040957600080fd5b50610412611277565b604080516001600160a01b039092168252519081900360200190f35b34801561043a57600080fd5b50610443611286565b604080519115158252519081900360200190f35b34801561046357600080fd5b506104436004803603602081101561047a57600080fd5b50356001600160a01b0316611296565b34801561049657600080fd5b5061049f6112ab565b6040805160208082528351818301528351919283929083019185019080838360005b838110156104d95781810151838201526020016104c1565b50505050905090810190601f1680156105065780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561052057600080fd5b506104436004803603604081101561053757600080fd5b506001600160a01b038135169060200135611341565b34801561055957600080fd5b506104436004803603602081101561057057600080fd5b50356001600160a01b031661135f565b34801561058c57600080fd5b5061059561137d565b60408051918252519081900360200190f35b3480156105b357600080fd5b506103fb600480360360c08110156105ca57600080fd5b8101906020810181356401000000008111156105e557600080fd5b8201836020820111156105f757600080fd5b8035906020019184600183028401116401000000008311171561061957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561066c57600080fd5b82018360208201111561067e57600080fd5b803590602001918460018302840111640100000000831117156106a057600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156106f357600080fd5b82018360208201111561070557600080fd5b8035906020019184602083028401116401000000008311171561072757600080fd5b91939092909160208101903564010000000081111561074557600080fd5b82018360208201111561075757600080fd5b8035906020019184602083028401116401000000008311171561077957600080fd5b91939092909160208101903564010000000081111561079757600080fd5b8201836020820111156107a957600080fd5b803590602001918460208302840111640100000000831117156107cb57600080fd5b9193909290916020810190356401000000008111156107e957600080fd5b8201836020820111156107fb57600080fd5b8035906020019184602083028401116401000000008311171561081d57600080fd5b509092509050611383565b34801561083457600080fd5b5061085b6004803603602081101561084b57600080fd5b50356001600160a01b03166118e5565b604080519687526020870195909552858501939093526060850191909152608084015260a0830152519081900360c00190f35b34801561089a57600080fd5b50610595600480360360208110156108b157600080fd5b503561191a565b3480156108c457600080fd5b50610443600480360360608110156108db57600080fd5b506001600160a01b03813581169160208101359091169060400135611948565b34801561090757600080fd5b506103fb6004803603608081101561091e57600080fd5b50803590602081013590604081013590606001356001600160a01b03166119d0565b34801561094c57600080fd5b50610595611c05565b34801561096157600080fd5b506103fb6004803603604081101561097857600080fd5b506001600160a01b038135169060200135611c0b565b34801561099a57600080fd5b506109a3611c38565b6040805160ff9092168252519081900360200190f35b3480156109c557600080fd5b50610443600480360360408110156109dc57600080fd5b506001600160a01b038135169060200135611c41565b3480156109fe57600080fd5b5061044360048036036020811015610a1557600080fd5b50356001600160a01b0316611c8f565b348015610a3157600080fd5b506103fb60048036036020811015610a4857600080fd5b810190602081018135640100000000811115610a6357600080fd5b820183602082011115610a7557600080fd5b80359060200191846020830284011164010000000083111715610a9757600080fd5b509092509050611ca4565b348015610aae57600080fd5b5061085b60048036036020811015610ac557600080fd5b50356001600160a01b0316611ffd565b348015610ae157600080fd5b5061059561203a565b348015610af657600080fd5b506103fb60048036036020811015610b0d57600080fd5b5035612040565b348015610b2057600080fd5b506104436121b4565b6103fb600480360360e0811015610b3f57600080fd5b6001600160a01b0382358116926020810135821692604082013590921691810190608081016060820135640100000000811115610b7b57600080fd5b820183602082011115610b8d57600080fd5b80359060200191846001830284011164010000000083111715610baf57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050640100000000811115610c0257600080fd5b820183602082011115610c1457600080fd5b80359060200191846001830284011164010000000083111715610c3657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050640100000000811115610c8957600080fd5b820183602082011115610c9b57600080fd5b80359060200191846020830284011164010000000083111715610cbd57600080fd5b9193509150356121c4565b348015610cd457600080fd5b50610595612560565b348015610ce957600080fd5b50610595612566565b348015610cfe57600080fd5b5061059560048036036020811015610d1557600080fd5b50356001600160a01b031661256c565b348015610d3157600080fd5b50610595612587565b348015610d4657600080fd5b5061059561258d565b348015610d5b57600080fd5b50610595612592565b348015610d7057600080fd5b50610595612598565b348015610d8557600080fd5b5061059561259e565b348015610d9a57600080fd5b506105956125a4565b6103fb60048036036060811015610db957600080fd5b50803590602081013590604001356001600160a01b03166125aa565b348015610de157600080fd5b50610595612814565b348015610df657600080fd5b5061059561281a565b348015610e0b57600080fd5b5061049f612820565b348015610e2057600080fd5b506103fb60048036036040811015610e3757600080fd5b506001600160a01b038135169060200135612881565b348015610e5957600080fd5b506103fb60048036036020811015610e7057600080fd5b50356129e3565b348015610e8357600080fd5b5061044360048036036040811015610e9a57600080fd5b506001600160a01b038135169060200135612e76565b348015610ebc57600080fd5b50610595612ede565b348015610ed157600080fd5b5061044360048036036040811015610ee857600080fd5b506001600160a01b038135169060200135612ee4565b348015610f0a57600080fd5b50610595612ef8565b348015610f1f57600080fd5b506103fb60048036036080811015610f3657600080fd5b508035906020810135906001600160a01b0360408201351690606001351515612efe565b348015610f6657600080fd5b506103fb60048036036020811015610f7d57600080fd5b503515156130d7565b348015610f9257600080fd5b506103fb60048036036020811015610fa957600080fd5b50356001600160a01b031661312e565b348015610fc557600080fd5b50610fce6131d7565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561100a578181015183820152602001610ff2565b505050509050019250505060405180910390f35b34801561102a57600080fd5b50610fce613238565b34801561103f57600080fd5b50610595613298565b34801561105457600080fd5b506105956004803603604081101561106b57600080fd5b5080359060200135151561329e565b34801561108657600080fd5b5061059561348a565b34801561109b57600080fd5b50610595613490565b3480156110b057600080fd5b5061059561349c565b3480156110c557600080fd5b506105956134a2565b3480156110da57600080fd5b50610595600480360360208110156110f157600080fd5b50356001600160a01b03166134a8565b34801561110d57600080fd5b506105956135a5565b34801561112257600080fd5b506105956004803603604081101561113957600080fd5b506001600160a01b03813581169160200135166135ab565b34801561115d57600080fd5b506105956135d6565b34801561117257600080fd5b506105956135dc565b34801561118757600080fd5b506105956135e2565b34801561119c57600080fd5b506104126135e8565b3480156111b157600080fd5b506103fb6135f7565b3480156111c657600080fd5b506104126136b9565b6066546111ec906001600160a01b0383811691161415600e6136c8565b6000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561123b57600080fd5b505afa15801561124f573d6000803e3d6000fd5b505050506040513d602081101561126557600080fd5b5051905061127382826136d6565b5050565b6068546001600160a01b031681565b606854600160a01b900460ff1681565b60816020526000908152604090205460ff1681565b60368054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156113375780601f1061130c57610100808354040283529160200191611337565b820191906000526020600020905b81548152906001019060200180831161131a57829003601f168201915b5050505050905090565b600061135561134e613772565b8484613776565b5060015b92915050565b6001600160a01b031660009081526080602052604090205460ff1690565b60355490565b61138b613862565b61139361387c565b606754604080517fc8ed947f00000000000000000000000000000000000000000000000000000000815290516114b8926001600160a01b03169163c8ed947f916004808301926020929190829003018186803b1580156113f257600080fd5b505afa158015611406573d6000803e3d6000fd5b505050506040513d602081101561141c57600080fd5b5051604080517f5066c71400000000000000000000000000000000000000000000000000000000815230600482015233602482015290516001600160a01b0390921691635066c71491604480820192602092909190829003018186803b15801561148557600080fd5b505afa158015611499573d6000803e3d6000fd5b505050506040513d60208110156114af57600080fd5b5051601e6136c8565b607e546114c990601411601a6136c8565b6114d760058814604d6136c8565b606754604080517f9ef3571000000000000000000000000000000000000000000000000000000000815290516000926001600160a01b031691639ef35710916004808301926020929190829003018186803b15801561153557600080fd5b505afa158015611549573d6000803e3d6000fd5b505050506040513d602081101561155f57600080fd5b81019080805190602001909291905050506001600160a01b03166378afca3e8c8c33308e8e6040518763ffffffff1660e01b8152600401808060200180602001876001600160a01b03168152602001866001600160a01b031681526020018060200184810384528a818151815260200191508051906020019080838360005b838110156115f65781810151838201526020016115de565b50505050905090810190601f1680156116235780820380516001836020036101000a031916815260200191505b5084810383528951815289516020918201918b019080838360005b8381101561165657818101518382015260200161163e565b50505050905090810190601f1680156116835780820380516001836020036101000a031916815260200191505b508481038252868682818152602001925060200280828437600081840152601f19601f8201169050808301925050509950505050505050505050602060405180830381600087803b1580156116d757600080fd5b505af11580156116eb573d6000803e3d6000fd5b505050506040513d602081101561170157600080fd5b50516001600160a01b0381166000908152608060205260409020805460ff19166001908117909155909150611755908a908a9081811061173d57fe5b9050602002013560795461389290919063ffffffff16565b607955607e80546001810182556000919091527f0f2ada1f2dbae48ae468fe0cdb7bcda7d0cffee8545442e682273ba01a6203a701805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517fc2ea0bc40000000000000000000000000000000000000000000000000000000081526060600482019081526064820189905263c2ea0bc4918a918a918a918a918a918a918190602481019060448101906084018a60208b0280828437600083820152601f01601f19169091018581038452888152602090810191508990890280828437600083820152601f01601f19169091018581038352868152602090810191508790870280828437600081840152601f19601f8201169050808301925050509950505050505050505050600060405180830381600087803b15801561189d57600080fd5b505af11580156118b1573d6000803e3d6000fd5b5050506001600160a01b039091166000908152608160205260409020805460ff191660011790555050505050505050505050565b607160205260009081526040902080546001820154600283015460038401546004850154600590950154939492939192909186565b606654600090819061194090611939906001600160a01b0316856138ec565b6000613a6c565b949350505050565b6000611955848484613b99565b6119c584611961613772565b6119c085604051806060016040528060288152602001615e7f602891396001600160a01b038a1660009081526034602052604081209061199f613772565b6001600160a01b031681526020810191909152604001600020549190613cf6565b613776565b5060015b9392505050565b33600090815260806020526040902054611a6f9060ff168015611a685750306001600160a01b0316336001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015611a3157600080fd5b505afa158015611a45573d6000803e3d6000fd5b505050506040513d6020811015611a5b57600080fd5b50516001600160a01b0316145b60146136c8565b611a8c611a8783611a81606954613d8d565b90613df1565b613e56565b606955607054421015611acc57611ac4611abd611ab442607054613ead90919063ffffffff16565b606f5490613ead565b4290613892565b607055611ade565b606f54611ada904290613892565b6070555b606a54611aeb9084613892565b606a55606b54611afb9085613892565b606b55606c54611b0b9083613df1565b606c81905550611b7e81607e805480602002602001604051908101604052809291908181526020018280548015611b6b57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611b4d575b5050505050613f0a90919063ffffffff16565b8051611b9291607e91602090910190615c48565b50607f8054600181019091557f66925e85f1a4743fd8d60ba595ed74887b7caf321dd83b21e04d77c1153834080180546001600160a01b0390921673ffffffffffffffffffffffffffffffffffffffff19909216821790556000908152608060205260409020805460ff19169055505050565b607c5481565b611c13613f87565b611c1c8261256c565b8110611c2e57611c2b8261256c565b90505b6112738282613fa5565b60385460ff1690565b6000611355611c4e613772565b846119c08560346000611c5f613772565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490613892565b60806020526000908152604090205460ff1681565b60026065541415611cfc576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555611d0961387c565b3360009081526071602052604090206002810154611d2a904211600c6136c8565b6067546040805162fca95560e61b815290516000926001600160a01b031691633f2a5540916004808301926020929190829003018186803b158015611d6e57600080fd5b505afa158015611d82573d6000803e3d6000fd5b505050506040513d6020811015611d9857600080fd5b50516040517f69795e93000000000000000000000000000000000000000000000000000000008152306004820181815233602484018190526060604485019081526064850189905294955060009485946001600160a01b038816946369795e93949093928c928c929190608401846020850280828437600081840152601f19601f82011690508083019250505095505050505050604080518083038186803b158015611e4357600080fd5b505afa158015611e57573d6000803e3d6000fd5b505050506040513d6040811015611e6d57600080fd5b5080516020909101519092506bffffffffffffffffffffffff1690508115801590611e985750814710155b15611eff576004840154611eac9083613892565b6004850155611ebb33836140a1565b606a54611ec89083613ead565b606a55604051829033907f4dacaff8a707e7b54321fbdedb3b65d1f3316b59787949c034bae8946d6ff4e190600090a34260028501555b8015611ff0576003840154611f149082613892565b6003850155604080517f6bf15bbd0000000000000000000000000000000000000000000000000000000081523360048201526bffffffffffffffffffffffff8316602482015290516001600160a01b03851691636bf15bbd91604480830192600092919082900301818387803b158015611f8d57600080fd5b505af1158015611fa1573d6000803e3d6000fd5b5050604080516bffffffffffffffffffffffff8516815290513393507f475c0834f68d797672d1b72d49bd010f85eecfd60d3fb7afb7ede1a03530f4a492509081900360200190a24260028501555b5050600160655550505050565b6001600160a01b03166000908152607160205260409020805460018201546002830154600384015460048501546005909501549395929491939092565b607d5481565b612048613f87565b612050613862565b612058614186565b606b54606654604080516370a0823160e01b815230600482015290516000936120e19390926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b1580156120af57600080fd5b505afa1580156120c3573d6000803e3d6000fd5b505050506040513d60208110156120d957600080fd5b505190613ead565b9050600061216983606760009054906101000a90046001600160a01b03166001600160a01b031663313754776040518163ffffffff1660e01b815260040160206040518083038186803b15801561213757600080fd5b505afa15801561214b573d6000803e3d6000fd5b505050506040513d602081101561216157600080fd5b50519061419b565b9050612182826121798584613892565b111560046136c8565b606654612198906001600160a01b0316826136d6565b6066546121af906001600160a01b031633856141b9565b505050565b606854600160a81b900460ff1681565b600054610100900460ff16806121dd57506121dd614239565b806121eb575060005460ff16155b6122265760405162461bcd60e51b815260040180806020018281038252602e815260200180615e30602e913960400191505060405180910390fd5b600054610100900460ff16158015612251576000805460ff1961ff0019909116610100171660011790555b6122606032875110604f6136c8565b6122766001600160a01b038816151560176136c8565b61228c6001600160a01b038916151560176136c8565b61230160008a6001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156122ca57600080fd5b505afa1580156122de573d6000803e3d6000fd5b505050506040513d60208110156122f457600080fd5b505160ff161160176136c8565b61230f60098414604e6136c8565b612392886001600160a01b031663f979cdd98b6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561235f57600080fd5b505afa158015612373573d6000803e3d6000fd5b505050506040513d602081101561238957600080fd5b5051600e6136c8565b61239c868661424a565b606780546001600160a01b03808b1673ffffffffffffffffffffffffffffffffffffffff199283168117909355606680548d831690841617905560688054918b1691909216179055604080517f7177fec90000000000000000000000000000000000000000000000000000000081529051637177fec991600480820192602092909190829003018186803b15801561243357600080fd5b505afa158015612447573d6000803e3d6000fd5b505050506040513d602081101561245d57600080fd5b50516073556068805460ff60a81b1916600160a81b17905561253082858560008161248457fe5b905060200201358686600181811061249857fe5b90506020020135878760028181106124ac57fe5b90506020020135888860038181106124c057fe5b90506020020135898960048181106124d457fe5b905060200201358a8a60058181106124e857fe5b905060200201358b8b60068181106124fc57fe5b905060200201358c8c600781811061251057fe5b905060200201358d8d600881811061252457fe5b905060200201356142ff565b6068805460ff60a01b1916600160a01b1790558015612555576000805461ff00191690555b505050505050505050565b60825481565b606f5481565b6001600160a01b031660009081526033602052604090205490565b606e5481565b601481565b606c5481565b60705481565b60735481565b60795481565b60026065541415612602576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260655561260f613862565b60685461275490600160a81b900460ff1615806127355750606760009054906101000a90046001600160a01b03166001600160a01b031663c8ed947f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561267557600080fd5b505afa158015612689573d6000803e3d6000fd5b505050506040513d602081101561269f57600080fd5b5051604080517fc7ec5d5d00000000000000000000000000000000000000000000000000000000815230600482015233602482015290516001600160a01b039092169163c7ec5d5d91604480820192602092909190829003018186803b15801561270857600080fd5b505afa15801561271c573d6000803e3d6000fd5b505050506040513d602081101561273257600080fd5b50515b8061274d57506068546001600160a01b038381169116145b601d6136c8565b60745415612780576127806074546127778560695461389290919063ffffffff16565b111560006136c8565b6127926073546072541115603d6136c8565b61279b83614610565b6000806127a9856001613a6c565b915091506127bb8482101560026136c8565b6066546127d1906001600160a01b0316836136d6565b6127f183826127eb8460695461389290919063ffffffff16565b856147ae565b6128086078546127ff61137d565b101560026136c8565b50506001606555505050565b606b5481565b607b5481565b60378054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156113375780601f1061130c57610100808354040283529160200191611337565b6067546040805163411137c360e01b81526001600160a01b038581166004830152915161290693929092169163411137c391602480820192602092909190829003018186803b1580156128d357600080fd5b505afa1580156128e7573d6000803e3d6000fd5b505050506040513d60208110156128fd57600080fd5b505160126136c8565b61290e613f87565b60825461291b9082613892565b6082819055158015906129a65750608254606654604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561297757600080fd5b505afa15801561298b573d6000803e3d6000fd5b505050506040513d60208110156129a157600080fd5b505110155b15611273576082546066546129c8916001600160a01b039091169084906141b9565b6082546069546129d791613ead565b60695560006082555050565b6129eb613862565b6067546040805163411137c360e01b81523360048201529051612a37926001600160a01b03169163411137c3916024808301926020929190829003018186803b1580156128d357600080fd5b612a4d670de0b6b3a764000082111560136136c8565b606654604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015612a9857600080fd5b505afa158015612aac573d6000803e3d6000fd5b505050506040513d6020811015612ac257600080fd5b5051905060005b607e548110156121af576000607e8281548110612ae257fe5b9060005260206000200160009054906101000a90046001600160a01b031690506000612b7d607954612b77846001600160a01b0316630d15fd776040518163ffffffff1660e01b815260040160206040518083038186803b158015612b4657600080fd5b505afa158015612b5a573d6000803e3d6000fd5b505050506040513d6020811015612b7057600080fd5b5051613e56565b90614968565b90506000612b8b858361419b565b9050612c8d62015180612c87856001600160a01b0316630fb5a6b46040518163ffffffff1660e01b815260040160206040518083038186803b158015612bd057600080fd5b505afa158015612be4573d6000803e3d6000fd5b505050506040513d6020811015612bfa57600080fd5b5051604080517f825deffe00000000000000000000000000000000000000000000000000000000815290516001600160a01b0389169163825deffe916004808301926020929190829003018186803b158015612c5557600080fd5b505afa158015612c69573d6000803e3d6000fd5b505050506040513d6020811015612c7f57600080fd5b505190613892565b90613ead565b42108015612cff5750826001600160a01b031663302733566040518163ffffffff1660e01b815260040160206040518083038186803b158015612ccf57600080fd5b505afa158015612ce3573d6000803e3d6000fd5b505050506040513d6020811015612cf957600080fd5b50518110155b8015612dff5750826001600160a01b03166393baae416040518163ffffffff1660e01b815260040160206040518083038186803b158015612d3f57600080fd5b505afa158015612d53573d6000803e3d6000fd5b505050506040513d6020811015612d6957600080fd5b5051604080517f03cddb2c0000000000000000000000000000000000000000000000000000000081529051612dfc916001600160a01b038716916303cddb2c91600480820192602092909190829003018186803b158015612dc957600080fd5b505afa158015612ddd573d6000803e3d6000fd5b505050506040513d6020811015612df357600080fd5b50518390613892565b11155b15612e6b57826001600160a01b031663f101e82b82886040518363ffffffff1660e01b81526004018083815260200182815260200192505050600060405180830381600087803b158015612e5257600080fd5b505af1158015612e66573d6000803e3d6000fd5b505050505b505050600101612ac9565b6000611355612e83613772565b846119c085604051806060016040528060258152602001615f636025913960346000612ead613772565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190613cf6565b606d5481565b6000611355612ef1613772565b8484613b99565b60775481565b60026065541415612f56576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002606555612f6361387c565b80612f7857612f73848484614980565b6130cc565b612f8d612f853386614c52565b15601c6136c8565b6000612fab612fa486670214e8348c4f000061419b565b8690613ead565b9050600080612fb8614e53565b909350915061303a9050612fcc8385613ead565b826001600160a01b031663302733566040518163ffffffff1660e01b815260040160206040518083038186803b15801561300557600080fd5b505afa158015613019573d6000803e3d6000fd5b505050506040513d602081101561302f57600080fd5b5051111560446136c8565b806001600160a01b03166342296724846040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561308057600080fd5b505af1158015613094573d6000803e3d6000fd5b505050506130bc336130b7670214e8348c4f00008a61419b90919063ffffffff16565b613fa5565b6130c883600187614980565b5050505b505060016065555050565b6067546130f0906001600160a01b0316331460106136c8565b6068546131109060ff600160a01b909104161515821515141560166136c8565b60688054911515600160a01b0260ff60a01b19909216919091179055565b613136613f87565b6131a181607e805480602002602001604051908101604052809291908181526020018280548015611b6b576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311611b4d575050505050613f0a90919063ffffffff16565b80516131b591607e91602090910190615c48565b506001600160a01b03166000908152608060205260409020805460ff19169055565b6060607f80548060200260200160405190810160405280929190818152602001828054801561133757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613211575050505050905090565b6060607e805480602002602001604051908101604052809291908181526020018280548015611337576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311613211575050505050905090565b60785481565b600080606660009054906101000a90046001600160a01b03166001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156132ef57600080fd5b505afa158015613303573d6000803e3d6000fd5b505050506040513d602081101561331957600080fd5b505160ff16600a0a9050600061332f8583614968565b905061333961137d565b6133465791506113599050565b606754604080517f294d237c00000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163294d237c916004808301926020929190829003018186803b1580156133a457600080fd5b505afa1580156133b8573d6000803e3d6000fd5b505050506040513d60208110156133ce57600080fd5b505160665460408051635e0a3b9d60e11b81523060048201526001600160a01b0392831660248201529051919092169163bc14773a916044808301926020929190829003018186803b15801561342357600080fd5b505afa158015613437573d6000803e3d6000fd5b505050506040513d602081101561344d57600080fd5b5051905084156134765761347361346c61346561137d565b8490614968565b8290613ead565b90505b6134808282614968565b9695505050505050565b60745481565b670214e8348c4f000081565b606a5481565b60695481565b60008060005b607e5481101561358b576000607e82815481106134c757fe5b6000918252602080832090910154604080517f950c78220000000000000000000000000000000000000000000000000000000081526001600160a01b038a81166004830152915191909216945061356c92859263950c78229260248083019392829003018186803b15801561353b57600080fd5b505afa15801561354f573d6000803e3d6000fd5b505050506040513d602081101561356557600080fd5b5051614fd1565b905080156135815761357e8482613892565b93505b50506001016134ae565b50806135968461256c565b1015611359576119c98361256c565b60755481565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b607a5481565b60765481565b60725481565b6067546001600160a01b031681565b606854613610906001600160a01b0316331460116136c8565b6068546136aa90600160a81b900460ff1680156136a35750606760009054906101000a90046001600160a01b03166001600160a01b0316637f80e05b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561367657600080fd5b505afa15801561368a573d6000803e3d6000fd5b505050506040513d60208110156136a057600080fd5b50515b60436136c8565b6068805460ff60a81b19169055565b6066546001600160a01b031681565b816112735761127381614fe2565b606754604080517f61d027b30000000000000000000000000000000000000000000000000000000081529051611273926001600160a01b0316916361d027b3916004808301926020929190829003018186803b15801561373557600080fd5b505afa158015613749573d6000803e3d6000fd5b505050506040513d602081101561375f57600080fd5b50516001600160a01b03841690836141b9565b3390565b6001600160a01b0383166137bb5760405162461bcd60e51b8152600401808060200182810382526024815260200180615eed6024913960400191505060405180910390fd5b6001600160a01b0382166138005760405162461bcd60e51b8152600401808060200182810382526022815260200180615d8d6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260346020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b60685461387a90600160a01b900460ff1660156136c8565b565b61387a600061388a3361256c565b11600f6136c8565b6000828201838110156119c9576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600080606760009054906101000a90046001600160a01b03166001600160a01b031663294d237c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561393d57600080fd5b505afa158015613951573d6000803e3d6000fd5b505050506040513d602081101561396757600080fd5b505160408051635e0a3b9d60e11b81523060048201526001600160a01b0387811660248301529151919092169163bc14773a916044808301926020929190829003018186803b1580156139b957600080fd5b505afa1580156139cd573d6000803e3d6000fd5b505050506040513d60208110156139e357600080fd5b5051905060006139f3848361419b565b90506000613480866001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015613a3357600080fd5b505afa158015613a47573d6000803e3d6000fd5b505050506040513d6020811015613a5d57600080fd5b5051839060ff16600a0a61419b565b600080600083613af557606760009054906101000a90046001600160a01b03166001600160a01b031663259072e16040518163ffffffff1660e01b815260040160206040518083038186803b158015613ac457600080fd5b505afa158015613ad8573d6000803e3d6000fd5b505050506040513d6020811015613aee57600080fd5b5051613b70565b606760009054906101000a90046001600160a01b03166001600160a01b03166350d9f37f6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b4357600080fd5b505afa158015613b57573d6000803e3d6000fd5b505050506040513d6020811015613b6d57600080fd5b50515b90506000613b7e828761419b565b905080613b8b8782613ead565b9350935050505b9250929050565b6001600160a01b038316613bde5760405162461bcd60e51b8152600401808060200182810382526025815260200180615ec86025913960400191505060405180910390fd5b6001600160a01b038216613c235760405162461bcd60e51b8152600401808060200182810382526023815260200180615d486023913960400191505060405180910390fd5b613c2e838383615035565b613c6b81604051806060016040528060268152602001615daf602691396001600160a01b0386166000908152603360205260409020549190613cf6565b6001600160a01b038085166000908152603360205260408082209390935590841681522054613c9a9082613892565b6001600160a01b0380841660008181526033602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115613d855760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613d4a578181015183820152602001613d32565b50505050905090810190601f168015613d775780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60007f80000000000000000000000000000000000000000000000000000000000000008210613ded5760405162461bcd60e51b8152600401808060200182810382526028815260200180615f116028913960400191505060405180910390fd5b5090565b6000828201818312801590613e065750838112155b80613e1b5750600083128015613e1b57508381125b6119c95760405162461bcd60e51b8152600401808060200182810382526021815260200180615dd56021913960400191505060405180910390fd5b600080821215613ded576040805162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f736974697665604482015290519081900360640190fd5b600082821115613f04576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6060600080613f1985856150fd565b9150915080613f6f576040805162461bcd60e51b815260206004820152601560248201527f41646472657373206e6f7420696e2061727261792e0000000000000000000000604482015290519081900360640190fd5b6000613f7b8684615160565b50935061135992505050565b3360009081526080602052604090205461387a9060ff1660146136c8565b6001600160a01b038216613fea5760405162461bcd60e51b8152600401808060200182810382526021815260200180615ea76021913960400191505060405180910390fd5b613ff682600083615035565b61403381604051806060016040528060228152602001615d6b602291396001600160a01b0385166000908152603360205260409020549190613cf6565b6001600160a01b0383166000908152603360205260409020556035546140599082613ead565b6035556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b804710156140f6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015290519081900360640190fd5b6040516000906001600160a01b0384169083908381818185875af1925050503d8060008114614141576040519150601f19603f3d011682016040523d82523d6000602084013e614146565b606091505b50509050806121af5760405162461bcd60e51b815260040180806020018281038252603a815260200180615df6603a913960400191505060405180910390fd5b607054421061387a5760006070819055606b55565b60006119c9670de0b6b3a76400006141b385856152c4565b9061531d565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526121af908490615384565b600061424430615435565b15905090565b600054610100900460ff16806142635750614263614239565b80614271575060005460ff16155b6142ac5760405162461bcd60e51b815260040180806020018281038252602e815260200180615e30602e913960400191505060405180910390fd5b600054610100900460ff161580156142d7576000805460ff1961ff0019909116610100171660011790555b6142df61543b565b6142e983836154dd565b80156121af576000805461ff0019169055505050565b61430d6000861160016136c8565b61431b858b101560016136c8565b614329888b101560046136c8565b614337898b111560006136c8565b606654614395906001600160a01b031673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc214614372576a084595161401484a00000061437e565b69021e19e0c9bab24000005b6affffffffffffffffffffff168a111560006136c8565b6067546001600160a01b03166143ae89151560026136c8565b6143bc6000881160036136c8565b606654604080517ff05017eb0000000000000000000000000000000000000000000000000000000081526001600160a01b039283166004820152905161445a9284169163f05017eb916024808301926020929190829003018186803b15801561442457600080fd5b505afa158015614438573d6000803e3d6000fd5b505050506040513d602081101561444e57600080fd5b505189101560046136c8565b606754604080517f8e20fb070000000000000000000000000000000000000000000000000000000081529051614574926001600160a01b031691638e20fb07916004808301926020929190829003018186803b1580156144b957600080fd5b505afa1580156144cd573d6000803e3d6000fd5b505050506040513d60208110156144e357600080fd5b5051861180159061456d5750606760009054906101000a90046001600160a01b03166001600160a01b0316636b2fb6786040518163ffffffff1660e01b815260040160206040518083038186803b15801561453d57600080fd5b505afa158015614551573d6000803e3d6000fd5b505050506040513d602081101561456757600080fd5b50518610155b60186136c8565b6145a867016345785d8a000085101580156145a1575061459d67016345785d8a000060056152c4565b8511155b60196136c8565b6145b683831015603f6136c8565b6145d76201518084101580156145d057506302932e008311155b603f6136c8565b50607794909455607d92909255607a55607b55607c5560789290925560749290925542607555606d91909155606e555062093a80606f55565b61462060775482101560016136c8565b606654604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561466b57600080fd5b505afa15801561467f573d6000803e3d6000fd5b505050506040513d602081101561469557600080fd5b50516066549091506001600160a01b031673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21480156146c85750600034115b1561473a5773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561471c57600080fd5b505af1158015614730573d6000803e3d6000fd5b5050505050614752565b606654614752906001600160a01b03163330856155b5565b606654604080516370a0823160e01b815230600482015290516112739285926147a69286926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156120af57600080fd5b1460056136c8565b60006147b98561256c565b90506147cf856147ca86600161329e565b615643565b6147d98582615735565b6069839055606754604080517fead4c1cf00000000000000000000000000000000000000000000000000000000815290516001600160a01b039092169163ead4c1cf91600480820192602092909190829003018186803b15801561483c57600080fd5b505afa158015614850573d6000803e3d6000fd5b505050506040513d602081101561486657600080fd5b5051604080517f45b497470000000000000000000000000000000000000000000000000000000081526001600160a01b038881166004830152915191909216916345b497479160248083019260209291908290030181600087803b1580156148cd57600080fd5b505af11580156148e1573d6000803e3d6000fd5b505050506040513d60208110156148f757600080fd5b5061490f9050600061490761137d565b1160046136c8565b604080513481526020810186905280820184905242606082015290516001600160a01b038716917f38574f2bc5e150a9fd6f2ced17988994c3d1d8cafd2b73402da66a97164e8e3f919081900360800190a25050505050565b60006119c9826141b385670de0b6b3a76400006152c4565b61499661498c3361256c565b84111560066136c8565b606e54336000908152607160205260409020546149c291906149b9904290613ead565b101560036136c8565b604080517fc40868930000000000000000000000000000000000000000000000000000000081523360048201529051614a5f91614a5591309163c4086893916024808301926020929190829003018186803b158015614a2057600080fd5b505afa158015614a34573d6000803e3d6000fd5b505050506040513d6020811015614a4a57600080fd5b5051612c873361256c565b84111560076136c8565b614a67614186565b606654600090614a80906001600160a01b0316856138ec565b9050600080614a90836000613a6c565b915091506000614aa287612c8761137d565b9050614ab8614ab13384614c52565b60046136c8565b614ac860785482101560026136c8565b614ad68683101560026136c8565b614ae03388613fa5565b6066546001600160a01b031673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21415614b915781471015614b825773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2632e1a7d4d614b338447613ead565b6040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015614b6957600080fd5b505af1158015614b7d573d6000803e3d6000fd5b505050505b614b8c85836140a1565b614ba8565b606654614ba8906001600160a01b031633846141b9565b614bb1826158fb565b606654614bc7906001600160a01b0316846136d6565b6000614bd38385613892565b9050614be581606954101560086136c8565b606954614bf29082613ead565b60695560408051848152602081018a905280820186905242606082015290516001600160a01b0388169133917f25b65b867b695d9502ad64f047cea91edc82a4d945f78fb241dd9f58d10cbb359181900360800190a35050505050505050565b606654604080516370a0823160e01b8152306004820152905160009283926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b158015614ca257600080fd5b505afa158015614cb6573d6000803e3d6000fd5b505050506040513d6020811015614ccc57600080fd5b50519050614cde8382101560426136c8565b6070544211614e4957606b54614cf49084613892565b811115614d05576001915050611359565b6067546040805162fca95560e61b815290516000926001600160a01b031691633f2a5540916004808301926020929190829003018186803b158015614d4957600080fd5b505afa158015614d5d573d6000803e3d6000fd5b505050506040513d6020811015614d7357600080fd5b50516001600160a01b0386811660008181526071602090815260408083206001015481517f7602bdde0000000000000000000000000000000000000000000000000000000081523060048201526024810195909552604485015242606485015251949550909392851692637602bdde926084808201939291829003018186803b158015614dff57600080fd5b505afa158015614e13573d6000803e3d6000fd5b505050506040513d6020811015614e2957600080fd5b5051606b549091508590614e3d908361419b565b10159350505050611359565b8211159050611359565b60008080808080805b607e5460ff82161015614fc4576000607e8260ff1681548110614e7b57fe5b60009182526020918290200154604080517fe4df5e1a00000000000000000000000000000000000000000000000000000000815290516001600160a01b039092169350839263e4df5e1a92600480840193829003018186803b158015614ee057600080fd5b505afa158015614ef4573d6000803e3d6000fd5b505050506040513d6020811015614f0a57600080fd5b505115614fbb576000816001600160a01b03166303cddb2c6040518163ffffffff1660e01b815260040160206040518083038186803b158015614f4c57600080fd5b505afa158015614f60573d6000803e3d6000fd5b505050506040513d6020811015614f7657600080fd5b50519050614f848682613892565b955084811115614fb957809450607e8360ff1681548110614fa157fe5b6000918252602090912001546001600160a01b031693505b505b50600101614e5c565b5091945092509050909192565b600080821215613ded575060000390565b62461bcd60e51b6000908152602060045260076024526642414223000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b6150408383836121af565b6121af6001600160a01b038416158061506057506001600160a01b038316155b806150f65750606760009054906101000a90046001600160a01b03166001600160a01b031663393bfe496040518163ffffffff1660e01b815260040160206040518083038186803b1580156150b457600080fd5b505afa1580156150c8573d6000803e3d6000fd5b505050506040513d60208110156150de57600080fd5b505180156150f65750606854600160a81b900460ff16155b603b6136c8565b81516000908190815b8181101561515057846001600160a01b031686828151811061512457fe5b60200260200101516001600160a01b0316141561514857925060019150613b929050565b600101615106565b5060001995600095509350505050565b81516060906000908084106151bc576040805162461bcd60e51b815260206004820152601860248201527f496e646578206d757374206265203c2041206c656e6774680000000000000000604482015290519081900360640190fd5b60006001820367ffffffffffffffff811180156151d857600080fd5b50604051908082528060200260200182016040528015615202578160200160208202803683370190505b50905060005b858110156152505786818151811061521c57fe5b602002602001015182828151811061523057fe5b6001600160a01b0390921660209283029190910190910152600101615208565b50600185015b828110156152a15786818151811061526a57fe5b602002602001015182600183038151811061528157fe5b6001600160a01b0390921660209283029190910190910152600101615256565b50808686815181106152af57fe5b60200260200101519350935050509250929050565b6000826152d357506000611359565b828202828482816152e057fe5b04146119c95760405162461bcd60e51b8152600401808060200182810382526021815260200180615e5e6021913960400191505060405180910390fd5b6000808211615373576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161537c57fe5b049392505050565b60006153d9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316615abd9092919063ffffffff16565b8051909150156121af578080602001905160208110156153f857600080fd5b50516121af5760405162461bcd60e51b815260040180806020018281038252602a815260200180615f39602a913960400191505060405180910390fd5b3b151590565b600054610100900460ff16806154545750615454614239565b80615462575060005460ff16155b61549d5760405162461bcd60e51b815260040180806020018281038252602e815260200180615e30602e913960400191505060405180910390fd5b600054610100900460ff161580156154c8576000805460ff1961ff0019909116610100171660011790555b80156154da576000805461ff00191690555b50565b600054610100900460ff16806154f657506154f6614239565b80615504575060005460ff16155b61553f5760405162461bcd60e51b815260040180806020018281038252602e815260200180615e30602e913960400191505060405180910390fd5b600054610100900460ff1615801561556a576000805460ff1961ff0019909116610100171660011790555b825161557d906036906020860190615cb6565b508151615591906037906020850190615cb6565b506038805460ff1916601217905580156121af576000805461ff0019169055505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017905261563d908590615384565b50505050565b6001600160a01b03821661569e576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b6156aa60008383615035565b6035546156b79082613892565b6035556001600160a01b0382166000908152603360205260409020546156dd9082613892565b6001600160a01b03831660008181526033602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b038216600090815260716020526040902081158061575c57506001810154155b1561578a5761577260735460725410603d6136c8565b607254615780906001613892565b6072554260018201555b4281556067546040805162fca95560e61b815290516000926001600160a01b031691633f2a5540916004808301926020929190829003018186803b1580156157d157600080fd5b505afa1580156157e5573d6000803e3d6000fd5b505050506040513d60208110156157fb57600080fd5b50516076546040805163df14e06f60e01b81523060048201526024810192909252519192506001600160a01b0383169163df14e06f9160448082019260009290919082900301818387803b15801561585257600080fd5b505af1158015615866573d6000803e3d6000fd5b505060765460408051632db4b3a760e01b81523060048201526001600160a01b0389811660248301526044820189905260016064830152608482019390935290519185169350632db4b3a7925060a48082019260009290919082900301818387803b1580156158d457600080fd5b505af11580156158e8573d6000803e3d6000fd5b5050607680546001019055505050505050565b336000818152607160205260409020906159149061256c565b6159415760008082556001808301829055600583019190915560725461593991613ead565b607255615956565b60058101546159509083613892565b60058201555b6067546040805162fca95560e61b815290516000926001600160a01b031691633f2a5540916004808301926020929190829003018186803b15801561599a57600080fd5b505afa1580156159ae573d6000803e3d6000fd5b505050506040513d60208110156159c457600080fd5b50516076546040805163df14e06f60e01b81523060048201526024810192909252519192506001600160a01b0383169163df14e06f9160448082019260009290919082900301818387803b158015615a1b57600080fd5b505af1158015615a2f573d6000803e3d6000fd5b505060765460408051632db4b3a760e01b815230600482015233602482015260006044820181905260648201819052608482019390935290516001600160a01b0386169450632db4b3a7935060a4808301939282900301818387803b158015615a9757600080fd5b505af1158015615aab573d6000803e3d6000fd5b50506076805460010190555050505050565b6060611940848460008585615ad185615435565b615b22576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b60208310615b605780518252601f199092019160209182019101615b41565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114615bc2576040519150601f19603f3d011682016040523d82523d6000602084013e615bc7565b606091505b5091509150615bd7828286615be2565b979650505050505050565b60608315615bf15750816119c9565b825115615c015782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315613d4a578181015183820152602001613d32565b828054828255906000526020600020908101928215615caa579160200282015b82811115615caa578251825473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909116178255602090920191600190910190615c68565b50613ded929150615d32565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282615cec5760008555615caa565b82601f10615d0557805160ff1916838001178555615caa565b82800160010185558215615caa579182015b82811115615caa578251825591602001919060010190615d17565b5b80821115613ded5760008155600101615d3356fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63655369676e6564536166654d6174683a206164646974696f6e206f766572666c6f77416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737353616665436173743a2076616c756520646f65736e27742066697420696e20616e20696e743235365361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122031a5a9d4dfe8369ee82a0ed4e07c2759b179ef1a2ae67478b907d23b7aea015864736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80638d06366f14610030575b600080fd5b610257600480360361010081101561004757600080fd5b6001600160a01b03823581169260208101359091169181019060608101604082013564010000000081111561007b57600080fd5b82018360208201111561008d57600080fd5b803590602001918460018302840111640100000000831117156100af57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561010257600080fd5b82018360208201111561011457600080fd5b8035906020019184600183028401116401000000008311171561013657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561018957600080fd5b82018360208201111561019b57600080fd5b803590602001918460018302840111640100000000831117156101bd57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295843595909490935060408101925060200135905064010000000081111561021857600080fd5b82018360208201111561022a57600080fd5b8035906020019184602083028401116401000000008311171561024c57600080fd5b919350915035610273565b604080516001600160a01b039092168252519081900360200190f35b6000336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146102dc5760405162461bcd60e51b815260040180806020018281038252602681526020018061070c6026913960400191505060405180910390fd5b60006103077f000000000000000000000000000000000000000000000000000000000000000061064b565b9050806001600160a01b0316635fe3d4ce8c7f00000000000000000000000000000000000000000000000000000000000000008d8d8d8b8b8b6040518963ffffffff1660e01b815260040180896001600160a01b03168152602001886001600160a01b03168152602001876001600160a01b03168152602001806020018060200180602001858152602001848103845289818151815260200191508051906020019080838360005b838110156103c75781810151838201526020016103af565b50505050905090810190601f1680156103f45780820380516001836020036101000a031916815260200191505b5084810383528851815288516020918201918a019080838360005b8381101561042757818101518382015260200161040f565b50505050905090810190601f1680156104545780820380516001836020036101000a031916815260200191505b508481038252878782818152602001925060200280828437600081840152601f19601f8201169050808301925050509b505050505050505050505050600060405180830381600087803b1580156104aa57600080fd5b505af11580156104be573d6000803e3d6000fd5b505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ead4c1cf6040518163ffffffff1660e01b815260040160206040518083038186803b15801561051b57600080fd5b505afa15801561052f573d6000803e3d6000fd5b505050506040513d602081101561054557600080fd5b50516040517f616ac7920000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301908152604483018a90526060602484019081528b5160648501528b51929094169363616ac7929386938d938d9390929091608490910190602086019080838360005b838110156105d65781810151838201526020016105be565b50505050905090810190601f1680156106035780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561062457600080fd5b505af1158015610638573d6000803e3d6000fd5b50929d9c50505050505050505050505050565b60006040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528260601b60148201527f5af43d82803e903d91602b57fd5bf3000000000000000000000000000000000060288201526037816000f09150506001600160a01b038116610706576040805162461bcd60e51b815260206004820152601660248201527f455243313136373a20637265617465206661696c656400000000000000000000604482015290519081900360640190fd5b91905056fe4f6e6c792074686520636f6e74726f6c6c65722063616e206372656174652067617264656e73a264697066735822122041520f490fe42d0da8583f2d052d5981c4cd87a620bf3045ea5a36769c82ee9c64736f6c63430007060033", "devdoc": { "author": "Babylon Finance Factory to create garden contracts", "kind": "dev", "methods": { - "createGarden(address,address,address,string,string,string,uint256,uint256[])": { + "createGarden(address,address,string,string,string,uint256,uint256[],uint256)": { "params": { - "_controller": "Address of the controller", "_creator": "Address of the creator", "_gardenParams": "Array of numeric params in the garden", + "_initialContribution": "Initial Contribution by the Gardener", "_name": "Name of the Garden", "_reserveAsset": "Address of the reserve asset ERC20", "_seed": "Seed to regenerate the garden NFT", @@ -105,7 +113,7 @@ "userdoc": { "kind": "user", "methods": { - "createGarden(address,address,address,string,string,string,uint256,uint256[])": { + "createGarden(address,address,string,string,string,uint256,uint256[],uint256)": { "notice": "Creates a garden using minimal proxies" } }, diff --git a/deployments/artifacts/mainnet/GardenNFT.json b/deployments/artifacts/mainnet/GardenNFT.json new file mode 100644 index 000000000..2a0b99840 --- /dev/null +++ b/deployments/artifacts/mainnet/GardenNFT.json @@ -0,0 +1,988 @@ +{ + "address": "0x13F5C44f1D3a90ab2736Fa170aE39d36726AFE9c", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_controller", + "type": "address" + }, + { + "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": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_newItemId", + "type": "uint256" + } + ], + "name": "GardenNFTAwarded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "baseURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "controller", + "outputs": [ + { + "internalType": "contract IBabController", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "gardenSeeds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "gardenTokenURIs", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "grantGardenNFT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_garden", + "type": "address" + }, + { + "internalType": "string", + "name": "_gardenTokenURI", + "type": "string" + }, + { + "internalType": "uint256", + "name": "_seed", + "type": "uint256" + } + ], + "name": "saveGardenURIAndSeed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenOfOwnerByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "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": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x27c2a26792fca1798bacc0116da7c47de612569f66687d42e3792fd3ac914b00", + "receipt": { + "to": null, + "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", + "contractAddress": "0x13F5C44f1D3a90ab2736Fa170aE39d36726AFE9c", + "transactionIndex": 278, + "gasUsed": "2182372", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x6f367cc2173071d6d94367ffc827855eb91153efc42b50bd2652d8c2dbe8d466", + "transactionHash": "0x27c2a26792fca1798bacc0116da7c47de612569f66687d42e3792fd3ac914b00", + "logs": [], + "blockNumber": 12451358, + "cumulativeGasUsed": "12060767", + "status": 1, + "byzantium": true + }, + "args": [ + "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F", + "Babylon Garden NFT", + "GARDEN_NFT" + ], + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"},{\"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\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_member\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_newItemId\",\"type\":\"uint256\"}],\"name\":\"GardenNFTAwarded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"baseURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"contract IBabController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"gardenSeeds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"gardenTokenURIs\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"grantGardenNFT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_gardenTokenURI\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_seed\",\"type\":\"uint256\"}],\"name\":\"saveGardenURIAndSeed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenOfOwnerByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"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\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Contract the NFT for each Garden\",\"kind\":\"dev\",\"methods\":{\"approve(address,uint256)\":{\"details\":\"See {IERC721-approve}.\"},\"balanceOf(address)\":{\"details\":\"See {IERC721-balanceOf}.\"},\"baseURI()\":{\"details\":\"Returns the base URI set via {_setBaseURI}. This will be automatically added as a prefix in {tokenURI} to each token's URI, or to the token ID if no specific URI is set for that token ID.\"},\"constructor\":{\"params\":{\"_controller\":\"Address of controller contract\",\"_name\":\"Name of the garden\",\"_symbol\":\"Symbol of the garden\"}},\"getApproved(uint256)\":{\"details\":\"See {IERC721-getApproved}.\"},\"grantGardenNFT(address)\":{\"params\":{\"_user\":\"Address of the user\"}},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC721-isApprovedForAll}.\"},\"name()\":{\"details\":\"See {IERC721Metadata-name}.\"},\"ownerOf(uint256)\":{\"details\":\"See {IERC721-ownerOf}.\"},\"safeTransferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,bytes)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"saveGardenURIAndSeed(address,string,uint256)\":{\"params\":{\"_garden\":\"Address of the garden\",\"_gardenTokenURI\":\"Garden Token URI\"}},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC721-setApprovalForAll}.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}. Time complexity O(1), guaranteed to always use less than 30 000 gas.\"},\"symbol()\":{\"details\":\"See {IERC721Metadata-symbol}.\"},\"tokenByIndex(uint256)\":{\"details\":\"See {IERC721Enumerable-tokenByIndex}.\"},\"tokenOfOwnerByIndex(address,uint256)\":{\"details\":\"See {IERC721Enumerable-tokenOfOwnerByIndex}.\"},\"tokenURI(uint256)\":{\"details\":\"See {IERC721Metadata-tokenURI}.\"},\"totalSupply()\":{\"details\":\"See {IERC721Enumerable-totalSupply}.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-transferFrom}.\"}},\"title\":\"GardenNFT\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Sets the protocol controller\"},\"grantGardenNFT(address)\":{\"notice\":\"Awards the garden NFT to a user and gives him access to a specific garden\"},\"saveGardenURIAndSeed(address,string,uint256)\":{\"notice\":\"Saves the Garden URI and seed\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/gardens/GardenNFT.sol\":\"GardenNFT\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts may inherit from this and call {_registerInterface} to declare\\n * their support of an interface.\\n */\\nabstract contract ERC165 is IERC165 {\\n /*\\n * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7\\n */\\n bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;\\n\\n /**\\n * @dev Mapping of interface ids to whether or not it's supported.\\n */\\n mapping(bytes4 => bool) private _supportedInterfaces;\\n\\n constructor () internal {\\n // Derived contracts need only register support for their own interfaces,\\n // we register support for ERC165 itself here\\n _registerInterface(_INTERFACE_ID_ERC165);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n *\\n * Time complexity O(1), guaranteed to always use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return _supportedInterfaces[interfaceId];\\n }\\n\\n /**\\n * @dev Registers the contract as an implementer of the interface defined by\\n * `interfaceId`. Support of the actual ERC165 interface is automatic and\\n * registering its interface id is not required.\\n *\\n * See {IERC165-supportsInterface}.\\n *\\n * Requirements:\\n *\\n * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).\\n */\\n function _registerInterface(bytes4 interfaceId) internal virtual {\\n require(interfaceId != 0xffffffff, \\\"ERC165: invalid interface id\\\");\\n _supportedInterfaces[interfaceId] = true;\\n }\\n}\\n\",\"keccak256\":\"0x24141d2f6b98d4cb77a8936eae8cbaad2e261d9062bdc08036096f4550092501\",\"license\":\"MIT\"},\"@openzeppelin/contracts/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xf70bc25d981e4ec9673a995ad2995d5d493ea188d3d8f388bba9c227ce09fb82\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC721.sol\\\";\\nimport \\\"./IERC721Metadata.sol\\\";\\nimport \\\"./IERC721Enumerable.sol\\\";\\nimport \\\"./IERC721Receiver.sol\\\";\\nimport \\\"../../introspection/ERC165.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/EnumerableSet.sol\\\";\\nimport \\\"../../utils/EnumerableMap.sol\\\";\\nimport \\\"../../utils/Strings.sol\\\";\\n\\n/**\\n * @title ERC721 Non-Fungible Token Standard basic implementation\\n * @dev see https://eips.ethereum.org/EIPS/eip-721\\n */\\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {\\n using SafeMath for uint256;\\n using Address for address;\\n using EnumerableSet for EnumerableSet.UintSet;\\n using EnumerableMap for EnumerableMap.UintToAddressMap;\\n using Strings for uint256;\\n\\n // Equals to `bytes4(keccak256(\\\"onERC721Received(address,address,uint256,bytes)\\\"))`\\n // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector`\\n bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;\\n\\n // Mapping from holder address to their (enumerable) set of owned tokens\\n mapping (address => EnumerableSet.UintSet) private _holderTokens;\\n\\n // Enumerable mapping from token ids to their owners\\n EnumerableMap.UintToAddressMap private _tokenOwners;\\n\\n // Mapping from token ID to approved address\\n mapping (uint256 => address) private _tokenApprovals;\\n\\n // Mapping from owner to operator approvals\\n mapping (address => mapping (address => bool)) private _operatorApprovals;\\n\\n // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Optional mapping for token URIs\\n mapping (uint256 => string) private _tokenURIs;\\n\\n // Base URI\\n string private _baseURI;\\n\\n /*\\n * bytes4(keccak256('balanceOf(address)')) == 0x70a08231\\n * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e\\n * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3\\n * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc\\n * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465\\n * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5\\n * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd\\n * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e\\n * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde\\n *\\n * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^\\n * 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;\\n\\n /*\\n * bytes4(keccak256('name()')) == 0x06fdde03\\n * bytes4(keccak256('symbol()')) == 0x95d89b41\\n * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd\\n *\\n * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f;\\n\\n /*\\n * bytes4(keccak256('totalSupply()')) == 0x18160ddd\\n * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59\\n * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7\\n *\\n * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;\\n\\n /**\\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\\n */\\n constructor (string memory name_, string memory symbol_) public {\\n _name = name_;\\n _symbol = symbol_;\\n\\n // register the supported interfaces to conform to ERC721 via ERC165\\n _registerInterface(_INTERFACE_ID_ERC721);\\n _registerInterface(_INTERFACE_ID_ERC721_METADATA);\\n _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE);\\n }\\n\\n /**\\n * @dev See {IERC721-balanceOf}.\\n */\\n function balanceOf(address owner) public view virtual override returns (uint256) {\\n require(owner != address(0), \\\"ERC721: balance query for the zero address\\\");\\n return _holderTokens[owner].length();\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n return _tokenOwners.get(tokenId, \\\"ERC721: owner query for nonexistent token\\\");\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-name}.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-symbol}.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-tokenURI}.\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n require(_exists(tokenId), \\\"ERC721Metadata: URI query for nonexistent token\\\");\\n\\n string memory _tokenURI = _tokenURIs[tokenId];\\n string memory base = baseURI();\\n\\n // If there is no base URI, return the token URI.\\n if (bytes(base).length == 0) {\\n return _tokenURI;\\n }\\n // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).\\n if (bytes(_tokenURI).length > 0) {\\n return string(abi.encodePacked(base, _tokenURI));\\n }\\n // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI.\\n return string(abi.encodePacked(base, tokenId.toString()));\\n }\\n\\n /**\\n * @dev Returns the base URI set via {_setBaseURI}. This will be\\n * automatically added as a prefix in {tokenURI} to each token's URI, or\\n * to the token ID if no specific URI is set for that token ID.\\n */\\n function baseURI() public view virtual returns (string memory) {\\n return _baseURI;\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\\n return _holderTokens[owner].at(index);\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds\\n return _tokenOwners.length();\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenByIndex}.\\n */\\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\\n (uint256 tokenId, ) = _tokenOwners.at(index);\\n return tokenId;\\n }\\n\\n /**\\n * @dev See {IERC721-approve}.\\n */\\n function approve(address to, uint256 tokenId) public virtual override {\\n address owner = ERC721.ownerOf(tokenId);\\n require(to != owner, \\\"ERC721: approval to current owner\\\");\\n\\n require(_msgSender() == owner || ERC721.isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not owner nor approved for all\\\"\\n );\\n\\n _approve(to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-getApproved}.\\n */\\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\\n require(_exists(tokenId), \\\"ERC721: approved query for nonexistent token\\\");\\n\\n return _tokenApprovals[tokenId];\\n }\\n\\n /**\\n * @dev See {IERC721-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n require(operator != _msgSender(), \\\"ERC721: approve to caller\\\");\\n\\n _operatorApprovals[_msgSender()][operator] = approved;\\n emit ApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC721-isApprovedForAll}.\\n */\\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[owner][operator];\\n }\\n\\n /**\\n * @dev See {IERC721-transferFrom}.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) public virtual override {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: transfer caller is not owner nor approved\\\");\\n\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: transfer caller is not owner nor approved\\\");\\n _safeTransfer(from, to, tokenId, _data);\\n }\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * `_data` is additional data, it has no specified format and it is sent in call to `to`.\\n *\\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\\n * implement alternative mechanisms to perform token transfer, such as signature-based.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual {\\n _transfer(from, to, tokenId);\\n require(_checkOnERC721Received(from, to, tokenId, _data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Returns whether `tokenId` exists.\\n *\\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\\n *\\n * Tokens start existing when they are minted (`_mint`),\\n * and stop existing when they are burned (`_burn`).\\n */\\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\\n return _tokenOwners.contains(tokenId);\\n }\\n\\n /**\\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\\n require(_exists(tokenId), \\\"ERC721: operator query for nonexistent token\\\");\\n address owner = ERC721.ownerOf(tokenId);\\n return (spender == owner || getApproved(tokenId) == spender || ERC721.isApprovedForAll(owner, spender));\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n d*\\n * - `tokenId` must not exist.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeMint(address to, uint256 tokenId) internal virtual {\\n _safeMint(to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\\n */\\n function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual {\\n _mint(to, tokenId);\\n require(_checkOnERC721Received(address(0), to, tokenId, _data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Mints `tokenId` and transfers it to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - `to` cannot be the zero address.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _mint(address to, uint256 tokenId) internal virtual {\\n require(to != address(0), \\\"ERC721: mint to the zero address\\\");\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n _beforeTokenTransfer(address(0), to, tokenId);\\n\\n _holderTokens[to].add(tokenId);\\n\\n _tokenOwners.set(tokenId, to);\\n\\n emit Transfer(address(0), to, tokenId);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _burn(uint256 tokenId) internal virtual {\\n address owner = ERC721.ownerOf(tokenId); // internal owner\\n\\n _beforeTokenTransfer(owner, address(0), tokenId);\\n\\n // Clear approvals\\n _approve(address(0), tokenId);\\n\\n // Clear metadata (if any)\\n if (bytes(_tokenURIs[tokenId]).length != 0) {\\n delete _tokenURIs[tokenId];\\n }\\n\\n _holderTokens[owner].remove(tokenId);\\n\\n _tokenOwners.remove(tokenId);\\n\\n emit Transfer(owner, address(0), tokenId);\\n }\\n\\n /**\\n * @dev Transfers `tokenId` from `from` to `to`.\\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _transfer(address from, address to, uint256 tokenId) internal virtual {\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer of token that is not own\\\"); // internal owner\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId);\\n\\n // Clear approvals from the previous owner\\n _approve(address(0), tokenId);\\n\\n _holderTokens[from].remove(tokenId);\\n _holderTokens[to].add(tokenId);\\n\\n _tokenOwners.set(tokenId, to);\\n\\n emit Transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {\\n require(_exists(tokenId), \\\"ERC721Metadata: URI set of nonexistent token\\\");\\n _tokenURIs[tokenId] = _tokenURI;\\n }\\n\\n /**\\n * @dev Internal function to set the base URI for all token IDs. It is\\n * automatically added as a prefix to the value returned in {tokenURI},\\n * or to the token ID if {tokenURI} is empty.\\n */\\n function _setBaseURI(string memory baseURI_) internal virtual {\\n _baseURI = baseURI_;\\n }\\n\\n /**\\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\\n * The call is not executed if the target address is not a contract.\\n *\\n * @param from address representing the previous owner of the given token ID\\n * @param to target address that will receive the tokens\\n * @param tokenId uint256 ID of the token to be transferred\\n * @param _data bytes optional data to send along with the call\\n * @return bool whether the call correctly returned the expected magic value\\n */\\n function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data)\\n private returns (bool)\\n {\\n if (!to.isContract()) {\\n return true;\\n }\\n bytes memory returndata = to.functionCall(abi.encodeWithSelector(\\n IERC721Receiver(to).onERC721Received.selector,\\n _msgSender(),\\n from,\\n tokenId,\\n _data\\n ), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n bytes4 retval = abi.decode(returndata, (bytes4));\\n return (retval == _ERC721_RECEIVED);\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * Emits an {Approval} event.\\n */\\n function _approve(address to, uint256 tokenId) internal virtual {\\n _tokenApprovals[tokenId] = to;\\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId); // internal owner\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\\n * transferred to `to`.\\n * - When `from` is zero, `tokenId` will be minted for `to`.\\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { }\\n}\\n\",\"keccak256\":\"0x118ed7540f56b21ff92e21ebaa73584048e98d2ac04ca67571329bb8dbd9032f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"../../introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x2d99a0deb6648c34fbc66d6ac4a2d64798d7a5321b45624f6736fadc63da1962\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"./IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Enumerable is IERC721 {\\n\\n /**\\n * @dev Returns the total amount of tokens stored by the contract.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns a token ID owned by `owner` at a given `index` of its token list.\\n * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);\\n\\n /**\\n * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.\\n * Use along with {totalSupply} to enumerate all tokens.\\n */\\n function tokenByIndex(uint256 index) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xe6bd1b1218338b6f9fe17776f48623b4ac3d8a40405f74a44bc23c00abe2ca13\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"./IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xccb917776f826ac6b68bd5a15a5f711e3967848a52ba11e6104d9a4f593314a7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721Receiver {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.\\n */\\n function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0x52146049d6709c870e8ddcd988b5155cb6c5d640cfcd8978aee52bc1ba2ec4eb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\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 { size := extcodesize(account) }\\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, \\\"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, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Counters.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../math/SafeMath.sol\\\";\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath}\\n * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never\\n * directly accessed.\\n */\\nlibrary Counters {\\n using SafeMath for uint256;\\n\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n // The {SafeMath} overflow check can be skipped here, see the comment at the top\\n counter._value += 1;\\n }\\n\\n function decrement(Counter storage counter) internal {\\n counter._value = counter._value.sub(1);\\n }\\n}\\n\",\"keccak256\":\"0x21662e4254ce4ac8570b30cc7ab31435966b3cb778a56ba4d09276881cfb2437\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/EnumerableMap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 *\\n * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are\\n * supported.\\n */\\nlibrary EnumerableMap {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Map type with\\n // bytes32 keys and values.\\n // The Map implementation uses private functions, and user-facing\\n // implementations (such as Uint256ToAddressMap) are just wrappers around\\n // the underlying Map.\\n // This means that we can only create new EnumerableMaps for types that fit\\n // in bytes32.\\n\\n struct MapEntry {\\n bytes32 _key;\\n bytes32 _value;\\n }\\n\\n struct Map {\\n // Storage of map keys and values\\n MapEntry[] _entries;\\n\\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 (bytes32 => 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(Map storage map, bytes32 key, bytes32 value) private 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 if (keyIndex == 0) { // Equivalent to !contains(map, key)\\n map._entries.push(MapEntry({ _key: key, _value: value }));\\n // The entry is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n map._indexes[key] = map._entries.length;\\n return true;\\n } else {\\n map._entries[keyIndex - 1]._value = value;\\n return false;\\n }\\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(Map storage map, bytes32 key) private 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 if (keyIndex != 0) { // Equivalent to contains(map, key)\\n // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one\\n // in the array, and then remove the last entry (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = keyIndex - 1;\\n uint256 lastIndex = map._entries.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 MapEntry 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 map._entries.pop();\\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(Map storage map, bytes32 key) private 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(Map storage map) private view returns (uint256) {\\n return map._entries.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(Map storage map, uint256 index) private view returns (bytes32, bytes32) {\\n require(map._entries.length > index, \\\"EnumerableMap: index out of bounds\\\");\\n\\n MapEntry storage entry = map._entries[index];\\n return (entry._key, entry._value);\\n }\\n\\n /**\\n * @dev Tries to returns the value associated with `key`. O(1).\\n * Does not revert if `key` is not in the map.\\n */\\n function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key)\\n return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based\\n }\\n\\n /**\\n * @dev Returns the value associated with `key`. O(1).\\n *\\n * Requirements:\\n *\\n * - `key` must be in the map.\\n */\\n function _get(Map storage map, bytes32 key) private view returns (bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n require(keyIndex != 0, \\\"EnumerableMap: nonexistent key\\\"); // Equivalent to contains(map, key)\\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\\n }\\n\\n /**\\n * @dev Same as {_get}, with a custom error message when `key` is not in the map.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {_tryGet}.\\n */\\n function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key)\\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\\n }\\n\\n // UintToAddressMap\\n\\n struct UintToAddressMap {\\n Map _inner;\\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(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) {\\n return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the key was removed from the map, that is if it was present.\\n */\\n function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) {\\n return _remove(map._inner, bytes32(key));\\n }\\n\\n /**\\n * @dev Returns true if the key is in the map. O(1).\\n */\\n function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) {\\n return _contains(map._inner, bytes32(key));\\n }\\n\\n /**\\n * @dev Returns the number of elements in the map. O(1).\\n */\\n function length(UintToAddressMap storage map) internal view returns (uint256) {\\n return _length(map._inner);\\n }\\n\\n /**\\n * @dev Returns the element 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 *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) {\\n (bytes32 key, bytes32 value) = _at(map._inner, index);\\n return (uint256(key), address(uint160(uint256(value))));\\n }\\n\\n /**\\n * @dev Tries to returns the value associated with `key`. O(1).\\n * Does not revert if `key` is not in the map.\\n *\\n * _Available since v3.4._\\n */\\n function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) {\\n (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key));\\n return (success, address(uint160(uint256(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.\\n */\\n function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {\\n return address(uint160(uint256(_get(map._inner, bytes32(key)))));\\n }\\n\\n /**\\n * @dev Same as {get}, with a custom error message when `key` is not in the map.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryGet}.\\n */\\n function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) {\\n return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage))));\\n }\\n}\\n\",\"keccak256\":\"0x4b087f06b6670a131a5a14e53b1d2a5ef19c034cc5ec42eeebcf9554325744ad\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\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 (bytes32 => 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(Set storage set, bytes32 value) private 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(Set storage set, bytes32 value) private 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) { // 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 bytes32 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(Set storage set, bytes32 value) private 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(Set storage set) private 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(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\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(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\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(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\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(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\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 return _add(set._inner, bytes32(uint256(uint160(value))));\\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 return _remove(set._inner, bytes32(uint256(uint160(value))));\\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 _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\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 return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\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(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\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(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\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(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x1562cd9922fbf739edfb979f506809e2743789cbde3177515542161c3d04b164\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n uint256 index = digits - 1;\\n temp = value;\\n while (temp != 0) {\\n buffer[index--] = bytes1(uint8(48 + temp % 10));\\n temp /= 10;\\n }\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xa1e12f97981f1d0964b1c048978606a57127c56c438bab61cdfe269cad859a74\",\"license\":\"MIT\"},\"contracts/gardens/GardenNFT.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n//\\nimport {ERC721} from '@openzeppelin/contracts/token/ERC721/ERC721.sol';\\nimport {Counters} from '@openzeppelin/contracts/utils/Counters.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {IGardenNFT} from '../interfaces/IGardenNFT.sol';\\n\\n/**\\n * @title GardenNFT\\n * @author Babylon Finance\\n *\\n * Contract the NFT for each Garden\\n */\\ncontract GardenNFT is ERC721, IGardenNFT {\\n using Counters for Counters.Counter;\\n\\n /* ============ Events ============ */\\n\\n event GardenNFTAwarded(address indexed _member, uint256 indexed _newItemId);\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlyGarden {\\n require(\\n controller.isSystemContract(msg.sender) && IGarden(msg.sender).controller() == address(controller),\\n 'Only the garden can mint the NFT'\\n );\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the Controller contract\\n IBabController public controller;\\n\\n Counters.Counter private _tokenIds;\\n mapping(address => string) public override gardenTokenURIs;\\n mapping(address => uint256) public override gardenSeeds;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Sets the protocol controller\\n *\\n * @param _controller Address of controller contract\\n * @param _name Name of the garden\\n * @param _symbol Symbol of the garden\\n */\\n constructor(\\n address _controller,\\n string memory _name,\\n string memory _symbol\\n ) ERC721(_name, _symbol) {\\n require(address(_controller) != address(0), 'Controller must exist');\\n controller = IBabController(_controller);\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Awards the garden NFT to a user and gives him access to a specific garden\\n *\\n * @param _user Address of the user\\n */\\n function grantGardenNFT(address _user) external override onlyGarden returns (uint256) {\\n require(address(_user) != address(0), 'User must exist');\\n _tokenIds.increment();\\n uint256 newItemId = _tokenIds.current();\\n _safeMint(_user, newItemId);\\n _setTokenURI(newItemId, gardenTokenURIs[msg.sender]);\\n emit GardenNFTAwarded(_user, newItemId);\\n return newItemId;\\n }\\n\\n /**\\n * Saves the Garden URI and seed\\n *\\n * @param _garden Address of the garden\\n * @param _gardenTokenURI Garden Token URI\\n */\\n function saveGardenURIAndSeed(\\n address _garden,\\n string memory _gardenTokenURI,\\n uint256 _seed\\n ) external override {\\n require(controller.isSystemContract(msg.sender), 'Only a system contract can call this');\\n gardenTokenURIs[_garden] = _gardenTokenURI;\\n gardenSeeds[_garden] = _seed;\\n }\\n}\\n\",\"keccak256\":\"0xceb667327c5e9b4e3e218b7551102c12ce647b0ff82a1eb680b875820209aacc\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editGardenNFT(address _newGardenNFT) external;\\n\\n function editStrategyNFT(address _newStrategyNFT) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function editUniswapFactory(address _newUniswapFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\\n\\n function maxContributorsPerGarden() external view returns (uint256);\\n\\n function gardenCreationIsOpen() external view returns (bool);\\n\\n function openPublicGardenCreation() external;\\n\\n function setMaxContributorsPerGarden(uint256 _newMax) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function gardenNFT() external view returns (address);\\n\\n function strategyNFT() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\\n\\n function uniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0xdee5a27301c24f507d312f32249487fa9b0a756062a7e479405a1d1ee9ee7bb8\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function isGardenStrategy(address _strategy) external view returns (bool);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategyActiveInGarden(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to,\\n bool _withPenalty\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x88f1786ffee23e386aaa1735177912e1b5a7cdd440dafe52fb139fe50fd621b4\",\"license\":\"Apache License\"},\"contracts/interfaces/IGardenNFT.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from './IGarden.sol';\\nimport {IBabController} from './IBabController.sol';\\n\\n/**\\n * @title IGardenNFT\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden NFT.\\n */\\ninterface IGardenNFT {\\n function grantGardenNFT(address _user) external returns (uint256);\\n\\n function saveGardenURIAndSeed(\\n address _garden,\\n string memory _gardenTokenURI,\\n uint256 _seed\\n ) external;\\n\\n function gardenTokenURIs(address _garden) external view returns (string memory);\\n\\n function gardenSeeds(address _garden) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf8549547423323ef0c5c18a6b6e5d6803f0f41020aaad34bcc1d0dd819ebc71b\",\"license\":\"Apache License\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b506040516200275138038062002751833981810160405260608110156200003757600080fd5b8151602083018051604051929492938301929190846401000000008211156200005f57600080fd5b9083019060208201858111156200007557600080fd5b82516401000000008111828201881017156200009057600080fd5b82525081516020918201929091019080838360005b83811015620000bf578181015183820152602001620000a5565b50505050905090810190601f168015620000ed5780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011157600080fd5b9083019060208201858111156200012757600080fd5b82516401000000008111828201881017156200014257600080fd5b82525081516020918201929091019080838360005b838110156200017157818101518382015260200162000157565b50505050905090810190601f1680156200019f5780820380516001836020036101000a031916815260200191505b5060405250839150829050620001bc6301ffc9a760e01b620002a4565b8151620001d190600690602085019062000329565b508051620001e790600790602084019062000329565b50620001fa6380ac58cd60e01b620002a4565b6200020c635b5e139f60e01b620002a4565b6200021e63780e9d6360e01b620002a4565b50506001600160a01b0383166200027c576040805162461bcd60e51b815260206004820152601560248201527f436f6e74726f6c6c6572206d7573742065786973740000000000000000000000604482015290519081900360640190fd5b5050600a80546001600160a01b0319166001600160a01b0392909216919091179055620003d5565b6001600160e01b0319808216141562000304576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620003615760008555620003ac565b82601f106200037c57805160ff1916838001178555620003ac565b82800160010185558215620003ac579182015b82811115620003ac5782518255916020019190600101906200038f565b50620003ba929150620003be565b5090565b5b80821115620003ba5760008155600101620003bf565b61236c80620003e56000396000f3fe608060405234801561001057600080fd5b50600436106101825760003560e01c8063616ac792116100d857806395d89b411161008c578063c87b56dd11610066578063c87b56dd146105fe578063e985e9c51461061b578063f77c47911461064957610182565b806395d89b4114610502578063a22cb4651461050a578063b88d4fde1461053857610182565b80636c0360eb116100bd5780636c0360eb146104ae5780636fdf9aea146104b657806370a08231146104dc57610182565b8063616ac792146103d95780636352211e1461049157610182565b8063181df3071161013a57806342842e0e1161011457806342842e0e1461036057806345b49747146103965780634f6ccce7146103bc57610182565b8063181df307146102d857806323b872dd146102fe5780632f745c591461033457610182565b8063081812fc1161016b578063081812fc14610257578063095ea7b31461029057806318160ddd146102be57610182565b806301ffc9a71461018757806306fdde03146101da575b600080fd5b6101c66004803603602081101561019d57600080fd5b50357fffffffff0000000000000000000000000000000000000000000000000000000016610651565b604080519115158252519081900360200190f35b6101e261068c565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561021c578181015183820152602001610204565b50505050905090810190601f1680156102495780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102746004803603602081101561026d57600080fd5b5035610722565b604080516001600160a01b039092168252519081900360200190f35b6102bc600480360360408110156102a657600080fd5b506001600160a01b038135169060200135610784565b005b6102c661085f565b60408051918252519081900360200190f35b6102c6600480360360208110156102ee57600080fd5b50356001600160a01b0316610870565b6102bc6004803603606081101561031457600080fd5b506001600160a01b03813581169160208101359091169060400135610882565b6102c66004803603604081101561034a57600080fd5b506001600160a01b0381351690602001356108d9565b6102bc6004803603606081101561037657600080fd5b506001600160a01b03813581169160208101359091169060400135610904565b6102c6600480360360208110156103ac57600080fd5b50356001600160a01b031661091f565b6102c6600480360360208110156103d257600080fd5b5035610be1565b6102bc600480360360608110156103ef57600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561041a57600080fd5b82018360208201111561042c57600080fd5b8035906020019184600183028401116401000000008311171561044e57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610bf7915050565b610274600480360360208110156104a757600080fd5b5035610cf3565b6101e2610d1b565b6101e2600480360360208110156104cc57600080fd5b50356001600160a01b0316610d7c565b6102c6600480360360208110156104f257600080fd5b50356001600160a01b0316610e17565b6101e2610e7f565b6102bc6004803603604081101561052057600080fd5b506001600160a01b0381351690602001351515610ee0565b6102bc6004803603608081101561054e57600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561058957600080fd5b82018360208201111561059b57600080fd5b803590602001918460018302840111640100000000831117156105bd57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610fe5945050505050565b6101e26004803603602081101561061457600080fd5b5035611043565b6101c66004803603604081101561063157600080fd5b506001600160a01b03813581169160200135166112c4565b6102746112f2565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526020819052604090205460ff165b919050565b60068054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107185780601f106106ed57610100808354040283529160200191610718565b820191906000526020600020905b8154815290600101906020018083116106fb57829003601f168201915b5050505050905090565b600061072d82611301565b6107685760405162461bcd60e51b815260040180806020018281038252602c815260200180612211602c913960400191505060405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061078f82610cf3565b9050806001600160a01b0316836001600160a01b031614156107e25760405162461bcd60e51b81526004018080602001828103825260218152602001806122c16021913960400191505060405180910390fd5b806001600160a01b03166107f461130e565b6001600160a01b0316148061081557506108158161081061130e565b6112c4565b6108505760405162461bcd60e51b81526004018080602001828103825260388152602001806121646038913960400191505060405180910390fd5b61085a8383611312565b505050565b600061086b6002611398565b905090565b600d6020526000908152604090205481565b61089361088d61130e565b826113a3565b6108ce5760405162461bcd60e51b81526004018080602001828103825260318152602001806123066031913960400191505060405180910390fd5b61085a838383611447565b6001600160a01b03821660009081526001602052604081206108fb9083611593565b90505b92915050565b61085a83838360405180602001604052806000815250610fe5565b600a54604080516313bc6d4b60e01b815233600482015290516000926001600160a01b0316916313bc6d4b916024808301926020929190829003018186803b15801561096a57600080fd5b505afa15801561097e573d6000803e3d6000fd5b505050506040513d602081101561099457600080fd5b50518015610a335750600a54604080517ff77c479100000000000000000000000000000000000000000000000000000000815290516001600160a01b0390921691339163f77c4791916004808301926020929190829003018186803b1580156109fc57600080fd5b505afa158015610a10573d6000803e3d6000fd5b505050506040513d6020811015610a2657600080fd5b50516001600160a01b0316145b610a84576040805162461bcd60e51b815260206004820181905260248201527f4f6e6c79207468652067617264656e2063616e206d696e7420746865204e4654604482015290519081900360640190fd5b6001600160a01b038216610adf576040805162461bcd60e51b815260206004820152600f60248201527f55736572206d7573742065786973740000000000000000000000000000000000604482015290519081900360640190fd5b610ae9600b61159f565b6000610af5600b6115a8565b9050610b0183826115ac565b336000908152600c60209081526040918290208054835160026001831615610100026000190190921691909104601f8101849004840282018401909452838152610ba5938593919291830182828015610b9b5780601f10610b7057610100808354040283529160200191610b9b565b820191906000526020600020905b815481529060010190602001808311610b7e57829003601f168201915b50505050506115ca565b60405181906001600160a01b038516907f4d515e69e2844aba841b8ecc898590f7a7648dd9d9aa7eebea35e23c13568e0190600090a392915050565b600080610bef60028461162d565b509392505050565b600a54604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b158015610c4257600080fd5b505afa158015610c56573d6000803e3d6000fd5b505050506040513d6020811015610c6c57600080fd5b5051610ca95760405162461bcd60e51b81526004018080602001828103825260248152602001806122e26024913960400191505060405180910390fd5b6001600160a01b0383166000908152600c602090815260409091208351610cd29285019061201e565b506001600160a01b039092166000908152600d602052604090209190915550565b60006108fe826040518060600160405280602981526020016121c66029913960029190611649565b60098054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107185780601f106106ed57610100808354040283529160200191610718565b600c6020908152600091825260409182902080548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084529091830182828015610e0f5780601f10610de457610100808354040283529160200191610e0f565b820191906000526020600020905b815481529060010190602001808311610df257829003601f168201915b505050505081565b60006001600160a01b038216610e5e5760405162461bcd60e51b815260040180806020018281038252602a81526020018061219c602a913960400191505060405180910390fd5b6001600160a01b03821660009081526001602052604090206108fe90611398565b60078054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107185780601f106106ed57610100808354040283529160200191610718565b610ee861130e565b6001600160a01b0316826001600160a01b03161415610f4e576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b8060056000610f5b61130e565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155610f9f61130e565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b610ff6610ff061130e565b836113a3565b6110315760405162461bcd60e51b81526004018080602001828103825260318152602001806123066031913960400191505060405180910390fd5b61103d84848484611660565b50505050565b606061104e82611301565b6110895760405162461bcd60e51b815260040180806020018281038252602f815260200180612292602f913960400191505060405180910390fd5b60008281526008602090815260408083208054825160026001831615610100026000190190921691909104601f81018590048502820185019093528281529290919083018282801561111c5780601f106110f15761010080835404028352916020019161111c565b820191906000526020600020905b8154815290600101906020018083116110ff57829003601f168201915b50505050509050600061112d610d1b565b905080516000141561114157509050610687565b8151156112025780826040516020018083805190602001908083835b6020831061117c5780518252601f19909201916020918201910161115d565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106111c45780518252601f1990920191602091820191016111a5565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405292505050610687565b8061120c856116b2565b6040516020018083805190602001908083835b6020831061123e5780518252601f19909201916020918201910161121f565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106112865780518252601f199092019160209182019101611267565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405292505050919050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b600a546001600160a01b031681565b60006108fe6002836117c1565b3390565b600081815260046020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b038416908117909155819061135f82610cf3565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006108fe826115a8565b60006113ae82611301565b6113e95760405162461bcd60e51b815260040180806020018281038252602c815260200180612138602c913960400191505060405180910390fd5b60006113f483610cf3565b9050806001600160a01b0316846001600160a01b0316148061142f5750836001600160a01b031661142484610722565b6001600160a01b0316145b8061143f575061143f81856112c4565b949350505050565b826001600160a01b031661145a82610cf3565b6001600160a01b03161461149f5760405162461bcd60e51b81526004018080602001828103825260298152602001806122696029913960400191505060405180910390fd5b6001600160a01b0382166114e45760405162461bcd60e51b81526004018080602001828103825260248152602001806121146024913960400191505060405180910390fd5b6114ef83838361085a565b6114fa600082611312565b6001600160a01b038316600090815260016020526040902061151c90826117cd565b506001600160a01b038216600090815260016020526040902061153f90826117d9565b5061154c600282846117e5565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60006108fb83836117fb565b80546001019055565b5490565b6115c682826040518060200160405280600081525061185f565b5050565b6115d382611301565b61160e5760405162461bcd60e51b815260040180806020018281038252602c81526020018061223d602c913960400191505060405180910390fd5b6000828152600860209081526040909120825161085a9284019061201e565b600080808061163c86866118b1565b9097909650945050505050565b600061165684848461192c565b90505b9392505050565b61166b848484611447565b611677848484846119f6565b61103d5760405162461bcd60e51b81526004018080602001828103825260328152602001806120e26032913960400191505060405180910390fd5b6060816116f3575060408051808201909152600181527f30000000000000000000000000000000000000000000000000000000000000006020820152610687565b8160005b811561170b57600101600a820491506116f7565b60008167ffffffffffffffff8111801561172457600080fd5b506040519080825280601f01601f19166020018201604052801561174f576020820181803683370190505b50859350905060001982015b83156117b857600a840660300160f81b8282806001900393508151811061177e57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a8404935061175b565b50949350505050565b60006108fb8383611ba0565b60006108fb8383611bb8565b60006108fb8383611c7e565b600061165684846001600160a01b038516611cc8565b8154600090821061183d5760405162461bcd60e51b81526004018080602001828103825260228152602001806120c06022913960400191505060405180910390fd5b82600001828154811061184c57fe5b9060005260206000200154905092915050565b6118698383611d5f565b61187660008484846119f6565b61085a5760405162461bcd60e51b81526004018080602001828103825260328152602001806120e26032913960400191505060405180910390fd5b8154600090819083106118f55760405162461bcd60e51b81526004018080602001828103825260228152602001806121ef6022913960400191505060405180910390fd5b600084600001848154811061190657fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b600082815260018401602052604081205482816119c75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561198c578181015183820152602001611974565b50505050905090810190601f1680156119b95780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b508460000160018203815481106119da57fe5b9060005260206000209060020201600101549150509392505050565b6000611a0a846001600160a01b0316611e8d565b611a165750600161143f565b6000611b4e630a85bd0160e11b611a2b61130e565b88878760405160240180856001600160a01b03168152602001846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611a92578181015183820152602001611a7a565b50505050905090810190601f168015611abf5780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518060600160405280603281526020016120e2603291396001600160a01b0388169190611e93565b90506000818060200190516020811015611b6757600080fd5b50517fffffffff0000000000000000000000000000000000000000000000000000000016630a85bd0160e11b1492505050949350505050565b60009081526001919091016020526040902054151590565b60008181526001830160205260408120548015611c745783546000198083019190810190600090879083908110611beb57fe5b9060005260206000200154905080876000018481548110611c0857fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080611c3857fe5b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506108fe565b60009150506108fe565b6000611c8a8383611ba0565b611cc0575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556108fe565b5060006108fe565b600082815260018401602052604081205480611d2d575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055611659565b82856000016001830381548110611d4057fe5b9060005260206000209060020201600101819055506000915050611659565b6001600160a01b038216611dba576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b611dc381611301565b15611e15576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b611e216000838361085a565b6001600160a01b0382166000908152600160205260409020611e4390826117d9565b50611e50600282846117e5565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b3b151590565b6060611656848460008585611ea785611e8d565b611ef8576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b60208310611f365780518252601f199092019160209182019101611f17565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611f98576040519150601f19603f3d011682016040523d82523d6000602084013e611f9d565b606091505b5091509150611fad828286611fb8565b979650505050505050565b60608315611fc7575081611659565b825115611fd75782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561198c578181015183820152602001611974565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282612054576000855561209a565b82601f1061206d57805160ff191683800117855561209a565b8280016001018555821561209a579182015b8281111561209a57825182559160200191906001019061207f565b506120a69291506120aa565b5090565b5b808211156120a657600081556001016120ab56fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724552433732313a207472616e7366657220746f20746865207a65726f20616464726573734552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e64734552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732314d657461646174613a2055524920736574206f66206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314d657461646174613a2055524920717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724f6e6c7920612073797374656d20636f6e74726163742063616e2063616c6c20746869734552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564a26469706673582212201859d80a86303ca8810f7534e6254702436f6b18e0d0342d16cf82676dcdf95c64736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101825760003560e01c8063616ac792116100d857806395d89b411161008c578063c87b56dd11610066578063c87b56dd146105fe578063e985e9c51461061b578063f77c47911461064957610182565b806395d89b4114610502578063a22cb4651461050a578063b88d4fde1461053857610182565b80636c0360eb116100bd5780636c0360eb146104ae5780636fdf9aea146104b657806370a08231146104dc57610182565b8063616ac792146103d95780636352211e1461049157610182565b8063181df3071161013a57806342842e0e1161011457806342842e0e1461036057806345b49747146103965780634f6ccce7146103bc57610182565b8063181df307146102d857806323b872dd146102fe5780632f745c591461033457610182565b8063081812fc1161016b578063081812fc14610257578063095ea7b31461029057806318160ddd146102be57610182565b806301ffc9a71461018757806306fdde03146101da575b600080fd5b6101c66004803603602081101561019d57600080fd5b50357fffffffff0000000000000000000000000000000000000000000000000000000016610651565b604080519115158252519081900360200190f35b6101e261068c565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561021c578181015183820152602001610204565b50505050905090810190601f1680156102495780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102746004803603602081101561026d57600080fd5b5035610722565b604080516001600160a01b039092168252519081900360200190f35b6102bc600480360360408110156102a657600080fd5b506001600160a01b038135169060200135610784565b005b6102c661085f565b60408051918252519081900360200190f35b6102c6600480360360208110156102ee57600080fd5b50356001600160a01b0316610870565b6102bc6004803603606081101561031457600080fd5b506001600160a01b03813581169160208101359091169060400135610882565b6102c66004803603604081101561034a57600080fd5b506001600160a01b0381351690602001356108d9565b6102bc6004803603606081101561037657600080fd5b506001600160a01b03813581169160208101359091169060400135610904565b6102c6600480360360208110156103ac57600080fd5b50356001600160a01b031661091f565b6102c6600480360360208110156103d257600080fd5b5035610be1565b6102bc600480360360608110156103ef57600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561041a57600080fd5b82018360208201111561042c57600080fd5b8035906020019184600183028401116401000000008311171561044e57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610bf7915050565b610274600480360360208110156104a757600080fd5b5035610cf3565b6101e2610d1b565b6101e2600480360360208110156104cc57600080fd5b50356001600160a01b0316610d7c565b6102c6600480360360208110156104f257600080fd5b50356001600160a01b0316610e17565b6101e2610e7f565b6102bc6004803603604081101561052057600080fd5b506001600160a01b0381351690602001351515610ee0565b6102bc6004803603608081101561054e57600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561058957600080fd5b82018360208201111561059b57600080fd5b803590602001918460018302840111640100000000831117156105bd57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610fe5945050505050565b6101e26004803603602081101561061457600080fd5b5035611043565b6101c66004803603604081101561063157600080fd5b506001600160a01b03813581169160200135166112c4565b6102746112f2565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526020819052604090205460ff165b919050565b60068054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107185780601f106106ed57610100808354040283529160200191610718565b820191906000526020600020905b8154815290600101906020018083116106fb57829003601f168201915b5050505050905090565b600061072d82611301565b6107685760405162461bcd60e51b815260040180806020018281038252602c815260200180612211602c913960400191505060405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061078f82610cf3565b9050806001600160a01b0316836001600160a01b031614156107e25760405162461bcd60e51b81526004018080602001828103825260218152602001806122c16021913960400191505060405180910390fd5b806001600160a01b03166107f461130e565b6001600160a01b0316148061081557506108158161081061130e565b6112c4565b6108505760405162461bcd60e51b81526004018080602001828103825260388152602001806121646038913960400191505060405180910390fd5b61085a8383611312565b505050565b600061086b6002611398565b905090565b600d6020526000908152604090205481565b61089361088d61130e565b826113a3565b6108ce5760405162461bcd60e51b81526004018080602001828103825260318152602001806123066031913960400191505060405180910390fd5b61085a838383611447565b6001600160a01b03821660009081526001602052604081206108fb9083611593565b90505b92915050565b61085a83838360405180602001604052806000815250610fe5565b600a54604080516313bc6d4b60e01b815233600482015290516000926001600160a01b0316916313bc6d4b916024808301926020929190829003018186803b15801561096a57600080fd5b505afa15801561097e573d6000803e3d6000fd5b505050506040513d602081101561099457600080fd5b50518015610a335750600a54604080517ff77c479100000000000000000000000000000000000000000000000000000000815290516001600160a01b0390921691339163f77c4791916004808301926020929190829003018186803b1580156109fc57600080fd5b505afa158015610a10573d6000803e3d6000fd5b505050506040513d6020811015610a2657600080fd5b50516001600160a01b0316145b610a84576040805162461bcd60e51b815260206004820181905260248201527f4f6e6c79207468652067617264656e2063616e206d696e7420746865204e4654604482015290519081900360640190fd5b6001600160a01b038216610adf576040805162461bcd60e51b815260206004820152600f60248201527f55736572206d7573742065786973740000000000000000000000000000000000604482015290519081900360640190fd5b610ae9600b61159f565b6000610af5600b6115a8565b9050610b0183826115ac565b336000908152600c60209081526040918290208054835160026001831615610100026000190190921691909104601f8101849004840282018401909452838152610ba5938593919291830182828015610b9b5780601f10610b7057610100808354040283529160200191610b9b565b820191906000526020600020905b815481529060010190602001808311610b7e57829003601f168201915b50505050506115ca565b60405181906001600160a01b038516907f4d515e69e2844aba841b8ecc898590f7a7648dd9d9aa7eebea35e23c13568e0190600090a392915050565b600080610bef60028461162d565b509392505050565b600a54604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b158015610c4257600080fd5b505afa158015610c56573d6000803e3d6000fd5b505050506040513d6020811015610c6c57600080fd5b5051610ca95760405162461bcd60e51b81526004018080602001828103825260248152602001806122e26024913960400191505060405180910390fd5b6001600160a01b0383166000908152600c602090815260409091208351610cd29285019061201e565b506001600160a01b039092166000908152600d602052604090209190915550565b60006108fe826040518060600160405280602981526020016121c66029913960029190611649565b60098054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107185780601f106106ed57610100808354040283529160200191610718565b600c6020908152600091825260409182902080548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084529091830182828015610e0f5780601f10610de457610100808354040283529160200191610e0f565b820191906000526020600020905b815481529060010190602001808311610df257829003601f168201915b505050505081565b60006001600160a01b038216610e5e5760405162461bcd60e51b815260040180806020018281038252602a81526020018061219c602a913960400191505060405180910390fd5b6001600160a01b03821660009081526001602052604090206108fe90611398565b60078054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107185780601f106106ed57610100808354040283529160200191610718565b610ee861130e565b6001600160a01b0316826001600160a01b03161415610f4e576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b8060056000610f5b61130e565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155610f9f61130e565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b610ff6610ff061130e565b836113a3565b6110315760405162461bcd60e51b81526004018080602001828103825260318152602001806123066031913960400191505060405180910390fd5b61103d84848484611660565b50505050565b606061104e82611301565b6110895760405162461bcd60e51b815260040180806020018281038252602f815260200180612292602f913960400191505060405180910390fd5b60008281526008602090815260408083208054825160026001831615610100026000190190921691909104601f81018590048502820185019093528281529290919083018282801561111c5780601f106110f15761010080835404028352916020019161111c565b820191906000526020600020905b8154815290600101906020018083116110ff57829003601f168201915b50505050509050600061112d610d1b565b905080516000141561114157509050610687565b8151156112025780826040516020018083805190602001908083835b6020831061117c5780518252601f19909201916020918201910161115d565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106111c45780518252601f1990920191602091820191016111a5565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405292505050610687565b8061120c856116b2565b6040516020018083805190602001908083835b6020831061123e5780518252601f19909201916020918201910161121f565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106112865780518252601f199092019160209182019101611267565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405292505050919050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b600a546001600160a01b031681565b60006108fe6002836117c1565b3390565b600081815260046020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b038416908117909155819061135f82610cf3565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006108fe826115a8565b60006113ae82611301565b6113e95760405162461bcd60e51b815260040180806020018281038252602c815260200180612138602c913960400191505060405180910390fd5b60006113f483610cf3565b9050806001600160a01b0316846001600160a01b0316148061142f5750836001600160a01b031661142484610722565b6001600160a01b0316145b8061143f575061143f81856112c4565b949350505050565b826001600160a01b031661145a82610cf3565b6001600160a01b03161461149f5760405162461bcd60e51b81526004018080602001828103825260298152602001806122696029913960400191505060405180910390fd5b6001600160a01b0382166114e45760405162461bcd60e51b81526004018080602001828103825260248152602001806121146024913960400191505060405180910390fd5b6114ef83838361085a565b6114fa600082611312565b6001600160a01b038316600090815260016020526040902061151c90826117cd565b506001600160a01b038216600090815260016020526040902061153f90826117d9565b5061154c600282846117e5565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60006108fb83836117fb565b80546001019055565b5490565b6115c682826040518060200160405280600081525061185f565b5050565b6115d382611301565b61160e5760405162461bcd60e51b815260040180806020018281038252602c81526020018061223d602c913960400191505060405180910390fd5b6000828152600860209081526040909120825161085a9284019061201e565b600080808061163c86866118b1565b9097909650945050505050565b600061165684848461192c565b90505b9392505050565b61166b848484611447565b611677848484846119f6565b61103d5760405162461bcd60e51b81526004018080602001828103825260328152602001806120e26032913960400191505060405180910390fd5b6060816116f3575060408051808201909152600181527f30000000000000000000000000000000000000000000000000000000000000006020820152610687565b8160005b811561170b57600101600a820491506116f7565b60008167ffffffffffffffff8111801561172457600080fd5b506040519080825280601f01601f19166020018201604052801561174f576020820181803683370190505b50859350905060001982015b83156117b857600a840660300160f81b8282806001900393508151811061177e57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a8404935061175b565b50949350505050565b60006108fb8383611ba0565b60006108fb8383611bb8565b60006108fb8383611c7e565b600061165684846001600160a01b038516611cc8565b8154600090821061183d5760405162461bcd60e51b81526004018080602001828103825260228152602001806120c06022913960400191505060405180910390fd5b82600001828154811061184c57fe5b9060005260206000200154905092915050565b6118698383611d5f565b61187660008484846119f6565b61085a5760405162461bcd60e51b81526004018080602001828103825260328152602001806120e26032913960400191505060405180910390fd5b8154600090819083106118f55760405162461bcd60e51b81526004018080602001828103825260228152602001806121ef6022913960400191505060405180910390fd5b600084600001848154811061190657fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b600082815260018401602052604081205482816119c75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561198c578181015183820152602001611974565b50505050905090810190601f1680156119b95780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b508460000160018203815481106119da57fe5b9060005260206000209060020201600101549150509392505050565b6000611a0a846001600160a01b0316611e8d565b611a165750600161143f565b6000611b4e630a85bd0160e11b611a2b61130e565b88878760405160240180856001600160a01b03168152602001846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611a92578181015183820152602001611a7a565b50505050905090810190601f168015611abf5780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518060600160405280603281526020016120e2603291396001600160a01b0388169190611e93565b90506000818060200190516020811015611b6757600080fd5b50517fffffffff0000000000000000000000000000000000000000000000000000000016630a85bd0160e11b1492505050949350505050565b60009081526001919091016020526040902054151590565b60008181526001830160205260408120548015611c745783546000198083019190810190600090879083908110611beb57fe5b9060005260206000200154905080876000018481548110611c0857fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080611c3857fe5b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506108fe565b60009150506108fe565b6000611c8a8383611ba0565b611cc0575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556108fe565b5060006108fe565b600082815260018401602052604081205480611d2d575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055611659565b82856000016001830381548110611d4057fe5b9060005260206000209060020201600101819055506000915050611659565b6001600160a01b038216611dba576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b611dc381611301565b15611e15576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b611e216000838361085a565b6001600160a01b0382166000908152600160205260409020611e4390826117d9565b50611e50600282846117e5565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b3b151590565b6060611656848460008585611ea785611e8d565b611ef8576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b60208310611f365780518252601f199092019160209182019101611f17565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611f98576040519150601f19603f3d011682016040523d82523d6000602084013e611f9d565b606091505b5091509150611fad828286611fb8565b979650505050505050565b60608315611fc7575081611659565b825115611fd75782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561198c578181015183820152602001611974565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282612054576000855561209a565b82601f1061206d57805160ff191683800117855561209a565b8280016001018555821561209a579182015b8281111561209a57825182559160200191906001019061207f565b506120a69291506120aa565b5090565b5b808211156120a657600081556001016120ab56fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724552433732313a207472616e7366657220746f20746865207a65726f20616464726573734552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e64734552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732314d657461646174613a2055524920736574206f66206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314d657461646174613a2055524920717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724f6e6c7920612073797374656d20636f6e74726163742063616e2063616c6c20746869734552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564a26469706673582212201859d80a86303ca8810f7534e6254702436f6b18e0d0342d16cf82676dcdf95c64736f6c63430007060033", + "devdoc": { + "author": "Babylon Finance Contract the NFT for each Garden", + "kind": "dev", + "methods": { + "approve(address,uint256)": { + "details": "See {IERC721-approve}." + }, + "balanceOf(address)": { + "details": "See {IERC721-balanceOf}." + }, + "baseURI()": { + "details": "Returns the base URI set via {_setBaseURI}. This will be automatically added as a prefix in {tokenURI} to each token's URI, or to the token ID if no specific URI is set for that token ID." + }, + "constructor": { + "params": { + "_controller": "Address of controller contract", + "_name": "Name of the garden", + "_symbol": "Symbol of the garden" + } + }, + "getApproved(uint256)": { + "details": "See {IERC721-getApproved}." + }, + "grantGardenNFT(address)": { + "params": { + "_user": "Address of the user" + } + }, + "isApprovedForAll(address,address)": { + "details": "See {IERC721-isApprovedForAll}." + }, + "name()": { + "details": "See {IERC721Metadata-name}." + }, + "ownerOf(uint256)": { + "details": "See {IERC721-ownerOf}." + }, + "safeTransferFrom(address,address,uint256)": { + "details": "See {IERC721-safeTransferFrom}." + }, + "safeTransferFrom(address,address,uint256,bytes)": { + "details": "See {IERC721-safeTransferFrom}." + }, + "saveGardenURIAndSeed(address,string,uint256)": { + "params": { + "_garden": "Address of the garden", + "_gardenTokenURI": "Garden Token URI" + } + }, + "setApprovalForAll(address,bool)": { + "details": "See {IERC721-setApprovalForAll}." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}. Time complexity O(1), guaranteed to always use less than 30 000 gas." + }, + "symbol()": { + "details": "See {IERC721Metadata-symbol}." + }, + "tokenByIndex(uint256)": { + "details": "See {IERC721Enumerable-tokenByIndex}." + }, + "tokenOfOwnerByIndex(address,uint256)": { + "details": "See {IERC721Enumerable-tokenOfOwnerByIndex}." + }, + "tokenURI(uint256)": { + "details": "See {IERC721Metadata-tokenURI}." + }, + "totalSupply()": { + "details": "See {IERC721Enumerable-totalSupply}." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC721-transferFrom}." + } + }, + "title": "GardenNFT", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "constructor": { + "notice": "Sets the protocol controller" + }, + "grantGardenNFT(address)": { + "notice": "Awards the garden NFT to a user and gives him access to a specific garden" + }, + "saveGardenURIAndSeed(address,string,uint256)": { + "notice": "Saves the Garden URI and seed" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1572, + "contract": "contracts/gardens/GardenNFT.sol:GardenNFT", + "label": "_supportedInterfaces", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes4,t_bool)" + }, + { + "astId": 3081, + "contract": "contracts/gardens/GardenNFT.sol:GardenNFT", + "label": "_holderTokens", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_struct(UintSet)5497_storage)" + }, + { + "astId": 3083, + "contract": "contracts/gardens/GardenNFT.sol:GardenNFT", + "label": "_tokenOwners", + "offset": 0, + "slot": "2", + "type": "t_struct(UintToAddressMap)4874_storage" + }, + { + "astId": 3087, + "contract": "contracts/gardens/GardenNFT.sol:GardenNFT", + "label": "_tokenApprovals", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_uint256,t_address)" + }, + { + "astId": 3093, + "contract": "contracts/gardens/GardenNFT.sol:GardenNFT", + "label": "_operatorApprovals", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" + }, + { + "astId": 3095, + "contract": "contracts/gardens/GardenNFT.sol:GardenNFT", + "label": "_name", + "offset": 0, + "slot": "6", + "type": "t_string_storage" + }, + { + "astId": 3097, + "contract": "contracts/gardens/GardenNFT.sol:GardenNFT", + "label": "_symbol", + "offset": 0, + "slot": "7", + "type": "t_string_storage" + }, + { + "astId": 3101, + "contract": "contracts/gardens/GardenNFT.sol:GardenNFT", + "label": "_tokenURIs", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_uint256,t_string_storage)" + }, + { + "astId": 3103, + "contract": "contracts/gardens/GardenNFT.sol:GardenNFT", + "label": "_baseURI", + "offset": 0, + "slot": "9", + "type": "t_string_storage" + }, + { + "astId": 15718, + "contract": "contracts/gardens/GardenNFT.sol:GardenNFT", + "label": "controller", + "offset": 0, + "slot": "10", + "type": "t_contract(IBabController)22767" + }, + { + "astId": 15720, + "contract": "contracts/gardens/GardenNFT.sol:GardenNFT", + "label": "_tokenIds", + "offset": 0, + "slot": "11", + "type": "t_struct(Counter)4500_storage" + }, + { + "astId": 15725, + "contract": "contracts/gardens/GardenNFT.sol:GardenNFT", + "label": "gardenTokenURIs", + "offset": 0, + "slot": "12", + "type": "t_mapping(t_address,t_string_storage)" + }, + { + "astId": 15730, + "contract": "contracts/gardens/GardenNFT.sol:GardenNFT", + "label": "gardenSeeds", + "offset": 0, + "slot": "13", + "type": "t_mapping(t_address,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_struct(MapEntry)4548_storage)dyn_storage": { + "base": "t_struct(MapEntry)4548_storage", + "encoding": "dynamic_array", + "label": "struct EnumerableMap.MapEntry[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes4": { + "encoding": "inplace", + "label": "bytes4", + "numberOfBytes": "4" + }, + "t_contract(IBabController)22767": { + "encoding": "inplace", + "label": "contract IBabController", + "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_string_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => string)", + "numberOfBytes": "32", + "value": "t_string_storage" + }, + "t_mapping(t_address,t_struct(UintSet)5497_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.UintSet)", + "numberOfBytes": "32", + "value": "t_struct(UintSet)5497_storage" + }, + "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_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes4,t_bool)": { + "encoding": "mapping", + "key": "t_bytes4", + "label": "mapping(bytes4 => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_uint256,t_address)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_uint256,t_string_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => string)", + "numberOfBytes": "32", + "value": "t_string_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Counter)4500_storage": { + "encoding": "inplace", + "label": "struct Counters.Counter", + "members": [ + { + "astId": 4499, + "contract": "contracts/gardens/GardenNFT.sol:GardenNFT", + "label": "_value", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Map)4556_storage": { + "encoding": "inplace", + "label": "struct EnumerableMap.Map", + "members": [ + { + "astId": 4551, + "contract": "contracts/gardens/GardenNFT.sol:GardenNFT", + "label": "_entries", + "offset": 0, + "slot": "0", + "type": "t_array(t_struct(MapEntry)4548_storage)dyn_storage" + }, + { + "astId": 4555, + "contract": "contracts/gardens/GardenNFT.sol:GardenNFT", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(MapEntry)4548_storage": { + "encoding": "inplace", + "label": "struct EnumerableMap.MapEntry", + "members": [ + { + "astId": 4545, + "contract": "contracts/gardens/GardenNFT.sol:GardenNFT", + "label": "_key", + "offset": 0, + "slot": "0", + "type": "t_bytes32" + }, + { + "astId": 4547, + "contract": "contracts/gardens/GardenNFT.sol:GardenNFT", + "label": "_value", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)5111_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 5106, + "contract": "contracts/gardens/GardenNFT.sol:GardenNFT", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 5110, + "contract": "contracts/gardens/GardenNFT.sol:GardenNFT", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(UintSet)5497_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.UintSet", + "members": [ + { + "astId": 5496, + "contract": "contracts/gardens/GardenNFT.sol:GardenNFT", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)5111_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(UintToAddressMap)4874_storage": { + "encoding": "inplace", + "label": "struct EnumerableMap.UintToAddressMap", + "members": [ + { + "astId": 4873, + "contract": "contracts/gardens/GardenNFT.sol:GardenNFT", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Map)4556_storage" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/artifacts/mainnet/GardenValuer.json b/deployments/artifacts/mainnet/GardenValuer.json index 70f2e8ba4..a9d94fc8d 100644 --- a/deployments/artifacts/mainnet/GardenValuer.json +++ b/deployments/artifacts/mainnet/GardenValuer.json @@ -1,5 +1,5 @@ { - "address": "0x2aFBB0366cA9426dEEa887717b7d2ee5ef86989c", + "address": "0xBf86931e5E7eB9EAE2Ca489F6B625c8f7BDA75c9", "abi": [ { "inputs": [ @@ -50,36 +50,37 @@ "type": "function" } ], - "transactionHash": "0x430d63675768600250bb7c677a2b7eb7b84fdf1d82820b94ff4283a602d5e0c7", + "transactionHash": "0xe68eec5d7fa00f1c186471cd364e0ce0e5afbf46b84466044704aae54290b8c2", "receipt": { "to": null, - "from": "0x311FEE0d859FA936FaEd456758dCD8047C4fFEd7", - "contractAddress": "0xbd49B838d9E0086d47AEDD12594A3fd2Dc1D3DA7", - "transactionIndex": 0, - "gasUsed": "510663", + "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", + "contractAddress": "0xBf86931e5E7eB9EAE2Ca489F6B625c8f7BDA75c9", + "transactionIndex": 35, + "gasUsed": "548321", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x2fb1b11794d3600ce129be38f415adec5de4d83131eae524d2d747f567afc88f", - "transactionHash": "0x430d63675768600250bb7c677a2b7eb7b84fdf1d82820b94ff4283a602d5e0c7", + "blockHash": "0xbe3118aa714834cc127859323d0b75e1cb03d8b5d1421da004ad76c97827a02a", + "transactionHash": "0xe68eec5d7fa00f1c186471cd364e0ce0e5afbf46b84466044704aae54290b8c2", "logs": [], - "blockNumber": 8516144, - "cumulativeGasUsed": "510663", + "blockNumber": 12451176, + "cumulativeGasUsed": "3027216", "status": 1, "byzantium": true }, "args": [ - "0x26E44AD5b46C6A8C167815B7D180F6a5eD91D7bc" + "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F" ], - "solcInputHash": "1cde26e1be086ba932a8865ced5ceef3", - "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_quoteAsset\",\"type\":\"address\"}],\"name\":\"calculateGardenValuation\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Contract that returns the valuation of a Garden using price oracle data used in contracts that are external to the system. Note: Prices are returned in preciseUnits (i.e. 18 decimals of precision)\",\"kind\":\"dev\",\"methods\":{\"calculateGardenValuation(address,address)\":{\"params\":{\"_garden\":\"Garden instance to get valuation\"},\"returns\":{\"_0\":\"Token valuation in terms of quote asset in precise units 1e18\"}},\"constructor\":{\"params\":{\"_controller\":\"Address of controller contract\"}}},\"title\":\"GardenValuer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"calculateGardenValuation(address,address)\":{\"notice\":\"Gets the valuation of a Garden using data from the price oracle. Adds all the active strategies plus the reserve asset and ETH. Note: this works for external positions and negative (debt) positions. Note: There is a risk that the valuation is off if airdrops aren't retrieved\"},\"constructor\":{\"notice\":\"Set state variables and map asset pairs to their oracles\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/GardenValuer.sol\":\"GardenValuer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\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 /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\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, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x7b2b8baa20fd60ab4a328c8e34c64a353651b80ba4b5b157cbb61813f6f85d55\",\"license\":\"MIT\"},\"contracts/GardenValuer.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nimport {IBabController} from './interfaces/IBabController.sol';\\nimport {IGarden} from './interfaces/IGarden.sol';\\nimport {IStrategy} from './interfaces/IStrategy.sol';\\nimport {IPriceOracle} from './interfaces/IPriceOracle.sol';\\nimport {PreciseUnitMath} from './lib/PreciseUnitMath.sol';\\n\\n/**\\n * @title GardenValuer\\n * @author Babylon Finance\\n *\\n * Contract that returns the valuation of a Garden using price oracle data used in contracts\\n * that are external to the system.\\n *\\n * Note: Prices are returned in preciseUnits (i.e. 18 decimals of precision)\\n */\\ncontract GardenValuer {\\n using PreciseUnitMath for int256;\\n using PreciseUnitMath for uint256;\\n using SafeCast for int256;\\n using SafeCast for uint256;\\n using SignedSafeMath for int256;\\n using SafeMath for uint256;\\n\\n /* ============ State Variables ============ */\\n\\n // Instance of the Controller contract\\n address public controller;\\n\\n address private constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Set state variables and map asset pairs to their oracles\\n *\\n * @param _controller Address of controller contract\\n */\\n constructor(address _controller) {\\n controller = _controller;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Gets the valuation of a Garden using data from the price oracle.\\n * Adds all the active strategies plus the reserve asset and ETH.\\n * Note: this works for external\\n * positions and negative (debt) positions.\\n *\\n * Note: There is a risk that the valuation is off if airdrops aren't retrieved\\n *\\n * @param _garden Garden instance to get valuation\\n *\\n * @return Token valuation in terms of quote asset in precise units 1e18\\n */\\n function calculateGardenValuation(address _garden, address _quoteAsset) external view returns (uint256) {\\n IPriceOracle priceOracle = IPriceOracle(IBabController(controller).priceOracle());\\n address reserveAsset = IGarden(_garden).reserveAsset();\\n\\n uint256 reservePrice;\\n // Get price of the reserveAsset in _quoteAsset\\n if (reserveAsset == _quoteAsset) {\\n // meaning 1 reserveAsset equals to 1 _quoteAsset\\n reservePrice = 1 ether;\\n } else {\\n reservePrice = priceOracle.getPrice(reserveAsset, _quoteAsset);\\n }\\n\\n uint256 wethPrice;\\n // Get price of the WETH in _quoteAsset\\n if (_quoteAsset == WETH) {\\n // meaning 1 WETH equals to 1 _quoteAsset\\n // this line looks ironic. 10/10.\\n wethPrice = 1 ether;\\n } else {\\n wethPrice = priceOracle.getPrice(WETH, _quoteAsset);\\n }\\n\\n address[] memory strategies = IGarden(_garden).getStrategies();\\n uint256 valuation;\\n for (uint256 j = 0; j < strategies.length; j++) {\\n IStrategy strategy = IStrategy(strategies[j]);\\n // strategies return their valuation in garden's reserveAsset\\n valuation = valuation.add(strategy.getNAV());\\n }\\n\\n // Recalculate the valuation in the _quoteAsset prices\\n valuation = valuation.preciseMul(reservePrice);\\n\\n // Add garden's reserve asset to calculations\\n valuation = valuation.add(IERC20(reserveAsset).balanceOf(address(_garden)).preciseMul(reservePrice));\\n\\n // Adds ETH of garden in _quoteAsset prices\\n valuation = valuation.add(address(_garden).balance.preciseMul(wethPrice));\\n\\n return valuation.preciseDiv(IERC20(_garden).totalSupply());\\n }\\n}\\n\",\"keccak256\":\"0x6016113f6718f46c78dd5587955c80b7b330a907200388879033919ed7f57111\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityMinimum(uint256 _minRiskyPairLiquidityEth) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minRiskyPairLiquidityEth() external view returns (uint256);\\n\\n function getUniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0x57cf4ece98219f805a416e8c24728d30d9b37c4126d66785d2617b97e35ffae6\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function nftAddress() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategy(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function reenableEthForStrategies() external;\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x5e460136e0b45024ea1c1f32cde607f3ce75dd5b14cee34007d6bbd08beabc82\",\"license\":\"Apache License\"},\"contracts/interfaces/IPriceOracle.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol IPriceOracle)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPriceOracle\\n * @author Babylon Finance\\n *\\n * Interface for interacting with PriceOracle\\n */\\ninterface IPriceOracle {\\n /* ============ Functions ============ */\\n\\n function getPrice(address _assetOne, address _assetTwo) external view returns (uint256);\\n\\n function updateAdapters(address _assetOne, address _assetTwo) external;\\n}\\n\",\"keccak256\":\"0xa22e0e5e166f6f6714553b736ee921b916c37bc5b557042bf6042cc010d2a041\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital,\\n address _strategyNft\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function strategyNft() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x4396906e436eb68c96715e0a53ae1656ac5d7934ebdaeb58ec3c33953465bc39\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516108443803806108448339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b03199092169190911790556107df806100656000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063bc14773a1461003b578063f77c47911461007b575b600080fd5b6100696004803603604081101561005157600080fd5b506001600160a01b038135811691602001351661009f565b60408051918252519081900360200190f35b610083610626565b604080516001600160a01b039092168252519081900360200190f35b60008054604080517f2630c12f000000000000000000000000000000000000000000000000000000008152905183926001600160a01b031691632630c12f916004808301926020929190829003018186803b1580156100fd57600080fd5b505afa158015610111573d6000803e3d6000fd5b505050506040513d602081101561012757600080fd5b5051604080517ff85cb5c800000000000000000000000000000000000000000000000000000000815290519192506000916001600160a01b0387169163f85cb5c8916004808301926020929190829003018186803b15801561018857600080fd5b505afa15801561019c573d6000803e3d6000fd5b505050506040513d60208110156101b257600080fd5b5051905060006001600160a01b0380831690861614156101db5750670de0b6b3a7640000610268565b826001600160a01b031663ac41865a83876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561023957600080fd5b505afa15801561024d573d6000803e3d6000fd5b505050506040513d602081101561026357600080fd5b505190505b60006001600160a01b03861673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2141561029e5750670de0b6b3a764000061034a565b604080517fac41865a00000000000000000000000000000000000000000000000000000000815273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc260048201526001600160a01b03888116602483015291519186169163ac41865a91604480820192602092909190829003018186803b15801561031b57600080fd5b505afa15801561032f573d6000803e3d6000fd5b505050506040513d602081101561034557600080fd5b505190505b6000876001600160a01b031663b49a60bb6040518163ffffffff1660e01b815260040160006040518083038186803b15801561038557600080fd5b505afa158015610399573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156103c257600080fd5b81019080805160405193929190846401000000008211156103e257600080fd5b9083019060208201858111156103f757600080fd5b825186602082028301116401000000008211171561041457600080fd5b82525081516020918201928201910280838360005b83811015610441578181015183820152602001610429565b505050509050016040525050509050600080600090505b82518110156104f357600083828151811061046f57fe5b602002602001015190506104e8816001600160a01b0316630126c6066040518163ffffffff1660e01b815260040160206040518083038186803b1580156104b557600080fd5b505afa1580156104c9573d6000803e3d6000fd5b505050506040513d60208110156104df57600080fd5b50518490610635565b925050600101610458565b506104fe8185610696565b905061058d61058685876001600160a01b03166370a082318d6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561055457600080fd5b505afa158015610568573d6000803e3d6000fd5b505050506040513d602081101561057e57600080fd5b505190610696565b8290610635565b90506105a66105866001600160a01b038b163185610696565b9050610617896001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156105e457600080fd5b505afa1580156105f8573d6000803e3d6000fd5b505050506040513d602081101561060e57600080fd5b505182906106b4565b96505050505050505b92915050565b6000546001600160a01b031681565b60008282018381101561068f576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b600061068f670de0b6b3a76400006106ae85856106c8565b90610721565b600061068f826106ae85670de0b6b3a76400005b6000826106d757506000610620565b828202828482816106e457fe5b041461068f5760405162461bcd60e51b81526004018080602001828103825260218152602001806107896021913960400191505060405180910390fd5b6000808211610777576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161078057fe5b04939250505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a26469706673582212200e1a1c79446b02067740f56ca4ee935cac7123aa233f930c2620dc6e921714b664736f6c63430007060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063bc14773a1461003b578063f77c47911461007b575b600080fd5b6100696004803603604081101561005157600080fd5b506001600160a01b038135811691602001351661009f565b60408051918252519081900360200190f35b610083610626565b604080516001600160a01b039092168252519081900360200190f35b60008054604080517f2630c12f000000000000000000000000000000000000000000000000000000008152905183926001600160a01b031691632630c12f916004808301926020929190829003018186803b1580156100fd57600080fd5b505afa158015610111573d6000803e3d6000fd5b505050506040513d602081101561012757600080fd5b5051604080517ff85cb5c800000000000000000000000000000000000000000000000000000000815290519192506000916001600160a01b0387169163f85cb5c8916004808301926020929190829003018186803b15801561018857600080fd5b505afa15801561019c573d6000803e3d6000fd5b505050506040513d60208110156101b257600080fd5b5051905060006001600160a01b0380831690861614156101db5750670de0b6b3a7640000610268565b826001600160a01b031663ac41865a83876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561023957600080fd5b505afa15801561024d573d6000803e3d6000fd5b505050506040513d602081101561026357600080fd5b505190505b60006001600160a01b03861673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2141561029e5750670de0b6b3a764000061034a565b604080517fac41865a00000000000000000000000000000000000000000000000000000000815273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc260048201526001600160a01b03888116602483015291519186169163ac41865a91604480820192602092909190829003018186803b15801561031b57600080fd5b505afa15801561032f573d6000803e3d6000fd5b505050506040513d602081101561034557600080fd5b505190505b6000876001600160a01b031663b49a60bb6040518163ffffffff1660e01b815260040160006040518083038186803b15801561038557600080fd5b505afa158015610399573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156103c257600080fd5b81019080805160405193929190846401000000008211156103e257600080fd5b9083019060208201858111156103f757600080fd5b825186602082028301116401000000008211171561041457600080fd5b82525081516020918201928201910280838360005b83811015610441578181015183820152602001610429565b505050509050016040525050509050600080600090505b82518110156104f357600083828151811061046f57fe5b602002602001015190506104e8816001600160a01b0316630126c6066040518163ffffffff1660e01b815260040160206040518083038186803b1580156104b557600080fd5b505afa1580156104c9573d6000803e3d6000fd5b505050506040513d60208110156104df57600080fd5b50518490610635565b925050600101610458565b506104fe8185610696565b905061058d61058685876001600160a01b03166370a082318d6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561055457600080fd5b505afa158015610568573d6000803e3d6000fd5b505050506040513d602081101561057e57600080fd5b505190610696565b8290610635565b90506105a66105866001600160a01b038b163185610696565b9050610617896001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156105e457600080fd5b505afa1580156105f8573d6000803e3d6000fd5b505050506040513d602081101561060e57600080fd5b505182906106b4565b96505050505050505b92915050565b6000546001600160a01b031681565b60008282018381101561068f576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b600061068f670de0b6b3a76400006106ae85856106c8565b90610721565b600061068f826106ae85670de0b6b3a76400005b6000826106d757506000610620565b828202828482816106e457fe5b041461068f5760405162461bcd60e51b81526004018080602001828103825260218152602001806107896021913960400191505060405180910390fd5b6000808211610777576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161078057fe5b04939250505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a26469706673582212200e1a1c79446b02067740f56ca4ee935cac7123aa233f930c2620dc6e921714b664736f6c63430007060033", + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_quoteAsset\",\"type\":\"address\"}],\"name\":\"calculateGardenValuation\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Contract that returns the valuation of a Garden using price oracle data used in contracts that are external to the system. Note: Prices are returned in preciseUnits (i.e. 18 decimals of precision)\",\"kind\":\"dev\",\"methods\":{\"calculateGardenValuation(address,address)\":{\"params\":{\"_garden\":\"Garden instance to get valuation\",\"_quoteAsset\":\"Quote asset for the valuation\"},\"returns\":{\"_0\":\"Token valuation in terms of quote asset in precise units 1e18\"}},\"constructor\":{\"params\":{\"_controller\":\"Address of controller contract\"}}},\"title\":\"GardenValuer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"calculateGardenValuation(address,address)\":{\"notice\":\"Gets the valuation of a Garden using data from the price oracle. Adds all the active strategies plus the reserve asset and ETH. Note: this works for external positions and negative (debt) positions. Note: There is a risk that the valuation is off if airdrops aren't retrieved\"},\"constructor\":{\"notice\":\"Set state variables and map asset pairs to their oracles\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/GardenValuer.sol\":\"GardenValuer\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\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 /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\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, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x7b2b8baa20fd60ab4a328c8e34c64a353651b80ba4b5b157cbb61813f6f85d55\",\"license\":\"MIT\"},\"contracts/GardenValuer.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nimport {IBabController} from './interfaces/IBabController.sol';\\nimport {IGarden} from './interfaces/IGarden.sol';\\nimport {IStrategy} from './interfaces/IStrategy.sol';\\nimport {IPriceOracle} from './interfaces/IPriceOracle.sol';\\nimport {PreciseUnitMath} from './lib/PreciseUnitMath.sol';\\n\\n/**\\n * @title GardenValuer\\n * @author Babylon Finance\\n *\\n * Contract that returns the valuation of a Garden using price oracle data used in contracts\\n * that are external to the system.\\n *\\n * Note: Prices are returned in preciseUnits (i.e. 18 decimals of precision)\\n */\\ncontract GardenValuer {\\n using PreciseUnitMath for int256;\\n using PreciseUnitMath for uint256;\\n using SafeCast for int256;\\n using SafeCast for uint256;\\n using SignedSafeMath for int256;\\n using SafeMath for uint256;\\n\\n /* ============ State Variables ============ */\\n\\n // Instance of the Controller contract\\n address public controller;\\n\\n address private constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Set state variables and map asset pairs to their oracles\\n *\\n * @param _controller Address of controller contract\\n */\\n constructor(address _controller) {\\n controller = _controller;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Gets the valuation of a Garden using data from the price oracle.\\n * Adds all the active strategies plus the reserve asset and ETH.\\n * Note: this works for external\\n * positions and negative (debt) positions.\\n *\\n * Note: There is a risk that the valuation is off if airdrops aren't retrieved\\n *\\n * @param _garden Garden instance to get valuation\\n * @param _quoteAsset Quote asset for the valuation\\n *\\n * @return Token valuation in terms of quote asset in precise units 1e18\\n */\\n function calculateGardenValuation(address _garden, address _quoteAsset) external view returns (uint256) {\\n IPriceOracle priceOracle = IPriceOracle(IBabController(controller).priceOracle());\\n address reserveAsset = IGarden(_garden).reserveAsset();\\n\\n // uint8 reserveAssetDecimals = ERC20(reserveAsset).decimals();\\n uint8 quoteAssetDecimals = ERC20(_quoteAsset).decimals();\\n\\n uint256 reservePrice;\\n // Get price of the reserveAsset in _quoteAsset\\n if (reserveAsset == _quoteAsset) {\\n // meaning 1 reserveAsset equals to 1 _quoteAsset\\n reservePrice = 1 ether;\\n } else {\\n reservePrice = priceOracle.getPrice(reserveAsset, _quoteAsset);\\n }\\n\\n uint256 wethPrice;\\n // Get price of the WETH in _quoteAsset\\n if (_quoteAsset == WETH) {\\n // meaning 1 WETH equals to 1 _quoteAsset\\n // this line looks ironic. 10/10.\\n wethPrice = 1 ether;\\n } else {\\n wethPrice = priceOracle.getPrice(WETH, _quoteAsset);\\n }\\n\\n address[] memory strategies = IGarden(_garden).getStrategies();\\n uint256 valuation;\\n for (uint256 j = 0; j < strategies.length; j++) {\\n IStrategy strategy = IStrategy(strategies[j]);\\n // strategies return their valuation in garden's reserveAsset\\n valuation = valuation.add(strategy.getNAV());\\n }\\n\\n // Add strategy reserve assets and garden's reserve asset\\n valuation = valuation.add(ERC20(reserveAsset).balanceOf(address(_garden)));\\n\\n // Get the valuation in terms of the quote asset\\n valuation = valuation.preciseMul(reservePrice);\\n\\n // Adds ETH of garden in _quoteAsset prices\\n valuation = valuation.add(address(_garden).balance.preciseMul(wethPrice));\\n\\n if (quoteAssetDecimals < 18) {\\n valuation = valuation.mul(10**(18 - quoteAssetDecimals));\\n }\\n\\n return valuation.preciseDiv(ERC20(_garden).totalSupply());\\n }\\n}\\n\",\"keccak256\":\"0xeb0e0ae5373c75f8fa371b8707e0a6e7309188560813c9d224a3c52d17049e65\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editGardenNFT(address _newGardenNFT) external;\\n\\n function editStrategyNFT(address _newStrategyNFT) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function editUniswapFactory(address _newUniswapFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\\n\\n function maxContributorsPerGarden() external view returns (uint256);\\n\\n function gardenCreationIsOpen() external view returns (bool);\\n\\n function openPublicGardenCreation() external;\\n\\n function setMaxContributorsPerGarden(uint256 _newMax) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function gardenNFT() external view returns (address);\\n\\n function strategyNFT() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\\n\\n function uniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0xdee5a27301c24f507d312f32249487fa9b0a756062a7e479405a1d1ee9ee7bb8\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function isGardenStrategy(address _strategy) external view returns (bool);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategyActiveInGarden(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to,\\n bool _withPenalty\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x88f1786ffee23e386aaa1735177912e1b5a7cdd440dafe52fb139fe50fd621b4\",\"license\":\"Apache License\"},\"contracts/interfaces/IPriceOracle.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol IPriceOracle)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPriceOracle\\n * @author Babylon Finance\\n *\\n * Interface for interacting with PriceOracle\\n */\\ninterface IPriceOracle {\\n /* ============ Functions ============ */\\n\\n function getPrice(address _assetOne, address _assetTwo) external view returns (uint256);\\n\\n function updateAdapters(address _assetOne, address _assetTwo) external;\\n}\\n\",\"keccak256\":\"0xa22e0e5e166f6f6714553b736ee921b916c37bc5b557042bf6042cc010d2a041\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n address,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x850597ec9a68eb86f31f13b6b77d3b31350b4ed3d0019dedfbd3550ad1a1d9e2\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516108f43803806108f48339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b031990921691909117905561088f806100656000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063bc14773a1461003b578063f77c47911461007b575b600080fd5b6100696004803603604081101561005157600080fd5b506001600160a01b038135811691602001351661009f565b60408051918252519081900360200190f35b6100836106d2565b604080516001600160a01b039092168252519081900360200190f35b60008054604080517f2630c12f000000000000000000000000000000000000000000000000000000008152905183926001600160a01b031691632630c12f916004808301926020929190829003018186803b1580156100fd57600080fd5b505afa158015610111573d6000803e3d6000fd5b505050506040513d602081101561012757600080fd5b5051604080517ff85cb5c800000000000000000000000000000000000000000000000000000000815290519192506000916001600160a01b0387169163f85cb5c8916004808301926020929190829003018186803b15801561018857600080fd5b505afa15801561019c573d6000803e3d6000fd5b505050506040513d60208110156101b257600080fd5b5051604080517f313ce56700000000000000000000000000000000000000000000000000000000815290519192506000916001600160a01b0387169163313ce567916004808301926020929190829003018186803b15801561021357600080fd5b505afa158015610227573d6000803e3d6000fd5b505050506040513d602081101561023d57600080fd5b5051905060006001600160a01b0383811690871614156102665750670de0b6b3a76400006102f3565b836001600160a01b031663ac41865a84886040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b1580156102c457600080fd5b505afa1580156102d8573d6000803e3d6000fd5b505050506040513d60208110156102ee57600080fd5b505190505b60006001600160a01b03871673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc214156103295750670de0b6b3a76400006103d5565b604080517fac41865a00000000000000000000000000000000000000000000000000000000815273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc260048201526001600160a01b03898116602483015291519187169163ac41865a91604480820192602092909190829003018186803b1580156103a657600080fd5b505afa1580156103ba573d6000803e3d6000fd5b505050506040513d60208110156103d057600080fd5b505190505b6000886001600160a01b031663b49a60bb6040518163ffffffff1660e01b815260040160006040518083038186803b15801561041057600080fd5b505afa158015610424573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561044d57600080fd5b810190808051604051939291908464010000000082111561046d57600080fd5b90830190602082018581111561048257600080fd5b825186602082028301116401000000008211171561049f57600080fd5b82525081516020918201928201910280838360005b838110156104cc5781810151838201526020016104b4565b505050509050016040525050509050600080600090505b825181101561057e5760008382815181106104fa57fe5b60200260200101519050610573816001600160a01b0316630126c6066040518163ffffffff1660e01b815260040160206040518083038186803b15801561054057600080fd5b505afa158015610554573d6000803e3d6000fd5b505050506040513d602081101561056a57600080fd5b505184906106e1565b9250506001016104e3565b50610602866001600160a01b03166370a082318c6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156105cf57600080fd5b505afa1580156105e3573d6000803e3d6000fd5b505050506040513d60208110156105f957600080fd5b505182906106e1565b905061060e8185610742565b905061062e6106276001600160a01b038c163185610742565b82906106e1565b905060128560ff161015610653576106508160ff601288900316600a0a610760565b90505b6106c28a6001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561068f57600080fd5b505afa1580156106a3573d6000803e3d6000fd5b505050506040513d60208110156106b957600080fd5b505182906107b9565b9750505050505050505b92915050565b6000546001600160a01b031681565b60008282018381101561073b576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b600061073b670de0b6b3a764000061075a8585610760565b906107d1565b60008261076f575060006106cc565b8282028284828161077c57fe5b041461073b5760405162461bcd60e51b81526004018080602001828103825260218152602001806108396021913960400191505060405180910390fd5b600061073b8261075a85670de0b6b3a7640000610760565b6000808211610827576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161083057fe5b04939250505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220f6c7fe9456369f5efc81e602648d6fa5ed7bec9acea0e393b6b19128b8273fd064736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063bc14773a1461003b578063f77c47911461007b575b600080fd5b6100696004803603604081101561005157600080fd5b506001600160a01b038135811691602001351661009f565b60408051918252519081900360200190f35b6100836106d2565b604080516001600160a01b039092168252519081900360200190f35b60008054604080517f2630c12f000000000000000000000000000000000000000000000000000000008152905183926001600160a01b031691632630c12f916004808301926020929190829003018186803b1580156100fd57600080fd5b505afa158015610111573d6000803e3d6000fd5b505050506040513d602081101561012757600080fd5b5051604080517ff85cb5c800000000000000000000000000000000000000000000000000000000815290519192506000916001600160a01b0387169163f85cb5c8916004808301926020929190829003018186803b15801561018857600080fd5b505afa15801561019c573d6000803e3d6000fd5b505050506040513d60208110156101b257600080fd5b5051604080517f313ce56700000000000000000000000000000000000000000000000000000000815290519192506000916001600160a01b0387169163313ce567916004808301926020929190829003018186803b15801561021357600080fd5b505afa158015610227573d6000803e3d6000fd5b505050506040513d602081101561023d57600080fd5b5051905060006001600160a01b0383811690871614156102665750670de0b6b3a76400006102f3565b836001600160a01b031663ac41865a84886040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b1580156102c457600080fd5b505afa1580156102d8573d6000803e3d6000fd5b505050506040513d60208110156102ee57600080fd5b505190505b60006001600160a01b03871673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc214156103295750670de0b6b3a76400006103d5565b604080517fac41865a00000000000000000000000000000000000000000000000000000000815273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc260048201526001600160a01b03898116602483015291519187169163ac41865a91604480820192602092909190829003018186803b1580156103a657600080fd5b505afa1580156103ba573d6000803e3d6000fd5b505050506040513d60208110156103d057600080fd5b505190505b6000886001600160a01b031663b49a60bb6040518163ffffffff1660e01b815260040160006040518083038186803b15801561041057600080fd5b505afa158015610424573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561044d57600080fd5b810190808051604051939291908464010000000082111561046d57600080fd5b90830190602082018581111561048257600080fd5b825186602082028301116401000000008211171561049f57600080fd5b82525081516020918201928201910280838360005b838110156104cc5781810151838201526020016104b4565b505050509050016040525050509050600080600090505b825181101561057e5760008382815181106104fa57fe5b60200260200101519050610573816001600160a01b0316630126c6066040518163ffffffff1660e01b815260040160206040518083038186803b15801561054057600080fd5b505afa158015610554573d6000803e3d6000fd5b505050506040513d602081101561056a57600080fd5b505184906106e1565b9250506001016104e3565b50610602866001600160a01b03166370a082318c6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156105cf57600080fd5b505afa1580156105e3573d6000803e3d6000fd5b505050506040513d60208110156105f957600080fd5b505182906106e1565b905061060e8185610742565b905061062e6106276001600160a01b038c163185610742565b82906106e1565b905060128560ff161015610653576106508160ff601288900316600a0a610760565b90505b6106c28a6001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561068f57600080fd5b505afa1580156106a3573d6000803e3d6000fd5b505050506040513d60208110156106b957600080fd5b505182906107b9565b9750505050505050505b92915050565b6000546001600160a01b031681565b60008282018381101561073b576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b600061073b670de0b6b3a764000061075a8585610760565b906107d1565b60008261076f575060006106cc565b8282028284828161077c57fe5b041461073b5760405162461bcd60e51b81526004018080602001828103825260218152602001806108396021913960400191505060405180910390fd5b600061073b8261075a85670de0b6b3a7640000610760565b6000808211610827576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161083057fe5b04939250505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220f6c7fe9456369f5efc81e602648d6fa5ed7bec9acea0e393b6b19128b8273fd064736f6c63430007060033", "devdoc": { "author": "Babylon Finance Contract that returns the valuation of a Garden using price oracle data used in contracts that are external to the system. Note: Prices are returned in preciseUnits (i.e. 18 decimals of precision)", "kind": "dev", "methods": { "calculateGardenValuation(address,address)": { "params": { - "_garden": "Garden instance to get valuation" + "_garden": "Garden instance to get valuation", + "_quoteAsset": "Quote asset for the valuation" }, "returns": { "_0": "Token valuation in terms of quote asset in precise units 1e18" @@ -109,7 +110,7 @@ "storageLayout": { "storage": [ { - "astId": 12301, + "astId": 11202, "contract": "contracts/GardenValuer.sol:GardenValuer", "label": "controller", "offset": 0, diff --git a/deployments/artifacts/mainnet/IshtarGate.json b/deployments/artifacts/mainnet/IshtarGate.json index 84b7560e6..47ce05f4a 100644 --- a/deployments/artifacts/mainnet/IshtarGate.json +++ b/deployments/artifacts/mainnet/IshtarGate.json @@ -1,5 +1,5 @@ { - "address": "0xdf425815A0378107aa894e7D55C30AdCB6308685", + "address": "0x77D200ECa7Fd0a3DB27E96D7b24cF7613b0a2a12", "abi": [ { "inputs": [ @@ -939,45 +939,45 @@ "type": "function" } ], - "transactionHash": "0x67783b2d6874444c09364ac6119761c69c75f34ff3cb6e1e4e68490d8d9b8d95", + "transactionHash": "0x40d5fb3e06bab00cfcc17a5710cc22b8027966073405e99d15ac1290a066b3a1", "receipt": { "to": null, - "from": "0x311FEE0d859FA936FaEd456758dCD8047C4fFEd7", - "contractAddress": "0x0eE66F062DBEA7b4255286BF05987e898BF399DA", - "transactionIndex": 6, - "gasUsed": "3315155", - "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000020000000000000000000800000001000000000000000800000000410000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000004000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x2c5822c6b38f84bb4f55134c8f2d9982463843dba713656816d7b8778ccef0d8", - "transactionHash": "0x67783b2d6874444c09364ac6119761c69c75f34ff3cb6e1e4e68490d8d9b8d95", + "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", + "contractAddress": "0x77D200ECa7Fd0a3DB27E96D7b24cF7613b0a2a12", + "transactionIndex": 110, + "gasUsed": "3595202", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000008000000000000000000000000000004000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000004000000020002000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x13990751416c161f1897ed75426c5616077cac6e9427b66ccc041a1d47dc74ca", + "transactionHash": "0x40d5fb3e06bab00cfcc17a5710cc22b8027966073405e99d15ac1290a066b3a1", "logs": [ { - "transactionIndex": 6, - "blockNumber": 8516145, - "transactionHash": "0x67783b2d6874444c09364ac6119761c69c75f34ff3cb6e1e4e68490d8d9b8d95", - "address": "0x0eE66F062DBEA7b4255286BF05987e898BF399DA", + "transactionIndex": 110, + "blockNumber": 12451184, + "transactionHash": "0x40d5fb3e06bab00cfcc17a5710cc22b8027966073405e99d15ac1290a066b3a1", + "address": "0x77D200ECa7Fd0a3DB27E96D7b24cF7613b0a2a12", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000311fee0d859fa936faed456758dcd8047c4ffed7" + "0x000000000000000000000000040cc3af8455f3c34d1df1d2a305e047a062bebf" ], "data": "0x", - "logIndex": 7, - "blockHash": "0x2c5822c6b38f84bb4f55134c8f2d9982463843dba713656816d7b8778ccef0d8" + "logIndex": 157, + "blockHash": "0x13990751416c161f1897ed75426c5616077cac6e9427b66ccc041a1d47dc74ca" } ], - "blockNumber": 8516145, - "cumulativeGasUsed": "5089446", + "blockNumber": 12451184, + "cumulativeGasUsed": "9531965", "status": 1, "byzantium": true }, "args": [ - "0x26E44AD5b46C6A8C167815B7D180F6a5eD91D7bc", - "http://json.api/test" + "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F", + "https://babylon.mypinata.cloud/ipfs/QmTTcF8a1asL9YKsCB5DzND1Biy4Kyw4nX7EPSgv1pLEDA" ], - "solcInputHash": "1cde26e1be086ba932a8865ced5ceef3", - "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBabController\",\"name\":\"_controller\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_tokenURI\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_member\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"_permission\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"GardenAccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_member\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_creation\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"GardenCreationPower\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"_newURI\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"_oldURI\",\"type\":\"string\"}],\"name\":\"GateURIUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_member\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_newItemId\",\"type\":\"uint256\"}],\"name\":\"IshtarGateAwarded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"JUST_LP\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NONE\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"STEWARD\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"STRATEGIST\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"baseURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"canAddStrategiesInAGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"canCreate\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"canCreateAGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"canJoinAGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"canVoteInAGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"contract IBabController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"gardenAccessCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_users\",\"type\":\"address[]\"},{\"internalType\":\"bool[]\",\"name\":\"_perms\",\"type\":\"bool[]\"}],\"name\":\"grantCreatorsInBatch\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"_users\",\"type\":\"address[]\"},{\"internalType\":\"uint8[]\",\"name\":\"_perms\",\"type\":\"uint8[]\"}],\"name\":\"grantGardenAccessBatch\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxNumberOfInvites\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"permissionsByCommunity\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_canCreate\",\"type\":\"bool\"}],\"name\":\"setCreatorPermissions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"_permission\",\"type\":\"uint8\"}],\"name\":\"setGardenAccess\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxNumberOfInvites\",\"type\":\"uint256\"}],\"name\":\"setMaxNumberOfInvites\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenOfOwnerByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"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\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_tokenURI\",\"type\":\"string\"}],\"name\":\"updateGardenURI\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Contract that implements guestlists for Babylon Finance using an NFT\",\"kind\":\"dev\",\"methods\":{\"approve(address,uint256)\":{\"details\":\"See {IERC721-approve}.\"},\"balanceOf(address)\":{\"details\":\"See {IERC721-balanceOf}.\"},\"baseURI()\":{\"details\":\"Returns the base URI set via {_setBaseURI}. This will be automatically added as a prefix in {tokenURI} to each token's URI, or to the token ID if no specific URI is set for that token ID.\"},\"canAddStrategiesInAGarden(address,address)\":{\"params\":{\"_garden\":\"Address of the _garden\",\"_user\":\"Address of the user\"},\"returns\":{\"_0\":\"_canStrategize Whether or not the user can create strategies\"}},\"canCreate(address)\":{\"params\":{\"_user\":\"Address of the user\"},\"returns\":{\"_0\":\"_canCreate Whether or not the user can create\"}},\"canJoinAGarden(address,address)\":{\"params\":{\"_garden\":\"Address of the _garden\",\"_user\":\"Address of the user\"},\"returns\":{\"_0\":\"_canJoin Whether or not the user can join\"}},\"canVoteInAGarden(address,address)\":{\"params\":{\"_garden\":\"Address of the _garden\",\"_user\":\"Address of the user\"},\"returns\":{\"_0\":\"_canVote Whether or not the user can vote\"}},\"constructor\":{\"params\":{\"_controller\":\"Address of controller contract\",\"_tokenURI\":\"URL of the Ishtar Gate JSON metadata\"}},\"getApproved(uint256)\":{\"details\":\"See {IERC721-getApproved}.\"},\"grantCreatorsInBatch(address[],bool[])\":{\"params\":{\"_perms\":\"Lists of booleans\",\"_users\":\"Addresses of the users\"}},\"grantGardenAccessBatch(address,address[],uint8[])\":{\"params\":{\"_garden\":\"Community that the gate grants access to\",\"_perms\":\"List of permissions of what each user can do in the community\",\"_users\":\"Addresses of the users\"}},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC721-isApprovedForAll}.\"},\"name()\":{\"details\":\"See {IERC721Metadata-name}.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"ownerOf(uint256)\":{\"details\":\"See {IERC721-ownerOf}.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"safeTransferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,bytes)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC721-setApprovalForAll}.\"},\"setCreatorPermissions(address,bool)\":{\"params\":{\"_canCreate\":\"Boolean with permissions as to whether the user can create gardens\",\"_user\":\"Address of the user\"}},\"setGardenAccess(address,address,uint8)\":{\"params\":{\"_garden\":\"Community that the gate grants access to\",\"_permission\":\"Permissions of what user can do in the community\",\"_user\":\"Address of the user\"}},\"setMaxNumberOfInvites(uint256)\":{\"params\":{\"_maxNumberOfInvites\":\"New max number of invites per garden\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}. Time complexity O(1), guaranteed to always use less than 30 000 gas.\"},\"symbol()\":{\"details\":\"See {IERC721Metadata-symbol}.\"},\"tokenByIndex(uint256)\":{\"details\":\"See {IERC721Enumerable-tokenByIndex}.\"},\"tokenOfOwnerByIndex(address,uint256)\":{\"details\":\"See {IERC721Enumerable-tokenOfOwnerByIndex}.\"},\"tokenURI(uint256)\":{\"details\":\"See {IERC721Metadata-tokenURI}.\"},\"totalSupply()\":{\"details\":\"See {IERC721Enumerable-totalSupply}.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-transferFrom}.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateGardenURI(string)\":{\"params\":{\"_tokenURI\":\"Address of the tokenURI\"}}},\"title\":\"IshtarGate\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"canAddStrategiesInAGarden(address,address)\":{\"notice\":\"Check if a user can add strategies in a specific garden\"},\"canCreate(address)\":{\"notice\":\"Check if a user can create gardens\"},\"canJoinAGarden(address,address)\":{\"notice\":\"Check if a user can join a specific garden\"},\"canVoteInAGarden(address,address)\":{\"notice\":\"Check if a user can vote in a specific garden\"},\"constructor\":{\"notice\":\"Sets the protocol controller\"},\"grantCreatorsInBatch(address[],bool[])\":{\"notice\":\"Awards the ishtar gate to a list of users with permissions to create gardens\"},\"grantGardenAccessBatch(address,address[],uint8[])\":{\"notice\":\"Awards the ishtar gate to a list of users with permissions to a specific garden\"},\"setCreatorPermissions(address,bool)\":{\"notice\":\"Awards the ishtar gate to a user and give/remove him garden creation capabilities.\"},\"setGardenAccess(address,address,uint8)\":{\"notice\":\"Awards the ishtar gate to a user and gives him access to a specific garden\"},\"setMaxNumberOfInvites(uint256)\":{\"notice\":\"Changs the number of invites we are going to give per garden\"},\"updateGardenURI(string)\":{\"notice\":\"Updates the token URI of the gate NFT\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/IshtarGate.sol\":\"IshtarGate\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () internal {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts may inherit from this and call {_registerInterface} to declare\\n * their support of an interface.\\n */\\nabstract contract ERC165 is IERC165 {\\n /*\\n * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7\\n */\\n bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;\\n\\n /**\\n * @dev Mapping of interface ids to whether or not it's supported.\\n */\\n mapping(bytes4 => bool) private _supportedInterfaces;\\n\\n constructor () internal {\\n // Derived contracts need only register support for their own interfaces,\\n // we register support for ERC165 itself here\\n _registerInterface(_INTERFACE_ID_ERC165);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n *\\n * Time complexity O(1), guaranteed to always use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return _supportedInterfaces[interfaceId];\\n }\\n\\n /**\\n * @dev Registers the contract as an implementer of the interface defined by\\n * `interfaceId`. Support of the actual ERC165 interface is automatic and\\n * registering its interface id is not required.\\n *\\n * See {IERC165-supportsInterface}.\\n *\\n * Requirements:\\n *\\n * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).\\n */\\n function _registerInterface(bytes4 interfaceId) internal virtual {\\n require(interfaceId != 0xffffffff, \\\"ERC165: invalid interface id\\\");\\n _supportedInterfaces[interfaceId] = true;\\n }\\n}\\n\",\"keccak256\":\"0x24141d2f6b98d4cb77a8936eae8cbaad2e261d9062bdc08036096f4550092501\",\"license\":\"MIT\"},\"@openzeppelin/contracts/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xf70bc25d981e4ec9673a995ad2995d5d493ea188d3d8f388bba9c227ce09fb82\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC721.sol\\\";\\nimport \\\"./IERC721Metadata.sol\\\";\\nimport \\\"./IERC721Enumerable.sol\\\";\\nimport \\\"./IERC721Receiver.sol\\\";\\nimport \\\"../../introspection/ERC165.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/EnumerableSet.sol\\\";\\nimport \\\"../../utils/EnumerableMap.sol\\\";\\nimport \\\"../../utils/Strings.sol\\\";\\n\\n/**\\n * @title ERC721 Non-Fungible Token Standard basic implementation\\n * @dev see https://eips.ethereum.org/EIPS/eip-721\\n */\\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {\\n using SafeMath for uint256;\\n using Address for address;\\n using EnumerableSet for EnumerableSet.UintSet;\\n using EnumerableMap for EnumerableMap.UintToAddressMap;\\n using Strings for uint256;\\n\\n // Equals to `bytes4(keccak256(\\\"onERC721Received(address,address,uint256,bytes)\\\"))`\\n // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector`\\n bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;\\n\\n // Mapping from holder address to their (enumerable) set of owned tokens\\n mapping (address => EnumerableSet.UintSet) private _holderTokens;\\n\\n // Enumerable mapping from token ids to their owners\\n EnumerableMap.UintToAddressMap private _tokenOwners;\\n\\n // Mapping from token ID to approved address\\n mapping (uint256 => address) private _tokenApprovals;\\n\\n // Mapping from owner to operator approvals\\n mapping (address => mapping (address => bool)) private _operatorApprovals;\\n\\n // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Optional mapping for token URIs\\n mapping (uint256 => string) private _tokenURIs;\\n\\n // Base URI\\n string private _baseURI;\\n\\n /*\\n * bytes4(keccak256('balanceOf(address)')) == 0x70a08231\\n * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e\\n * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3\\n * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc\\n * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465\\n * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5\\n * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd\\n * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e\\n * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde\\n *\\n * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^\\n * 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;\\n\\n /*\\n * bytes4(keccak256('name()')) == 0x06fdde03\\n * bytes4(keccak256('symbol()')) == 0x95d89b41\\n * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd\\n *\\n * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f;\\n\\n /*\\n * bytes4(keccak256('totalSupply()')) == 0x18160ddd\\n * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59\\n * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7\\n *\\n * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;\\n\\n /**\\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\\n */\\n constructor (string memory name_, string memory symbol_) public {\\n _name = name_;\\n _symbol = symbol_;\\n\\n // register the supported interfaces to conform to ERC721 via ERC165\\n _registerInterface(_INTERFACE_ID_ERC721);\\n _registerInterface(_INTERFACE_ID_ERC721_METADATA);\\n _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE);\\n }\\n\\n /**\\n * @dev See {IERC721-balanceOf}.\\n */\\n function balanceOf(address owner) public view virtual override returns (uint256) {\\n require(owner != address(0), \\\"ERC721: balance query for the zero address\\\");\\n return _holderTokens[owner].length();\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n return _tokenOwners.get(tokenId, \\\"ERC721: owner query for nonexistent token\\\");\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-name}.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-symbol}.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-tokenURI}.\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n require(_exists(tokenId), \\\"ERC721Metadata: URI query for nonexistent token\\\");\\n\\n string memory _tokenURI = _tokenURIs[tokenId];\\n string memory base = baseURI();\\n\\n // If there is no base URI, return the token URI.\\n if (bytes(base).length == 0) {\\n return _tokenURI;\\n }\\n // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).\\n if (bytes(_tokenURI).length > 0) {\\n return string(abi.encodePacked(base, _tokenURI));\\n }\\n // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI.\\n return string(abi.encodePacked(base, tokenId.toString()));\\n }\\n\\n /**\\n * @dev Returns the base URI set via {_setBaseURI}. This will be\\n * automatically added as a prefix in {tokenURI} to each token's URI, or\\n * to the token ID if no specific URI is set for that token ID.\\n */\\n function baseURI() public view virtual returns (string memory) {\\n return _baseURI;\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\\n return _holderTokens[owner].at(index);\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds\\n return _tokenOwners.length();\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenByIndex}.\\n */\\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\\n (uint256 tokenId, ) = _tokenOwners.at(index);\\n return tokenId;\\n }\\n\\n /**\\n * @dev See {IERC721-approve}.\\n */\\n function approve(address to, uint256 tokenId) public virtual override {\\n address owner = ERC721.ownerOf(tokenId);\\n require(to != owner, \\\"ERC721: approval to current owner\\\");\\n\\n require(_msgSender() == owner || ERC721.isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not owner nor approved for all\\\"\\n );\\n\\n _approve(to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-getApproved}.\\n */\\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\\n require(_exists(tokenId), \\\"ERC721: approved query for nonexistent token\\\");\\n\\n return _tokenApprovals[tokenId];\\n }\\n\\n /**\\n * @dev See {IERC721-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n require(operator != _msgSender(), \\\"ERC721: approve to caller\\\");\\n\\n _operatorApprovals[_msgSender()][operator] = approved;\\n emit ApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC721-isApprovedForAll}.\\n */\\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[owner][operator];\\n }\\n\\n /**\\n * @dev See {IERC721-transferFrom}.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) public virtual override {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: transfer caller is not owner nor approved\\\");\\n\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: transfer caller is not owner nor approved\\\");\\n _safeTransfer(from, to, tokenId, _data);\\n }\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * `_data` is additional data, it has no specified format and it is sent in call to `to`.\\n *\\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\\n * implement alternative mechanisms to perform token transfer, such as signature-based.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual {\\n _transfer(from, to, tokenId);\\n require(_checkOnERC721Received(from, to, tokenId, _data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Returns whether `tokenId` exists.\\n *\\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\\n *\\n * Tokens start existing when they are minted (`_mint`),\\n * and stop existing when they are burned (`_burn`).\\n */\\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\\n return _tokenOwners.contains(tokenId);\\n }\\n\\n /**\\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\\n require(_exists(tokenId), \\\"ERC721: operator query for nonexistent token\\\");\\n address owner = ERC721.ownerOf(tokenId);\\n return (spender == owner || getApproved(tokenId) == spender || ERC721.isApprovedForAll(owner, spender));\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n d*\\n * - `tokenId` must not exist.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeMint(address to, uint256 tokenId) internal virtual {\\n _safeMint(to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\\n */\\n function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual {\\n _mint(to, tokenId);\\n require(_checkOnERC721Received(address(0), to, tokenId, _data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Mints `tokenId` and transfers it to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - `to` cannot be the zero address.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _mint(address to, uint256 tokenId) internal virtual {\\n require(to != address(0), \\\"ERC721: mint to the zero address\\\");\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n _beforeTokenTransfer(address(0), to, tokenId);\\n\\n _holderTokens[to].add(tokenId);\\n\\n _tokenOwners.set(tokenId, to);\\n\\n emit Transfer(address(0), to, tokenId);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _burn(uint256 tokenId) internal virtual {\\n address owner = ERC721.ownerOf(tokenId); // internal owner\\n\\n _beforeTokenTransfer(owner, address(0), tokenId);\\n\\n // Clear approvals\\n _approve(address(0), tokenId);\\n\\n // Clear metadata (if any)\\n if (bytes(_tokenURIs[tokenId]).length != 0) {\\n delete _tokenURIs[tokenId];\\n }\\n\\n _holderTokens[owner].remove(tokenId);\\n\\n _tokenOwners.remove(tokenId);\\n\\n emit Transfer(owner, address(0), tokenId);\\n }\\n\\n /**\\n * @dev Transfers `tokenId` from `from` to `to`.\\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _transfer(address from, address to, uint256 tokenId) internal virtual {\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer of token that is not own\\\"); // internal owner\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId);\\n\\n // Clear approvals from the previous owner\\n _approve(address(0), tokenId);\\n\\n _holderTokens[from].remove(tokenId);\\n _holderTokens[to].add(tokenId);\\n\\n _tokenOwners.set(tokenId, to);\\n\\n emit Transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {\\n require(_exists(tokenId), \\\"ERC721Metadata: URI set of nonexistent token\\\");\\n _tokenURIs[tokenId] = _tokenURI;\\n }\\n\\n /**\\n * @dev Internal function to set the base URI for all token IDs. It is\\n * automatically added as a prefix to the value returned in {tokenURI},\\n * or to the token ID if {tokenURI} is empty.\\n */\\n function _setBaseURI(string memory baseURI_) internal virtual {\\n _baseURI = baseURI_;\\n }\\n\\n /**\\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\\n * The call is not executed if the target address is not a contract.\\n *\\n * @param from address representing the previous owner of the given token ID\\n * @param to target address that will receive the tokens\\n * @param tokenId uint256 ID of the token to be transferred\\n * @param _data bytes optional data to send along with the call\\n * @return bool whether the call correctly returned the expected magic value\\n */\\n function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data)\\n private returns (bool)\\n {\\n if (!to.isContract()) {\\n return true;\\n }\\n bytes memory returndata = to.functionCall(abi.encodeWithSelector(\\n IERC721Receiver(to).onERC721Received.selector,\\n _msgSender(),\\n from,\\n tokenId,\\n _data\\n ), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n bytes4 retval = abi.decode(returndata, (bytes4));\\n return (retval == _ERC721_RECEIVED);\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * Emits an {Approval} event.\\n */\\n function _approve(address to, uint256 tokenId) internal virtual {\\n _tokenApprovals[tokenId] = to;\\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId); // internal owner\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\\n * transferred to `to`.\\n * - When `from` is zero, `tokenId` will be minted for `to`.\\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { }\\n}\\n\",\"keccak256\":\"0x118ed7540f56b21ff92e21ebaa73584048e98d2ac04ca67571329bb8dbd9032f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"../../introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x2d99a0deb6648c34fbc66d6ac4a2d64798d7a5321b45624f6736fadc63da1962\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"./IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Enumerable is IERC721 {\\n\\n /**\\n * @dev Returns the total amount of tokens stored by the contract.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns a token ID owned by `owner` at a given `index` of its token list.\\n * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);\\n\\n /**\\n * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.\\n * Use along with {totalSupply} to enumerate all tokens.\\n */\\n function tokenByIndex(uint256 index) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xe6bd1b1218338b6f9fe17776f48623b4ac3d8a40405f74a44bc23c00abe2ca13\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"./IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xccb917776f826ac6b68bd5a15a5f711e3967848a52ba11e6104d9a4f593314a7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721Receiver {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.\\n */\\n function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0x52146049d6709c870e8ddcd988b5155cb6c5d640cfcd8978aee52bc1ba2ec4eb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\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 { size := extcodesize(account) }\\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, \\\"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, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Counters.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../math/SafeMath.sol\\\";\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath}\\n * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never\\n * directly accessed.\\n */\\nlibrary Counters {\\n using SafeMath for uint256;\\n\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n // The {SafeMath} overflow check can be skipped here, see the comment at the top\\n counter._value += 1;\\n }\\n\\n function decrement(Counter storage counter) internal {\\n counter._value = counter._value.sub(1);\\n }\\n}\\n\",\"keccak256\":\"0x21662e4254ce4ac8570b30cc7ab31435966b3cb778a56ba4d09276881cfb2437\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/EnumerableMap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 *\\n * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are\\n * supported.\\n */\\nlibrary EnumerableMap {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Map type with\\n // bytes32 keys and values.\\n // The Map implementation uses private functions, and user-facing\\n // implementations (such as Uint256ToAddressMap) are just wrappers around\\n // the underlying Map.\\n // This means that we can only create new EnumerableMaps for types that fit\\n // in bytes32.\\n\\n struct MapEntry {\\n bytes32 _key;\\n bytes32 _value;\\n }\\n\\n struct Map {\\n // Storage of map keys and values\\n MapEntry[] _entries;\\n\\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 (bytes32 => 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(Map storage map, bytes32 key, bytes32 value) private 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 if (keyIndex == 0) { // Equivalent to !contains(map, key)\\n map._entries.push(MapEntry({ _key: key, _value: value }));\\n // The entry is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n map._indexes[key] = map._entries.length;\\n return true;\\n } else {\\n map._entries[keyIndex - 1]._value = value;\\n return false;\\n }\\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(Map storage map, bytes32 key) private 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 if (keyIndex != 0) { // Equivalent to contains(map, key)\\n // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one\\n // in the array, and then remove the last entry (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = keyIndex - 1;\\n uint256 lastIndex = map._entries.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 MapEntry 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 map._entries.pop();\\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(Map storage map, bytes32 key) private 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(Map storage map) private view returns (uint256) {\\n return map._entries.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(Map storage map, uint256 index) private view returns (bytes32, bytes32) {\\n require(map._entries.length > index, \\\"EnumerableMap: index out of bounds\\\");\\n\\n MapEntry storage entry = map._entries[index];\\n return (entry._key, entry._value);\\n }\\n\\n /**\\n * @dev Tries to returns the value associated with `key`. O(1).\\n * Does not revert if `key` is not in the map.\\n */\\n function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key)\\n return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based\\n }\\n\\n /**\\n * @dev Returns the value associated with `key`. O(1).\\n *\\n * Requirements:\\n *\\n * - `key` must be in the map.\\n */\\n function _get(Map storage map, bytes32 key) private view returns (bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n require(keyIndex != 0, \\\"EnumerableMap: nonexistent key\\\"); // Equivalent to contains(map, key)\\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\\n }\\n\\n /**\\n * @dev Same as {_get}, with a custom error message when `key` is not in the map.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {_tryGet}.\\n */\\n function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key)\\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\\n }\\n\\n // UintToAddressMap\\n\\n struct UintToAddressMap {\\n Map _inner;\\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(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) {\\n return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the key was removed from the map, that is if it was present.\\n */\\n function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) {\\n return _remove(map._inner, bytes32(key));\\n }\\n\\n /**\\n * @dev Returns true if the key is in the map. O(1).\\n */\\n function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) {\\n return _contains(map._inner, bytes32(key));\\n }\\n\\n /**\\n * @dev Returns the number of elements in the map. O(1).\\n */\\n function length(UintToAddressMap storage map) internal view returns (uint256) {\\n return _length(map._inner);\\n }\\n\\n /**\\n * @dev Returns the element 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 *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) {\\n (bytes32 key, bytes32 value) = _at(map._inner, index);\\n return (uint256(key), address(uint160(uint256(value))));\\n }\\n\\n /**\\n * @dev Tries to returns the value associated with `key`. O(1).\\n * Does not revert if `key` is not in the map.\\n *\\n * _Available since v3.4._\\n */\\n function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) {\\n (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key));\\n return (success, address(uint160(uint256(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.\\n */\\n function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {\\n return address(uint160(uint256(_get(map._inner, bytes32(key)))));\\n }\\n\\n /**\\n * @dev Same as {get}, with a custom error message when `key` is not in the map.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryGet}.\\n */\\n function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) {\\n return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage))));\\n }\\n}\\n\",\"keccak256\":\"0x4b087f06b6670a131a5a14e53b1d2a5ef19c034cc5ec42eeebcf9554325744ad\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\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 (bytes32 => 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(Set storage set, bytes32 value) private 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(Set storage set, bytes32 value) private 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) { // 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 bytes32 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(Set storage set, bytes32 value) private 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(Set storage set) private 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(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\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(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\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(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\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(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\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 return _add(set._inner, bytes32(uint256(uint160(value))));\\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 return _remove(set._inner, bytes32(uint256(uint160(value))));\\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 _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\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 return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\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(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\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(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\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(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x1562cd9922fbf739edfb979f506809e2743789cbde3177515542161c3d04b164\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n uint256 index = digits - 1;\\n temp = value;\\n while (temp != 0) {\\n buffer[index--] = bytes1(uint8(48 + temp % 10));\\n temp /= 10;\\n }\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xa1e12f97981f1d0964b1c048978606a57127c56c438bab61cdfe269cad859a74\",\"license\":\"MIT\"},\"contracts/IshtarGate.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {ERC721} from '@openzeppelin/contracts/token/ERC721/ERC721.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Counters} from '@openzeppelin/contracts/utils/Counters.sol';\\nimport {IBabController} from './interfaces/IBabController.sol';\\nimport {IIshtarGate} from './interfaces/IIshtarGate.sol';\\nimport {IGarden} from './interfaces/IGarden.sol';\\n\\n/**\\n * @title IshtarGate\\n * @author Babylon Finance\\n *\\n * Contract that implements guestlists for Babylon Finance using an NFT\\n */\\ncontract IshtarGate is ERC721, IIshtarGate, Ownable {\\n using Counters for Counters.Counter;\\n using SafeMath for uint256;\\n\\n /* ============ Events ============ */\\n\\n event IshtarGateAwarded(address indexed _member, uint256 indexed _newItemId);\\n event GardenAccess(address indexed _member, address indexed _garden, uint8 _permission, uint256 _tokenId);\\n event GardenCreationPower(address indexed _member, bool _creation, uint256 _tokenId);\\n event GateURIUpdated(string indexed _newURI, string indexed _oldURI);\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the Controller contract\\n IBabController public controller;\\n\\n // Address of the Ishtar Gate JSON (Shared JSON)\\n string public override tokenURI;\\n\\n uint256 public override maxNumberOfInvites;\\n\\n // Permissions by community user\\n mapping(address => mapping(address => uint8)) public permissionsByCommunity;\\n mapping(address => bool) public canCreateAGarden;\\n mapping(address => uint256) public gardenAccessCount;\\n\\n uint8 public constant NONE = 0;\\n uint8 public constant JUST_LP = 1;\\n uint8 public constant STEWARD = 2;\\n uint8 public constant STRATEGIST = 3;\\n\\n Counters.Counter private _tokenIds;\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlyGardenCreator(address _garden) {\\n require(address(_garden) != address(0), 'Garden must exist');\\n IGarden garden = IGarden(_garden);\\n require(garden.controller() == address(controller), 'Controller must match');\\n require(msg.sender == garden.creator(), 'Only creator can give access to garden');\\n require(gardenAccessCount[_garden] < maxNumberOfInvites, 'The number of contributors must be below the limit');\\n _;\\n }\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Sets the protocol controller\\n *\\n * @param _controller Address of controller contract\\n * @param _tokenURI URL of the Ishtar Gate JSON metadata\\n */\\n constructor(IBabController _controller, string memory _tokenURI) ERC721('IshtarGate', 'ISHT') {\\n require(address(_controller) != address(0), 'Controller must exist');\\n controller = _controller;\\n tokenURI = _tokenURI;\\n maxNumberOfInvites = 10;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Changs the number of invites we are going to give per garden\\n *\\n * @param _maxNumberOfInvites New max number of invites per garden\\n */\\n function setMaxNumberOfInvites(uint256 _maxNumberOfInvites) external override onlyOwner {\\n require(_maxNumberOfInvites > maxNumberOfInvites, 'Invites must be higher');\\n maxNumberOfInvites = _maxNumberOfInvites;\\n }\\n\\n /**\\n * Updates the token URI of the gate NFT\\n *\\n * @param _tokenURI Address of the tokenURI\\n */\\n function updateGardenURI(string memory _tokenURI) external override onlyOwner {\\n string memory oldURI = tokenURI;\\n tokenURI = _tokenURI;\\n emit GateURIUpdated(tokenURI, oldURI);\\n }\\n\\n /**\\n * Awards the ishtar gate to a user and gives him access to a specific garden\\n *\\n * @param _user Address of the user\\n * @param _garden Community that the gate grants access to\\n * @param _permission Permissions of what user can do in the community\\n */\\n function setGardenAccess(\\n address _user,\\n address _garden,\\n uint8 _permission\\n ) external override onlyGardenCreator(_garden) returns (uint256) {\\n require(address(_user) != address(0), 'User must exist');\\n return _setIndividualGardenAccess(_user, _garden, _permission);\\n }\\n\\n /**\\n * Awards the ishtar gate to a list of users with permissions to a specific garden\\n *\\n * @param _garden Community that the gate grants access to\\n * @param _users Addresses of the users\\n * @param _perms List of permissions of what each user can do in the community\\n */\\n function grantGardenAccessBatch(\\n address _garden,\\n address[] calldata _users,\\n uint8[] calldata _perms\\n ) external override onlyGardenCreator(_garden) returns (bool) {\\n require(_users.length == _perms.length, 'Permissions and users must match');\\n for (uint8 i = 0; i < _users.length; i++) {\\n require(address(_users[i]) != address(0), 'User must exist');\\n _setIndividualGardenAccess(_users[i], _garden, _perms[i]);\\n }\\n return true;\\n }\\n\\n /**\\n * Awards the ishtar gate to a user and give/remove him garden creation capabilities.\\n *\\n * @param _user Address of the user\\n * @param _canCreate Boolean with permissions as to whether the user can create gardens\\n */\\n function setCreatorPermissions(address _user, bool _canCreate) external override onlyOwner returns (uint256) {\\n return _setCreatorPermissions(_user, _canCreate);\\n }\\n\\n /**\\n * Awards the ishtar gate to a list of users with permissions to create gardens\\n *\\n * @param _users Addresses of the users\\n * @param _perms Lists of booleans\\n */\\n function grantCreatorsInBatch(address[] calldata _users, bool[] calldata _perms)\\n external\\n override\\n onlyOwner\\n returns (bool)\\n {\\n require(_users.length == _perms.length, 'Permissions and users must match');\\n for (uint8 i = 0; i < _users.length; i++) {\\n _setCreatorPermissions(_users[i], _perms[i]);\\n }\\n return true;\\n }\\n\\n /* ============ Getter Functions ============ */\\n\\n /**\\n * Check if a user can create gardens\\n *\\n * @param _user Address of the user\\n * @return _canCreate Whether or not the user can create\\n */\\n function canCreate(address _user) external view override returns (bool) {\\n return balanceOf(_user) > 0 && canCreateAGarden[_user];\\n }\\n\\n /**\\n * Check if a user can join a specific garden\\n *\\n * @param _user Address of the user\\n * @param _garden Address of the _garden\\n * @return _canJoin Whether or not the user can join\\n */\\n function canJoinAGarden(address _garden, address _user) external view override returns (bool) {\\n return balanceOf(_user) > 0 && permissionsByCommunity[_garden][_user] >= JUST_LP;\\n }\\n\\n /**\\n * Check if a user can vote in a specific garden\\n *\\n * @param _user Address of the user\\n * @param _garden Address of the _garden\\n * @return _canVote Whether or not the user can vote\\n */\\n function canVoteInAGarden(address _garden, address _user) external view override returns (bool) {\\n return balanceOf(_user) > 0 && permissionsByCommunity[_garden][_user] >= STEWARD;\\n }\\n\\n /**\\n * Check if a user can add strategies in a specific garden\\n *\\n * @param _user Address of the user\\n * @param _garden Address of the _garden\\n * @return _canStrategize Whether or not the user can create strategies\\n */\\n function canAddStrategiesInAGarden(address _garden, address _user) external view override returns (bool) {\\n return balanceOf(_user) > 0 && permissionsByCommunity[_garden][_user] >= STRATEGIST;\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Gives a new gate to the user or retrieve the existing one\\n *\\n * @param _user Address of the user\\n */\\n function _createOrGetGateNFT(address _user) private returns (uint256) {\\n uint256 newItemId = 0;\\n if (balanceOf(_user) == 0) {\\n _tokenIds.increment();\\n newItemId = _tokenIds.current();\\n _safeMint(_user, newItemId);\\n _setTokenURI(newItemId, tokenURI);\\n emit IshtarGateAwarded(_user, newItemId);\\n } else {\\n newItemId = tokenOfOwnerByIndex(_user, 0);\\n }\\n return newItemId;\\n }\\n\\n /**\\n * Awards the ishtar gate to a user and gives him access to a specific garden\\n *\\n * @param _user Address of the user\\n * @param _garden Community that the gate grants access to\\n * @param _permission Permissions of what user can do in the community\\n */\\n function _setIndividualGardenAccess(\\n address _user,\\n address _garden,\\n uint8 _permission\\n ) private returns (uint256) {\\n uint256 newItemId = _createOrGetGateNFT(_user);\\n if (_permission > 0 && permissionsByCommunity[_garden][_user] == 0) {\\n gardenAccessCount[_garden] = gardenAccessCount[_garden].add(1);\\n }\\n if (_permission == 0 && permissionsByCommunity[_garden][_user] > 0) {\\n gardenAccessCount[_garden] = gardenAccessCount[_garden].sub(1);\\n }\\n permissionsByCommunity[_garden][_user] = _permission;\\n emit GardenAccess(_user, _garden, _permission, newItemId);\\n return newItemId;\\n }\\n\\n /**\\n * Awards the ishtar gate to a user and give/remove him garden creation capabilities.\\n *\\n * @param _user Address of the user\\n * @param _canCreate Boolean with permissions as to whether the user can create gardens\\n */\\n function _setCreatorPermissions(address _user, bool _canCreate) private returns (uint256) {\\n require(address(_user) != address(0), 'User must exist');\\n uint256 newItemId = _createOrGetGateNFT(_user);\\n canCreateAGarden[_user] = _canCreate;\\n emit GardenCreationPower(_user, _canCreate, newItemId);\\n return newItemId;\\n }\\n}\\n\",\"keccak256\":\"0xb2b0505a30039e6ea51cb16ea34ec9b53ff012419dcb873c98b9a62a9e73ba93\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityMinimum(uint256 _minRiskyPairLiquidityEth) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minRiskyPairLiquidityEth() external view returns (uint256);\\n\\n function getUniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0x57cf4ece98219f805a416e8c24728d30d9b37c4126d66785d2617b97e35ffae6\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function nftAddress() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategy(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function reenableEthForStrategies() external;\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x5e460136e0b45024ea1c1f32cde607f3ce75dd5b14cee34007d6bbd08beabc82\",\"license\":\"Apache License\"},\"contracts/interfaces/IIshtarGate.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIshtarGate\\n * @author Babylon Finance\\n *\\n * Interface for interacting with the Gate Guestlist NFT\\n */\\ninterface IIshtarGate {\\n /* ============ Functions ============ */\\n\\n function setGardenAccess(\\n address _user,\\n address _garden,\\n uint8 _permission\\n ) external returns (uint256);\\n\\n function setCreatorPermissions(address _user, bool _canCreate) external returns (uint256);\\n\\n function grantGardenAccessBatch(\\n address _garden,\\n address[] calldata _users,\\n uint8[] calldata _perms\\n ) external returns (bool);\\n\\n function maxNumberOfInvites() external view returns (uint256);\\n\\n function tokenURI() external view returns (string memory);\\n\\n function setMaxNumberOfInvites(uint256 _maxNumberOfInvites) external;\\n\\n function updateGardenURI(string memory _tokenURI) external;\\n\\n function grantCreatorsInBatch(address[] calldata _users, bool[] calldata _perms) external returns (bool);\\n\\n function canCreate(address _user) external view returns (bool);\\n\\n function canJoinAGarden(address _garden, address _user) external view returns (bool);\\n\\n function canVoteInAGarden(address _garden, address _user) external view returns (bool);\\n\\n function canAddStrategiesInAGarden(address _garden, address _user) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x0731159ca37445441424ec07de68ac1347a6a3c4559eed6db7682a6018660d63\",\"license\":\"Apache License\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b5060405162003a9038038062003a90833981810160405260408110156200003757600080fd5b8151602083018051604051929492938301929190846401000000008211156200005f57600080fd5b9083019060208201858111156200007557600080fd5b82516401000000008111828201881017156200009057600080fd5b82525081516020918201929091019080838360005b83811015620000bf578181015183820152602001620000a5565b50505050905090810190601f168015620000ed5780820380516001836020036101000a031916815260200191505b5060408181018152600a8252694973687461724761746560b01b602080840191909152815180830190925260048252631254d21560e21b9082015290935091506200014190506301ffc9a760e01b6200029a565b81516200015690600690602085019062000323565b5080516200016c90600790602084019062000323565b506200017f6380ac58cd60e01b6200029a565b62000191635b5e139f60e01b6200029a565b620001a363780e9d6360e01b6200029a565b5060009050620001b26200031f565b600a80546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600160a01b0382166200025c576040805162461bcd60e51b815260206004820152601560248201527f436f6e74726f6c6c6572206d7573742065786973740000000000000000000000604482015290519081900360640190fd5b600b80546001600160a01b0319166001600160a01b03841617905580516200028c90600c90602084019062000323565b5050600a600d5550620003cf565b6001600160e01b03198082161415620002fa576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b3390565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826200035b5760008555620003a6565b82601f106200037657805160ff1916838001178555620003a6565b82800160010185558215620003a6579182015b82811115620003a657825182559160200191906001019062000389565b50620003b4929150620003b8565b5090565b5b80821115620003b45760008155600101620003b9565b6136b180620003df6000396000f3fe608060405234801561001057600080fd5b50600436106102c85760003560e01c806370793b4b1161017b578063b07b7e7f116100d8578063d83e2c971161008c578063e9c6fe3111610071578063e9c6fe3114610a76578063f2fde38b14610aa4578063f77c479114610aca576102c8565b8063d83e2c97146109a2578063e985e9c514610a48576102c8565b8063c7ec5d5d116100bd578063c7ec5d5d14610895578063c87b56dd146108c3578063d1610652146108e0576102c8565b8063b07b7e7f146107c7578063b88d4fde146107cf576102c8565b8063835253941161012f57806395d89b411161011457806395d89b41146107895780639cfdede314610791578063a22cb46514610799576102c8565b806383525394146107795780638da5cb5b14610781576102c8565b8063715018a611610160578063715018a61461071d5780637804a5dc1461072557806382e894231461074b576102c8565b806370793b4b146106bd57806370a08231146106f7576102c8565b80632f745c59116102295780634f6ccce7116101dd5780636352211e116101c25780636352211e1461067b57806365f64118146106985780636c0360eb146106b5576102c8565b80634f6ccce7146106305780635066c7141461064d576102c8565b80633c130d901161020e5780633c130d90146105c457806342842e0e146105cc5780634d98fbf014610602576102c8565b80632f745c591461057257806331eff3831461059e576102c8565b8063187af87d1161028057806323b872dd1161026557806323b872dd146104625780632561e6b21461049857806327844ee21461056a576102c8565b8063187af87d1461041e5780631b8f119014610444576102c8565b8063081812fc116102b1578063081812fc1461039d578063095ea7b3146103d657806318160ddd14610404576102c8565b806301ffc9a7146102cd57806306fdde0314610320575b600080fd5b61030c600480360360208110156102e357600080fd5b50357fffffffff0000000000000000000000000000000000000000000000000000000016610ad2565b604080519115158252519081900360200190f35b610328610b0d565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561036257818101518382015260200161034a565b50505050905090810190601f16801561038f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103ba600480360360208110156103b357600080fd5b5035610ba3565b604080516001600160a01b039092168252519081900360200190f35b610402600480360360408110156103ec57600080fd5b506001600160a01b038135169060200135610c05565b005b61040c610ce0565b60408051918252519081900360200190f35b61030c6004803603602081101561043457600080fd5b50356001600160a01b0316610cf1565b61044c610d06565b6040805160ff9092168252519081900360200190f35b6104026004803603606081101561047857600080fd5b506001600160a01b03813581169160208101359091169060400135610d0b565b61030c600480360360608110156104ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156104d957600080fd5b8201836020820111156104eb57600080fd5b8035906020019184602083028401116401000000008311171561050d57600080fd5b91939092909160208101903564010000000081111561052b57600080fd5b82018360208201111561053d57600080fd5b8035906020019184602083028401116401000000008311171561055f57600080fd5b509092509050610d62565b61044c6110bf565b61040c6004803603604081101561058857600080fd5b506001600160a01b0381351690602001356110c4565b61040c600480360360208110156105b457600080fd5b50356001600160a01b03166110ef565b610328611101565b610402600480360360608110156105e257600080fd5b506001600160a01b0381358116916020810135909116906040013561118f565b61030c6004803603604081101561061857600080fd5b506001600160a01b03813581169160200135166111aa565b61040c6004803603602081101561064657600080fd5b50356111f3565b61030c6004803603604081101561066357600080fd5b506001600160a01b0381358116916020013516611209565b6103ba6004803603602081101561069157600080fd5b5035611252565b610402600480360360208110156106ae57600080fd5b503561127a565b610328611349565b61040c600480360360608110156106d357600080fd5b5080356001600160a01b03908116916020810135909116906040013560ff166113aa565b61040c6004803603602081101561070d57600080fd5b50356001600160a01b031661163f565b6104026116a7565b61030c6004803603602081101561073b57600080fd5b50356001600160a01b0316611772565b61040c6004803603604081101561076157600080fd5b506001600160a01b03813516906020013515156117a5565b61044c611825565b6103ba61182a565b610328611839565b61044c61189a565b610402600480360360408110156107af57600080fd5b506001600160a01b038135169060200135151561189f565b61040c6119a4565b610402600480360360808110156107e557600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561082057600080fd5b82018360208201111561083257600080fd5b8035906020019184600183028401116401000000008311171561085457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506119aa945050505050565b61030c600480360360408110156108ab57600080fd5b506001600160a01b0381358116916020013516611a08565b610328600480360360208110156108d957600080fd5b5035611a51565b61030c600480360360408110156108f657600080fd5b81019060208101813564010000000081111561091157600080fd5b82018360208201111561092357600080fd5b8035906020019184602083028401116401000000008311171561094557600080fd5b91939092909160208101903564010000000081111561096357600080fd5b82018360208201111561097557600080fd5b8035906020019184602083028401116401000000008311171561099757600080fd5b509092509050611cd2565b610402600480360360208110156109b857600080fd5b8101906020810181356401000000008111156109d357600080fd5b8201836020820111156109e557600080fd5b80359060200191846001830284011164010000000083111715610a0757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611e00945050505050565b61030c60048036036040811015610a5e57600080fd5b506001600160a01b038135811691602001351661200f565b61044c60048036036040811015610a8c57600080fd5b506001600160a01b038135811691602001351661203d565b61040260048036036020811015610aba57600080fd5b50356001600160a01b031661205d565b6103ba61217f565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526020819052604090205460ff165b919050565b60068054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610b995780601f10610b6e57610100808354040283529160200191610b99565b820191906000526020600020905b815481529060010190602001808311610b7c57829003601f168201915b5050505050905090565b6000610bae8261218e565b610be95760405162461bcd60e51b815260040180806020018281038252602c81526020018061357a602c913960400191505060405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610c1082611252565b9050806001600160a01b0316836001600160a01b03161415610c635760405162461bcd60e51b815260040180806020018281038252602181526020018061362a6021913960400191505060405180910390fd5b806001600160a01b0316610c7561219b565b6001600160a01b03161480610c965750610c9681610c9161219b565b61200f565b610cd15760405162461bcd60e51b81526004018080602001828103825260388152602001806134cd6038913960400191505060405180910390fd5b610cdb838361219f565b505050565b6000610cec600261221a565b905090565b600f6020526000908152604090205460ff1681565b600281565b610d1c610d1661219b565b82612225565b610d575760405162461bcd60e51b815260040180806020018281038252603181526020018061364b6031913960400191505060405180910390fd5b610cdb8383836122c1565b6000856001600160a01b038116610dc0576040805162461bcd60e51b815260206004820152601160248201527f47617264656e206d757374206578697374000000000000000000000000000000604482015290519081900360640190fd5b600b546040805163f77c479160e01b8152905183926001600160a01b03908116929084169163f77c479191600480820192602092909190829003018186803b158015610e0b57600080fd5b505afa158015610e1f573d6000803e3d6000fd5b505050506040513d6020811015610e3557600080fd5b50516001600160a01b031614610e92576040805162461bcd60e51b815260206004820152601560248201527f436f6e74726f6c6c6572206d757374206d617463680000000000000000000000604482015290519081900360640190fd5b806001600160a01b03166302d05d3f6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ecb57600080fd5b505afa158015610edf573d6000803e3d6000fd5b505050506040513d6020811015610ef557600080fd5b50516001600160a01b03163314610f3d5760405162461bcd60e51b81526004018080602001828103825260268152602001806133856026913960400191505060405180910390fd5b600d546001600160a01b03831660009081526010602052604090205410610f955760405162461bcd60e51b81526004018080602001828103825260328152602001806133cd6032913960400191505060405180910390fd5b858414610fe9576040805162461bcd60e51b815260206004820181905260248201527f5065726d697373696f6e7320616e64207573657273206d757374206d61746368604482015290519081900360640190fd5b60005b60ff81168711156110b0576000888860ff841681811061100857fe5b905060200201356001600160a01b03166001600160a01b03161415611066576040805162461bcd60e51b815260206004820152600f60248201526e155cd95c881b5d5cdd08195e1a5cdd608a1b604482015290519081900360640190fd5b6110a788888360ff1681811061107857fe5b905060200201356001600160a01b03168a88888560ff1681811061109857fe5b9050602002013560ff1661240d565b50600101610fec565b50600198975050505050505050565b600181565b6001600160a01b03821660009081526001602052604081206110e69083612590565b90505b92915050565b60106020526000908152604090205481565b600c805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156111875780601f1061115c57610100808354040283529160200191611187565b820191906000526020600020905b81548152906001019060200180831161116a57829003601f168201915b505050505081565b610cdb838383604051806020016040528060008152506119aa565b6000806111b68361163f565b1180156110e65750506001600160a01b039182166000908152600e60209081526040808320939094168252919091522054600260ff909116101590565b60008061120160028461259c565b509392505050565b6000806112158361163f565b1180156110e65750506001600160a01b039182166000908152600e60209081526040808320939094168252919091522054600360ff909116101590565b60006110e98260405180606001604052806029815260200161352f60299139600291906125b8565b61128261219b565b6001600160a01b031661129361182a565b6001600160a01b0316146112ee576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600d548111611344576040805162461bcd60e51b815260206004820152601660248201527f496e7669746573206d7573742062652068696768657200000000000000000000604482015290519081900360640190fd5b600d55565b60098054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610b995780601f10610b6e57610100808354040283529160200191610b99565b6000826001600160a01b038116611408576040805162461bcd60e51b815260206004820152601160248201527f47617264656e206d757374206578697374000000000000000000000000000000604482015290519081900360640190fd5b600b546040805163f77c479160e01b8152905183926001600160a01b03908116929084169163f77c479191600480820192602092909190829003018186803b15801561145357600080fd5b505afa158015611467573d6000803e3d6000fd5b505050506040513d602081101561147d57600080fd5b50516001600160a01b0316146114da576040805162461bcd60e51b815260206004820152601560248201527f436f6e74726f6c6c6572206d757374206d617463680000000000000000000000604482015290519081900360640190fd5b806001600160a01b03166302d05d3f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561151357600080fd5b505afa158015611527573d6000803e3d6000fd5b505050506040513d602081101561153d57600080fd5b50516001600160a01b031633146115855760405162461bcd60e51b81526004018080602001828103825260268152602001806133856026913960400191505060405180910390fd5b600d546001600160a01b038316600090815260106020526040902054106115dd5760405162461bcd60e51b81526004018080602001828103825260328152602001806133cd6032913960400191505060405180910390fd5b6001600160a01b03861661162a576040805162461bcd60e51b815260206004820152600f60248201526e155cd95c881b5d5cdd08195e1a5cdd608a1b604482015290519081900360640190fd5b61163586868661240d565b9695505050505050565b60006001600160a01b0382166116865760405162461bcd60e51b815260040180806020018281038252602a815260200180613505602a913960400191505060405180910390fd5b6001600160a01b03821660009081526001602052604090206110e99061221a565b6116af61219b565b6001600160a01b03166116c061182a565b6001600160a01b03161461171b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600a546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600a805473ffffffffffffffffffffffffffffffffffffffff19169055565b60008061177e8361163f565b1180156110e95750506001600160a01b03166000908152600f602052604090205460ff1690565b60006117af61219b565b6001600160a01b03166117c061182a565b6001600160a01b03161461181b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6110e683836125c5565b600081565b600a546001600160a01b031690565b60078054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610b995780601f10610b6e57610100808354040283529160200191610b99565b600381565b6118a761219b565b6001600160a01b0316826001600160a01b0316141561190d576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b806005600061191a61219b565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff19169215159290921790915561195e61219b565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b600d5481565b6119bb6119b561219b565b83612225565b6119f65760405162461bcd60e51b815260040180806020018281038252603181526020018061364b6031913960400191505060405180910390fd5b611a028484848461268d565b50505050565b600080611a148361163f565b1180156110e65750506001600160a01b039182166000908152600e60209081526040808320939094168252919091522054600160ff909116101590565b6060611a5c8261218e565b611a975760405162461bcd60e51b815260040180806020018281038252602f8152602001806135fb602f913960400191505060405180910390fd5b60008281526008602090815260408083208054825160026001831615610100026000190190921691909104601f810185900485028201850190935282815292909190830182828015611b2a5780601f10611aff57610100808354040283529160200191611b2a565b820191906000526020600020905b815481529060010190602001808311611b0d57829003601f168201915b505050505090506000611b3b611349565b9050805160001415611b4f57509050610b08565b815115611c105780826040516020018083805190602001908083835b60208310611b8a5780518252601f199092019160209182019101611b6b565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310611bd25780518252601f199092019160209182019101611bb3565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405292505050610b08565b80611c1a856126df565b6040516020018083805190602001908083835b60208310611c4c5780518252601f199092019160209182019101611c2d565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310611c945780518252601f199092019160209182019101611c75565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405292505050919050565b6000611cdc61219b565b6001600160a01b0316611ced61182a565b6001600160a01b031614611d48576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b838214611d9c576040805162461bcd60e51b815260206004820181905260248201527f5065726d697373696f6e7320616e64207573657273206d757374206d61746368604482015290519081900360640190fd5b60005b60ff8116851115611df257611de986868360ff16818110611dbc57fe5b905060200201356001600160a01b031685858460ff16818110611ddb57fe5b9050602002013515156125c5565b50600101611d9f565b50600190505b949350505050565b611e0861219b565b6001600160a01b0316611e1961182a565b6001600160a01b031614611e74576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600c8054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260009390929091830182828015611f005780601f10611ed557610100808354040283529160200191611f00565b820191906000526020600020905b815481529060010190602001808311611ee357829003601f168201915b50508551939450611f1c93600c935060208701925090506132e3565b50806040518082805190602001908083835b60208310611f4d5780518252601f199092019160209182019101611f2e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020600c6040518082805460018160011615610100020316600290048015611fd75780601f10611fb5576101008083540402835291820191611fd7565b820191906000526020600020905b815481529060010190602001808311611fc3575b505060405190819003812092507fb9f7d3f8371d63914851c4029cbff0eb77d038eef46fa05b86df0339e490fffc9150600090a35050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b600e60209081526000928352604080842090915290825290205460ff1681565b61206561219b565b6001600160a01b031661207661182a565b6001600160a01b0316146120d1576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166121165760405162461bcd60e51b81526004018080602001828103825260268152602001806134316026913960400191505060405180910390fd5b600a546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600a805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600b546001600160a01b031681565b60006110e96002836127ee565b3390565b6000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841690811790915581906121e182611252565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006110e9826127fa565b60006122308261218e565b61226b5760405162461bcd60e51b815260040180806020018281038252602c8152602001806134a1602c913960400191505060405180910390fd5b600061227683611252565b9050806001600160a01b0316846001600160a01b031614806122b15750836001600160a01b03166122a684610ba3565b6001600160a01b0316145b80611df85750611df8818561200f565b826001600160a01b03166122d482611252565b6001600160a01b0316146123195760405162461bcd60e51b81526004018080602001828103825260298152602001806135d26029913960400191505060405180910390fd5b6001600160a01b03821661235e5760405162461bcd60e51b81526004018080602001828103825260248152602001806134576024913960400191505060405180910390fd5b612369838383610cdb565b61237460008261219f565b6001600160a01b038316600090815260016020526040902061239690826127fe565b506001600160a01b03821660009081526001602052604090206123b9908261280a565b506123c660028284612816565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000806124198561282c565b905060008360ff1611801561245457506001600160a01b038085166000908152600e602090815260408083209389168352929052205460ff16155b15612497576001600160a01b03841660009081526010602052604090205461247d90600161293a565b6001600160a01b0385166000908152601060205260409020555b60ff83161580156124cf57506001600160a01b038085166000908152600e602090815260408083209389168352929052205460ff1615155b15612512576001600160a01b0384166000908152601060205260409020546124f8906001612994565b6001600160a01b0385166000908152601060205260409020555b6001600160a01b038481166000818152600e60209081526040808320948a1680845294825291829020805460ff191660ff8916908117909155825190815290810185905281519293927ff9a024892baa30c97621bf85cea2ce82d0c128a59fa7714a72c1d37868fdb1be929181900390910190a390505b9392505050565b60006110e683836129f1565b60008080806125ab8686612a55565b9097909650945050505050565b6000611df8848484612ad0565b60006001600160a01b038316612614576040805162461bcd60e51b815260206004820152600f60248201526e155cd95c881b5d5cdd08195e1a5cdd608a1b604482015290519081900360640190fd5b600061261f8461282c565b6001600160a01b0385166000818152600f6020908152604091829020805460ff19168815159081179091558251908152908101849052815193945091927fc7ef194be94a46a1602ce7825850329a4560bcb6c4b5611df12e4dedf4db59d69281900390910190a29392505050565b6126988484846122c1565b6126a484848484612b9a565b611a025760405162461bcd60e51b81526004018080602001828103825260328152602001806133ff6032913960400191505060405180910390fd5b606081612720575060408051808201909152600181527f30000000000000000000000000000000000000000000000000000000000000006020820152610b08565b8160005b811561273857600101600a82049150612724565b60008167ffffffffffffffff8111801561275157600080fd5b506040519080825280601f01601f19166020018201604052801561277c576020820181803683370190505b50859350905060001982015b83156127e557600a840660300160f81b828280600190039350815181106127ab57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a84049350612788565b50949350505050565b60006110e68383612d44565b5490565b60006110e68383612d5c565b60006110e68383612e22565b6000611df884846001600160a01b038516612e6c565b6000806128388361163f565b61292f576128466011612f03565b61285060116127fa565b905061285c8382612f0c565b600c805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181526128f4938593919290918301828280156128ea5780601f106128bf576101008083540402835291602001916128ea565b820191906000526020600020905b8154815290600101906020018083116128cd57829003601f168201915b5050505050612f2a565b60405181906001600160a01b038516907f91f491a5affa462bcd7c0c9229592fcaaf55959bcce7f754256f9360d53f6aac90600090a36110e9565b6110e68360006110c4565b6000828201838110156110e6576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000828211156129eb576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b81546000908210612a335760405162461bcd60e51b81526004018080602001828103825260228152602001806133ab6022913960400191505060405180910390fd5b826000018281548110612a4257fe5b9060005260206000200154905092915050565b815460009081908310612a995760405162461bcd60e51b81526004018080602001828103825260228152602001806135586022913960400191505060405180910390fd5b6000846000018481548110612aaa57fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b60008281526001840160205260408120548281612b6b5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612b30578181015183820152602001612b18565b50505050905090810190601f168015612b5d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50846000016001820381548110612b7e57fe5b9060005260206000209060020201600101549150509392505050565b6000612bae846001600160a01b0316612f8d565b612bba57506001611df8565b6000612cf2630a85bd0160e11b612bcf61219b565b88878760405160240180856001600160a01b03168152602001846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612c36578181015183820152602001612c1e565b50505050905090810190601f168015612c635780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518060600160405280603281526020016133ff603291396001600160a01b0388169190612f93565b90506000818060200190516020811015612d0b57600080fd5b50517fffffffff0000000000000000000000000000000000000000000000000000000016630a85bd0160e11b1492505050949350505050565b60009081526001919091016020526040902054151590565b60008181526001830160205260408120548015612e185783546000198083019190810190600090879083908110612d8f57fe5b9060005260206000200154905080876000018481548110612dac57fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080612ddc57fe5b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506110e9565b60009150506110e9565b6000612e2e8383612d44565b612e64575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556110e9565b5060006110e9565b600082815260018401602052604081205480612ed1575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055612589565b82856000016001830381548110612ee457fe5b9060005260206000209060020201600101819055506000915050612589565b80546001019055565b612f26828260405180602001604052806000815250612fa2565b5050565b612f338261218e565b612f6e5760405162461bcd60e51b815260040180806020018281038252602c8152602001806135a6602c913960400191505060405180910390fd5b60008281526008602090815260409091208251610cdb928401906132e3565b3b151590565b6060611df88484600085612ff4565b612fac838361314f565b612fb96000848484612b9a565b610cdb5760405162461bcd60e51b81526004018080602001828103825260328152602001806133ff6032913960400191505060405180910390fd5b6060824710156130355760405162461bcd60e51b815260040180806020018281038252602681526020018061347b6026913960400191505060405180910390fd5b61303e85612f8d565b61308f576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106130cd5780518252601f1990920191602091820191016130ae565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461312f576040519150601f19603f3d011682016040523d82523d6000602084013e613134565b606091505b509150915061314482828661327d565b979650505050505050565b6001600160a01b0382166131aa576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b6131b38161218e565b15613205576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b61321160008383610cdb565b6001600160a01b0382166000908152600160205260409020613233908261280a565b5061324060028284612816565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6060831561328c575081612589565b82511561329c5782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315612b30578181015183820152602001612b18565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282613319576000855561335f565b82601f1061333257805160ff191683800117855561335f565b8280016001018555821561335f579182015b8281111561335f578251825591602001919060010190613344565b5061336b92915061336f565b5090565b5b8082111561336b576000815560010161337056fe4f6e6c792063726561746f722063616e20676976652061636365737320746f2067617264656e456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473546865206e756d626572206f6620636f6e7472696275746f7273206d7573742062652062656c6f7720746865206c696d69744552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734552433732313a207472616e7366657220746f20746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e64734552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732314d657461646174613a2055524920736574206f66206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314d657461646174613a2055524920717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564a26469706673582212206fc87fcdcbc213f495678c1802e900842d8ba587c5ab4afce7bc28dbcfee5aad64736f6c63430007060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102c85760003560e01c806370793b4b1161017b578063b07b7e7f116100d8578063d83e2c971161008c578063e9c6fe3111610071578063e9c6fe3114610a76578063f2fde38b14610aa4578063f77c479114610aca576102c8565b8063d83e2c97146109a2578063e985e9c514610a48576102c8565b8063c7ec5d5d116100bd578063c7ec5d5d14610895578063c87b56dd146108c3578063d1610652146108e0576102c8565b8063b07b7e7f146107c7578063b88d4fde146107cf576102c8565b8063835253941161012f57806395d89b411161011457806395d89b41146107895780639cfdede314610791578063a22cb46514610799576102c8565b806383525394146107795780638da5cb5b14610781576102c8565b8063715018a611610160578063715018a61461071d5780637804a5dc1461072557806382e894231461074b576102c8565b806370793b4b146106bd57806370a08231146106f7576102c8565b80632f745c59116102295780634f6ccce7116101dd5780636352211e116101c25780636352211e1461067b57806365f64118146106985780636c0360eb146106b5576102c8565b80634f6ccce7146106305780635066c7141461064d576102c8565b80633c130d901161020e5780633c130d90146105c457806342842e0e146105cc5780634d98fbf014610602576102c8565b80632f745c591461057257806331eff3831461059e576102c8565b8063187af87d1161028057806323b872dd1161026557806323b872dd146104625780632561e6b21461049857806327844ee21461056a576102c8565b8063187af87d1461041e5780631b8f119014610444576102c8565b8063081812fc116102b1578063081812fc1461039d578063095ea7b3146103d657806318160ddd14610404576102c8565b806301ffc9a7146102cd57806306fdde0314610320575b600080fd5b61030c600480360360208110156102e357600080fd5b50357fffffffff0000000000000000000000000000000000000000000000000000000016610ad2565b604080519115158252519081900360200190f35b610328610b0d565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561036257818101518382015260200161034a565b50505050905090810190601f16801561038f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103ba600480360360208110156103b357600080fd5b5035610ba3565b604080516001600160a01b039092168252519081900360200190f35b610402600480360360408110156103ec57600080fd5b506001600160a01b038135169060200135610c05565b005b61040c610ce0565b60408051918252519081900360200190f35b61030c6004803603602081101561043457600080fd5b50356001600160a01b0316610cf1565b61044c610d06565b6040805160ff9092168252519081900360200190f35b6104026004803603606081101561047857600080fd5b506001600160a01b03813581169160208101359091169060400135610d0b565b61030c600480360360608110156104ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156104d957600080fd5b8201836020820111156104eb57600080fd5b8035906020019184602083028401116401000000008311171561050d57600080fd5b91939092909160208101903564010000000081111561052b57600080fd5b82018360208201111561053d57600080fd5b8035906020019184602083028401116401000000008311171561055f57600080fd5b509092509050610d62565b61044c6110bf565b61040c6004803603604081101561058857600080fd5b506001600160a01b0381351690602001356110c4565b61040c600480360360208110156105b457600080fd5b50356001600160a01b03166110ef565b610328611101565b610402600480360360608110156105e257600080fd5b506001600160a01b0381358116916020810135909116906040013561118f565b61030c6004803603604081101561061857600080fd5b506001600160a01b03813581169160200135166111aa565b61040c6004803603602081101561064657600080fd5b50356111f3565b61030c6004803603604081101561066357600080fd5b506001600160a01b0381358116916020013516611209565b6103ba6004803603602081101561069157600080fd5b5035611252565b610402600480360360208110156106ae57600080fd5b503561127a565b610328611349565b61040c600480360360608110156106d357600080fd5b5080356001600160a01b03908116916020810135909116906040013560ff166113aa565b61040c6004803603602081101561070d57600080fd5b50356001600160a01b031661163f565b6104026116a7565b61030c6004803603602081101561073b57600080fd5b50356001600160a01b0316611772565b61040c6004803603604081101561076157600080fd5b506001600160a01b03813516906020013515156117a5565b61044c611825565b6103ba61182a565b610328611839565b61044c61189a565b610402600480360360408110156107af57600080fd5b506001600160a01b038135169060200135151561189f565b61040c6119a4565b610402600480360360808110156107e557600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561082057600080fd5b82018360208201111561083257600080fd5b8035906020019184600183028401116401000000008311171561085457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506119aa945050505050565b61030c600480360360408110156108ab57600080fd5b506001600160a01b0381358116916020013516611a08565b610328600480360360208110156108d957600080fd5b5035611a51565b61030c600480360360408110156108f657600080fd5b81019060208101813564010000000081111561091157600080fd5b82018360208201111561092357600080fd5b8035906020019184602083028401116401000000008311171561094557600080fd5b91939092909160208101903564010000000081111561096357600080fd5b82018360208201111561097557600080fd5b8035906020019184602083028401116401000000008311171561099757600080fd5b509092509050611cd2565b610402600480360360208110156109b857600080fd5b8101906020810181356401000000008111156109d357600080fd5b8201836020820111156109e557600080fd5b80359060200191846001830284011164010000000083111715610a0757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611e00945050505050565b61030c60048036036040811015610a5e57600080fd5b506001600160a01b038135811691602001351661200f565b61044c60048036036040811015610a8c57600080fd5b506001600160a01b038135811691602001351661203d565b61040260048036036020811015610aba57600080fd5b50356001600160a01b031661205d565b6103ba61217f565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526020819052604090205460ff165b919050565b60068054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610b995780601f10610b6e57610100808354040283529160200191610b99565b820191906000526020600020905b815481529060010190602001808311610b7c57829003601f168201915b5050505050905090565b6000610bae8261218e565b610be95760405162461bcd60e51b815260040180806020018281038252602c81526020018061357a602c913960400191505060405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610c1082611252565b9050806001600160a01b0316836001600160a01b03161415610c635760405162461bcd60e51b815260040180806020018281038252602181526020018061362a6021913960400191505060405180910390fd5b806001600160a01b0316610c7561219b565b6001600160a01b03161480610c965750610c9681610c9161219b565b61200f565b610cd15760405162461bcd60e51b81526004018080602001828103825260388152602001806134cd6038913960400191505060405180910390fd5b610cdb838361219f565b505050565b6000610cec600261221a565b905090565b600f6020526000908152604090205460ff1681565b600281565b610d1c610d1661219b565b82612225565b610d575760405162461bcd60e51b815260040180806020018281038252603181526020018061364b6031913960400191505060405180910390fd5b610cdb8383836122c1565b6000856001600160a01b038116610dc0576040805162461bcd60e51b815260206004820152601160248201527f47617264656e206d757374206578697374000000000000000000000000000000604482015290519081900360640190fd5b600b546040805163f77c479160e01b8152905183926001600160a01b03908116929084169163f77c479191600480820192602092909190829003018186803b158015610e0b57600080fd5b505afa158015610e1f573d6000803e3d6000fd5b505050506040513d6020811015610e3557600080fd5b50516001600160a01b031614610e92576040805162461bcd60e51b815260206004820152601560248201527f436f6e74726f6c6c6572206d757374206d617463680000000000000000000000604482015290519081900360640190fd5b806001600160a01b03166302d05d3f6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ecb57600080fd5b505afa158015610edf573d6000803e3d6000fd5b505050506040513d6020811015610ef557600080fd5b50516001600160a01b03163314610f3d5760405162461bcd60e51b81526004018080602001828103825260268152602001806133856026913960400191505060405180910390fd5b600d546001600160a01b03831660009081526010602052604090205410610f955760405162461bcd60e51b81526004018080602001828103825260328152602001806133cd6032913960400191505060405180910390fd5b858414610fe9576040805162461bcd60e51b815260206004820181905260248201527f5065726d697373696f6e7320616e64207573657273206d757374206d61746368604482015290519081900360640190fd5b60005b60ff81168711156110b0576000888860ff841681811061100857fe5b905060200201356001600160a01b03166001600160a01b03161415611066576040805162461bcd60e51b815260206004820152600f60248201526e155cd95c881b5d5cdd08195e1a5cdd608a1b604482015290519081900360640190fd5b6110a788888360ff1681811061107857fe5b905060200201356001600160a01b03168a88888560ff1681811061109857fe5b9050602002013560ff1661240d565b50600101610fec565b50600198975050505050505050565b600181565b6001600160a01b03821660009081526001602052604081206110e69083612590565b90505b92915050565b60106020526000908152604090205481565b600c805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156111875780601f1061115c57610100808354040283529160200191611187565b820191906000526020600020905b81548152906001019060200180831161116a57829003601f168201915b505050505081565b610cdb838383604051806020016040528060008152506119aa565b6000806111b68361163f565b1180156110e65750506001600160a01b039182166000908152600e60209081526040808320939094168252919091522054600260ff909116101590565b60008061120160028461259c565b509392505050565b6000806112158361163f565b1180156110e65750506001600160a01b039182166000908152600e60209081526040808320939094168252919091522054600360ff909116101590565b60006110e98260405180606001604052806029815260200161352f60299139600291906125b8565b61128261219b565b6001600160a01b031661129361182a565b6001600160a01b0316146112ee576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600d548111611344576040805162461bcd60e51b815260206004820152601660248201527f496e7669746573206d7573742062652068696768657200000000000000000000604482015290519081900360640190fd5b600d55565b60098054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610b995780601f10610b6e57610100808354040283529160200191610b99565b6000826001600160a01b038116611408576040805162461bcd60e51b815260206004820152601160248201527f47617264656e206d757374206578697374000000000000000000000000000000604482015290519081900360640190fd5b600b546040805163f77c479160e01b8152905183926001600160a01b03908116929084169163f77c479191600480820192602092909190829003018186803b15801561145357600080fd5b505afa158015611467573d6000803e3d6000fd5b505050506040513d602081101561147d57600080fd5b50516001600160a01b0316146114da576040805162461bcd60e51b815260206004820152601560248201527f436f6e74726f6c6c6572206d757374206d617463680000000000000000000000604482015290519081900360640190fd5b806001600160a01b03166302d05d3f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561151357600080fd5b505afa158015611527573d6000803e3d6000fd5b505050506040513d602081101561153d57600080fd5b50516001600160a01b031633146115855760405162461bcd60e51b81526004018080602001828103825260268152602001806133856026913960400191505060405180910390fd5b600d546001600160a01b038316600090815260106020526040902054106115dd5760405162461bcd60e51b81526004018080602001828103825260328152602001806133cd6032913960400191505060405180910390fd5b6001600160a01b03861661162a576040805162461bcd60e51b815260206004820152600f60248201526e155cd95c881b5d5cdd08195e1a5cdd608a1b604482015290519081900360640190fd5b61163586868661240d565b9695505050505050565b60006001600160a01b0382166116865760405162461bcd60e51b815260040180806020018281038252602a815260200180613505602a913960400191505060405180910390fd5b6001600160a01b03821660009081526001602052604090206110e99061221a565b6116af61219b565b6001600160a01b03166116c061182a565b6001600160a01b03161461171b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600a546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600a805473ffffffffffffffffffffffffffffffffffffffff19169055565b60008061177e8361163f565b1180156110e95750506001600160a01b03166000908152600f602052604090205460ff1690565b60006117af61219b565b6001600160a01b03166117c061182a565b6001600160a01b03161461181b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6110e683836125c5565b600081565b600a546001600160a01b031690565b60078054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610b995780601f10610b6e57610100808354040283529160200191610b99565b600381565b6118a761219b565b6001600160a01b0316826001600160a01b0316141561190d576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b806005600061191a61219b565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff19169215159290921790915561195e61219b565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b600d5481565b6119bb6119b561219b565b83612225565b6119f65760405162461bcd60e51b815260040180806020018281038252603181526020018061364b6031913960400191505060405180910390fd5b611a028484848461268d565b50505050565b600080611a148361163f565b1180156110e65750506001600160a01b039182166000908152600e60209081526040808320939094168252919091522054600160ff909116101590565b6060611a5c8261218e565b611a975760405162461bcd60e51b815260040180806020018281038252602f8152602001806135fb602f913960400191505060405180910390fd5b60008281526008602090815260408083208054825160026001831615610100026000190190921691909104601f810185900485028201850190935282815292909190830182828015611b2a5780601f10611aff57610100808354040283529160200191611b2a565b820191906000526020600020905b815481529060010190602001808311611b0d57829003601f168201915b505050505090506000611b3b611349565b9050805160001415611b4f57509050610b08565b815115611c105780826040516020018083805190602001908083835b60208310611b8a5780518252601f199092019160209182019101611b6b565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310611bd25780518252601f199092019160209182019101611bb3565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405292505050610b08565b80611c1a856126df565b6040516020018083805190602001908083835b60208310611c4c5780518252601f199092019160209182019101611c2d565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310611c945780518252601f199092019160209182019101611c75565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405292505050919050565b6000611cdc61219b565b6001600160a01b0316611ced61182a565b6001600160a01b031614611d48576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b838214611d9c576040805162461bcd60e51b815260206004820181905260248201527f5065726d697373696f6e7320616e64207573657273206d757374206d61746368604482015290519081900360640190fd5b60005b60ff8116851115611df257611de986868360ff16818110611dbc57fe5b905060200201356001600160a01b031685858460ff16818110611ddb57fe5b9050602002013515156125c5565b50600101611d9f565b50600190505b949350505050565b611e0861219b565b6001600160a01b0316611e1961182a565b6001600160a01b031614611e74576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600c8054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260009390929091830182828015611f005780601f10611ed557610100808354040283529160200191611f00565b820191906000526020600020905b815481529060010190602001808311611ee357829003601f168201915b50508551939450611f1c93600c935060208701925090506132e3565b50806040518082805190602001908083835b60208310611f4d5780518252601f199092019160209182019101611f2e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020600c6040518082805460018160011615610100020316600290048015611fd75780601f10611fb5576101008083540402835291820191611fd7565b820191906000526020600020905b815481529060010190602001808311611fc3575b505060405190819003812092507fb9f7d3f8371d63914851c4029cbff0eb77d038eef46fa05b86df0339e490fffc9150600090a35050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b600e60209081526000928352604080842090915290825290205460ff1681565b61206561219b565b6001600160a01b031661207661182a565b6001600160a01b0316146120d1576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166121165760405162461bcd60e51b81526004018080602001828103825260268152602001806134316026913960400191505060405180910390fd5b600a546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600a805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600b546001600160a01b031681565b60006110e96002836127ee565b3390565b6000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841690811790915581906121e182611252565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006110e9826127fa565b60006122308261218e565b61226b5760405162461bcd60e51b815260040180806020018281038252602c8152602001806134a1602c913960400191505060405180910390fd5b600061227683611252565b9050806001600160a01b0316846001600160a01b031614806122b15750836001600160a01b03166122a684610ba3565b6001600160a01b0316145b80611df85750611df8818561200f565b826001600160a01b03166122d482611252565b6001600160a01b0316146123195760405162461bcd60e51b81526004018080602001828103825260298152602001806135d26029913960400191505060405180910390fd5b6001600160a01b03821661235e5760405162461bcd60e51b81526004018080602001828103825260248152602001806134576024913960400191505060405180910390fd5b612369838383610cdb565b61237460008261219f565b6001600160a01b038316600090815260016020526040902061239690826127fe565b506001600160a01b03821660009081526001602052604090206123b9908261280a565b506123c660028284612816565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000806124198561282c565b905060008360ff1611801561245457506001600160a01b038085166000908152600e602090815260408083209389168352929052205460ff16155b15612497576001600160a01b03841660009081526010602052604090205461247d90600161293a565b6001600160a01b0385166000908152601060205260409020555b60ff83161580156124cf57506001600160a01b038085166000908152600e602090815260408083209389168352929052205460ff1615155b15612512576001600160a01b0384166000908152601060205260409020546124f8906001612994565b6001600160a01b0385166000908152601060205260409020555b6001600160a01b038481166000818152600e60209081526040808320948a1680845294825291829020805460ff191660ff8916908117909155825190815290810185905281519293927ff9a024892baa30c97621bf85cea2ce82d0c128a59fa7714a72c1d37868fdb1be929181900390910190a390505b9392505050565b60006110e683836129f1565b60008080806125ab8686612a55565b9097909650945050505050565b6000611df8848484612ad0565b60006001600160a01b038316612614576040805162461bcd60e51b815260206004820152600f60248201526e155cd95c881b5d5cdd08195e1a5cdd608a1b604482015290519081900360640190fd5b600061261f8461282c565b6001600160a01b0385166000818152600f6020908152604091829020805460ff19168815159081179091558251908152908101849052815193945091927fc7ef194be94a46a1602ce7825850329a4560bcb6c4b5611df12e4dedf4db59d69281900390910190a29392505050565b6126988484846122c1565b6126a484848484612b9a565b611a025760405162461bcd60e51b81526004018080602001828103825260328152602001806133ff6032913960400191505060405180910390fd5b606081612720575060408051808201909152600181527f30000000000000000000000000000000000000000000000000000000000000006020820152610b08565b8160005b811561273857600101600a82049150612724565b60008167ffffffffffffffff8111801561275157600080fd5b506040519080825280601f01601f19166020018201604052801561277c576020820181803683370190505b50859350905060001982015b83156127e557600a840660300160f81b828280600190039350815181106127ab57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a84049350612788565b50949350505050565b60006110e68383612d44565b5490565b60006110e68383612d5c565b60006110e68383612e22565b6000611df884846001600160a01b038516612e6c565b6000806128388361163f565b61292f576128466011612f03565b61285060116127fa565b905061285c8382612f0c565b600c805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181526128f4938593919290918301828280156128ea5780601f106128bf576101008083540402835291602001916128ea565b820191906000526020600020905b8154815290600101906020018083116128cd57829003601f168201915b5050505050612f2a565b60405181906001600160a01b038516907f91f491a5affa462bcd7c0c9229592fcaaf55959bcce7f754256f9360d53f6aac90600090a36110e9565b6110e68360006110c4565b6000828201838110156110e6576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000828211156129eb576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b81546000908210612a335760405162461bcd60e51b81526004018080602001828103825260228152602001806133ab6022913960400191505060405180910390fd5b826000018281548110612a4257fe5b9060005260206000200154905092915050565b815460009081908310612a995760405162461bcd60e51b81526004018080602001828103825260228152602001806135586022913960400191505060405180910390fd5b6000846000018481548110612aaa57fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b60008281526001840160205260408120548281612b6b5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612b30578181015183820152602001612b18565b50505050905090810190601f168015612b5d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50846000016001820381548110612b7e57fe5b9060005260206000209060020201600101549150509392505050565b6000612bae846001600160a01b0316612f8d565b612bba57506001611df8565b6000612cf2630a85bd0160e11b612bcf61219b565b88878760405160240180856001600160a01b03168152602001846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612c36578181015183820152602001612c1e565b50505050905090810190601f168015612c635780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518060600160405280603281526020016133ff603291396001600160a01b0388169190612f93565b90506000818060200190516020811015612d0b57600080fd5b50517fffffffff0000000000000000000000000000000000000000000000000000000016630a85bd0160e11b1492505050949350505050565b60009081526001919091016020526040902054151590565b60008181526001830160205260408120548015612e185783546000198083019190810190600090879083908110612d8f57fe5b9060005260206000200154905080876000018481548110612dac57fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080612ddc57fe5b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506110e9565b60009150506110e9565b6000612e2e8383612d44565b612e64575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556110e9565b5060006110e9565b600082815260018401602052604081205480612ed1575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055612589565b82856000016001830381548110612ee457fe5b9060005260206000209060020201600101819055506000915050612589565b80546001019055565b612f26828260405180602001604052806000815250612fa2565b5050565b612f338261218e565b612f6e5760405162461bcd60e51b815260040180806020018281038252602c8152602001806135a6602c913960400191505060405180910390fd5b60008281526008602090815260409091208251610cdb928401906132e3565b3b151590565b6060611df88484600085612ff4565b612fac838361314f565b612fb96000848484612b9a565b610cdb5760405162461bcd60e51b81526004018080602001828103825260328152602001806133ff6032913960400191505060405180910390fd5b6060824710156130355760405162461bcd60e51b815260040180806020018281038252602681526020018061347b6026913960400191505060405180910390fd5b61303e85612f8d565b61308f576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106130cd5780518252601f1990920191602091820191016130ae565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461312f576040519150601f19603f3d011682016040523d82523d6000602084013e613134565b606091505b509150915061314482828661327d565b979650505050505050565b6001600160a01b0382166131aa576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b6131b38161218e565b15613205576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b61321160008383610cdb565b6001600160a01b0382166000908152600160205260409020613233908261280a565b5061324060028284612816565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6060831561328c575081612589565b82511561329c5782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315612b30578181015183820152602001612b18565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282613319576000855561335f565b82601f1061333257805160ff191683800117855561335f565b8280016001018555821561335f579182015b8281111561335f578251825591602001919060010190613344565b5061336b92915061336f565b5090565b5b8082111561336b576000815560010161337056fe4f6e6c792063726561746f722063616e20676976652061636365737320746f2067617264656e456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473546865206e756d626572206f6620636f6e7472696275746f7273206d7573742062652062656c6f7720746865206c696d69744552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734552433732313a207472616e7366657220746f20746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e64734552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732314d657461646174613a2055524920736574206f66206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314d657461646174613a2055524920717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564a26469706673582212206fc87fcdcbc213f495678c1802e900842d8ba587c5ab4afce7bc28dbcfee5aad64736f6c63430007060033", + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBabController\",\"name\":\"_controller\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_tokenURI\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_member\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"_permission\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"GardenAccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_member\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_creation\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"GardenCreationPower\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"_newURI\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"_oldURI\",\"type\":\"string\"}],\"name\":\"GateURIUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_member\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_newItemId\",\"type\":\"uint256\"}],\"name\":\"IshtarGateAwarded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"JUST_LP\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NONE\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"STEWARD\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"STRATEGIST\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"baseURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"canAddStrategiesInAGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"canCreate\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"canCreateAGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"canJoinAGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"canVoteInAGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"contract IBabController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"gardenAccessCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_users\",\"type\":\"address[]\"},{\"internalType\":\"bool[]\",\"name\":\"_perms\",\"type\":\"bool[]\"}],\"name\":\"grantCreatorsInBatch\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"_users\",\"type\":\"address[]\"},{\"internalType\":\"uint8[]\",\"name\":\"_perms\",\"type\":\"uint8[]\"}],\"name\":\"grantGardenAccessBatch\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxNumberOfInvites\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"permissionsByCommunity\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_canCreate\",\"type\":\"bool\"}],\"name\":\"setCreatorPermissions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"_permission\",\"type\":\"uint8\"}],\"name\":\"setGardenAccess\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxNumberOfInvites\",\"type\":\"uint256\"}],\"name\":\"setMaxNumberOfInvites\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenOfOwnerByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"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\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_tokenURI\",\"type\":\"string\"}],\"name\":\"updateGardenURI\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Contract that implements guestlists for Babylon Finance using an NFT\",\"kind\":\"dev\",\"methods\":{\"approve(address,uint256)\":{\"details\":\"See {IERC721-approve}.\"},\"balanceOf(address)\":{\"details\":\"See {IERC721-balanceOf}.\"},\"baseURI()\":{\"details\":\"Returns the base URI set via {_setBaseURI}. This will be automatically added as a prefix in {tokenURI} to each token's URI, or to the token ID if no specific URI is set for that token ID.\"},\"canAddStrategiesInAGarden(address,address)\":{\"params\":{\"_garden\":\"Address of the _garden\",\"_user\":\"Address of the user\"},\"returns\":{\"_0\":\"_canStrategize Whether or not the user can create strategies\"}},\"canCreate(address)\":{\"params\":{\"_user\":\"Address of the user\"},\"returns\":{\"_0\":\"_canCreate Whether or not the user can create\"}},\"canJoinAGarden(address,address)\":{\"params\":{\"_garden\":\"Address of the _garden\",\"_user\":\"Address of the user\"},\"returns\":{\"_0\":\"_canJoin Whether or not the user can join\"}},\"canVoteInAGarden(address,address)\":{\"params\":{\"_garden\":\"Address of the _garden\",\"_user\":\"Address of the user\"},\"returns\":{\"_0\":\"_canVote Whether or not the user can vote\"}},\"constructor\":{\"params\":{\"_controller\":\"Address of controller contract\",\"_tokenURI\":\"URL of the Ishtar Gate JSON metadata\"}},\"getApproved(uint256)\":{\"details\":\"See {IERC721-getApproved}.\"},\"grantCreatorsInBatch(address[],bool[])\":{\"params\":{\"_perms\":\"Lists of booleans\",\"_users\":\"Addresses of the users\"}},\"grantGardenAccessBatch(address,address[],uint8[])\":{\"params\":{\"_garden\":\"Community that the gate grants access to\",\"_perms\":\"List of permissions of what each user can do in the community\",\"_users\":\"Addresses of the users\"}},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC721-isApprovedForAll}.\"},\"name()\":{\"details\":\"See {IERC721Metadata-name}.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"ownerOf(uint256)\":{\"details\":\"See {IERC721-ownerOf}.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"safeTransferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,bytes)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC721-setApprovalForAll}.\"},\"setCreatorPermissions(address,bool)\":{\"params\":{\"_canCreate\":\"Boolean with permissions as to whether the user can create gardens\",\"_user\":\"Address of the user\"}},\"setGardenAccess(address,address,uint8)\":{\"params\":{\"_garden\":\"Community that the gate grants access to\",\"_permission\":\"Permissions of what user can do in the community\",\"_user\":\"Address of the user\"}},\"setMaxNumberOfInvites(uint256)\":{\"params\":{\"_maxNumberOfInvites\":\"New max number of invites per garden\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}. Time complexity O(1), guaranteed to always use less than 30 000 gas.\"},\"symbol()\":{\"details\":\"See {IERC721Metadata-symbol}.\"},\"tokenByIndex(uint256)\":{\"details\":\"See {IERC721Enumerable-tokenByIndex}.\"},\"tokenOfOwnerByIndex(address,uint256)\":{\"details\":\"See {IERC721Enumerable-tokenOfOwnerByIndex}.\"},\"tokenURI(uint256)\":{\"details\":\"See {IERC721Metadata-tokenURI}.\"},\"totalSupply()\":{\"details\":\"See {IERC721Enumerable-totalSupply}.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-transferFrom}.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateGardenURI(string)\":{\"params\":{\"_tokenURI\":\"Address of the tokenURI\"}}},\"title\":\"IshtarGate\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"canAddStrategiesInAGarden(address,address)\":{\"notice\":\"Check if a user can add strategies in a specific garden\"},\"canCreate(address)\":{\"notice\":\"Check if a user can create gardens\"},\"canJoinAGarden(address,address)\":{\"notice\":\"Check if a user can join a specific garden\"},\"canVoteInAGarden(address,address)\":{\"notice\":\"Check if a user can vote in a specific garden\"},\"constructor\":{\"notice\":\"Sets the protocol controller\"},\"grantCreatorsInBatch(address[],bool[])\":{\"notice\":\"Awards the ishtar gate to a list of users with permissions to create gardens\"},\"grantGardenAccessBatch(address,address[],uint8[])\":{\"notice\":\"Awards the ishtar gate to a list of users with permissions to a specific garden\"},\"setCreatorPermissions(address,bool)\":{\"notice\":\"Awards the ishtar gate to a user and give/remove him garden creation capabilities.\"},\"setGardenAccess(address,address,uint8)\":{\"notice\":\"Awards the ishtar gate to a user and gives him access to a specific garden\"},\"setMaxNumberOfInvites(uint256)\":{\"notice\":\"Changs the number of invites we are going to give per garden\"},\"updateGardenURI(string)\":{\"notice\":\"Updates the token URI of the gate NFT\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/IshtarGate.sol\":\"IshtarGate\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () internal {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts may inherit from this and call {_registerInterface} to declare\\n * their support of an interface.\\n */\\nabstract contract ERC165 is IERC165 {\\n /*\\n * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7\\n */\\n bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;\\n\\n /**\\n * @dev Mapping of interface ids to whether or not it's supported.\\n */\\n mapping(bytes4 => bool) private _supportedInterfaces;\\n\\n constructor () internal {\\n // Derived contracts need only register support for their own interfaces,\\n // we register support for ERC165 itself here\\n _registerInterface(_INTERFACE_ID_ERC165);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n *\\n * Time complexity O(1), guaranteed to always use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return _supportedInterfaces[interfaceId];\\n }\\n\\n /**\\n * @dev Registers the contract as an implementer of the interface defined by\\n * `interfaceId`. Support of the actual ERC165 interface is automatic and\\n * registering its interface id is not required.\\n *\\n * See {IERC165-supportsInterface}.\\n *\\n * Requirements:\\n *\\n * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).\\n */\\n function _registerInterface(bytes4 interfaceId) internal virtual {\\n require(interfaceId != 0xffffffff, \\\"ERC165: invalid interface id\\\");\\n _supportedInterfaces[interfaceId] = true;\\n }\\n}\\n\",\"keccak256\":\"0x24141d2f6b98d4cb77a8936eae8cbaad2e261d9062bdc08036096f4550092501\",\"license\":\"MIT\"},\"@openzeppelin/contracts/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xf70bc25d981e4ec9673a995ad2995d5d493ea188d3d8f388bba9c227ce09fb82\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC721.sol\\\";\\nimport \\\"./IERC721Metadata.sol\\\";\\nimport \\\"./IERC721Enumerable.sol\\\";\\nimport \\\"./IERC721Receiver.sol\\\";\\nimport \\\"../../introspection/ERC165.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/EnumerableSet.sol\\\";\\nimport \\\"../../utils/EnumerableMap.sol\\\";\\nimport \\\"../../utils/Strings.sol\\\";\\n\\n/**\\n * @title ERC721 Non-Fungible Token Standard basic implementation\\n * @dev see https://eips.ethereum.org/EIPS/eip-721\\n */\\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {\\n using SafeMath for uint256;\\n using Address for address;\\n using EnumerableSet for EnumerableSet.UintSet;\\n using EnumerableMap for EnumerableMap.UintToAddressMap;\\n using Strings for uint256;\\n\\n // Equals to `bytes4(keccak256(\\\"onERC721Received(address,address,uint256,bytes)\\\"))`\\n // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector`\\n bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;\\n\\n // Mapping from holder address to their (enumerable) set of owned tokens\\n mapping (address => EnumerableSet.UintSet) private _holderTokens;\\n\\n // Enumerable mapping from token ids to their owners\\n EnumerableMap.UintToAddressMap private _tokenOwners;\\n\\n // Mapping from token ID to approved address\\n mapping (uint256 => address) private _tokenApprovals;\\n\\n // Mapping from owner to operator approvals\\n mapping (address => mapping (address => bool)) private _operatorApprovals;\\n\\n // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Optional mapping for token URIs\\n mapping (uint256 => string) private _tokenURIs;\\n\\n // Base URI\\n string private _baseURI;\\n\\n /*\\n * bytes4(keccak256('balanceOf(address)')) == 0x70a08231\\n * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e\\n * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3\\n * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc\\n * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465\\n * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5\\n * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd\\n * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e\\n * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde\\n *\\n * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^\\n * 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;\\n\\n /*\\n * bytes4(keccak256('name()')) == 0x06fdde03\\n * bytes4(keccak256('symbol()')) == 0x95d89b41\\n * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd\\n *\\n * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f;\\n\\n /*\\n * bytes4(keccak256('totalSupply()')) == 0x18160ddd\\n * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59\\n * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7\\n *\\n * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;\\n\\n /**\\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\\n */\\n constructor (string memory name_, string memory symbol_) public {\\n _name = name_;\\n _symbol = symbol_;\\n\\n // register the supported interfaces to conform to ERC721 via ERC165\\n _registerInterface(_INTERFACE_ID_ERC721);\\n _registerInterface(_INTERFACE_ID_ERC721_METADATA);\\n _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE);\\n }\\n\\n /**\\n * @dev See {IERC721-balanceOf}.\\n */\\n function balanceOf(address owner) public view virtual override returns (uint256) {\\n require(owner != address(0), \\\"ERC721: balance query for the zero address\\\");\\n return _holderTokens[owner].length();\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n return _tokenOwners.get(tokenId, \\\"ERC721: owner query for nonexistent token\\\");\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-name}.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-symbol}.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-tokenURI}.\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n require(_exists(tokenId), \\\"ERC721Metadata: URI query for nonexistent token\\\");\\n\\n string memory _tokenURI = _tokenURIs[tokenId];\\n string memory base = baseURI();\\n\\n // If there is no base URI, return the token URI.\\n if (bytes(base).length == 0) {\\n return _tokenURI;\\n }\\n // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).\\n if (bytes(_tokenURI).length > 0) {\\n return string(abi.encodePacked(base, _tokenURI));\\n }\\n // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI.\\n return string(abi.encodePacked(base, tokenId.toString()));\\n }\\n\\n /**\\n * @dev Returns the base URI set via {_setBaseURI}. This will be\\n * automatically added as a prefix in {tokenURI} to each token's URI, or\\n * to the token ID if no specific URI is set for that token ID.\\n */\\n function baseURI() public view virtual returns (string memory) {\\n return _baseURI;\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\\n return _holderTokens[owner].at(index);\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds\\n return _tokenOwners.length();\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenByIndex}.\\n */\\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\\n (uint256 tokenId, ) = _tokenOwners.at(index);\\n return tokenId;\\n }\\n\\n /**\\n * @dev See {IERC721-approve}.\\n */\\n function approve(address to, uint256 tokenId) public virtual override {\\n address owner = ERC721.ownerOf(tokenId);\\n require(to != owner, \\\"ERC721: approval to current owner\\\");\\n\\n require(_msgSender() == owner || ERC721.isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not owner nor approved for all\\\"\\n );\\n\\n _approve(to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-getApproved}.\\n */\\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\\n require(_exists(tokenId), \\\"ERC721: approved query for nonexistent token\\\");\\n\\n return _tokenApprovals[tokenId];\\n }\\n\\n /**\\n * @dev See {IERC721-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n require(operator != _msgSender(), \\\"ERC721: approve to caller\\\");\\n\\n _operatorApprovals[_msgSender()][operator] = approved;\\n emit ApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC721-isApprovedForAll}.\\n */\\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[owner][operator];\\n }\\n\\n /**\\n * @dev See {IERC721-transferFrom}.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) public virtual override {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: transfer caller is not owner nor approved\\\");\\n\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: transfer caller is not owner nor approved\\\");\\n _safeTransfer(from, to, tokenId, _data);\\n }\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * `_data` is additional data, it has no specified format and it is sent in call to `to`.\\n *\\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\\n * implement alternative mechanisms to perform token transfer, such as signature-based.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual {\\n _transfer(from, to, tokenId);\\n require(_checkOnERC721Received(from, to, tokenId, _data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Returns whether `tokenId` exists.\\n *\\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\\n *\\n * Tokens start existing when they are minted (`_mint`),\\n * and stop existing when they are burned (`_burn`).\\n */\\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\\n return _tokenOwners.contains(tokenId);\\n }\\n\\n /**\\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\\n require(_exists(tokenId), \\\"ERC721: operator query for nonexistent token\\\");\\n address owner = ERC721.ownerOf(tokenId);\\n return (spender == owner || getApproved(tokenId) == spender || ERC721.isApprovedForAll(owner, spender));\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n d*\\n * - `tokenId` must not exist.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeMint(address to, uint256 tokenId) internal virtual {\\n _safeMint(to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\\n */\\n function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual {\\n _mint(to, tokenId);\\n require(_checkOnERC721Received(address(0), to, tokenId, _data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Mints `tokenId` and transfers it to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - `to` cannot be the zero address.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _mint(address to, uint256 tokenId) internal virtual {\\n require(to != address(0), \\\"ERC721: mint to the zero address\\\");\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n _beforeTokenTransfer(address(0), to, tokenId);\\n\\n _holderTokens[to].add(tokenId);\\n\\n _tokenOwners.set(tokenId, to);\\n\\n emit Transfer(address(0), to, tokenId);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _burn(uint256 tokenId) internal virtual {\\n address owner = ERC721.ownerOf(tokenId); // internal owner\\n\\n _beforeTokenTransfer(owner, address(0), tokenId);\\n\\n // Clear approvals\\n _approve(address(0), tokenId);\\n\\n // Clear metadata (if any)\\n if (bytes(_tokenURIs[tokenId]).length != 0) {\\n delete _tokenURIs[tokenId];\\n }\\n\\n _holderTokens[owner].remove(tokenId);\\n\\n _tokenOwners.remove(tokenId);\\n\\n emit Transfer(owner, address(0), tokenId);\\n }\\n\\n /**\\n * @dev Transfers `tokenId` from `from` to `to`.\\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _transfer(address from, address to, uint256 tokenId) internal virtual {\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer of token that is not own\\\"); // internal owner\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId);\\n\\n // Clear approvals from the previous owner\\n _approve(address(0), tokenId);\\n\\n _holderTokens[from].remove(tokenId);\\n _holderTokens[to].add(tokenId);\\n\\n _tokenOwners.set(tokenId, to);\\n\\n emit Transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {\\n require(_exists(tokenId), \\\"ERC721Metadata: URI set of nonexistent token\\\");\\n _tokenURIs[tokenId] = _tokenURI;\\n }\\n\\n /**\\n * @dev Internal function to set the base URI for all token IDs. It is\\n * automatically added as a prefix to the value returned in {tokenURI},\\n * or to the token ID if {tokenURI} is empty.\\n */\\n function _setBaseURI(string memory baseURI_) internal virtual {\\n _baseURI = baseURI_;\\n }\\n\\n /**\\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\\n * The call is not executed if the target address is not a contract.\\n *\\n * @param from address representing the previous owner of the given token ID\\n * @param to target address that will receive the tokens\\n * @param tokenId uint256 ID of the token to be transferred\\n * @param _data bytes optional data to send along with the call\\n * @return bool whether the call correctly returned the expected magic value\\n */\\n function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data)\\n private returns (bool)\\n {\\n if (!to.isContract()) {\\n return true;\\n }\\n bytes memory returndata = to.functionCall(abi.encodeWithSelector(\\n IERC721Receiver(to).onERC721Received.selector,\\n _msgSender(),\\n from,\\n tokenId,\\n _data\\n ), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n bytes4 retval = abi.decode(returndata, (bytes4));\\n return (retval == _ERC721_RECEIVED);\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * Emits an {Approval} event.\\n */\\n function _approve(address to, uint256 tokenId) internal virtual {\\n _tokenApprovals[tokenId] = to;\\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId); // internal owner\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\\n * transferred to `to`.\\n * - When `from` is zero, `tokenId` will be minted for `to`.\\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { }\\n}\\n\",\"keccak256\":\"0x118ed7540f56b21ff92e21ebaa73584048e98d2ac04ca67571329bb8dbd9032f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"../../introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x2d99a0deb6648c34fbc66d6ac4a2d64798d7a5321b45624f6736fadc63da1962\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"./IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Enumerable is IERC721 {\\n\\n /**\\n * @dev Returns the total amount of tokens stored by the contract.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns a token ID owned by `owner` at a given `index` of its token list.\\n * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);\\n\\n /**\\n * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.\\n * Use along with {totalSupply} to enumerate all tokens.\\n */\\n function tokenByIndex(uint256 index) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xe6bd1b1218338b6f9fe17776f48623b4ac3d8a40405f74a44bc23c00abe2ca13\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"./IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xccb917776f826ac6b68bd5a15a5f711e3967848a52ba11e6104d9a4f593314a7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721Receiver {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.\\n */\\n function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0x52146049d6709c870e8ddcd988b5155cb6c5d640cfcd8978aee52bc1ba2ec4eb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\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 { size := extcodesize(account) }\\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, \\\"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, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Counters.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../math/SafeMath.sol\\\";\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath}\\n * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never\\n * directly accessed.\\n */\\nlibrary Counters {\\n using SafeMath for uint256;\\n\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n // The {SafeMath} overflow check can be skipped here, see the comment at the top\\n counter._value += 1;\\n }\\n\\n function decrement(Counter storage counter) internal {\\n counter._value = counter._value.sub(1);\\n }\\n}\\n\",\"keccak256\":\"0x21662e4254ce4ac8570b30cc7ab31435966b3cb778a56ba4d09276881cfb2437\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/EnumerableMap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 *\\n * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are\\n * supported.\\n */\\nlibrary EnumerableMap {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Map type with\\n // bytes32 keys and values.\\n // The Map implementation uses private functions, and user-facing\\n // implementations (such as Uint256ToAddressMap) are just wrappers around\\n // the underlying Map.\\n // This means that we can only create new EnumerableMaps for types that fit\\n // in bytes32.\\n\\n struct MapEntry {\\n bytes32 _key;\\n bytes32 _value;\\n }\\n\\n struct Map {\\n // Storage of map keys and values\\n MapEntry[] _entries;\\n\\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 (bytes32 => 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(Map storage map, bytes32 key, bytes32 value) private 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 if (keyIndex == 0) { // Equivalent to !contains(map, key)\\n map._entries.push(MapEntry({ _key: key, _value: value }));\\n // The entry is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n map._indexes[key] = map._entries.length;\\n return true;\\n } else {\\n map._entries[keyIndex - 1]._value = value;\\n return false;\\n }\\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(Map storage map, bytes32 key) private 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 if (keyIndex != 0) { // Equivalent to contains(map, key)\\n // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one\\n // in the array, and then remove the last entry (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = keyIndex - 1;\\n uint256 lastIndex = map._entries.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 MapEntry 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 map._entries.pop();\\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(Map storage map, bytes32 key) private 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(Map storage map) private view returns (uint256) {\\n return map._entries.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(Map storage map, uint256 index) private view returns (bytes32, bytes32) {\\n require(map._entries.length > index, \\\"EnumerableMap: index out of bounds\\\");\\n\\n MapEntry storage entry = map._entries[index];\\n return (entry._key, entry._value);\\n }\\n\\n /**\\n * @dev Tries to returns the value associated with `key`. O(1).\\n * Does not revert if `key` is not in the map.\\n */\\n function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key)\\n return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based\\n }\\n\\n /**\\n * @dev Returns the value associated with `key`. O(1).\\n *\\n * Requirements:\\n *\\n * - `key` must be in the map.\\n */\\n function _get(Map storage map, bytes32 key) private view returns (bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n require(keyIndex != 0, \\\"EnumerableMap: nonexistent key\\\"); // Equivalent to contains(map, key)\\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\\n }\\n\\n /**\\n * @dev Same as {_get}, with a custom error message when `key` is not in the map.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {_tryGet}.\\n */\\n function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key)\\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\\n }\\n\\n // UintToAddressMap\\n\\n struct UintToAddressMap {\\n Map _inner;\\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(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) {\\n return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the key was removed from the map, that is if it was present.\\n */\\n function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) {\\n return _remove(map._inner, bytes32(key));\\n }\\n\\n /**\\n * @dev Returns true if the key is in the map. O(1).\\n */\\n function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) {\\n return _contains(map._inner, bytes32(key));\\n }\\n\\n /**\\n * @dev Returns the number of elements in the map. O(1).\\n */\\n function length(UintToAddressMap storage map) internal view returns (uint256) {\\n return _length(map._inner);\\n }\\n\\n /**\\n * @dev Returns the element 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 *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) {\\n (bytes32 key, bytes32 value) = _at(map._inner, index);\\n return (uint256(key), address(uint160(uint256(value))));\\n }\\n\\n /**\\n * @dev Tries to returns the value associated with `key`. O(1).\\n * Does not revert if `key` is not in the map.\\n *\\n * _Available since v3.4._\\n */\\n function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) {\\n (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key));\\n return (success, address(uint160(uint256(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.\\n */\\n function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {\\n return address(uint160(uint256(_get(map._inner, bytes32(key)))));\\n }\\n\\n /**\\n * @dev Same as {get}, with a custom error message when `key` is not in the map.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryGet}.\\n */\\n function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) {\\n return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage))));\\n }\\n}\\n\",\"keccak256\":\"0x4b087f06b6670a131a5a14e53b1d2a5ef19c034cc5ec42eeebcf9554325744ad\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\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 (bytes32 => 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(Set storage set, bytes32 value) private 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(Set storage set, bytes32 value) private 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) { // 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 bytes32 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(Set storage set, bytes32 value) private 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(Set storage set) private 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(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\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(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\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(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\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(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\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 return _add(set._inner, bytes32(uint256(uint160(value))));\\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 return _remove(set._inner, bytes32(uint256(uint160(value))));\\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 _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\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 return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\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(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\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(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\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(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x1562cd9922fbf739edfb979f506809e2743789cbde3177515542161c3d04b164\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n uint256 index = digits - 1;\\n temp = value;\\n while (temp != 0) {\\n buffer[index--] = bytes1(uint8(48 + temp % 10));\\n temp /= 10;\\n }\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xa1e12f97981f1d0964b1c048978606a57127c56c438bab61cdfe269cad859a74\",\"license\":\"MIT\"},\"contracts/IshtarGate.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {ERC721} from '@openzeppelin/contracts/token/ERC721/ERC721.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Counters} from '@openzeppelin/contracts/utils/Counters.sol';\\nimport {IBabController} from './interfaces/IBabController.sol';\\nimport {IIshtarGate} from './interfaces/IIshtarGate.sol';\\nimport {IGarden} from './interfaces/IGarden.sol';\\n\\n/**\\n * @title IshtarGate\\n * @author Babylon Finance\\n *\\n * Contract that implements guestlists for Babylon Finance using an NFT\\n */\\ncontract IshtarGate is ERC721, IIshtarGate, Ownable {\\n using Counters for Counters.Counter;\\n using SafeMath for uint256;\\n\\n /* ============ Events ============ */\\n\\n event IshtarGateAwarded(address indexed _member, uint256 indexed _newItemId);\\n event GardenAccess(address indexed _member, address indexed _garden, uint8 _permission, uint256 _tokenId);\\n event GardenCreationPower(address indexed _member, bool _creation, uint256 _tokenId);\\n event GateURIUpdated(string indexed _newURI, string indexed _oldURI);\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the Controller contract\\n IBabController public controller;\\n\\n // Address of the Ishtar Gate JSON (Shared JSON)\\n string public override tokenURI;\\n\\n uint256 public override maxNumberOfInvites;\\n\\n // Permissions by community user\\n mapping(address => mapping(address => uint8)) public permissionsByCommunity;\\n mapping(address => bool) public canCreateAGarden;\\n mapping(address => uint256) public gardenAccessCount;\\n\\n uint8 public constant NONE = 0;\\n uint8 public constant JUST_LP = 1;\\n uint8 public constant STEWARD = 2;\\n uint8 public constant STRATEGIST = 3;\\n\\n Counters.Counter private _tokenIds;\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlyGardenCreator(address _garden) {\\n require(address(_garden) != address(0), 'Garden must exist');\\n IGarden garden = IGarden(_garden);\\n require(garden.controller() == address(controller), 'Controller must match');\\n require(msg.sender == garden.creator(), 'Only creator can give access to garden');\\n require(IBabController(controller).isSystemContract(address(_garden)));\\n require(IBabController(controller).isGarden(address(_garden)));\\n require(gardenAccessCount[_garden] <= maxNumberOfInvites, 'The number of contributors must be below the limit');\\n _;\\n }\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Sets the protocol controller\\n *\\n * @param _controller Address of controller contract\\n * @param _tokenURI URL of the Ishtar Gate JSON metadata\\n */\\n constructor(IBabController _controller, string memory _tokenURI) ERC721('IshtarGate', 'ISHT') {\\n require(address(_controller) != address(0), 'Controller must exist');\\n controller = _controller;\\n tokenURI = _tokenURI;\\n maxNumberOfInvites = 10;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Changs the number of invites we are going to give per garden\\n *\\n * @param _maxNumberOfInvites New max number of invites per garden\\n */\\n function setMaxNumberOfInvites(uint256 _maxNumberOfInvites) external override onlyOwner {\\n require(_maxNumberOfInvites > maxNumberOfInvites, 'Invites must be higher');\\n maxNumberOfInvites = _maxNumberOfInvites;\\n }\\n\\n /**\\n * Updates the token URI of the gate NFT\\n *\\n * @param _tokenURI Address of the tokenURI\\n */\\n function updateGardenURI(string memory _tokenURI) external override onlyOwner {\\n string memory oldURI = tokenURI;\\n tokenURI = _tokenURI;\\n emit GateURIUpdated(tokenURI, oldURI);\\n }\\n\\n /**\\n * Awards the ishtar gate to a user and gives him access to a specific garden\\n *\\n * @param _user Address of the user\\n * @param _garden Community that the gate grants access to\\n * @param _permission Permissions of what user can do in the community\\n */\\n function setGardenAccess(\\n address _user,\\n address _garden,\\n uint8 _permission\\n ) external override onlyGardenCreator(_garden) returns (uint256) {\\n require(address(_user) != address(0), 'User must exist');\\n return _setIndividualGardenAccess(_user, _garden, _permission);\\n }\\n\\n /**\\n * Awards the ishtar gate to a list of users with permissions to a specific garden\\n *\\n * @param _garden Community that the gate grants access to\\n * @param _users Addresses of the users\\n * @param _perms List of permissions of what each user can do in the community\\n */\\n function grantGardenAccessBatch(\\n address _garden,\\n address[] calldata _users,\\n uint8[] calldata _perms\\n ) external override onlyGardenCreator(_garden) returns (bool) {\\n require(_users.length == _perms.length, 'Permissions and users must match');\\n for (uint8 i = 0; i < _users.length; i++) {\\n require(address(_users[i]) != address(0), 'User must exist');\\n _setIndividualGardenAccess(_users[i], _garden, _perms[i]);\\n }\\n return true;\\n }\\n\\n /**\\n * Awards the ishtar gate to a user and give/remove him garden creation capabilities.\\n *\\n * @param _user Address of the user\\n * @param _canCreate Boolean with permissions as to whether the user can create gardens\\n */\\n function setCreatorPermissions(address _user, bool _canCreate) external override onlyOwner returns (uint256) {\\n return _setCreatorPermissions(_user, _canCreate);\\n }\\n\\n /**\\n * Awards the ishtar gate to a list of users with permissions to create gardens\\n *\\n * @param _users Addresses of the users\\n * @param _perms Lists of booleans\\n */\\n function grantCreatorsInBatch(address[] calldata _users, bool[] calldata _perms)\\n external\\n override\\n onlyOwner\\n returns (bool)\\n {\\n require(_users.length == _perms.length, 'Permissions and users must match');\\n for (uint8 i = 0; i < _users.length; i++) {\\n _setCreatorPermissions(_users[i], _perms[i]);\\n }\\n return true;\\n }\\n\\n /* ============ Getter Functions ============ */\\n\\n /**\\n * Check if a user can create gardens\\n *\\n * @param _user Address of the user\\n * @return _canCreate Whether or not the user can create\\n */\\n function canCreate(address _user) external view override returns (bool) {\\n return balanceOf(_user) > 0 && canCreateAGarden[_user];\\n }\\n\\n /**\\n * Check if a user can join a specific garden\\n *\\n * @param _user Address of the user\\n * @param _garden Address of the _garden\\n * @return _canJoin Whether or not the user can join\\n */\\n function canJoinAGarden(address _garden, address _user) external view override returns (bool) {\\n return\\n balanceOf(_user) > 0 &&\\n (permissionsByCommunity[_garden][_user] >= JUST_LP || IGarden(_garden).creator() == _user);\\n }\\n\\n /**\\n * Check if a user can vote in a specific garden\\n *\\n * @param _user Address of the user\\n * @param _garden Address of the _garden\\n * @return _canVote Whether or not the user can vote\\n */\\n function canVoteInAGarden(address _garden, address _user) external view override returns (bool) {\\n return\\n balanceOf(_user) > 0 &&\\n (permissionsByCommunity[_garden][_user] >= STEWARD || IGarden(_garden).creator() == _user);\\n }\\n\\n /**\\n * Check if a user can add strategies in a specific garden\\n *\\n * @param _user Address of the user\\n * @param _garden Address of the _garden\\n * @return _canStrategize Whether or not the user can create strategies\\n */\\n function canAddStrategiesInAGarden(address _garden, address _user) external view override returns (bool) {\\n return\\n balanceOf(_user) > 0 &&\\n (permissionsByCommunity[_garden][_user] >= STRATEGIST || IGarden(_garden).creator() == _user);\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Gives a new gate to the user or retrieve the existing one\\n *\\n * @param _user Address of the user\\n */\\n function _createOrGetGateNFT(address _user) private returns (uint256) {\\n uint256 newItemId = 0;\\n if (balanceOf(_user) == 0) {\\n _tokenIds.increment();\\n newItemId = _tokenIds.current();\\n _safeMint(_user, newItemId);\\n _setTokenURI(newItemId, tokenURI);\\n emit IshtarGateAwarded(_user, newItemId);\\n } else {\\n newItemId = tokenOfOwnerByIndex(_user, 0);\\n }\\n return newItemId;\\n }\\n\\n /**\\n * Awards the ishtar gate to a user and gives him access to a specific garden\\n *\\n * @param _user Address of the user\\n * @param _garden Community that the gate grants access to\\n * @param _permission Permissions of what user can do in the community\\n */\\n function _setIndividualGardenAccess(\\n address _user,\\n address _garden,\\n uint8 _permission\\n ) private returns (uint256) {\\n require(_permission <= 3, 'Permission out of bounds');\\n uint256 newItemId = _createOrGetGateNFT(_user);\\n if (_permission > 0 && permissionsByCommunity[_garden][_user] == 0) {\\n require(gardenAccessCount[_garden] < maxNumberOfInvites, 'Max Number of invites reached');\\n gardenAccessCount[_garden] = gardenAccessCount[_garden].add(1);\\n }\\n if (_permission == 0 && permissionsByCommunity[_garden][_user] > 0) {\\n gardenAccessCount[_garden] = gardenAccessCount[_garden].sub(1);\\n }\\n permissionsByCommunity[_garden][_user] = _permission;\\n emit GardenAccess(_user, _garden, _permission, newItemId);\\n return newItemId;\\n }\\n\\n /**\\n * Awards the ishtar gate to a user and give/remove him garden creation capabilities.\\n *\\n * @param _user Address of the user\\n * @param _canCreate Boolean with permissions as to whether the user can create gardens\\n */\\n function _setCreatorPermissions(address _user, bool _canCreate) private returns (uint256) {\\n require(address(_user) != address(0), 'User must exist');\\n uint256 newItemId = _createOrGetGateNFT(_user);\\n canCreateAGarden[_user] = _canCreate;\\n emit GardenCreationPower(_user, _canCreate, newItemId);\\n return newItemId;\\n }\\n}\\n\",\"keccak256\":\"0xc8a8196a0e516e94f86d06fe8c7b26eeae41fbe0940db8fb0bcdf2029d269805\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editGardenNFT(address _newGardenNFT) external;\\n\\n function editStrategyNFT(address _newStrategyNFT) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function editUniswapFactory(address _newUniswapFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\\n\\n function maxContributorsPerGarden() external view returns (uint256);\\n\\n function gardenCreationIsOpen() external view returns (bool);\\n\\n function openPublicGardenCreation() external;\\n\\n function setMaxContributorsPerGarden(uint256 _newMax) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function gardenNFT() external view returns (address);\\n\\n function strategyNFT() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\\n\\n function uniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0xdee5a27301c24f507d312f32249487fa9b0a756062a7e479405a1d1ee9ee7bb8\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function isGardenStrategy(address _strategy) external view returns (bool);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategyActiveInGarden(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to,\\n bool _withPenalty\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x88f1786ffee23e386aaa1735177912e1b5a7cdd440dafe52fb139fe50fd621b4\",\"license\":\"Apache License\"},\"contracts/interfaces/IIshtarGate.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIshtarGate\\n * @author Babylon Finance\\n *\\n * Interface for interacting with the Gate Guestlist NFT\\n */\\ninterface IIshtarGate {\\n /* ============ Functions ============ */\\n\\n function setGardenAccess(\\n address _user,\\n address _garden,\\n uint8 _permission\\n ) external returns (uint256);\\n\\n function setCreatorPermissions(address _user, bool _canCreate) external returns (uint256);\\n\\n function grantGardenAccessBatch(\\n address _garden,\\n address[] calldata _users,\\n uint8[] calldata _perms\\n ) external returns (bool);\\n\\n function maxNumberOfInvites() external view returns (uint256);\\n\\n function tokenURI() external view returns (string memory);\\n\\n function setMaxNumberOfInvites(uint256 _maxNumberOfInvites) external;\\n\\n function updateGardenURI(string memory _tokenURI) external;\\n\\n function grantCreatorsInBatch(address[] calldata _users, bool[] calldata _perms) external returns (bool);\\n\\n function canCreate(address _user) external view returns (bool);\\n\\n function canJoinAGarden(address _garden, address _user) external view returns (bool);\\n\\n function canVoteInAGarden(address _garden, address _user) external view returns (bool);\\n\\n function canAddStrategiesInAGarden(address _garden, address _user) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x0731159ca37445441424ec07de68ac1347a6a3c4559eed6db7682a6018660d63\",\"license\":\"Apache License\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b5060405162003e6838038062003e68833981810160405260408110156200003757600080fd5b8151602083018051604051929492938301929190846401000000008211156200005f57600080fd5b9083019060208201858111156200007557600080fd5b82516401000000008111828201881017156200009057600080fd5b82525081516020918201929091019080838360005b83811015620000bf578181015183820152602001620000a5565b50505050905090810190601f168015620000ed5780820380516001836020036101000a031916815260200191505b5060408181018152600a8252694973687461724761746560b01b602080840191909152815180830190925260048252631254d21560e21b9082015290935091506200014190506301ffc9a760e01b6200029a565b81516200015690600690602085019062000323565b5080516200016c90600790602084019062000323565b506200017f6380ac58cd60e01b6200029a565b62000191635b5e139f60e01b6200029a565b620001a363780e9d6360e01b6200029a565b5060009050620001b26200031f565b600a80546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600160a01b0382166200025c576040805162461bcd60e51b815260206004820152601560248201527f436f6e74726f6c6c6572206d7573742065786973740000000000000000000000604482015290519081900360640190fd5b600b80546001600160a01b0319166001600160a01b03841617905580516200028c90600c90602084019062000323565b5050600a600d5550620003cf565b6001600160e01b03198082161415620002fa576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b3390565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826200035b5760008555620003a6565b82601f106200037657805160ff1916838001178555620003a6565b82800160010185558215620003a6579182015b82811115620003a657825182559160200191906001019062000389565b50620003b4929150620003b8565b5090565b5b80821115620003b45760008155600101620003b9565b613a8980620003df6000396000f3fe608060405234801561001057600080fd5b50600436106102c85760003560e01c806370793b4b1161017b578063b07b7e7f116100d8578063d83e2c971161008c578063e9c6fe3111610071578063e9c6fe3114610a76578063f2fde38b14610aa4578063f77c479114610aca576102c8565b8063d83e2c97146109a2578063e985e9c514610a48576102c8565b8063c7ec5d5d116100bd578063c7ec5d5d14610895578063c87b56dd146108c3578063d1610652146108e0576102c8565b8063b07b7e7f146107c7578063b88d4fde146107cf576102c8565b8063835253941161012f57806395d89b411161011457806395d89b41146107895780639cfdede314610791578063a22cb46514610799576102c8565b806383525394146107795780638da5cb5b14610781576102c8565b8063715018a611610160578063715018a61461071d5780637804a5dc1461072557806382e894231461074b576102c8565b806370793b4b146106bd57806370a08231146106f7576102c8565b80632f745c59116102295780634f6ccce7116101dd5780636352211e116101c25780636352211e1461067b57806365f64118146106985780636c0360eb146106b5576102c8565b80634f6ccce7146106305780635066c7141461064d576102c8565b80633c130d901161020e5780633c130d90146105c457806342842e0e146105cc5780634d98fbf014610602576102c8565b80632f745c591461057257806331eff3831461059e576102c8565b8063187af87d1161028057806323b872dd1161026557806323b872dd146104625780632561e6b21461049857806327844ee21461056a576102c8565b8063187af87d1461041e5780631b8f119014610444576102c8565b8063081812fc116102b1578063081812fc1461039d578063095ea7b3146103d657806318160ddd14610404576102c8565b806301ffc9a7146102cd57806306fdde0314610320575b600080fd5b61030c600480360360208110156102e357600080fd5b50357fffffffff0000000000000000000000000000000000000000000000000000000016610ad2565b604080519115158252519081900360200190f35b610328610b0d565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561036257818101518382015260200161034a565b50505050905090810190601f16801561038f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103ba600480360360208110156103b357600080fd5b5035610ba3565b604080516001600160a01b039092168252519081900360200190f35b610402600480360360408110156103ec57600080fd5b506001600160a01b038135169060200135610c05565b005b61040c610ce0565b60408051918252519081900360200190f35b61030c6004803603602081101561043457600080fd5b50356001600160a01b0316610cf1565b61044c610d06565b6040805160ff9092168252519081900360200190f35b6104026004803603606081101561047857600080fd5b506001600160a01b03813581169160208101359091169060400135610d0b565b61030c600480360360608110156104ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156104d957600080fd5b8201836020820111156104eb57600080fd5b8035906020019184602083028401116401000000008311171561050d57600080fd5b91939092909160208101903564010000000081111561052b57600080fd5b82018360208201111561053d57600080fd5b8035906020019184602083028401116401000000008311171561055f57600080fd5b509092509050610d62565b61044c6111c4565b61040c6004803603604081101561058857600080fd5b506001600160a01b0381351690602001356111c9565b61040c600480360360208110156105b457600080fd5b50356001600160a01b03166111f4565b610328611206565b610402600480360360608110156105e257600080fd5b506001600160a01b03813581169160208101359091169060400135611294565b61030c6004803603604081101561061857600080fd5b506001600160a01b03813581169160200135166112af565b61040c6004803603602081101561064657600080fd5b5035611378565b61030c6004803603604081101561066357600080fd5b506001600160a01b038135811691602001351661138e565b6103ba6004803603602081101561069157600080fd5b503561141a565b610402600480360360208110156106ae57600080fd5b5035611442565b610328611511565b61040c600480360360608110156106d357600080fd5b5080356001600160a01b03908116916020810135909116906040013560ff16611572565b61040c6004803603602081101561070d57600080fd5b50356001600160a01b031661190c565b610402611974565b61030c6004803603602081101561073b57600080fd5b50356001600160a01b0316611a3f565b61040c6004803603604081101561076157600080fd5b506001600160a01b0381351690602001351515611a72565b61044c611af2565b6103ba611af7565b610328611b06565b61044c611b67565b610402600480360360408110156107af57600080fd5b506001600160a01b0381351690602001351515611b6c565b61040c611c71565b610402600480360360808110156107e557600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561082057600080fd5b82018360208201111561083257600080fd5b8035906020019184600183028401116401000000008311171561085457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611c77945050505050565b61030c600480360360408110156108ab57600080fd5b506001600160a01b0381358116916020013516611cd5565b610328600480360360208110156108d957600080fd5b5035611d61565b61030c600480360360408110156108f657600080fd5b81019060208101813564010000000081111561091157600080fd5b82018360208201111561092357600080fd5b8035906020019184602083028401116401000000008311171561094557600080fd5b91939092909160208101903564010000000081111561096357600080fd5b82018360208201111561097557600080fd5b8035906020019184602083028401116401000000008311171561099757600080fd5b509092509050611fe2565b610402600480360360208110156109b857600080fd5b8101906020810181356401000000008111156109d357600080fd5b8201836020820111156109e557600080fd5b80359060200191846001830284011164010000000083111715610a0757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612110945050505050565b61030c60048036036040811015610a5e57600080fd5b506001600160a01b038135811691602001351661231f565b61044c60048036036040811015610a8c57600080fd5b506001600160a01b038135811691602001351661234d565b61040260048036036020811015610aba57600080fd5b50356001600160a01b031661236d565b6103ba61248f565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526020819052604090205460ff165b919050565b60068054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610b995780601f10610b6e57610100808354040283529160200191610b99565b820191906000526020600020905b815481529060010190602001808311610b7c57829003601f168201915b5050505050905090565b6000610bae8261249e565b610be95760405162461bcd60e51b815260040180806020018281038252602c815260200180613952602c913960400191505060405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610c108261141a565b9050806001600160a01b0316836001600160a01b03161415610c635760405162461bcd60e51b8152600401808060200182810382526021815260200180613a026021913960400191505060405180910390fd5b806001600160a01b0316610c756124ab565b6001600160a01b03161480610c965750610c9681610c916124ab565b61231f565b610cd15760405162461bcd60e51b81526004018080602001828103825260388152602001806138a56038913960400191505060405180910390fd5b610cdb83836124af565b505050565b6000610cec600261252a565b905090565b600f6020526000908152604090205460ff1681565b600281565b610d1c610d166124ab565b82612535565b610d575760405162461bcd60e51b8152600401808060200182810382526031815260200180613a236031913960400191505060405180910390fd5b610cdb8383836125d1565b6000856001600160a01b038116610dc0576040805162461bcd60e51b815260206004820152601160248201527f47617264656e206d757374206578697374000000000000000000000000000000604482015290519081900360640190fd5b600b546040805163f77c479160e01b8152905183926001600160a01b03908116929084169163f77c479191600480820192602092909190829003018186803b158015610e0b57600080fd5b505afa158015610e1f573d6000803e3d6000fd5b505050506040513d6020811015610e3557600080fd5b50516001600160a01b031614610e92576040805162461bcd60e51b815260206004820152601560248201527f436f6e74726f6c6c6572206d757374206d617463680000000000000000000000604482015290519081900360640190fd5b806001600160a01b03166302d05d3f6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ecb57600080fd5b505afa158015610edf573d6000803e3d6000fd5b505050506040513d6020811015610ef557600080fd5b50516001600160a01b03163314610f3d5760405162461bcd60e51b815260040180806020018281038252602681526020018061375d6026913960400191505060405180910390fd5b600b54604080516313bc6d4b60e01b81526001600160a01b038581166004830152915191909216916313bc6d4b916024808301926020929190829003018186803b158015610f8a57600080fd5b505afa158015610f9e573d6000803e3d6000fd5b505050506040513d6020811015610fb457600080fd5b5051610fbf57600080fd5b600b546040805163364d118160e01b81526001600160a01b0385811660048301529151919092169163364d1181916024808301926020929190829003018186803b15801561100c57600080fd5b505afa158015611020573d6000803e3d6000fd5b505050506040513d602081101561103657600080fd5b505161104157600080fd5b600d546001600160a01b038316600090815260106020526040902054111561109a5760405162461bcd60e51b81526004018080602001828103825260328152602001806137a56032913960400191505060405180910390fd5b8584146110ee576040805162461bcd60e51b815260206004820181905260248201527f5065726d697373696f6e7320616e64207573657273206d757374206d61746368604482015290519081900360640190fd5b60005b60ff81168711156111b5576000888860ff841681811061110d57fe5b905060200201356001600160a01b03166001600160a01b0316141561116b576040805162461bcd60e51b815260206004820152600f60248201526e155cd95c881b5d5cdd08195e1a5cdd608a1b604482015290519081900360640190fd5b6111ac88888360ff1681811061117d57fe5b905060200201356001600160a01b03168a88888560ff1681811061119d57fe5b9050602002013560ff1661271d565b506001016110f1565b50600198975050505050505050565b600181565b6001600160a01b03821660009081526001602052604081206111eb9083612968565b90505b92915050565b60106020526000908152604090205481565b600c805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561128c5780601f106112615761010080835404028352916020019161128c565b820191906000526020600020905b81548152906001019060200180831161126f57829003601f168201915b505050505081565b610cdb83838360405180602001604052806000815250611c77565b6000806112bb8361190c565b1180156111eb57506001600160a01b038381166000908152600e6020908152604080832093861683529290522054600260ff9091161015806111eb5750816001600160a01b0316836001600160a01b03166302d05d3f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561133b57600080fd5b505afa15801561134f573d6000803e3d6000fd5b505050506040513d602081101561136557600080fd5b50516001600160a01b0316149392505050565b600080611386600284612974565b509392505050565b60008061139a8361190c565b1180156111eb57506001600160a01b038381166000908152600e6020908152604080832093861683529290522054600360ff9091161015806111eb5750816001600160a01b0316836001600160a01b03166302d05d3f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561133b57600080fd5b60006111ee826040518060600160405280602981526020016139076029913960029190612990565b61144a6124ab565b6001600160a01b031661145b611af7565b6001600160a01b0316146114b6576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600d54811161150c576040805162461bcd60e51b815260206004820152601660248201527f496e7669746573206d7573742062652068696768657200000000000000000000604482015290519081900360640190fd5b600d55565b60098054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610b995780601f10610b6e57610100808354040283529160200191610b99565b6000826001600160a01b0381166115d0576040805162461bcd60e51b815260206004820152601160248201527f47617264656e206d757374206578697374000000000000000000000000000000604482015290519081900360640190fd5b600b546040805163f77c479160e01b8152905183926001600160a01b03908116929084169163f77c479191600480820192602092909190829003018186803b15801561161b57600080fd5b505afa15801561162f573d6000803e3d6000fd5b505050506040513d602081101561164557600080fd5b50516001600160a01b0316146116a2576040805162461bcd60e51b815260206004820152601560248201527f436f6e74726f6c6c6572206d757374206d617463680000000000000000000000604482015290519081900360640190fd5b806001600160a01b03166302d05d3f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116db57600080fd5b505afa1580156116ef573d6000803e3d6000fd5b505050506040513d602081101561170557600080fd5b50516001600160a01b0316331461174d5760405162461bcd60e51b815260040180806020018281038252602681526020018061375d6026913960400191505060405180910390fd5b600b54604080516313bc6d4b60e01b81526001600160a01b038581166004830152915191909216916313bc6d4b916024808301926020929190829003018186803b15801561179a57600080fd5b505afa1580156117ae573d6000803e3d6000fd5b505050506040513d60208110156117c457600080fd5b50516117cf57600080fd5b600b546040805163364d118160e01b81526001600160a01b0385811660048301529151919092169163364d1181916024808301926020929190829003018186803b15801561181c57600080fd5b505afa158015611830573d6000803e3d6000fd5b505050506040513d602081101561184657600080fd5b505161185157600080fd5b600d546001600160a01b03831660009081526010602052604090205411156118aa5760405162461bcd60e51b81526004018080602001828103825260328152602001806137a56032913960400191505060405180910390fd5b6001600160a01b0386166118f7576040805162461bcd60e51b815260206004820152600f60248201526e155cd95c881b5d5cdd08195e1a5cdd608a1b604482015290519081900360640190fd5b61190286868661271d565b9695505050505050565b60006001600160a01b0382166119535760405162461bcd60e51b815260040180806020018281038252602a8152602001806138dd602a913960400191505060405180910390fd5b6001600160a01b03821660009081526001602052604090206111ee9061252a565b61197c6124ab565b6001600160a01b031661198d611af7565b6001600160a01b0316146119e8576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600a546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600a805473ffffffffffffffffffffffffffffffffffffffff19169055565b600080611a4b8361190c565b1180156111ee5750506001600160a01b03166000908152600f602052604090205460ff1690565b6000611a7c6124ab565b6001600160a01b0316611a8d611af7565b6001600160a01b031614611ae8576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6111eb838361299d565b600081565b600a546001600160a01b031690565b60078054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610b995780601f10610b6e57610100808354040283529160200191610b99565b600381565b611b746124ab565b6001600160a01b0316826001600160a01b03161415611bda576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b8060056000611be76124ab565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611c2b6124ab565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b600d5481565b611c88611c826124ab565b83612535565b611cc35760405162461bcd60e51b8152600401808060200182810382526031815260200180613a236031913960400191505060405180910390fd5b611ccf84848484612a65565b50505050565b600080611ce18361190c565b1180156111eb57506001600160a01b038381166000908152600e6020908152604080832093861683529290522054600160ff9091161015806111eb5750816001600160a01b0316836001600160a01b03166302d05d3f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561133b57600080fd5b6060611d6c8261249e565b611da75760405162461bcd60e51b815260040180806020018281038252602f8152602001806139d3602f913960400191505060405180910390fd5b60008281526008602090815260408083208054825160026001831615610100026000190190921691909104601f810185900485028201850190935282815292909190830182828015611e3a5780601f10611e0f57610100808354040283529160200191611e3a565b820191906000526020600020905b815481529060010190602001808311611e1d57829003601f168201915b505050505090506000611e4b611511565b9050805160001415611e5f57509050610b08565b815115611f205780826040516020018083805190602001908083835b60208310611e9a5780518252601f199092019160209182019101611e7b565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310611ee25780518252601f199092019160209182019101611ec3565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405292505050610b08565b80611f2a85612ab7565b6040516020018083805190602001908083835b60208310611f5c5780518252601f199092019160209182019101611f3d565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310611fa45780518252601f199092019160209182019101611f85565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405292505050919050565b6000611fec6124ab565b6001600160a01b0316611ffd611af7565b6001600160a01b031614612058576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b8382146120ac576040805162461bcd60e51b815260206004820181905260248201527f5065726d697373696f6e7320616e64207573657273206d757374206d61746368604482015290519081900360640190fd5b60005b60ff8116851115612102576120f986868360ff168181106120cc57fe5b905060200201356001600160a01b031685858460ff168181106120eb57fe5b90506020020135151561299d565b506001016120af565b50600190505b949350505050565b6121186124ab565b6001600160a01b0316612129611af7565b6001600160a01b031614612184576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600c8054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152600093909290918301828280156122105780601f106121e557610100808354040283529160200191612210565b820191906000526020600020905b8154815290600101906020018083116121f357829003601f168201915b5050855193945061222c93600c935060208701925090506136bb565b50806040518082805190602001908083835b6020831061225d5780518252601f19909201916020918201910161223e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020600c60405180828054600181600116156101000203166002900480156122e75780601f106122c55761010080835404028352918201916122e7565b820191906000526020600020905b8154815290600101906020018083116122d3575b505060405190819003812092507fb9f7d3f8371d63914851c4029cbff0eb77d038eef46fa05b86df0339e490fffc9150600090a35050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b600e60209081526000928352604080842090915290825290205460ff1681565b6123756124ab565b6001600160a01b0316612386611af7565b6001600160a01b0316146123e1576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166124265760405162461bcd60e51b81526004018080602001828103825260268152602001806138096026913960400191505060405180910390fd5b600a546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600a805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600b546001600160a01b031681565b60006111ee600283612bc6565b3390565b6000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841690811790915581906124f18261141a565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006111ee82612bd2565b60006125408261249e565b61257b5760405162461bcd60e51b815260040180806020018281038252602c815260200180613879602c913960400191505060405180910390fd5b60006125868361141a565b9050806001600160a01b0316846001600160a01b031614806125c15750836001600160a01b03166125b684610ba3565b6001600160a01b0316145b806121085750612108818561231f565b826001600160a01b03166125e48261141a565b6001600160a01b0316146126295760405162461bcd60e51b81526004018080602001828103825260298152602001806139aa6029913960400191505060405180910390fd5b6001600160a01b03821661266e5760405162461bcd60e51b815260040180806020018281038252602481526020018061382f6024913960400191505060405180910390fd5b612679838383610cdb565b6126846000826124af565b6001600160a01b03831660009081526001602052604090206126a69082612bd6565b506001600160a01b03821660009081526001602052604090206126c99082612be2565b506126d660028284612bee565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b600060038260ff161115612778576040805162461bcd60e51b815260206004820152601860248201527f5065726d697373696f6e206f7574206f6620626f756e64730000000000000000604482015290519081900360640190fd5b600061278385612c04565b905060008360ff161180156127be57506001600160a01b038085166000908152600e602090815260408083209389168352929052205460ff16155b1561286f57600d546001600160a01b03851660009081526010602052604090205410612831576040805162461bcd60e51b815260206004820152601d60248201527f4d6178204e756d626572206f6620696e76697465732072656163686564000000604482015290519081900360640190fd5b6001600160a01b038416600090815260106020526040902054612855906001612d12565b6001600160a01b0385166000908152601060205260409020555b60ff83161580156128a757506001600160a01b038085166000908152600e602090815260408083209389168352929052205460ff1615155b156128ea576001600160a01b0384166000908152601060205260409020546128d0906001612d6c565b6001600160a01b0385166000908152601060205260409020555b6001600160a01b038481166000818152600e60209081526040808320948a1680845294825291829020805460ff191660ff8916908117909155825190815290810185905281519293927ff9a024892baa30c97621bf85cea2ce82d0c128a59fa7714a72c1d37868fdb1be929181900390910190a390505b9392505050565b60006111eb8383612dc9565b60008080806129838686612e2d565b9097909650945050505050565b6000612108848484612ea8565b60006001600160a01b0383166129ec576040805162461bcd60e51b815260206004820152600f60248201526e155cd95c881b5d5cdd08195e1a5cdd608a1b604482015290519081900360640190fd5b60006129f784612c04565b6001600160a01b0385166000818152600f6020908152604091829020805460ff19168815159081179091558251908152908101849052815193945091927fc7ef194be94a46a1602ce7825850329a4560bcb6c4b5611df12e4dedf4db59d69281900390910190a29392505050565b612a708484846125d1565b612a7c84848484612f72565b611ccf5760405162461bcd60e51b81526004018080602001828103825260328152602001806137d76032913960400191505060405180910390fd5b606081612af8575060408051808201909152600181527f30000000000000000000000000000000000000000000000000000000000000006020820152610b08565b8160005b8115612b1057600101600a82049150612afc565b60008167ffffffffffffffff81118015612b2957600080fd5b506040519080825280601f01601f191660200182016040528015612b54576020820181803683370190505b50859350905060001982015b8315612bbd57600a840660300160f81b82828060019003935081518110612b8357fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a84049350612b60565b50949350505050565b60006111eb838361311c565b5490565b60006111eb8383613134565b60006111eb83836131fa565b600061210884846001600160a01b038516613244565b600080612c108361190c565b612d0757612c1e60116132db565b612c286011612bd2565b9050612c3483826132e4565b600c805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152612ccc93859391929091830182828015612cc25780601f10612c9757610100808354040283529160200191612cc2565b820191906000526020600020905b815481529060010190602001808311612ca557829003601f168201915b5050505050613302565b60405181906001600160a01b038516907f91f491a5affa462bcd7c0c9229592fcaaf55959bcce7f754256f9360d53f6aac90600090a36111ee565b6111eb8360006111c9565b6000828201838110156111eb576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115612dc3576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b81546000908210612e0b5760405162461bcd60e51b81526004018080602001828103825260228152602001806137836022913960400191505060405180910390fd5b826000018281548110612e1a57fe5b9060005260206000200154905092915050565b815460009081908310612e715760405162461bcd60e51b81526004018080602001828103825260228152602001806139306022913960400191505060405180910390fd5b6000846000018481548110612e8257fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b60008281526001840160205260408120548281612f435760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612f08578181015183820152602001612ef0565b50505050905090810190601f168015612f355780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50846000016001820381548110612f5657fe5b9060005260206000209060020201600101549150509392505050565b6000612f86846001600160a01b0316613365565b612f9257506001612108565b60006130ca630a85bd0160e11b612fa76124ab565b88878760405160240180856001600160a01b03168152602001846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561300e578181015183820152602001612ff6565b50505050905090810190601f16801561303b5780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518060600160405280603281526020016137d7603291396001600160a01b038816919061336b565b905060008180602001905160208110156130e357600080fd5b50517fffffffff0000000000000000000000000000000000000000000000000000000016630a85bd0160e11b1492505050949350505050565b60009081526001919091016020526040902054151590565b600081815260018301602052604081205480156131f0578354600019808301919081019060009087908390811061316757fe5b906000526020600020015490508087600001848154811061318457fe5b6000918252602080832090910192909255828152600189810190925260409020908401905586548790806131b457fe5b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506111ee565b60009150506111ee565b6000613206838361311c565b61323c575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556111ee565b5060006111ee565b6000828152600184016020526040812054806132a9575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055612961565b828560000160018303815481106132bc57fe5b9060005260206000209060020201600101819055506000915050612961565b80546001019055565b6132fe82826040518060200160405280600081525061337a565b5050565b61330b8261249e565b6133465760405162461bcd60e51b815260040180806020018281038252602c81526020018061397e602c913960400191505060405180910390fd5b60008281526008602090815260409091208251610cdb928401906136bb565b3b151590565b606061210884846000856133cc565b6133848383613527565b6133916000848484612f72565b610cdb5760405162461bcd60e51b81526004018080602001828103825260328152602001806137d76032913960400191505060405180910390fd5b60608247101561340d5760405162461bcd60e51b81526004018080602001828103825260268152602001806138536026913960400191505060405180910390fd5b61341685613365565b613467576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106134a55780518252601f199092019160209182019101613486565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613507576040519150601f19603f3d011682016040523d82523d6000602084013e61350c565b606091505b509150915061351c828286613655565b979650505050505050565b6001600160a01b038216613582576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b61358b8161249e565b156135dd576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b6135e960008383610cdb565b6001600160a01b038216600090815260016020526040902061360b9082612be2565b5061361860028284612bee565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60608315613664575081612961565b8251156136745782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315612f08578181015183820152602001612ef0565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826136f15760008555613737565b82601f1061370a57805160ff1916838001178555613737565b82800160010185558215613737579182015b8281111561373757825182559160200191906001019061371c565b50613743929150613747565b5090565b5b80821115613743576000815560010161374856fe4f6e6c792063726561746f722063616e20676976652061636365737320746f2067617264656e456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473546865206e756d626572206f6620636f6e7472696275746f7273206d7573742062652062656c6f7720746865206c696d69744552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734552433732313a207472616e7366657220746f20746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e64734552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732314d657461646174613a2055524920736574206f66206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314d657461646174613a2055524920717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564a2646970667358221220cdf2abb0b26137de23c457af1af68be12f3123ff29ce047f5485a1fbd26306aa64736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102c85760003560e01c806370793b4b1161017b578063b07b7e7f116100d8578063d83e2c971161008c578063e9c6fe3111610071578063e9c6fe3114610a76578063f2fde38b14610aa4578063f77c479114610aca576102c8565b8063d83e2c97146109a2578063e985e9c514610a48576102c8565b8063c7ec5d5d116100bd578063c7ec5d5d14610895578063c87b56dd146108c3578063d1610652146108e0576102c8565b8063b07b7e7f146107c7578063b88d4fde146107cf576102c8565b8063835253941161012f57806395d89b411161011457806395d89b41146107895780639cfdede314610791578063a22cb46514610799576102c8565b806383525394146107795780638da5cb5b14610781576102c8565b8063715018a611610160578063715018a61461071d5780637804a5dc1461072557806382e894231461074b576102c8565b806370793b4b146106bd57806370a08231146106f7576102c8565b80632f745c59116102295780634f6ccce7116101dd5780636352211e116101c25780636352211e1461067b57806365f64118146106985780636c0360eb146106b5576102c8565b80634f6ccce7146106305780635066c7141461064d576102c8565b80633c130d901161020e5780633c130d90146105c457806342842e0e146105cc5780634d98fbf014610602576102c8565b80632f745c591461057257806331eff3831461059e576102c8565b8063187af87d1161028057806323b872dd1161026557806323b872dd146104625780632561e6b21461049857806327844ee21461056a576102c8565b8063187af87d1461041e5780631b8f119014610444576102c8565b8063081812fc116102b1578063081812fc1461039d578063095ea7b3146103d657806318160ddd14610404576102c8565b806301ffc9a7146102cd57806306fdde0314610320575b600080fd5b61030c600480360360208110156102e357600080fd5b50357fffffffff0000000000000000000000000000000000000000000000000000000016610ad2565b604080519115158252519081900360200190f35b610328610b0d565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561036257818101518382015260200161034a565b50505050905090810190601f16801561038f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103ba600480360360208110156103b357600080fd5b5035610ba3565b604080516001600160a01b039092168252519081900360200190f35b610402600480360360408110156103ec57600080fd5b506001600160a01b038135169060200135610c05565b005b61040c610ce0565b60408051918252519081900360200190f35b61030c6004803603602081101561043457600080fd5b50356001600160a01b0316610cf1565b61044c610d06565b6040805160ff9092168252519081900360200190f35b6104026004803603606081101561047857600080fd5b506001600160a01b03813581169160208101359091169060400135610d0b565b61030c600480360360608110156104ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156104d957600080fd5b8201836020820111156104eb57600080fd5b8035906020019184602083028401116401000000008311171561050d57600080fd5b91939092909160208101903564010000000081111561052b57600080fd5b82018360208201111561053d57600080fd5b8035906020019184602083028401116401000000008311171561055f57600080fd5b509092509050610d62565b61044c6111c4565b61040c6004803603604081101561058857600080fd5b506001600160a01b0381351690602001356111c9565b61040c600480360360208110156105b457600080fd5b50356001600160a01b03166111f4565b610328611206565b610402600480360360608110156105e257600080fd5b506001600160a01b03813581169160208101359091169060400135611294565b61030c6004803603604081101561061857600080fd5b506001600160a01b03813581169160200135166112af565b61040c6004803603602081101561064657600080fd5b5035611378565b61030c6004803603604081101561066357600080fd5b506001600160a01b038135811691602001351661138e565b6103ba6004803603602081101561069157600080fd5b503561141a565b610402600480360360208110156106ae57600080fd5b5035611442565b610328611511565b61040c600480360360608110156106d357600080fd5b5080356001600160a01b03908116916020810135909116906040013560ff16611572565b61040c6004803603602081101561070d57600080fd5b50356001600160a01b031661190c565b610402611974565b61030c6004803603602081101561073b57600080fd5b50356001600160a01b0316611a3f565b61040c6004803603604081101561076157600080fd5b506001600160a01b0381351690602001351515611a72565b61044c611af2565b6103ba611af7565b610328611b06565b61044c611b67565b610402600480360360408110156107af57600080fd5b506001600160a01b0381351690602001351515611b6c565b61040c611c71565b610402600480360360808110156107e557600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561082057600080fd5b82018360208201111561083257600080fd5b8035906020019184600183028401116401000000008311171561085457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611c77945050505050565b61030c600480360360408110156108ab57600080fd5b506001600160a01b0381358116916020013516611cd5565b610328600480360360208110156108d957600080fd5b5035611d61565b61030c600480360360408110156108f657600080fd5b81019060208101813564010000000081111561091157600080fd5b82018360208201111561092357600080fd5b8035906020019184602083028401116401000000008311171561094557600080fd5b91939092909160208101903564010000000081111561096357600080fd5b82018360208201111561097557600080fd5b8035906020019184602083028401116401000000008311171561099757600080fd5b509092509050611fe2565b610402600480360360208110156109b857600080fd5b8101906020810181356401000000008111156109d357600080fd5b8201836020820111156109e557600080fd5b80359060200191846001830284011164010000000083111715610a0757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612110945050505050565b61030c60048036036040811015610a5e57600080fd5b506001600160a01b038135811691602001351661231f565b61044c60048036036040811015610a8c57600080fd5b506001600160a01b038135811691602001351661234d565b61040260048036036020811015610aba57600080fd5b50356001600160a01b031661236d565b6103ba61248f565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526020819052604090205460ff165b919050565b60068054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610b995780601f10610b6e57610100808354040283529160200191610b99565b820191906000526020600020905b815481529060010190602001808311610b7c57829003601f168201915b5050505050905090565b6000610bae8261249e565b610be95760405162461bcd60e51b815260040180806020018281038252602c815260200180613952602c913960400191505060405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610c108261141a565b9050806001600160a01b0316836001600160a01b03161415610c635760405162461bcd60e51b8152600401808060200182810382526021815260200180613a026021913960400191505060405180910390fd5b806001600160a01b0316610c756124ab565b6001600160a01b03161480610c965750610c9681610c916124ab565b61231f565b610cd15760405162461bcd60e51b81526004018080602001828103825260388152602001806138a56038913960400191505060405180910390fd5b610cdb83836124af565b505050565b6000610cec600261252a565b905090565b600f6020526000908152604090205460ff1681565b600281565b610d1c610d166124ab565b82612535565b610d575760405162461bcd60e51b8152600401808060200182810382526031815260200180613a236031913960400191505060405180910390fd5b610cdb8383836125d1565b6000856001600160a01b038116610dc0576040805162461bcd60e51b815260206004820152601160248201527f47617264656e206d757374206578697374000000000000000000000000000000604482015290519081900360640190fd5b600b546040805163f77c479160e01b8152905183926001600160a01b03908116929084169163f77c479191600480820192602092909190829003018186803b158015610e0b57600080fd5b505afa158015610e1f573d6000803e3d6000fd5b505050506040513d6020811015610e3557600080fd5b50516001600160a01b031614610e92576040805162461bcd60e51b815260206004820152601560248201527f436f6e74726f6c6c6572206d757374206d617463680000000000000000000000604482015290519081900360640190fd5b806001600160a01b03166302d05d3f6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ecb57600080fd5b505afa158015610edf573d6000803e3d6000fd5b505050506040513d6020811015610ef557600080fd5b50516001600160a01b03163314610f3d5760405162461bcd60e51b815260040180806020018281038252602681526020018061375d6026913960400191505060405180910390fd5b600b54604080516313bc6d4b60e01b81526001600160a01b038581166004830152915191909216916313bc6d4b916024808301926020929190829003018186803b158015610f8a57600080fd5b505afa158015610f9e573d6000803e3d6000fd5b505050506040513d6020811015610fb457600080fd5b5051610fbf57600080fd5b600b546040805163364d118160e01b81526001600160a01b0385811660048301529151919092169163364d1181916024808301926020929190829003018186803b15801561100c57600080fd5b505afa158015611020573d6000803e3d6000fd5b505050506040513d602081101561103657600080fd5b505161104157600080fd5b600d546001600160a01b038316600090815260106020526040902054111561109a5760405162461bcd60e51b81526004018080602001828103825260328152602001806137a56032913960400191505060405180910390fd5b8584146110ee576040805162461bcd60e51b815260206004820181905260248201527f5065726d697373696f6e7320616e64207573657273206d757374206d61746368604482015290519081900360640190fd5b60005b60ff81168711156111b5576000888860ff841681811061110d57fe5b905060200201356001600160a01b03166001600160a01b0316141561116b576040805162461bcd60e51b815260206004820152600f60248201526e155cd95c881b5d5cdd08195e1a5cdd608a1b604482015290519081900360640190fd5b6111ac88888360ff1681811061117d57fe5b905060200201356001600160a01b03168a88888560ff1681811061119d57fe5b9050602002013560ff1661271d565b506001016110f1565b50600198975050505050505050565b600181565b6001600160a01b03821660009081526001602052604081206111eb9083612968565b90505b92915050565b60106020526000908152604090205481565b600c805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561128c5780601f106112615761010080835404028352916020019161128c565b820191906000526020600020905b81548152906001019060200180831161126f57829003601f168201915b505050505081565b610cdb83838360405180602001604052806000815250611c77565b6000806112bb8361190c565b1180156111eb57506001600160a01b038381166000908152600e6020908152604080832093861683529290522054600260ff9091161015806111eb5750816001600160a01b0316836001600160a01b03166302d05d3f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561133b57600080fd5b505afa15801561134f573d6000803e3d6000fd5b505050506040513d602081101561136557600080fd5b50516001600160a01b0316149392505050565b600080611386600284612974565b509392505050565b60008061139a8361190c565b1180156111eb57506001600160a01b038381166000908152600e6020908152604080832093861683529290522054600360ff9091161015806111eb5750816001600160a01b0316836001600160a01b03166302d05d3f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561133b57600080fd5b60006111ee826040518060600160405280602981526020016139076029913960029190612990565b61144a6124ab565b6001600160a01b031661145b611af7565b6001600160a01b0316146114b6576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600d54811161150c576040805162461bcd60e51b815260206004820152601660248201527f496e7669746573206d7573742062652068696768657200000000000000000000604482015290519081900360640190fd5b600d55565b60098054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610b995780601f10610b6e57610100808354040283529160200191610b99565b6000826001600160a01b0381166115d0576040805162461bcd60e51b815260206004820152601160248201527f47617264656e206d757374206578697374000000000000000000000000000000604482015290519081900360640190fd5b600b546040805163f77c479160e01b8152905183926001600160a01b03908116929084169163f77c479191600480820192602092909190829003018186803b15801561161b57600080fd5b505afa15801561162f573d6000803e3d6000fd5b505050506040513d602081101561164557600080fd5b50516001600160a01b0316146116a2576040805162461bcd60e51b815260206004820152601560248201527f436f6e74726f6c6c6572206d757374206d617463680000000000000000000000604482015290519081900360640190fd5b806001600160a01b03166302d05d3f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116db57600080fd5b505afa1580156116ef573d6000803e3d6000fd5b505050506040513d602081101561170557600080fd5b50516001600160a01b0316331461174d5760405162461bcd60e51b815260040180806020018281038252602681526020018061375d6026913960400191505060405180910390fd5b600b54604080516313bc6d4b60e01b81526001600160a01b038581166004830152915191909216916313bc6d4b916024808301926020929190829003018186803b15801561179a57600080fd5b505afa1580156117ae573d6000803e3d6000fd5b505050506040513d60208110156117c457600080fd5b50516117cf57600080fd5b600b546040805163364d118160e01b81526001600160a01b0385811660048301529151919092169163364d1181916024808301926020929190829003018186803b15801561181c57600080fd5b505afa158015611830573d6000803e3d6000fd5b505050506040513d602081101561184657600080fd5b505161185157600080fd5b600d546001600160a01b03831660009081526010602052604090205411156118aa5760405162461bcd60e51b81526004018080602001828103825260328152602001806137a56032913960400191505060405180910390fd5b6001600160a01b0386166118f7576040805162461bcd60e51b815260206004820152600f60248201526e155cd95c881b5d5cdd08195e1a5cdd608a1b604482015290519081900360640190fd5b61190286868661271d565b9695505050505050565b60006001600160a01b0382166119535760405162461bcd60e51b815260040180806020018281038252602a8152602001806138dd602a913960400191505060405180910390fd5b6001600160a01b03821660009081526001602052604090206111ee9061252a565b61197c6124ab565b6001600160a01b031661198d611af7565b6001600160a01b0316146119e8576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600a546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600a805473ffffffffffffffffffffffffffffffffffffffff19169055565b600080611a4b8361190c565b1180156111ee5750506001600160a01b03166000908152600f602052604090205460ff1690565b6000611a7c6124ab565b6001600160a01b0316611a8d611af7565b6001600160a01b031614611ae8576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6111eb838361299d565b600081565b600a546001600160a01b031690565b60078054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610b995780601f10610b6e57610100808354040283529160200191610b99565b600381565b611b746124ab565b6001600160a01b0316826001600160a01b03161415611bda576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b8060056000611be76124ab565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611c2b6124ab565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b600d5481565b611c88611c826124ab565b83612535565b611cc35760405162461bcd60e51b8152600401808060200182810382526031815260200180613a236031913960400191505060405180910390fd5b611ccf84848484612a65565b50505050565b600080611ce18361190c565b1180156111eb57506001600160a01b038381166000908152600e6020908152604080832093861683529290522054600160ff9091161015806111eb5750816001600160a01b0316836001600160a01b03166302d05d3f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561133b57600080fd5b6060611d6c8261249e565b611da75760405162461bcd60e51b815260040180806020018281038252602f8152602001806139d3602f913960400191505060405180910390fd5b60008281526008602090815260408083208054825160026001831615610100026000190190921691909104601f810185900485028201850190935282815292909190830182828015611e3a5780601f10611e0f57610100808354040283529160200191611e3a565b820191906000526020600020905b815481529060010190602001808311611e1d57829003601f168201915b505050505090506000611e4b611511565b9050805160001415611e5f57509050610b08565b815115611f205780826040516020018083805190602001908083835b60208310611e9a5780518252601f199092019160209182019101611e7b565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310611ee25780518252601f199092019160209182019101611ec3565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405292505050610b08565b80611f2a85612ab7565b6040516020018083805190602001908083835b60208310611f5c5780518252601f199092019160209182019101611f3d565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310611fa45780518252601f199092019160209182019101611f85565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405292505050919050565b6000611fec6124ab565b6001600160a01b0316611ffd611af7565b6001600160a01b031614612058576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b8382146120ac576040805162461bcd60e51b815260206004820181905260248201527f5065726d697373696f6e7320616e64207573657273206d757374206d61746368604482015290519081900360640190fd5b60005b60ff8116851115612102576120f986868360ff168181106120cc57fe5b905060200201356001600160a01b031685858460ff168181106120eb57fe5b90506020020135151561299d565b506001016120af565b50600190505b949350505050565b6121186124ab565b6001600160a01b0316612129611af7565b6001600160a01b031614612184576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600c8054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152600093909290918301828280156122105780601f106121e557610100808354040283529160200191612210565b820191906000526020600020905b8154815290600101906020018083116121f357829003601f168201915b5050855193945061222c93600c935060208701925090506136bb565b50806040518082805190602001908083835b6020831061225d5780518252601f19909201916020918201910161223e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020600c60405180828054600181600116156101000203166002900480156122e75780601f106122c55761010080835404028352918201916122e7565b820191906000526020600020905b8154815290600101906020018083116122d3575b505060405190819003812092507fb9f7d3f8371d63914851c4029cbff0eb77d038eef46fa05b86df0339e490fffc9150600090a35050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b600e60209081526000928352604080842090915290825290205460ff1681565b6123756124ab565b6001600160a01b0316612386611af7565b6001600160a01b0316146123e1576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166124265760405162461bcd60e51b81526004018080602001828103825260268152602001806138096026913960400191505060405180910390fd5b600a546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600a805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600b546001600160a01b031681565b60006111ee600283612bc6565b3390565b6000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841690811790915581906124f18261141a565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006111ee82612bd2565b60006125408261249e565b61257b5760405162461bcd60e51b815260040180806020018281038252602c815260200180613879602c913960400191505060405180910390fd5b60006125868361141a565b9050806001600160a01b0316846001600160a01b031614806125c15750836001600160a01b03166125b684610ba3565b6001600160a01b0316145b806121085750612108818561231f565b826001600160a01b03166125e48261141a565b6001600160a01b0316146126295760405162461bcd60e51b81526004018080602001828103825260298152602001806139aa6029913960400191505060405180910390fd5b6001600160a01b03821661266e5760405162461bcd60e51b815260040180806020018281038252602481526020018061382f6024913960400191505060405180910390fd5b612679838383610cdb565b6126846000826124af565b6001600160a01b03831660009081526001602052604090206126a69082612bd6565b506001600160a01b03821660009081526001602052604090206126c99082612be2565b506126d660028284612bee565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b600060038260ff161115612778576040805162461bcd60e51b815260206004820152601860248201527f5065726d697373696f6e206f7574206f6620626f756e64730000000000000000604482015290519081900360640190fd5b600061278385612c04565b905060008360ff161180156127be57506001600160a01b038085166000908152600e602090815260408083209389168352929052205460ff16155b1561286f57600d546001600160a01b03851660009081526010602052604090205410612831576040805162461bcd60e51b815260206004820152601d60248201527f4d6178204e756d626572206f6620696e76697465732072656163686564000000604482015290519081900360640190fd5b6001600160a01b038416600090815260106020526040902054612855906001612d12565b6001600160a01b0385166000908152601060205260409020555b60ff83161580156128a757506001600160a01b038085166000908152600e602090815260408083209389168352929052205460ff1615155b156128ea576001600160a01b0384166000908152601060205260409020546128d0906001612d6c565b6001600160a01b0385166000908152601060205260409020555b6001600160a01b038481166000818152600e60209081526040808320948a1680845294825291829020805460ff191660ff8916908117909155825190815290810185905281519293927ff9a024892baa30c97621bf85cea2ce82d0c128a59fa7714a72c1d37868fdb1be929181900390910190a390505b9392505050565b60006111eb8383612dc9565b60008080806129838686612e2d565b9097909650945050505050565b6000612108848484612ea8565b60006001600160a01b0383166129ec576040805162461bcd60e51b815260206004820152600f60248201526e155cd95c881b5d5cdd08195e1a5cdd608a1b604482015290519081900360640190fd5b60006129f784612c04565b6001600160a01b0385166000818152600f6020908152604091829020805460ff19168815159081179091558251908152908101849052815193945091927fc7ef194be94a46a1602ce7825850329a4560bcb6c4b5611df12e4dedf4db59d69281900390910190a29392505050565b612a708484846125d1565b612a7c84848484612f72565b611ccf5760405162461bcd60e51b81526004018080602001828103825260328152602001806137d76032913960400191505060405180910390fd5b606081612af8575060408051808201909152600181527f30000000000000000000000000000000000000000000000000000000000000006020820152610b08565b8160005b8115612b1057600101600a82049150612afc565b60008167ffffffffffffffff81118015612b2957600080fd5b506040519080825280601f01601f191660200182016040528015612b54576020820181803683370190505b50859350905060001982015b8315612bbd57600a840660300160f81b82828060019003935081518110612b8357fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a84049350612b60565b50949350505050565b60006111eb838361311c565b5490565b60006111eb8383613134565b60006111eb83836131fa565b600061210884846001600160a01b038516613244565b600080612c108361190c565b612d0757612c1e60116132db565b612c286011612bd2565b9050612c3483826132e4565b600c805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152612ccc93859391929091830182828015612cc25780601f10612c9757610100808354040283529160200191612cc2565b820191906000526020600020905b815481529060010190602001808311612ca557829003601f168201915b5050505050613302565b60405181906001600160a01b038516907f91f491a5affa462bcd7c0c9229592fcaaf55959bcce7f754256f9360d53f6aac90600090a36111ee565b6111eb8360006111c9565b6000828201838110156111eb576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115612dc3576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b81546000908210612e0b5760405162461bcd60e51b81526004018080602001828103825260228152602001806137836022913960400191505060405180910390fd5b826000018281548110612e1a57fe5b9060005260206000200154905092915050565b815460009081908310612e715760405162461bcd60e51b81526004018080602001828103825260228152602001806139306022913960400191505060405180910390fd5b6000846000018481548110612e8257fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b60008281526001840160205260408120548281612f435760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612f08578181015183820152602001612ef0565b50505050905090810190601f168015612f355780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50846000016001820381548110612f5657fe5b9060005260206000209060020201600101549150509392505050565b6000612f86846001600160a01b0316613365565b612f9257506001612108565b60006130ca630a85bd0160e11b612fa76124ab565b88878760405160240180856001600160a01b03168152602001846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561300e578181015183820152602001612ff6565b50505050905090810190601f16801561303b5780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518060600160405280603281526020016137d7603291396001600160a01b038816919061336b565b905060008180602001905160208110156130e357600080fd5b50517fffffffff0000000000000000000000000000000000000000000000000000000016630a85bd0160e11b1492505050949350505050565b60009081526001919091016020526040902054151590565b600081815260018301602052604081205480156131f0578354600019808301919081019060009087908390811061316757fe5b906000526020600020015490508087600001848154811061318457fe5b6000918252602080832090910192909255828152600189810190925260409020908401905586548790806131b457fe5b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506111ee565b60009150506111ee565b6000613206838361311c565b61323c575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556111ee565b5060006111ee565b6000828152600184016020526040812054806132a9575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055612961565b828560000160018303815481106132bc57fe5b9060005260206000209060020201600101819055506000915050612961565b80546001019055565b6132fe82826040518060200160405280600081525061337a565b5050565b61330b8261249e565b6133465760405162461bcd60e51b815260040180806020018281038252602c81526020018061397e602c913960400191505060405180910390fd5b60008281526008602090815260409091208251610cdb928401906136bb565b3b151590565b606061210884846000856133cc565b6133848383613527565b6133916000848484612f72565b610cdb5760405162461bcd60e51b81526004018080602001828103825260328152602001806137d76032913960400191505060405180910390fd5b60608247101561340d5760405162461bcd60e51b81526004018080602001828103825260268152602001806138536026913960400191505060405180910390fd5b61341685613365565b613467576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106134a55780518252601f199092019160209182019101613486565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613507576040519150601f19603f3d011682016040523d82523d6000602084013e61350c565b606091505b509150915061351c828286613655565b979650505050505050565b6001600160a01b038216613582576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b61358b8161249e565b156135dd576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b6135e960008383610cdb565b6001600160a01b038216600090815260016020526040902061360b9082612be2565b5061361860028284612bee565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60608315613664575081612961565b8251156136745782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315612f08578181015183820152602001612ef0565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826136f15760008555613737565b82601f1061370a57805160ff1916838001178555613737565b82800160010185558215613737579182015b8281111561373757825182559160200191906001019061371c565b50613743929150613747565b5090565b5b80821115613743576000815560010161374856fe4f6e6c792063726561746f722063616e20676976652061636365737320746f2067617264656e456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473546865206e756d626572206f6620636f6e7472696275746f7273206d7573742062652062656c6f7720746865206c696d69744552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734552433732313a207472616e7366657220746f20746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e64734552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732314d657461646174613a2055524920736574206f66206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314d657461646174613a2055524920717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564a2646970667358221220cdf2abb0b26137de23c457af1af68be12f3123ff29ce047f5485a1fbd26306aa64736f6c63430007060033", "devdoc": { "author": "Babylon Finance Contract that implements guestlists for Babylon Finance using an NFT", "kind": "dev", @@ -1165,7 +1165,7 @@ "storageLayout": { "storage": [ { - "astId": 3964, + "astId": 1572, "contract": "contracts/IshtarGate.sol:IshtarGate", "label": "_supportedInterfaces", "offset": 0, @@ -1173,23 +1173,23 @@ "type": "t_mapping(t_bytes4,t_bool)" }, { - "astId": 5473, + "astId": 3081, "contract": "contracts/IshtarGate.sol:IshtarGate", "label": "_holderTokens", "offset": 0, "slot": "1", - "type": "t_mapping(t_address,t_struct(UintSet)7889_storage)" + "type": "t_mapping(t_address,t_struct(UintSet)5497_storage)" }, { - "astId": 5475, + "astId": 3083, "contract": "contracts/IshtarGate.sol:IshtarGate", "label": "_tokenOwners", "offset": 0, "slot": "2", - "type": "t_struct(UintToAddressMap)7266_storage" + "type": "t_struct(UintToAddressMap)4874_storage" }, { - "astId": 5479, + "astId": 3087, "contract": "contracts/IshtarGate.sol:IshtarGate", "label": "_tokenApprovals", "offset": 0, @@ -1197,7 +1197,7 @@ "type": "t_mapping(t_uint256,t_address)" }, { - "astId": 5485, + "astId": 3093, "contract": "contracts/IshtarGate.sol:IshtarGate", "label": "_operatorApprovals", "offset": 0, @@ -1205,7 +1205,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" }, { - "astId": 5487, + "astId": 3095, "contract": "contracts/IshtarGate.sol:IshtarGate", "label": "_name", "offset": 0, @@ -1213,7 +1213,7 @@ "type": "t_string_storage" }, { - "astId": 5489, + "astId": 3097, "contract": "contracts/IshtarGate.sol:IshtarGate", "label": "_symbol", "offset": 0, @@ -1221,7 +1221,7 @@ "type": "t_string_storage" }, { - "astId": 5493, + "astId": 3101, "contract": "contracts/IshtarGate.sol:IshtarGate", "label": "_tokenURIs", "offset": 0, @@ -1229,7 +1229,7 @@ "type": "t_mapping(t_uint256,t_string_storage)" }, { - "astId": 5495, + "astId": 3103, "contract": "contracts/IshtarGate.sol:IshtarGate", "label": "_baseURI", "offset": 0, @@ -1237,7 +1237,7 @@ "type": "t_string_storage" }, { - "astId": 3848, + "astId": 1456, "contract": "contracts/IshtarGate.sol:IshtarGate", "label": "_owner", "offset": 0, @@ -1245,15 +1245,15 @@ "type": "t_address" }, { - "astId": 12540, + "astId": 11463, "contract": "contracts/IshtarGate.sol:IshtarGate", "label": "controller", "offset": 0, "slot": "11", - "type": "t_contract(IBabController)23675" + "type": "t_contract(IBabController)22767" }, { - "astId": 12543, + "astId": 11466, "contract": "contracts/IshtarGate.sol:IshtarGate", "label": "tokenURI", "offset": 0, @@ -1261,7 +1261,7 @@ "type": "t_string_storage" }, { - "astId": 12546, + "astId": 11469, "contract": "contracts/IshtarGate.sol:IshtarGate", "label": "maxNumberOfInvites", "offset": 0, @@ -1269,7 +1269,7 @@ "type": "t_uint256" }, { - "astId": 12552, + "astId": 11475, "contract": "contracts/IshtarGate.sol:IshtarGate", "label": "permissionsByCommunity", "offset": 0, @@ -1277,7 +1277,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint8))" }, { - "astId": 12556, + "astId": 11479, "contract": "contracts/IshtarGate.sol:IshtarGate", "label": "canCreateAGarden", "offset": 0, @@ -1285,7 +1285,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 12560, + "astId": 11483, "contract": "contracts/IshtarGate.sol:IshtarGate", "label": "gardenAccessCount", "offset": 0, @@ -1293,12 +1293,12 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 12574, + "astId": 11497, "contract": "contracts/IshtarGate.sol:IshtarGate", "label": "_tokenIds", "offset": 0, "slot": "17", - "type": "t_struct(Counter)6892_storage" + "type": "t_struct(Counter)4500_storage" } ], "types": { @@ -1313,8 +1313,8 @@ "label": "bytes32[]", "numberOfBytes": "32" }, - "t_array(t_struct(MapEntry)6940_storage)dyn_storage": { - "base": "t_struct(MapEntry)6940_storage", + "t_array(t_struct(MapEntry)4548_storage)dyn_storage": { + "base": "t_struct(MapEntry)4548_storage", "encoding": "dynamic_array", "label": "struct EnumerableMap.MapEntry[]", "numberOfBytes": "32" @@ -1334,7 +1334,7 @@ "label": "bytes4", "numberOfBytes": "4" }, - "t_contract(IBabController)23675": { + "t_contract(IBabController)22767": { "encoding": "inplace", "label": "contract IBabController", "numberOfBytes": "20" @@ -1360,12 +1360,12 @@ "numberOfBytes": "32", "value": "t_mapping(t_address,t_uint8)" }, - "t_mapping(t_address,t_struct(UintSet)7889_storage)": { + "t_mapping(t_address,t_struct(UintSet)5497_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct EnumerableSet.UintSet)", "numberOfBytes": "32", - "value": "t_struct(UintSet)7889_storage" + "value": "t_struct(UintSet)5497_storage" }, "t_mapping(t_address,t_uint256)": { "encoding": "mapping", @@ -1414,12 +1414,12 @@ "label": "string", "numberOfBytes": "32" }, - "t_struct(Counter)6892_storage": { + "t_struct(Counter)4500_storage": { "encoding": "inplace", "label": "struct Counters.Counter", "members": [ { - "astId": 6891, + "astId": 4499, "contract": "contracts/IshtarGate.sol:IshtarGate", "label": "_value", "offset": 0, @@ -1429,20 +1429,20 @@ ], "numberOfBytes": "32" }, - "t_struct(Map)6948_storage": { + "t_struct(Map)4556_storage": { "encoding": "inplace", "label": "struct EnumerableMap.Map", "members": [ { - "astId": 6943, + "astId": 4551, "contract": "contracts/IshtarGate.sol:IshtarGate", "label": "_entries", "offset": 0, "slot": "0", - "type": "t_array(t_struct(MapEntry)6940_storage)dyn_storage" + "type": "t_array(t_struct(MapEntry)4548_storage)dyn_storage" }, { - "astId": 6947, + "astId": 4555, "contract": "contracts/IshtarGate.sol:IshtarGate", "label": "_indexes", "offset": 0, @@ -1452,12 +1452,12 @@ ], "numberOfBytes": "64" }, - "t_struct(MapEntry)6940_storage": { + "t_struct(MapEntry)4548_storage": { "encoding": "inplace", "label": "struct EnumerableMap.MapEntry", "members": [ { - "astId": 6937, + "astId": 4545, "contract": "contracts/IshtarGate.sol:IshtarGate", "label": "_key", "offset": 0, @@ -1465,7 +1465,7 @@ "type": "t_bytes32" }, { - "astId": 6939, + "astId": 4547, "contract": "contracts/IshtarGate.sol:IshtarGate", "label": "_value", "offset": 0, @@ -1475,12 +1475,12 @@ ], "numberOfBytes": "64" }, - "t_struct(Set)7503_storage": { + "t_struct(Set)5111_storage": { "encoding": "inplace", "label": "struct EnumerableSet.Set", "members": [ { - "astId": 7498, + "astId": 5106, "contract": "contracts/IshtarGate.sol:IshtarGate", "label": "_values", "offset": 0, @@ -1488,7 +1488,7 @@ "type": "t_array(t_bytes32)dyn_storage" }, { - "astId": 7502, + "astId": 5110, "contract": "contracts/IshtarGate.sol:IshtarGate", "label": "_indexes", "offset": 0, @@ -1498,32 +1498,32 @@ ], "numberOfBytes": "64" }, - "t_struct(UintSet)7889_storage": { + "t_struct(UintSet)5497_storage": { "encoding": "inplace", "label": "struct EnumerableSet.UintSet", "members": [ { - "astId": 7888, + "astId": 5496, "contract": "contracts/IshtarGate.sol:IshtarGate", "label": "_inner", "offset": 0, "slot": "0", - "type": "t_struct(Set)7503_storage" + "type": "t_struct(Set)5111_storage" } ], "numberOfBytes": "64" }, - "t_struct(UintToAddressMap)7266_storage": { + "t_struct(UintToAddressMap)4874_storage": { "encoding": "inplace", "label": "struct EnumerableMap.UintToAddressMap", "members": [ { - "astId": 7265, + "astId": 4873, "contract": "contracts/IshtarGate.sol:IshtarGate", "label": "_inner", "offset": 0, "slot": "0", - "type": "t_struct(Map)6948_storage" + "type": "t_struct(Map)4556_storage" } ], "numberOfBytes": "64" diff --git a/deployments/artifacts/mainnet/KyberTradeIntegration.json b/deployments/artifacts/mainnet/KyberTradeIntegration.json index 0613bda5e..1bb47bc22 100644 --- a/deployments/artifacts/mainnet/KyberTradeIntegration.json +++ b/deployments/artifacts/mainnet/KyberTradeIntegration.json @@ -1,5 +1,5 @@ { - "address": "0x43B9ee4D4B1C86A14a81eE254e0b17433c2b4D8b", + "address": "0x87761107b2F61eC524274cC7c881B8b1a2f5F225", "abi": [ { "inputs": [ @@ -223,31 +223,31 @@ "type": "function" } ], - "transactionHash": "0xe0f799fcc064a25a71bad24a9a79a02411edcf8488a19c11b940fdd88f89fd58", + "transactionHash": "0xff92aa1d66528f0656a7003217fee97a6f6fccdd75fb810cca53e93040f39979", "receipt": { "to": null, "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", - "contractAddress": "0x43B9ee4D4B1C86A14a81eE254e0b17433c2b4D8b", - "transactionIndex": 166, - "gasUsed": "1458642", + "contractAddress": "0x87761107b2F61eC524274cC7c881B8b1a2f5F225", + "transactionIndex": 51, + "gasUsed": "1683809", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xa762e6e439b8d029dceef40cd19cbfbc0d30049049120fd8e9a13f35281d593c", - "transactionHash": "0xe0f799fcc064a25a71bad24a9a79a02411edcf8488a19c11b940fdd88f89fd58", + "blockHash": "0x7dcd44c7602fa2d990ff3dda0f6b5ae61975264d384241d8eaccdb46599263d5", + "transactionHash": "0xff92aa1d66528f0656a7003217fee97a6f6fccdd75fb810cca53e93040f39979", "logs": [], - "blockNumber": 12360939, - "cumulativeGasUsed": "10936507", + "blockNumber": 12451259, + "cumulativeGasUsed": "4228510", "status": 1, "byzantium": true }, "args": [ - "0xffe7c30daDb1B132b86aB7bbede496615d54c8Ac", + "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F", "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", "0x9AAb3f75489902f3a48495025729a0AF77d4b11e" ], - "solcInputHash": "a02a2075cf667a20c416d2d0a5e8f337", - "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_weth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_kyberNetworkProxyAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IGarden\",\"name\":\"_garden\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IStrategy\",\"name\":\"_strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_sendToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_receiveToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_exchangeName\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_totalSendAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_totalReceiveAmount\",\"type\":\"uint256\"}],\"name\":\"ComponentExchanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_destinationToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sourceQuantity\",\"type\":\"uint256\"}],\"name\":\"getConversionRates\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"initializedByGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"kyberNetworkProxyAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_sendToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sendQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_receiveToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minReceiveQuantity\",\"type\":\"uint256\"}],\"name\":\"trade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Protocol Kyber protocol trade integration\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of the controller\",\"_kyberNetworkProxyAddress\":\"Address of Kyber Network Proxy contract\",\"_weth\":\"Address of the WETH ERC20\"}},\"getConversionRates(address,address,uint256)\":{\"params\":{\"_destinationToken\":\"Address of destination token to buy\",\"_sourceQuantity\":\"Amount of source token to sell\",\"_sourceToken\":\"Address of source token to be sold\"},\"returns\":{\"_0\":\"uint256 Conversion rate in wei\",\"_1\":\"uint256 Slippage rate in wei\"}},\"trade(address,address,uint256,address,uint256)\":{\"details\":\"@param _strategy Address of the strategy\",\"params\":{\"_minReceiveQuantity\":\"Min units of wanted token to be received from the exchange\",\"_receiveToken\":\"Address of the token that will be received from the exchange\",\"_sendQuantity\":\"Units of reserve asset token sent to the exchange\",\"_sendToken\":\"Address of the token to be sent to the exchange\"}}},\"title\":\"KyberTradeIntegration\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates the integration\"},\"getConversionRates(address,address,uint256)\":{\"notice\":\"Returns the conversion rate between the source token and the destination token in 18 decimals, regardless of component token's decimals\"},\"getName()\":{\"notice\":\"Returns the name of the integration\"},\"trade(address,address,uint256,address,uint256)\":{\"notice\":\"Executes a trade on a supported DEX.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/integrations/trade/KyberTradeIntegration.sol\":\"KyberTradeIntegration\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\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 /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\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, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x7b2b8baa20fd60ab4a328c8e34c64a353651b80ba4b5b157cbb61813f6f85d55\",\"license\":\"MIT\"},\"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol\":{\"content\":\"pragma solidity >=0.5.0;\\n\\ninterface IUniswapV2Pair {\\n event Approval(address indexed owner, address indexed spender, uint value);\\n event Transfer(address indexed from, address indexed to, uint value);\\n\\n function name() external pure returns (string memory);\\n function symbol() external pure returns (string memory);\\n function decimals() external pure returns (uint8);\\n function totalSupply() external view returns (uint);\\n function balanceOf(address owner) external view returns (uint);\\n function allowance(address owner, address spender) external view returns (uint);\\n\\n function approve(address spender, uint value) external returns (bool);\\n function transfer(address to, uint value) external returns (bool);\\n function transferFrom(address from, address to, uint value) external returns (bool);\\n\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n function PERMIT_TYPEHASH() external pure returns (bytes32);\\n function nonces(address owner) external view returns (uint);\\n\\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\\n\\n event Mint(address indexed sender, uint amount0, uint amount1);\\n event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\\n event Swap(\\n address indexed sender,\\n uint amount0In,\\n uint amount1In,\\n uint amount0Out,\\n uint amount1Out,\\n address indexed to\\n );\\n event Sync(uint112 reserve0, uint112 reserve1);\\n\\n function MINIMUM_LIQUIDITY() external pure returns (uint);\\n function factory() external view returns (address);\\n function token0() external view returns (address);\\n function token1() external view returns (address);\\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\\n function price0CumulativeLast() external view returns (uint);\\n function price1CumulativeLast() external view returns (uint);\\n function kLast() external view returns (uint);\\n\\n function mint(address to) external returns (uint liquidity);\\n function burn(address to) external returns (uint amount0, uint amount1);\\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\\n function skim(address to) external;\\n function sync() external;\\n\\n function initialize(address, address) external;\\n}\\n\",\"keccak256\":\"0x7c9bc70e5996c763e02ff38905282bc24fb242b0ef2519a003b36824fc524a4b\"},\"@uniswap/v2-periphery/contracts/libraries/SafeMath.sol\":{\"content\":\"pragma solidity >=0.5.0;\\n\\n// a library for performing overflow-safe math, courtesy of DappHub (https://github.com/dapphub/ds-math)\\n\\nlibrary SafeMath {\\n function add(uint x, uint y) internal pure returns (uint z) {\\n require((z = x + y) >= x, 'ds-math-add-overflow');\\n }\\n\\n function sub(uint x, uint y) internal pure returns (uint z) {\\n require((z = x - y) <= x, 'ds-math-sub-underflow');\\n }\\n\\n function mul(uint x, uint y) internal pure returns (uint z) {\\n require(y == 0 || (z = x * y) / y == x, 'ds-math-mul-overflow');\\n }\\n}\\n\",\"keccak256\":\"0x1fc06badffc7e465ffbf73154a4e0d618a7aac154eaa1657646d95f9abeb320c\"},\"@uniswap/v2-periphery/contracts/libraries/UniswapV2Library.sol\":{\"content\":\"pragma solidity >=0.5.0;\\n\\nimport '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';\\n\\nimport \\\"./SafeMath.sol\\\";\\n\\nlibrary UniswapV2Library {\\n using SafeMath for uint;\\n\\n // returns sorted token addresses, used to handle return values from pairs sorted in this order\\n function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {\\n require(tokenA != tokenB, 'UniswapV2Library: IDENTICAL_ADDRESSES');\\n (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);\\n require(token0 != address(0), 'UniswapV2Library: ZERO_ADDRESS');\\n }\\n\\n // calculates the CREATE2 address for a pair without making any external calls\\n function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) {\\n (address token0, address token1) = sortTokens(tokenA, tokenB);\\n pair = address(uint(keccak256(abi.encodePacked(\\n hex'ff',\\n factory,\\n keccak256(abi.encodePacked(token0, token1)),\\n hex'96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f' // init code hash\\n ))));\\n }\\n\\n // fetches and sorts the reserves for a pair\\n function getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) {\\n (address token0,) = sortTokens(tokenA, tokenB);\\n (uint reserve0, uint reserve1,) = IUniswapV2Pair(pairFor(factory, tokenA, tokenB)).getReserves();\\n (reserveA, reserveB) = tokenA == token0 ? (reserve0, reserve1) : (reserve1, reserve0);\\n }\\n\\n // given some amount of an asset and pair reserves, returns an equivalent amount of the other asset\\n function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) {\\n require(amountA > 0, 'UniswapV2Library: INSUFFICIENT_AMOUNT');\\n require(reserveA > 0 && reserveB > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');\\n amountB = amountA.mul(reserveB) / reserveA;\\n }\\n\\n // given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset\\n function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) {\\n require(amountIn > 0, 'UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT');\\n require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');\\n uint amountInWithFee = amountIn.mul(997);\\n uint numerator = amountInWithFee.mul(reserveOut);\\n uint denominator = reserveIn.mul(1000).add(amountInWithFee);\\n amountOut = numerator / denominator;\\n }\\n\\n // given an output amount of an asset and pair reserves, returns a required input amount of the other asset\\n function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn) {\\n require(amountOut > 0, 'UniswapV2Library: INSUFFICIENT_OUTPUT_AMOUNT');\\n require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');\\n uint numerator = reserveIn.mul(amountOut).mul(1000);\\n uint denominator = reserveOut.sub(amountOut).mul(997);\\n amountIn = (numerator / denominator).add(1);\\n }\\n\\n // performs chained getAmountOut calculations on any number of pairs\\n function getAmountsOut(address factory, uint amountIn, address[] memory path) internal view returns (uint[] memory amounts) {\\n require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');\\n amounts = new uint[](path.length);\\n amounts[0] = amountIn;\\n for (uint i; i < path.length - 1; i++) {\\n (uint reserveIn, uint reserveOut) = getReserves(factory, path[i], path[i + 1]);\\n amounts[i + 1] = getAmountOut(amounts[i], reserveIn, reserveOut);\\n }\\n }\\n\\n // performs chained getAmountIn calculations on any number of pairs\\n function getAmountsIn(address factory, uint amountOut, address[] memory path) internal view returns (uint[] memory amounts) {\\n require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');\\n amounts = new uint[](path.length);\\n amounts[amounts.length - 1] = amountOut;\\n for (uint i = path.length - 1; i > 0; i--) {\\n (uint reserveIn, uint reserveOut) = getReserves(factory, path[i - 1], path[i]);\\n amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2e125bac8733dde3c937e4245f15dcd56633a1aecf5d7760ba2018e9e374f378\"},\"contracts/integrations/BaseIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IIntegration} from '../interfaces/IIntegration.sol';\\nimport {IWETH} from '../interfaces/external/weth/IWETH.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\n\\n/**\\n * @title BaseIntegration\\n * @author Babylon Finance\\n *\\n * Abstract class that houses common Integration-related state and functions.\\n */\\nabstract contract BaseIntegration {\\n using SafeCast for int256;\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlySystemContract() {\\n require(IBabController(controller).isSystemContract(msg.sender), 'Only system can call this');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the controller\\n address public controller;\\n // Wrapped ETH address\\n address public immutable weth;\\n // Name of the integration\\n string public name;\\n mapping(address => bool) public initializedByGarden;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) {\\n require(_controller != address(0), 'Controller must be defined');\\n name = _name;\\n controller = _controller;\\n weth = _weth;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the name of the integration\\n */\\n function getName() external view returns (string memory) {\\n return name;\\n }\\n}\\n\",\"keccak256\":\"0xf15da8b024a5a4f205b363420cb5851fd1c4225970999aed5f00d829bbd4f638\",\"license\":\"Apache License\"},\"contracts/integrations/trade/KyberTradeIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {TradeIntegration} from './TradeIntegration.sol';\\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\\nimport {IKyberNetworkProxy} from '../../interfaces/external/kyber/IKyberNetworkProxy.sol';\\n\\n/**\\n * @title KyberTradeIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Kyber protocol trade integration\\n */\\ncontract KyberTradeIntegration is TradeIntegration {\\n using SafeMath for uint256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ State Variables ============ */\\n\\n // Address of Kyber Network Proxy\\n address public kyberNetworkProxyAddress;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _controller Address of the controller\\n * @param _weth Address of the WETH ERC20\\n * @param _kyberNetworkProxyAddress Address of Kyber Network Proxy contract\\n */\\n constructor(\\n address _controller,\\n address _weth,\\n address _kyberNetworkProxyAddress\\n ) TradeIntegration('kyber', _weth, _controller) {\\n kyberNetworkProxyAddress = _kyberNetworkProxyAddress;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the conversion rate between the source token and the destination token\\n * in 18 decimals, regardless of component token's decimals\\n *\\n * @param _sourceToken Address of source token to be sold\\n * @param _destinationToken Address of destination token to buy\\n * @param _sourceQuantity Amount of source token to sell\\n *\\n * @return uint256 Conversion rate in wei\\n * @return uint256 Slippage rate in wei\\n */\\n function getConversionRates(\\n address _sourceToken,\\n address _destinationToken,\\n uint256 _sourceQuantity\\n ) external view override returns (uint256, uint256) {\\n // Get Kyber expectedRate to trade with\\n return\\n IKyberNetworkProxy(kyberNetworkProxyAddress).getExpectedRate(\\n _sourceToken,\\n _destinationToken,\\n _sourceQuantity\\n );\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Get calldata through Kyber.\\n *\\n * @param _strategy Address of the strategy\\n * @param _sendToken Address of the token to be sent to the exchange\\n * @param _sendQuantity Units of reserve asset token sent to the exchange\\n * @param _receiveToken Address of the token that will be received from the exchange\\n */\\n function _getTradeCallData(\\n address _strategy,\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n )\\n internal\\n view\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n // this has 3 percent slippage and doesn't account for the platform fee\\n (, uint256 worstRate) =\\n IKyberNetworkProxy(kyberNetworkProxyAddress).getExpectedRate(_sendToken, _receiveToken, _sendQuantity);\\n\\n // Encode method data for TradeIntegration to invoke\\n bytes memory methodData =\\n abi.encodeWithSignature(\\n 'trade(address,uint256,address,address,uint256,uint256,address)',\\n _sendToken,\\n _sendQuantity,\\n _receiveToken,\\n _strategy,\\n PreciseUnitMath.maxUint256(), // Sell entire amount of sourceToken\\n worstRate, // Trade with implied conversion rate\\n _strategy // Strategy address\\n );\\n\\n return (kyberNetworkProxyAddress, 0, methodData);\\n }\\n\\n /**\\n * Returns the address to approve source tokens to for trading. This is the Kyber Network\\n * Proxy address\\n *\\n * @return address Address of the contract to approve tokens to\\n */\\n function _getSpender() internal view override returns (address) {\\n return kyberNetworkProxyAddress;\\n }\\n}\\n\",\"keccak256\":\"0x149e2aa77130524dfc5a10dd7f759d2b727b34c30f42f041e7f14643db60d77b\",\"license\":\"Apache License\"},\"contracts/integrations/trade/TradeIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\n\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\nimport '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';\\nimport '@uniswap/v2-periphery/contracts/libraries/UniswapV2Library.sol';\\n\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {ITradeIntegration} from '../../interfaces/ITradeIntegration.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\n\\nimport {BaseIntegration} from '../BaseIntegration.sol';\\n\\n/**\\n * @title BorrowIntetration\\n * @author Babylon Finance Protocol\\n *\\n * Base class for integration with trading protocols\\n */\\nabstract contract TradeIntegration is BaseIntegration, ReentrancyGuard, ITradeIntegration {\\n using SafeMath for uint256;\\n using SafeCast for uint256;\\n\\n /* ============ Struct ============ */\\n\\n struct TradeInfo {\\n IGarden garden; // Garden\\n IStrategy strategy; // Strategy\\n string exchangeName; // Which exchange to use\\n address sendToken; // Address of token being sold\\n address receiveToken; // Address of token being bought\\n uint256 gardenTotalSupply; // Total supply of Garden in Precise Units (10^18)\\n uint256 totalSendQuantity; // Total quantity of sold tokens\\n uint256 totalMinReceiveQuantity; // Total minimum quantity of token to receive back\\n uint256 preTradeSendTokenBalance; // Total initial balance of token being sold\\n uint256 preTradeReceiveTokenBalance; // Total initial balance of token being bought\\n }\\n\\n /* ============ Events ============ */\\n\\n event ComponentExchanged(\\n IGarden indexed _garden,\\n IStrategy indexed _strategy,\\n address indexed _sendToken,\\n address _receiveToken,\\n string _exchangeName,\\n uint256 _totalSendAmount,\\n uint256 _totalReceiveAmount\\n );\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) BaseIntegration(_name, _weth, _controller) {}\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Executes a trade on a supported DEX.\\n * @dev\\n *\\n * @param _strategy Address of the strategy\\n * @param _sendToken Address of the token to be sent to the exchange\\n * @param _sendQuantity Units of reserve asset token sent to the exchange\\n * @param _receiveToken Address of the token that will be received from the exchange\\n * @param _minReceiveQuantity Min units of wanted token to be received from the exchange\\n */\\n function trade(\\n address _strategy,\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken,\\n uint256 _minReceiveQuantity\\n ) external override nonReentrant onlySystemContract {\\n TradeInfo memory tradeInfo =\\n _createTradeInfo(_strategy, name, _sendToken, _receiveToken, _sendQuantity, _minReceiveQuantity);\\n _validatePreTradeData(tradeInfo, _sendQuantity);\\n // Get spender address from exchange adapter and invoke approve for exact amount on sendToken\\n tradeInfo.strategy.invokeApprove(_getSpender(), tradeInfo.sendToken, tradeInfo.totalSendQuantity);\\n (address targetExchange, uint256 callValue, bytes memory methodData) =\\n _getTradeCallData(_strategy, tradeInfo.sendToken, tradeInfo.totalSendQuantity, tradeInfo.receiveToken);\\n tradeInfo.strategy.invokeFromIntegration(targetExchange, callValue, methodData);\\n\\n uint256 exchangedQuantity = _validatePostTrade(tradeInfo);\\n uint256 newAmountSendTokens = tradeInfo.preTradeSendTokenBalance.sub(tradeInfo.totalSendQuantity);\\n uint256 newAmountReceiveTokens = tradeInfo.preTradeReceiveTokenBalance.add(exchangedQuantity);\\n emit ComponentExchanged(\\n tradeInfo.garden,\\n tradeInfo.strategy,\\n _sendToken,\\n _receiveToken,\\n tradeInfo.exchangeName,\\n newAmountSendTokens,\\n newAmountReceiveTokens\\n );\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Create and return TradeInfo struct\\n *\\n * @param _strategy Address of the strategy\\n * @param _exchangeName Human readable name of the exchange in the integrations registry\\n * @param _sendToken Address of the token to be sent to the exchange\\n * @param _receiveToken Address of the token that will be received from the exchange\\n * @param _sendQuantity Units of token in SetToken sent to the exchange\\n * @param _minReceiveQuantity Min units of token in SetToken to be received from the exchange\\n *\\n * return TradeInfo Struct containing data for trade\\n */\\n function _createTradeInfo(\\n address _strategy,\\n string memory _exchangeName,\\n address _sendToken,\\n address _receiveToken,\\n uint256 _sendQuantity,\\n uint256 _minReceiveQuantity\\n ) internal view returns (TradeInfo memory) {\\n TradeInfo memory tradeInfo;\\n\\n tradeInfo.strategy = IStrategy(_strategy);\\n tradeInfo.garden = tradeInfo.strategy.garden();\\n\\n tradeInfo.exchangeName = _exchangeName;\\n\\n tradeInfo.sendToken = _sendToken;\\n tradeInfo.receiveToken = _receiveToken;\\n\\n tradeInfo.gardenTotalSupply = ERC20(address(tradeInfo.strategy.garden())).totalSupply();\\n\\n tradeInfo.totalSendQuantity = _sendQuantity;\\n\\n tradeInfo.totalMinReceiveQuantity = _minReceiveQuantity;\\n\\n tradeInfo.preTradeSendTokenBalance = ERC20(_sendToken).balanceOf(_strategy);\\n tradeInfo.preTradeReceiveTokenBalance = ERC20(_receiveToken).balanceOf(_strategy);\\n\\n return tradeInfo;\\n }\\n\\n /**\\n * Validate pre trade data. Check exchange is valid, token quantity is valid.\\n *\\n * @param _tradeInfo Struct containing trade information used in internal functions\\n * @param _sendQuantity Units of token in SetToken sent to the exchange\\n */\\n function _validatePreTradeData(TradeInfo memory _tradeInfo, uint256 _sendQuantity) internal view {\\n require(_tradeInfo.totalSendQuantity > 0, 'Token to sell must be nonzero');\\n address pair =\\n UniswapV2Library.pairFor(\\n IBabController(controller).getUniswapFactory(),\\n _tradeInfo.sendToken,\\n _tradeInfo.receiveToken\\n );\\n uint256 minLiquidity = _tradeInfo.garden.minLiquidityAsset();\\n // Check that there is enough liquidity\\n (uint256 liquidity0, uint256 liquidity1, ) = IUniswapV2Pair(pair).getReserves();\\n require(\\n (IUniswapV2Pair(pair).token0() == weth && liquidity0 >= minLiquidity) ||\\n (IUniswapV2Pair(pair).token1() == weth && liquidity1 >= minLiquidity),\\n 'Not enough liquidity'\\n );\\n require(\\n ERC20(_tradeInfo.sendToken).balanceOf(address(_tradeInfo.strategy)) >= _sendQuantity,\\n 'Garden needs to have enough liquid tokens'\\n );\\n }\\n\\n /**\\n * Validate post trade data.\\n *\\n * @param _tradeInfo Struct containing trade information used in internal functions\\n * @return uint256 Total quantity of receive token that was exchanged\\n */\\n function _validatePostTrade(TradeInfo memory _tradeInfo) internal view returns (uint256) {\\n uint256 exchangedQuantity =\\n ERC20(_tradeInfo.receiveToken).balanceOf(address(_tradeInfo.strategy)).sub(\\n _tradeInfo.preTradeReceiveTokenBalance\\n );\\n // Get reserve asset decimals\\n uint8 tokenDecimals = ERC20(_tradeInfo.receiveToken).decimals();\\n uint256 normalizedExchangedQuantity =\\n tokenDecimals != 18 ? exchangedQuantity.mul(10**(18 - tokenDecimals)) : exchangedQuantity;\\n require(normalizedExchangedQuantity >= _tradeInfo.totalMinReceiveQuantity, 'Slippage greater than allowed');\\n\\n return normalizedExchangedQuantity;\\n }\\n\\n /**\\n * Return exchange calldata which is already generated from the exchange API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _sendToken Address of the token to be sent to the exchange\\n * hparam _sendQuantity Units of reserve asset token sent to the exchange\\n * hparam _receiveToken Address of the token that will be received from the exchange\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getTradeCallData(\\n address, /* _strategy */\\n address, /* _sendToken */\\n uint256, /*_sendQuantity */\\n address /* _receiveToken */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n /**\\n * Returns the address to approve source tokens to for trading. This is the TokenTaker address\\n *\\n * @return address Address of the contract to approve tokens to\\n */\\n function _getSpender() internal view virtual returns (address);\\n}\\n\",\"keccak256\":\"0x02a5a72eea1ecebb0a23fee6afe9fc09bcc78a1ccefff49d3a55eec375d42bea\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityMinimum(uint256 _minRiskyPairLiquidityEth) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minRiskyPairLiquidityEth() external view returns (uint256);\\n\\n function getUniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0x57cf4ece98219f805a416e8c24728d30d9b37c4126d66785d2617b97e35ffae6\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function nftAddress() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategy(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function reenableEthForStrategies() external;\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x5e460136e0b45024ea1c1f32cde607f3ce75dd5b14cee34007d6bbd08beabc82\",\"license\":\"Apache License\"},\"contracts/interfaces/IIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIntegration\\n * @author Babylon Finance\\n *\\n * Interface for protocol integrations\\n */\\ninterface IIntegration {\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xee03c9274ddf3257e3bfd2bb229fea3412c9105f178e64174f59efeafd53182c\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital,\\n address _strategyNft\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function strategyNft() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x4396906e436eb68c96715e0a53ae1656ac5d7934ebdaeb58ec3c33953465bc39\",\"license\":\"Apache License\"},\"contracts/interfaces/ITradeIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title ITrade\\n * @author Babylon Finance\\n *\\n * Interface for trading protocol integrations\\n */\\ninterface ITradeIntegration {\\n function trade(\\n address _strategy,\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken,\\n uint256 _minReceiveQuantity\\n ) external;\\n\\n function getConversionRates(\\n address _sourceToken,\\n address _destinationToken,\\n uint256 _sourceQuantity\\n ) external returns (uint256, uint256);\\n}\\n\",\"keccak256\":\"0x95df25f2cbfd3d82a9e22c9202f9fc2c497e90fd6e5fcfb00c4162f6447c0cbd\",\"license\":\"Apache License\"},\"contracts/interfaces/external/kyber/IKyberNetworkProxy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\ninterface IKyberNetworkProxy {\\n function getExpectedRate(\\n address _src,\\n address _dest,\\n uint256 _srcQty\\n ) external view returns (uint256, uint256);\\n\\n function trade(\\n address _src,\\n uint256 _srcAmount,\\n address _dest,\\n address _destAddress,\\n uint256 _maxDestAmount,\\n uint256 _minConversionRate,\\n address _referalFeeAddress\\n ) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x9fc1e180cd247544fa1d672e8830e51512bbacf9c0abdbf44e5ef54202132aad\",\"license\":\"Apache License\"},\"contracts/interfaces/external/weth/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface IWETH is IERC20 {\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n}\\n\",\"keccak256\":\"0xacc7980a650b7a753ee51f1bbc0ae4f641e84261bcc02cfdaf87ee8136483684\",\"license\":\"MIT\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523480156200001157600080fd5b50604051620019c0380380620019c0833981810160405260608110156200003757600080fd5b5080516020808301516040938401518451808601909552600585526435bcb132b960d91b92850192909252919282848282826001600160a01b038116620000c5576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c6572206d75737420626520646566696e6564000000000000604482015290519081900360640190fd5b8251620000da9060019060208601906200012f565b50600080546001600160a01b03199081166001600160a01b039384161790915560609290921b6001600160601b03191660805260016003556004805490921696169590951790945550620001db945050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001675760008555620001b2565b82601f106200018257805160ff1916838001178555620001b2565b82800160010185558215620001b2579182015b82811115620001b257825182559160200191906001019062000195565b50620001c0929150620001c4565b5090565b5b80821115620001c05760008155600101620001c5565b60805160601c6117bd62000203600039806103485280610ea35280610f3552506117bd6000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063aa0b24fa1161005b578063aa0b24fa1461013e578063b10198fb1461018d578063f77c4791146101c7578063fa1ca820146101cf57610088565b806306fdde031461008d57806312e41a771461010a57806317d7de7c1461012e5780633fc8cef314610136575b600080fd5b610095610215565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100cf5781810151838201526020016100b7565b50505050905090810190601f1680156100fc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101126102a2565b604080516001600160a01b039092168252519081900360200190f35b6100956102b1565b610112610346565b6101746004803603606081101561015457600080fd5b506001600160a01b0381358116916020810135909116906040013561036a565b6040805192835260208301919091528051918290030190f35b6101b3600480360360208110156101a357600080fd5b50356001600160a01b0316610406565b604080519115158252519081900360200190f35b61011261041b565b610213600480360360a08110156101e557600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135909116906080013561042a565b005b60018054604080516020600284861615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561029a5780601f1061026f5761010080835404028352916020019161029a565b820191906000526020600020905b81548152906001019060200180831161027d57829003601f168201915b505050505081565b6004546001600160a01b031681565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526060939092909183018282801561033c5780601f106103115761010080835404028352916020019161033c565b820191906000526020600020905b81548152906001019060200180831161031f57829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b600480546040805163809a9e5560e01b81526001600160a01b038781169482019490945285841660248201526044810185905281516000948594169263809a9e559260648082019391829003018186803b1580156103c757600080fd5b505afa1580156103db573d6000803e3d6000fd5b505050506040513d60408110156103f157600080fd5b50805160209091015190969095509350505050565b60026020526000908152604090205460ff1681565b6000546001600160a01b031681565b60026003541415610482576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080517f13bc6d4b00000000000000000000000000000000000000000000000000000000815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b1580156104eb57600080fd5b505afa1580156104ff573d6000803e3d6000fd5b505050506040513d602081101561051557600080fd5b5051610568576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152600093610603938a938301828280156105f55780601f106105ca576101008083540402835291602001916105f5565b820191906000526020600020905b8154815290600101906020018083116105d857829003601f168201915b5050505050878688876109b8565b905061060f8185610c60565b80602001516001600160a01b03166397ccdc6061062a6110f0565b83606001518460c001516040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561068a57600080fd5b505af115801561069e573d6000803e3d6000fd5b5050505060008060006106bf8985606001518660c0015187608001516110ff565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561073c578181015183820152602001610724565b50505050905090810190601f1680156107695780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561078a57600080fd5b505af115801561079e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156107c757600080fd5b81019080805160405193929190846401000000008211156107e757600080fd5b9083019060208201858111156107fc57600080fd5b825164010000000081118282018810171561081657600080fd5b82525081516020918201929091019080838360005b8381101561084357818101518382015260200161082b565b50505050905090810190601f1680156108705780820380516001836020036101000a031916815260200191505b5060405250505050600061088385611257565b905060006108a38660c001518761010001516113e490919063ffffffff16565b905060006108bf8388610120015161144290919063ffffffff16565b90508a6001600160a01b031687602001516001600160a01b031688600001516001600160a01b03167f6896e8a2de09380c881b23755435130206166901028e7413fce46cd6ecafdb758c8b60400151878760405180856001600160a01b0316815260200180602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b83811015610968578181015183820152602001610950565b50505050905090810190601f1680156109955780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a45050600160035550505050505050505050565b6109c06116c2565b6109c86116c2565b6001600160a01b038816602080830182905260408051630ad7511760e31b815290516356ba88b892600480840193919291829003018186803b158015610a0d57600080fd5b505afa158015610a21573d6000803e3d6000fd5b505050506040513d6020811015610a3757600080fd5b50516001600160a01b0390811682526040808301899052878216606084015286821660808401526020838101518251630ad7511760e31b815292519316926356ba88b8926004808201939291829003018186803b158015610a9757600080fd5b505afa158015610aab573d6000803e3d6000fd5b505050506040513d6020811015610ac157600080fd5b5051604080517f18160ddd00000000000000000000000000000000000000000000000000000000815290516001600160a01b03909216916318160ddd91600480820192602092909190829003018186803b158015610b1e57600080fd5b505afa158015610b32573d6000803e3d6000fd5b505050506040513d6020811015610b4857600080fd5b505160a082015260c0810184905260e08101839052604080516370a0823160e01b81526001600160a01b038a811660048301529151918816916370a0823191602480820192602092909190829003018186803b158015610ba757600080fd5b505afa158015610bbb573d6000803e3d6000fd5b505050506040513d6020811015610bd157600080fd5b5051610100820152604080516370a0823160e01b81526001600160a01b038a811660048301529151918716916370a0823191602480820192602092909190829003018186803b158015610c2357600080fd5b505afa158015610c37573d6000803e3d6000fd5b505050506040513d6020811015610c4d57600080fd5b5051610120820152979650505050505050565b60008260c0015111610cb9576040805162461bcd60e51b815260206004820152601d60248201527f546f6b656e20746f2073656c6c206d757374206265206e6f6e7a65726f000000604482015290519081900360640190fd5b60008054604080517f3e6dfa360000000000000000000000000000000000000000000000000000000081529051610d54926001600160a01b031691633e6dfa36916004808301926020929190829003018186803b158015610d1957600080fd5b505afa158015610d2d573d6000803e3d6000fd5b505050506040513d6020811015610d4357600080fd5b50516060850151608086015161149a565b9050600083600001516001600160a01b031663a63c643d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d9557600080fd5b505afa158015610da9573d6000803e3d6000fd5b505050506040513d6020811015610dbf57600080fd5b5051604080517f0902f1ac000000000000000000000000000000000000000000000000000000008152905191925060009182916001600160a01b03861691630902f1ac91600480820192606092909190829003018186803b158015610e2357600080fd5b505afa158015610e37573d6000803e3d6000fd5b505050506040513d6060811015610e4d57600080fd5b508051602091820151604080517f0dfe168100000000000000000000000000000000000000000000000000000000815290516dffffffffffffffffffffffffffff93841696509290911693506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169390881692630dfe1681926004808201939291829003018186803b158015610eeb57600080fd5b505afa158015610eff573d6000803e3d6000fd5b505050506040513d6020811015610f1557600080fd5b50516001600160a01b0316148015610f2d5750828210155b80610fd857507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610f9657600080fd5b505afa158015610faa573d6000803e3d6000fd5b505050506040513d6020811015610fc057600080fd5b50516001600160a01b0316148015610fd85750828110155b611029576040805162461bcd60e51b815260206004820152601460248201527f4e6f7420656e6f756768206c6971756964697479000000000000000000000000604482015290519081900360640190fd5b8486606001516001600160a01b03166370a0823188602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561107f57600080fd5b505afa158015611093573d6000803e3d6000fd5b505050506040513d60208110156110a957600080fd5b505110156110e85760405162461bcd60e51b815260040180806020018281038252602981526020018061175f6029913960400191505060405180910390fd5b505050505050565b6004546001600160a01b031690565b600480546040805163809a9e5560e01b81526001600160a01b0387811694820194909452848416602482015260448101869052815160009485946060948694929091169263809a9e55926064808201939291829003018186803b15801561116557600080fd5b505afa158015611179573d6000803e3d6000fd5b505050506040513d604081101561118f57600080fd5b5060200151905060008787878b6111a4611572565b604080516001600160a01b03968716602482015260448101959095529285166064850152908416608484015260a483015260c482019490945299811660e4808c01919091528351808c039091018152610104909a01909252506020880180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fcb3c28c70000000000000000000000000000000000000000000000000000000017905260045416976000979650945050505050565b6000806112ea83610120015184608001516001600160a01b03166370a0823186602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156112b857600080fd5b505afa1580156112cc573d6000803e3d6000fd5b505050506040513d60208110156112e257600080fd5b5051906113e4565b9050600083608001516001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561132b57600080fd5b505afa15801561133f573d6000803e3d6000fd5b505050506040513d602081101561135557600080fd5b505190506000601260ff8316141561136d5782611381565b6113818360ff601285900316600a0a611578565b90508460e001518110156113dc576040805162461bcd60e51b815260206004820152601d60248201527f536c6970706167652067726561746572207468616e20616c6c6f776564000000604482015290519081900360640190fd5b949350505050565b8082038281111561143c576040805162461bcd60e51b815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b92915050565b8082018281101561143c576040805162461bcd60e51b815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b60008060006114a985856115e4565b604080516bffffffffffffffffffffffff19606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501207fff0000000000000000000000000000000000000000000000000000000000000060688401529a90941b9093166069840152607d8301989098527f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b60001990565b60008115806115935750508082028282828161159057fe5b04145b61143c576040805162461bcd60e51b815260206004820152601460248201527f64732d6d6174682d6d756c2d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b600080826001600160a01b0316846001600160a01b031614156116385760405162461bcd60e51b815260040180806020018281038252602581526020018061173a6025913960400191505060405180910390fd5b826001600160a01b0316846001600160a01b03161061165857828461165b565b83835b90925090506001600160a01b0382166116bb576040805162461bcd60e51b815260206004820152601e60248201527f556e697377617056324c6962726172793a205a45524f5f414444524553530000604482015290519081900360640190fd5b9250929050565b60405180610140016040528060006001600160a01b0316815260200160006001600160a01b031681526020016060815260200160006001600160a01b0316815260200160006001600160a01b031681526020016000815260200160008152602001600081526020016000815260200160008152509056fe556e697377617056324c6962726172793a204944454e544943414c5f41444452455353455347617264656e206e6565647320746f206861766520656e6f756768206c697175696420746f6b656e73a2646970667358221220670c3ffb0d495853410c9379dfe95b0d750b31b54fdc469fee753b14188b4be864736f6c63430007060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c8063aa0b24fa1161005b578063aa0b24fa1461013e578063b10198fb1461018d578063f77c4791146101c7578063fa1ca820146101cf57610088565b806306fdde031461008d57806312e41a771461010a57806317d7de7c1461012e5780633fc8cef314610136575b600080fd5b610095610215565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100cf5781810151838201526020016100b7565b50505050905090810190601f1680156100fc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101126102a2565b604080516001600160a01b039092168252519081900360200190f35b6100956102b1565b610112610346565b6101746004803603606081101561015457600080fd5b506001600160a01b0381358116916020810135909116906040013561036a565b6040805192835260208301919091528051918290030190f35b6101b3600480360360208110156101a357600080fd5b50356001600160a01b0316610406565b604080519115158252519081900360200190f35b61011261041b565b610213600480360360a08110156101e557600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135909116906080013561042a565b005b60018054604080516020600284861615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561029a5780601f1061026f5761010080835404028352916020019161029a565b820191906000526020600020905b81548152906001019060200180831161027d57829003601f168201915b505050505081565b6004546001600160a01b031681565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526060939092909183018282801561033c5780601f106103115761010080835404028352916020019161033c565b820191906000526020600020905b81548152906001019060200180831161031f57829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b600480546040805163809a9e5560e01b81526001600160a01b038781169482019490945285841660248201526044810185905281516000948594169263809a9e559260648082019391829003018186803b1580156103c757600080fd5b505afa1580156103db573d6000803e3d6000fd5b505050506040513d60408110156103f157600080fd5b50805160209091015190969095509350505050565b60026020526000908152604090205460ff1681565b6000546001600160a01b031681565b60026003541415610482576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080517f13bc6d4b00000000000000000000000000000000000000000000000000000000815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b1580156104eb57600080fd5b505afa1580156104ff573d6000803e3d6000fd5b505050506040513d602081101561051557600080fd5b5051610568576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152600093610603938a938301828280156105f55780601f106105ca576101008083540402835291602001916105f5565b820191906000526020600020905b8154815290600101906020018083116105d857829003601f168201915b5050505050878688876109b8565b905061060f8185610c60565b80602001516001600160a01b03166397ccdc6061062a6110f0565b83606001518460c001516040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561068a57600080fd5b505af115801561069e573d6000803e3d6000fd5b5050505060008060006106bf8985606001518660c0015187608001516110ff565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561073c578181015183820152602001610724565b50505050905090810190601f1680156107695780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561078a57600080fd5b505af115801561079e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156107c757600080fd5b81019080805160405193929190846401000000008211156107e757600080fd5b9083019060208201858111156107fc57600080fd5b825164010000000081118282018810171561081657600080fd5b82525081516020918201929091019080838360005b8381101561084357818101518382015260200161082b565b50505050905090810190601f1680156108705780820380516001836020036101000a031916815260200191505b5060405250505050600061088385611257565b905060006108a38660c001518761010001516113e490919063ffffffff16565b905060006108bf8388610120015161144290919063ffffffff16565b90508a6001600160a01b031687602001516001600160a01b031688600001516001600160a01b03167f6896e8a2de09380c881b23755435130206166901028e7413fce46cd6ecafdb758c8b60400151878760405180856001600160a01b0316815260200180602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b83811015610968578181015183820152602001610950565b50505050905090810190601f1680156109955780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a45050600160035550505050505050505050565b6109c06116c2565b6109c86116c2565b6001600160a01b038816602080830182905260408051630ad7511760e31b815290516356ba88b892600480840193919291829003018186803b158015610a0d57600080fd5b505afa158015610a21573d6000803e3d6000fd5b505050506040513d6020811015610a3757600080fd5b50516001600160a01b0390811682526040808301899052878216606084015286821660808401526020838101518251630ad7511760e31b815292519316926356ba88b8926004808201939291829003018186803b158015610a9757600080fd5b505afa158015610aab573d6000803e3d6000fd5b505050506040513d6020811015610ac157600080fd5b5051604080517f18160ddd00000000000000000000000000000000000000000000000000000000815290516001600160a01b03909216916318160ddd91600480820192602092909190829003018186803b158015610b1e57600080fd5b505afa158015610b32573d6000803e3d6000fd5b505050506040513d6020811015610b4857600080fd5b505160a082015260c0810184905260e08101839052604080516370a0823160e01b81526001600160a01b038a811660048301529151918816916370a0823191602480820192602092909190829003018186803b158015610ba757600080fd5b505afa158015610bbb573d6000803e3d6000fd5b505050506040513d6020811015610bd157600080fd5b5051610100820152604080516370a0823160e01b81526001600160a01b038a811660048301529151918716916370a0823191602480820192602092909190829003018186803b158015610c2357600080fd5b505afa158015610c37573d6000803e3d6000fd5b505050506040513d6020811015610c4d57600080fd5b5051610120820152979650505050505050565b60008260c0015111610cb9576040805162461bcd60e51b815260206004820152601d60248201527f546f6b656e20746f2073656c6c206d757374206265206e6f6e7a65726f000000604482015290519081900360640190fd5b60008054604080517f3e6dfa360000000000000000000000000000000000000000000000000000000081529051610d54926001600160a01b031691633e6dfa36916004808301926020929190829003018186803b158015610d1957600080fd5b505afa158015610d2d573d6000803e3d6000fd5b505050506040513d6020811015610d4357600080fd5b50516060850151608086015161149a565b9050600083600001516001600160a01b031663a63c643d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d9557600080fd5b505afa158015610da9573d6000803e3d6000fd5b505050506040513d6020811015610dbf57600080fd5b5051604080517f0902f1ac000000000000000000000000000000000000000000000000000000008152905191925060009182916001600160a01b03861691630902f1ac91600480820192606092909190829003018186803b158015610e2357600080fd5b505afa158015610e37573d6000803e3d6000fd5b505050506040513d6060811015610e4d57600080fd5b508051602091820151604080517f0dfe168100000000000000000000000000000000000000000000000000000000815290516dffffffffffffffffffffffffffff93841696509290911693506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169390881692630dfe1681926004808201939291829003018186803b158015610eeb57600080fd5b505afa158015610eff573d6000803e3d6000fd5b505050506040513d6020811015610f1557600080fd5b50516001600160a01b0316148015610f2d5750828210155b80610fd857507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610f9657600080fd5b505afa158015610faa573d6000803e3d6000fd5b505050506040513d6020811015610fc057600080fd5b50516001600160a01b0316148015610fd85750828110155b611029576040805162461bcd60e51b815260206004820152601460248201527f4e6f7420656e6f756768206c6971756964697479000000000000000000000000604482015290519081900360640190fd5b8486606001516001600160a01b03166370a0823188602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561107f57600080fd5b505afa158015611093573d6000803e3d6000fd5b505050506040513d60208110156110a957600080fd5b505110156110e85760405162461bcd60e51b815260040180806020018281038252602981526020018061175f6029913960400191505060405180910390fd5b505050505050565b6004546001600160a01b031690565b600480546040805163809a9e5560e01b81526001600160a01b0387811694820194909452848416602482015260448101869052815160009485946060948694929091169263809a9e55926064808201939291829003018186803b15801561116557600080fd5b505afa158015611179573d6000803e3d6000fd5b505050506040513d604081101561118f57600080fd5b5060200151905060008787878b6111a4611572565b604080516001600160a01b03968716602482015260448101959095529285166064850152908416608484015260a483015260c482019490945299811660e4808c01919091528351808c039091018152610104909a01909252506020880180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fcb3c28c70000000000000000000000000000000000000000000000000000000017905260045416976000979650945050505050565b6000806112ea83610120015184608001516001600160a01b03166370a0823186602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156112b857600080fd5b505afa1580156112cc573d6000803e3d6000fd5b505050506040513d60208110156112e257600080fd5b5051906113e4565b9050600083608001516001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561132b57600080fd5b505afa15801561133f573d6000803e3d6000fd5b505050506040513d602081101561135557600080fd5b505190506000601260ff8316141561136d5782611381565b6113818360ff601285900316600a0a611578565b90508460e001518110156113dc576040805162461bcd60e51b815260206004820152601d60248201527f536c6970706167652067726561746572207468616e20616c6c6f776564000000604482015290519081900360640190fd5b949350505050565b8082038281111561143c576040805162461bcd60e51b815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b92915050565b8082018281101561143c576040805162461bcd60e51b815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b60008060006114a985856115e4565b604080516bffffffffffffffffffffffff19606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501207fff0000000000000000000000000000000000000000000000000000000000000060688401529a90941b9093166069840152607d8301989098527f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b60001990565b60008115806115935750508082028282828161159057fe5b04145b61143c576040805162461bcd60e51b815260206004820152601460248201527f64732d6d6174682d6d756c2d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b600080826001600160a01b0316846001600160a01b031614156116385760405162461bcd60e51b815260040180806020018281038252602581526020018061173a6025913960400191505060405180910390fd5b826001600160a01b0316846001600160a01b03161061165857828461165b565b83835b90925090506001600160a01b0382166116bb576040805162461bcd60e51b815260206004820152601e60248201527f556e697377617056324c6962726172793a205a45524f5f414444524553530000604482015290519081900360640190fd5b9250929050565b60405180610140016040528060006001600160a01b0316815260200160006001600160a01b031681526020016060815260200160006001600160a01b0316815260200160006001600160a01b031681526020016000815260200160008152602001600081526020016000815260200160008152509056fe556e697377617056324c6962726172793a204944454e544943414c5f41444452455353455347617264656e206e6565647320746f206861766520656e6f756768206c697175696420746f6b656e73a2646970667358221220670c3ffb0d495853410c9379dfe95b0d750b31b54fdc469fee753b14188b4be864736f6c63430007060033", + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_weth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_kyberNetworkProxyAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IGarden\",\"name\":\"_garden\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IStrategy\",\"name\":\"_strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_sendToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_receiveToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_exchangeName\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_totalSendAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_totalReceiveAmount\",\"type\":\"uint256\"}],\"name\":\"ComponentExchanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_sourceToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_destinationToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sourceQuantity\",\"type\":\"uint256\"}],\"name\":\"getConversionRates\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"initializedByGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"kyberNetworkProxyAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_sendToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sendQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_receiveToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minReceiveQuantity\",\"type\":\"uint256\"}],\"name\":\"trade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Protocol Kyber protocol trade integration\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of the controller\",\"_kyberNetworkProxyAddress\":\"Address of Kyber Network Proxy contract\",\"_weth\":\"Address of the WETH ERC20\"}},\"getConversionRates(address,address,uint256)\":{\"params\":{\"_destinationToken\":\"Address of destination token to buy\",\"_sourceQuantity\":\"Amount of source token to sell\",\"_sourceToken\":\"Address of source token to be sold\"},\"returns\":{\"_0\":\"uint256 Conversion rate in wei\",\"_1\":\"uint256 Slippage rate in wei\"}},\"trade(address,address,uint256,address,uint256)\":{\"details\":\"@param _strategy Address of the strategy\",\"params\":{\"_minReceiveQuantity\":\"Min units of wanted token to be received from the exchange\",\"_receiveToken\":\"Address of the token that will be received from the exchange\",\"_sendQuantity\":\"Units of reserve asset token sent to the exchange\",\"_sendToken\":\"Address of the token to be sent to the exchange\"}}},\"title\":\"KyberTradeIntegration\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates the integration\"},\"getConversionRates(address,address,uint256)\":{\"notice\":\"Returns the conversion rate between the source token and the destination token in 18 decimals, regardless of component token's decimals\"},\"getName()\":{\"notice\":\"Returns the name of the integration\"},\"trade(address,address,uint256,address,uint256)\":{\"notice\":\"Executes a trade on a supported DEX.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/integrations/trade/KyberTradeIntegration.sol\":\"KyberTradeIntegration\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\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 /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\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, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x7b2b8baa20fd60ab4a328c8e34c64a353651b80ba4b5b157cbb61813f6f85d55\",\"license\":\"MIT\"},\"@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title The interface for the Uniswap V3 Factory\\n/// @notice The Uniswap V3 Factory facilitates creation of Uniswap V3 pools and control over the protocol fees\\ninterface IUniswapV3Factory {\\n /// @notice Emitted when the owner of the factory is changed\\n /// @param oldOwner The owner before the owner was changed\\n /// @param newOwner The owner after the owner was changed\\n event OwnerChanged(address indexed oldOwner, address indexed newOwner);\\n\\n /// @notice Emitted when a pool is created\\n /// @param token0 The first token of the pool by address sort order\\n /// @param token1 The second token of the pool by address sort order\\n /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip\\n /// @param tickSpacing The minimum number of ticks between initialized ticks\\n /// @param pool The address of the created pool\\n event PoolCreated(\\n address indexed token0,\\n address indexed token1,\\n uint24 indexed fee,\\n int24 tickSpacing,\\n address pool\\n );\\n\\n /// @notice Emitted when a new fee amount is enabled for pool creation via the factory\\n /// @param fee The enabled fee, denominated in hundredths of a bip\\n /// @param tickSpacing The minimum number of ticks between initialized ticks for pools created with the given fee\\n event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing);\\n\\n /// @notice Returns the current owner of the factory\\n /// @dev Can be changed by the current owner via setOwner\\n /// @return The address of the factory owner\\n function owner() external view returns (address);\\n\\n /// @notice Returns the tick spacing for a given fee amount, if enabled, or 0 if not enabled\\n /// @dev A fee amount can never be removed, so this value should be hard coded or cached in the calling context\\n /// @param fee The enabled fee, denominated in hundredths of a bip. Returns 0 in case of unenabled fee\\n /// @return The tick spacing\\n function feeAmountTickSpacing(uint24 fee) external view returns (int24);\\n\\n /// @notice Returns the pool address for a given pair of tokens and a fee, or address 0 if it does not exist\\n /// @dev tokenA and tokenB may be passed in either token0/token1 or token1/token0 order\\n /// @param tokenA The contract address of either token0 or token1\\n /// @param tokenB The contract address of the other token\\n /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip\\n /// @return pool The pool address\\n function getPool(\\n address tokenA,\\n address tokenB,\\n uint24 fee\\n ) external view returns (address pool);\\n\\n /// @notice Creates a pool for the given two tokens and fee\\n /// @param tokenA One of the two tokens in the desired pool\\n /// @param tokenB The other of the two tokens in the desired pool\\n /// @param fee The desired fee for the pool\\n /// @dev tokenA and tokenB may be passed in either order: token0/token1 or token1/token0. tickSpacing is retrieved\\n /// from the fee. The call will revert if the pool already exists, the fee is invalid, or the token arguments\\n /// are invalid.\\n /// @return pool The address of the newly created pool\\n function createPool(\\n address tokenA,\\n address tokenB,\\n uint24 fee\\n ) external returns (address pool);\\n\\n /// @notice Updates the owner of the factory\\n /// @dev Must be called by the current owner\\n /// @param _owner The new owner of the factory\\n function setOwner(address _owner) external;\\n\\n /// @notice Enables a fee amount with the given tickSpacing\\n /// @dev Fee amounts may never be removed once enabled\\n /// @param fee The fee amount to enable, denominated in hundredths of a bip (i.e. 1e-6)\\n /// @param tickSpacing The spacing between ticks to be enforced for all pools created with the given fee amount\\n function enableFeeAmount(uint24 fee, int24 tickSpacing) external;\\n}\\n\",\"keccak256\":\"0xcc3d0c93fc9ac0febbe09f941b465b57f750bcf3b48432da0b97dc289cfdc489\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\nimport './pool/IUniswapV3PoolImmutables.sol';\\nimport './pool/IUniswapV3PoolState.sol';\\nimport './pool/IUniswapV3PoolDerivedState.sol';\\nimport './pool/IUniswapV3PoolActions.sol';\\nimport './pool/IUniswapV3PoolOwnerActions.sol';\\nimport './pool/IUniswapV3PoolEvents.sol';\\n\\n/// @title The interface for a Uniswap V3 Pool\\n/// @notice A Uniswap pool facilitates swapping and automated market making between any two assets that strictly conform\\n/// to the ERC20 specification\\n/// @dev The pool interface is broken up into many smaller pieces\\ninterface IUniswapV3Pool is\\n IUniswapV3PoolImmutables,\\n IUniswapV3PoolState,\\n IUniswapV3PoolDerivedState,\\n IUniswapV3PoolActions,\\n IUniswapV3PoolOwnerActions,\\n IUniswapV3PoolEvents\\n{\\n\\n}\\n\",\"keccak256\":\"0xfe6113d518466cd6652c85b111e01f33eb62157f49ae5ed7d5a3947a2044adb1\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolActions.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Permissionless pool actions\\n/// @notice Contains pool methods that can be called by anyone\\ninterface IUniswapV3PoolActions {\\n /// @notice Sets the initial price for the pool\\n /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value\\n /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96\\n function initialize(uint160 sqrtPriceX96) external;\\n\\n /// @notice Adds liquidity for the given recipient/tickLower/tickUpper position\\n /// @dev The caller of this method receives a callback in the form of IUniswapV3MintCallback#uniswapV3MintCallback\\n /// in which they must pay any token0 or token1 owed for the liquidity. The amount of token0/token1 due depends\\n /// on tickLower, tickUpper, the amount of liquidity, and the current price.\\n /// @param recipient The address for which the liquidity will be created\\n /// @param tickLower The lower tick of the position in which to add liquidity\\n /// @param tickUpper The upper tick of the position in which to add liquidity\\n /// @param amount The amount of liquidity to mint\\n /// @param data Any data that should be passed through to the callback\\n /// @return amount0 The amount of token0 that was paid to mint the given amount of liquidity. Matches the value in the callback\\n /// @return amount1 The amount of token1 that was paid to mint the given amount of liquidity. Matches the value in the callback\\n function mint(\\n address recipient,\\n int24 tickLower,\\n int24 tickUpper,\\n uint128 amount,\\n bytes calldata data\\n ) external returns (uint256 amount0, uint256 amount1);\\n\\n /// @notice Collects tokens owed to a position\\n /// @dev Does not recompute fees earned, which must be done either via mint or burn of any amount of liquidity.\\n /// Collect must be called by the position owner. To withdraw only token0 or only token1, amount0Requested or\\n /// amount1Requested may be set to zero. To withdraw all tokens owed, caller may pass any value greater than the\\n /// actual tokens owed, e.g. type(uint128).max. Tokens owed may be from accumulated swap fees or burned liquidity.\\n /// @param recipient The address which should receive the fees collected\\n /// @param tickLower The lower tick of the position for which to collect fees\\n /// @param tickUpper The upper tick of the position for which to collect fees\\n /// @param amount0Requested How much token0 should be withdrawn from the fees owed\\n /// @param amount1Requested How much token1 should be withdrawn from the fees owed\\n /// @return amount0 The amount of fees collected in token0\\n /// @return amount1 The amount of fees collected in token1\\n function collect(\\n address recipient,\\n int24 tickLower,\\n int24 tickUpper,\\n uint128 amount0Requested,\\n uint128 amount1Requested\\n ) external returns (uint128 amount0, uint128 amount1);\\n\\n /// @notice Burn liquidity from the sender and account tokens owed for the liquidity to the position\\n /// @dev Can be used to trigger a recalculation of fees owed to a position by calling with an amount of 0\\n /// @dev Fees must be collected separately via a call to #collect\\n /// @param tickLower The lower tick of the position for which to burn liquidity\\n /// @param tickUpper The upper tick of the position for which to burn liquidity\\n /// @param amount How much liquidity to burn\\n /// @return amount0 The amount of token0 sent to the recipient\\n /// @return amount1 The amount of token1 sent to the recipient\\n function burn(\\n int24 tickLower,\\n int24 tickUpper,\\n uint128 amount\\n ) external returns (uint256 amount0, uint256 amount1);\\n\\n /// @notice Swap token0 for token1, or token1 for token0\\n /// @dev The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback\\n /// @param recipient The address to receive the output of the swap\\n /// @param zeroForOne The direction of the swap, true for token0 to token1, false for token1 to token0\\n /// @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative)\\n /// @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this\\n /// value after the swap. If one for zero, the price cannot be greater than this value after the swap\\n /// @param data Any data to be passed through to the callback\\n /// @return amount0 The delta of the balance of token0 of the pool, exact when negative, minimum when positive\\n /// @return amount1 The delta of the balance of token1 of the pool, exact when negative, minimum when positive\\n function swap(\\n address recipient,\\n bool zeroForOne,\\n int256 amountSpecified,\\n uint160 sqrtPriceLimitX96,\\n bytes calldata data\\n ) external returns (int256 amount0, int256 amount1);\\n\\n /// @notice Receive token0 and/or token1 and pay it back, plus a fee, in the callback\\n /// @dev The caller of this method receives a callback in the form of IUniswapV3FlashCallback#uniswapV3FlashCallback\\n /// @dev Can be used to donate underlying tokens pro-rata to currently in-range liquidity providers by calling\\n /// with 0 amount{0,1} and sending the donation amount(s) from the callback\\n /// @param recipient The address which will receive the token0 and token1 amounts\\n /// @param amount0 The amount of token0 to send\\n /// @param amount1 The amount of token1 to send\\n /// @param data Any data to be passed through to the callback\\n function flash(\\n address recipient,\\n uint256 amount0,\\n uint256 amount1,\\n bytes calldata data\\n ) external;\\n\\n /// @notice Increase the maximum number of price and liquidity observations that this pool will store\\n /// @dev This method is no-op if the pool already has an observationCardinalityNext greater than or equal to\\n /// the input observationCardinalityNext.\\n /// @param observationCardinalityNext The desired minimum number of observations for the pool to store\\n function increaseObservationCardinalityNext(uint16 observationCardinalityNext) external;\\n}\\n\",\"keccak256\":\"0x9453dd0e7442188667d01d9b65de3f1e14e9511ff3e303179a15f6fc267f7634\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolDerivedState.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Pool state that is not stored\\n/// @notice Contains view functions to provide information about the pool that is computed rather than stored on the\\n/// blockchain. The functions here may have variable gas costs.\\ninterface IUniswapV3PoolDerivedState {\\n /// @notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp\\n /// @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing\\n /// the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick,\\n /// you must call it with secondsAgos = [3600, 0].\\n /// @dev The time weighted average tick represents the geometric time weighted average price of the pool, in\\n /// log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.\\n /// @param secondsAgos From how long ago each cumulative tick and liquidity value should be returned\\n /// @return tickCumulatives Cumulative tick values as of each `secondsAgos` from the current block timestamp\\n /// @return secondsPerLiquidityCumulativeX128s Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block\\n /// timestamp\\n function observe(uint32[] calldata secondsAgos)\\n external\\n view\\n returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s);\\n\\n /// @notice Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range\\n /// @dev Snapshots must only be compared to other snapshots, taken over a period for which a position existed.\\n /// I.e., snapshots cannot be compared if a position is not held for the entire period between when the first\\n /// snapshot is taken and the second snapshot is taken.\\n /// @param tickLower The lower tick of the range\\n /// @param tickUpper The upper tick of the range\\n /// @return tickCumulativeInside The snapshot of the tick accumulator for the range\\n /// @return secondsPerLiquidityInsideX128 The snapshot of seconds per liquidity for the range\\n /// @return secondsInside The snapshot of seconds per liquidity for the range\\n function snapshotCumulativesInside(int24 tickLower, int24 tickUpper)\\n external\\n view\\n returns (\\n int56 tickCumulativeInside,\\n uint160 secondsPerLiquidityInsideX128,\\n uint32 secondsInside\\n );\\n}\\n\",\"keccak256\":\"0xe603ac5b17ecdee73ba2b27efdf386c257a19c14206e87eee77e2017b742d9e5\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolEvents.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Events emitted by a pool\\n/// @notice Contains all events emitted by the pool\\ninterface IUniswapV3PoolEvents {\\n /// @notice Emitted exactly once by a pool when #initialize is first called on the pool\\n /// @dev Mint/Burn/Swap cannot be emitted by the pool before Initialize\\n /// @param sqrtPriceX96 The initial sqrt price of the pool, as a Q64.96\\n /// @param tick The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool\\n event Initialize(uint160 sqrtPriceX96, int24 tick);\\n\\n /// @notice Emitted when liquidity is minted for a given position\\n /// @param sender The address that minted the liquidity\\n /// @param owner The owner of the position and recipient of any minted liquidity\\n /// @param tickLower The lower tick of the position\\n /// @param tickUpper The upper tick of the position\\n /// @param amount The amount of liquidity minted to the position range\\n /// @param amount0 How much token0 was required for the minted liquidity\\n /// @param amount1 How much token1 was required for the minted liquidity\\n event Mint(\\n address sender,\\n address indexed owner,\\n int24 indexed tickLower,\\n int24 indexed tickUpper,\\n uint128 amount,\\n uint256 amount0,\\n uint256 amount1\\n );\\n\\n /// @notice Emitted when fees are collected by the owner of a position\\n /// @dev Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees\\n /// @param owner The owner of the position for which fees are collected\\n /// @param tickLower The lower tick of the position\\n /// @param tickUpper The upper tick of the position\\n /// @param amount0 The amount of token0 fees collected\\n /// @param amount1 The amount of token1 fees collected\\n event Collect(\\n address indexed owner,\\n address recipient,\\n int24 indexed tickLower,\\n int24 indexed tickUpper,\\n uint128 amount0,\\n uint128 amount1\\n );\\n\\n /// @notice Emitted when a position's liquidity is removed\\n /// @dev Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect\\n /// @param owner The owner of the position for which liquidity is removed\\n /// @param tickLower The lower tick of the position\\n /// @param tickUpper The upper tick of the position\\n /// @param amount The amount of liquidity to remove\\n /// @param amount0 The amount of token0 withdrawn\\n /// @param amount1 The amount of token1 withdrawn\\n event Burn(\\n address indexed owner,\\n int24 indexed tickLower,\\n int24 indexed tickUpper,\\n uint128 amount,\\n uint256 amount0,\\n uint256 amount1\\n );\\n\\n /// @notice Emitted by the pool for any swaps between token0 and token1\\n /// @param sender The address that initiated the swap call, and that received the callback\\n /// @param recipient The address that received the output of the swap\\n /// @param amount0 The delta of the token0 balance of the pool\\n /// @param amount1 The delta of the token1 balance of the pool\\n /// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96\\n /// @param liquidity The liquidity of the pool after the swap\\n /// @param tick The log base 1.0001 of price of the pool after the swap\\n event Swap(\\n address indexed sender,\\n address indexed recipient,\\n int256 amount0,\\n int256 amount1,\\n uint160 sqrtPriceX96,\\n uint128 liquidity,\\n int24 tick\\n );\\n\\n /// @notice Emitted by the pool for any flashes of token0/token1\\n /// @param sender The address that initiated the swap call, and that received the callback\\n /// @param recipient The address that received the tokens from flash\\n /// @param amount0 The amount of token0 that was flashed\\n /// @param amount1 The amount of token1 that was flashed\\n /// @param paid0 The amount of token0 paid for the flash, which can exceed the amount0 plus the fee\\n /// @param paid1 The amount of token1 paid for the flash, which can exceed the amount1 plus the fee\\n event Flash(\\n address indexed sender,\\n address indexed recipient,\\n uint256 amount0,\\n uint256 amount1,\\n uint256 paid0,\\n uint256 paid1\\n );\\n\\n /// @notice Emitted by the pool for increases to the number of observations that can be stored\\n /// @dev observationCardinalityNext is not the observation cardinality until an observation is written at the index\\n /// just before a mint/swap/burn.\\n /// @param observationCardinalityNextOld The previous value of the next observation cardinality\\n /// @param observationCardinalityNextNew The updated value of the next observation cardinality\\n event IncreaseObservationCardinalityNext(\\n uint16 observationCardinalityNextOld,\\n uint16 observationCardinalityNextNew\\n );\\n\\n /// @notice Emitted when the protocol fee is changed by the pool\\n /// @param feeProtocol0Old The previous value of the token0 protocol fee\\n /// @param feeProtocol1Old The previous value of the token1 protocol fee\\n /// @param feeProtocol0New The updated value of the token0 protocol fee\\n /// @param feeProtocol1New The updated value of the token1 protocol fee\\n event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New);\\n\\n /// @notice Emitted when the collected protocol fees are withdrawn by the factory owner\\n /// @param sender The address that collects the protocol fees\\n /// @param recipient The address that receives the collected protocol fees\\n /// @param amount0 The amount of token0 protocol fees that is withdrawn\\n /// @param amount0 The amount of token1 protocol fees that is withdrawn\\n event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1);\\n}\\n\",\"keccak256\":\"0x8071514d0fe5d17d6fbd31c191cdfb703031c24e0ece3621d88ab10e871375cd\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolImmutables.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Pool state that never changes\\n/// @notice These parameters are fixed for a pool forever, i.e., the methods will always return the same values\\ninterface IUniswapV3PoolImmutables {\\n /// @notice The contract that deployed the pool, which must adhere to the IUniswapV3Factory interface\\n /// @return The contract address\\n function factory() external view returns (address);\\n\\n /// @notice The first of the two tokens of the pool, sorted by address\\n /// @return The token contract address\\n function token0() external view returns (address);\\n\\n /// @notice The second of the two tokens of the pool, sorted by address\\n /// @return The token contract address\\n function token1() external view returns (address);\\n\\n /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6\\n /// @return The fee\\n function fee() external view returns (uint24);\\n\\n /// @notice The pool tick spacing\\n /// @dev Ticks can only be used at multiples of this value, minimum of 1 and always positive\\n /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ...\\n /// This value is an int24 to avoid casting even though it is always positive.\\n /// @return The tick spacing\\n function tickSpacing() external view returns (int24);\\n\\n /// @notice The maximum amount of position liquidity that can use any tick in the range\\n /// @dev This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and\\n /// also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool\\n /// @return The max amount of liquidity per tick\\n function maxLiquidityPerTick() external view returns (uint128);\\n}\\n\",\"keccak256\":\"0xf6e5d2cd1139c4c276bdbc8e1d2b256e456c866a91f1b868da265c6d2685c3f7\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolOwnerActions.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Permissioned pool actions\\n/// @notice Contains pool methods that may only be called by the factory owner\\ninterface IUniswapV3PoolOwnerActions {\\n /// @notice Set the denominator of the protocol's % share of the fees\\n /// @param feeProtocol0 new protocol fee for token0 of the pool\\n /// @param feeProtocol1 new protocol fee for token1 of the pool\\n function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external;\\n\\n /// @notice Collect the protocol fee accrued to the pool\\n /// @param recipient The address to which collected protocol fees should be sent\\n /// @param amount0Requested The maximum amount of token0 to send, can be 0 to collect fees in only token1\\n /// @param amount1Requested The maximum amount of token1 to send, can be 0 to collect fees in only token0\\n /// @return amount0 The protocol fee collected in token0\\n /// @return amount1 The protocol fee collected in token1\\n function collectProtocol(\\n address recipient,\\n uint128 amount0Requested,\\n uint128 amount1Requested\\n ) external returns (uint128 amount0, uint128 amount1);\\n}\\n\",\"keccak256\":\"0x759b78a2918af9e99e246dc3af084f654e48ef32bb4e4cb8a966aa3dcaece235\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolState.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Pool state that can change\\n/// @notice These methods compose the pool's state, and can change with any frequency including multiple times\\n/// per transaction\\ninterface IUniswapV3PoolState {\\n /// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas\\n /// when accessed externally.\\n /// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value\\n /// tick The current tick of the pool, i.e. according to the last tick transition that was run.\\n /// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick\\n /// boundary.\\n /// observationIndex The index of the last oracle observation that was written,\\n /// observationCardinality The current maximum number of observations stored in the pool,\\n /// observationCardinalityNext The next maximum number of observations, to be updated when the observation.\\n /// feeProtocol The protocol fee for both tokens of the pool.\\n /// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0\\n /// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee.\\n /// unlocked Whether the pool is currently locked to reentrancy\\n function slot0()\\n external\\n view\\n returns (\\n uint160 sqrtPriceX96,\\n int24 tick,\\n uint16 observationIndex,\\n uint16 observationCardinality,\\n uint16 observationCardinalityNext,\\n uint8 feeProtocol,\\n bool unlocked\\n );\\n\\n /// @notice The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool\\n /// @dev This value can overflow the uint256\\n function feeGrowthGlobal0X128() external view returns (uint256);\\n\\n /// @notice The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool\\n /// @dev This value can overflow the uint256\\n function feeGrowthGlobal1X128() external view returns (uint256);\\n\\n /// @notice The amounts of token0 and token1 that are owed to the protocol\\n /// @dev Protocol fees will never exceed uint128 max in either token\\n function protocolFees() external view returns (uint128 token0, uint128 token1);\\n\\n /// @notice The currently in range liquidity available to the pool\\n /// @dev This value has no relationship to the total liquidity across all ticks\\n function liquidity() external view returns (uint128);\\n\\n /// @notice Look up information about a specific tick in the pool\\n /// @param tick The tick to look up\\n /// @return liquidityGross the total amount of position liquidity that uses the pool either as tick lower or\\n /// tick upper,\\n /// liquidityNet how much liquidity changes when the pool price crosses the tick,\\n /// feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0,\\n /// feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1,\\n /// tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick\\n /// secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick,\\n /// secondsOutside the seconds spent on the other side of the tick from the current tick,\\n /// initialized Set to true if the tick is initialized, i.e. liquidityGross is greater than 0, otherwise equal to false.\\n /// Outside values can only be used if the tick is initialized, i.e. if liquidityGross is greater than 0.\\n /// In addition, these values are only relative and must be used only in comparison to previous snapshots for\\n /// a specific position.\\n function ticks(int24 tick)\\n external\\n view\\n returns (\\n uint128 liquidityGross,\\n int128 liquidityNet,\\n uint256 feeGrowthOutside0X128,\\n uint256 feeGrowthOutside1X128,\\n int56 tickCumulativeOutside,\\n uint160 secondsPerLiquidityOutsideX128,\\n uint32 secondsOutside,\\n bool initialized\\n );\\n\\n /// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information\\n function tickBitmap(int16 wordPosition) external view returns (uint256);\\n\\n /// @notice Returns the information about a position by the position's key\\n /// @param key The position's key is a hash of a preimage composed by the owner, tickLower and tickUpper\\n /// @return _liquidity The amount of liquidity in the position,\\n /// Returns feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke,\\n /// Returns feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke,\\n /// Returns tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke,\\n /// Returns tokensOwed1 the computed amount of token1 owed to the position as of the last mint/burn/poke\\n function positions(bytes32 key)\\n external\\n view\\n returns (\\n uint128 _liquidity,\\n uint256 feeGrowthInside0LastX128,\\n uint256 feeGrowthInside1LastX128,\\n uint128 tokensOwed0,\\n uint128 tokensOwed1\\n );\\n\\n /// @notice Returns data about a specific observation index\\n /// @param index The element of the observations array to fetch\\n /// @dev You most likely want to use #observe() instead of this method to get an observation as of some amount of time\\n /// ago, rather than at a specific index in the array.\\n /// @return blockTimestamp The timestamp of the observation,\\n /// Returns tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp,\\n /// Returns secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp,\\n /// Returns initialized whether the observation has been initialized and the values are safe to use\\n function observations(uint256 index)\\n external\\n view\\n returns (\\n uint32 blockTimestamp,\\n int56 tickCumulative,\\n uint160 secondsPerLiquidityCumulativeX128,\\n bool initialized\\n );\\n}\\n\",\"keccak256\":\"0x852dc1f5df7dcf7f11e7bb3eed79f0cea72ad4b25f6a9d2c35aafb48925fd49f\",\"license\":\"GPL-2.0-or-later\"},\"contracts/integrations/BaseIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IIntegration} from '../interfaces/IIntegration.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\n\\n/**\\n * @title BaseIntegration\\n * @author Babylon Finance\\n *\\n * Abstract class that houses common Integration-related state and functions.\\n */\\nabstract contract BaseIntegration {\\n using SafeCast for int256;\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlySystemContract() {\\n require(IBabController(controller).isSystemContract(msg.sender), 'Only system can call this');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the controller\\n address public controller;\\n // Wrapped ETH address\\n address public immutable weth;\\n // Name of the integration\\n string public name;\\n mapping(address => bool) public initializedByGarden;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) {\\n require(_controller != address(0), 'Controller must be defined');\\n name = _name;\\n controller = _controller;\\n weth = _weth;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the name of the integration\\n */\\n function getName() external view returns (string memory) {\\n return name;\\n }\\n}\\n\",\"keccak256\":\"0x2834e38218ae7abce3038140002a433c22ea9303d65b2d929cd88f6d5f712812\",\"license\":\"Apache License\"},\"contracts/integrations/trade/KyberTradeIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {TradeIntegration} from './TradeIntegration.sol';\\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\\nimport {IKyberNetworkProxy} from '../../interfaces/external/kyber/IKyberNetworkProxy.sol';\\n\\n/**\\n * @title KyberTradeIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Kyber protocol trade integration\\n */\\ncontract KyberTradeIntegration is TradeIntegration {\\n using SafeMath for uint256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ State Variables ============ */\\n\\n // Address of Kyber Network Proxy\\n address public kyberNetworkProxyAddress;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _controller Address of the controller\\n * @param _weth Address of the WETH ERC20\\n * @param _kyberNetworkProxyAddress Address of Kyber Network Proxy contract\\n */\\n constructor(\\n address _controller,\\n address _weth,\\n address _kyberNetworkProxyAddress\\n ) TradeIntegration('kyber', _weth, _controller) {\\n kyberNetworkProxyAddress = _kyberNetworkProxyAddress;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the conversion rate between the source token and the destination token\\n * in 18 decimals, regardless of component token's decimals\\n *\\n * @param _sourceToken Address of source token to be sold\\n * @param _destinationToken Address of destination token to buy\\n * @param _sourceQuantity Amount of source token to sell\\n *\\n * @return uint256 Conversion rate in wei\\n * @return uint256 Slippage rate in wei\\n */\\n function getConversionRates(\\n address _sourceToken,\\n address _destinationToken,\\n uint256 _sourceQuantity\\n ) external view override returns (uint256, uint256) {\\n // Get Kyber expectedRate to trade with\\n return\\n IKyberNetworkProxy(kyberNetworkProxyAddress).getExpectedRate(\\n _sourceToken,\\n _destinationToken,\\n _sourceQuantity\\n );\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Get calldata through Kyber.\\n *\\n * @param _strategy Address of the strategy\\n * @param _sendToken Address of the token to be sent to the exchange\\n * @param _sendQuantity Units of reserve asset token sent to the exchange\\n * @param _receiveToken Address of the token that will be received from the exchange\\n */\\n function _getTradeCallData(\\n address _strategy,\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n )\\n internal\\n view\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n // this has 3 percent slippage and doesn't account for the platform fee\\n (, uint256 worstRate) =\\n IKyberNetworkProxy(kyberNetworkProxyAddress).getExpectedRate(_sendToken, _receiveToken, _sendQuantity);\\n\\n // Encode method data for TradeIntegration to invoke\\n bytes memory methodData =\\n abi.encodeWithSignature(\\n 'trade(address,uint256,address,address,uint256,uint256,address)',\\n _sendToken,\\n _sendQuantity,\\n _receiveToken,\\n _strategy,\\n PreciseUnitMath.maxUint256(), // Sell entire amount of sourceToken\\n worstRate, // Trade with implied conversion rate\\n _strategy // Strategy address\\n );\\n\\n return (kyberNetworkProxyAddress, 0, methodData);\\n }\\n\\n /**\\n * Returns the address to approve source tokens to for trading. This is the Kyber Network\\n * Proxy address\\n *\\n * @return address Address of the contract to approve tokens to\\n */\\n function _getSpender() internal view override returns (address) {\\n return kyberNetworkProxyAddress;\\n }\\n}\\n\",\"keccak256\":\"0xc54d5e4d02b21434329c9cb7cdf6c2b451c0ef22993fc4abc3ad036d2a2b535b\",\"license\":\"Apache License\"},\"contracts/integrations/trade/TradeIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\nimport '@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol';\\nimport '@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol';\\n\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {ITradeIntegration} from '../../interfaces/ITradeIntegration.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\n\\nimport {BaseIntegration} from '../BaseIntegration.sol';\\n\\n/**\\n * @title BorrowIntetration\\n * @author Babylon Finance Protocol\\n *\\n * Base class for integration with trading protocols\\n */\\nabstract contract TradeIntegration is BaseIntegration, ReentrancyGuard, ITradeIntegration {\\n using SafeMath for uint256;\\n using SafeCast for uint256;\\n\\n /* ============ Struct ============ */\\n\\n struct TradeInfo {\\n IGarden garden; // Garden\\n IStrategy strategy; // Strategy\\n string exchangeName; // Which exchange to use\\n address sendToken; // Address of token being sold\\n address receiveToken; // Address of token being bought\\n uint256 gardenTotalSupply; // Total supply of Garden in Precise Units (10^18)\\n uint256 totalSendQuantity; // Total quantity of sold tokens\\n uint256 totalMinReceiveQuantity; // Total minimum quantity of token to receive back\\n uint256 preTradeSendTokenBalance; // Total initial balance of token being sold\\n uint256 preTradeReceiveTokenBalance; // Total initial balance of token being bought\\n }\\n\\n /* ============ Events ============ */\\n\\n event ComponentExchanged(\\n IGarden indexed _garden,\\n IStrategy indexed _strategy,\\n address indexed _sendToken,\\n address _receiveToken,\\n string _exchangeName,\\n uint256 _totalSendAmount,\\n uint256 _totalReceiveAmount\\n );\\n\\n uint24 private constant FEE_LOW = 500;\\n uint24 private constant FEE_MEDIUM = 3000;\\n uint24 private constant FEE_HIGH = 10000;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) BaseIntegration(_name, _weth, _controller) {}\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Executes a trade on a supported DEX.\\n * @dev\\n *\\n * @param _strategy Address of the strategy\\n * @param _sendToken Address of the token to be sent to the exchange\\n * @param _sendQuantity Units of reserve asset token sent to the exchange\\n * @param _receiveToken Address of the token that will be received from the exchange\\n * @param _minReceiveQuantity Min units of wanted token to be received from the exchange\\n */\\n function trade(\\n address _strategy,\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken,\\n uint256 _minReceiveQuantity\\n ) external override nonReentrant onlySystemContract {\\n TradeInfo memory tradeInfo =\\n _createTradeInfo(_strategy, name, _sendToken, _receiveToken, _sendQuantity, _minReceiveQuantity);\\n _validatePreTradeData(tradeInfo, _sendQuantity);\\n // Get spender address from exchange adapter and invoke approve for exact amount on sendToken\\n tradeInfo.strategy.invokeApprove(_getSpender(), tradeInfo.sendToken, tradeInfo.totalSendQuantity);\\n (address targetExchange, uint256 callValue, bytes memory methodData) =\\n _getTradeCallData(_strategy, tradeInfo.sendToken, tradeInfo.totalSendQuantity, tradeInfo.receiveToken);\\n tradeInfo.strategy.invokeFromIntegration(targetExchange, callValue, methodData);\\n\\n uint256 exchangedQuantity = _validatePostTrade(tradeInfo);\\n uint256 newAmountSendTokens = tradeInfo.preTradeSendTokenBalance.sub(tradeInfo.totalSendQuantity);\\n uint256 newAmountReceiveTokens = tradeInfo.preTradeReceiveTokenBalance.add(exchangedQuantity);\\n emit ComponentExchanged(\\n tradeInfo.garden,\\n tradeInfo.strategy,\\n _sendToken,\\n _receiveToken,\\n tradeInfo.exchangeName,\\n newAmountSendTokens,\\n newAmountReceiveTokens\\n );\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Create and return TradeInfo struct\\n *\\n * @param _strategy Address of the strategy\\n * @param _exchangeName Human readable name of the exchange in the integrations registry\\n * @param _sendToken Address of the token to be sent to the exchange\\n * @param _receiveToken Address of the token that will be received from the exchange\\n * @param _sendQuantity Units of token in SetToken sent to the exchange\\n * @param _minReceiveQuantity Min units of token in SetToken to be received from the exchange\\n *\\n * return TradeInfo Struct containing data for trade\\n */\\n function _createTradeInfo(\\n address _strategy,\\n string memory _exchangeName,\\n address _sendToken,\\n address _receiveToken,\\n uint256 _sendQuantity,\\n uint256 _minReceiveQuantity\\n ) internal view returns (TradeInfo memory) {\\n TradeInfo memory tradeInfo;\\n\\n tradeInfo.strategy = IStrategy(_strategy);\\n tradeInfo.garden = tradeInfo.strategy.garden();\\n\\n tradeInfo.exchangeName = _exchangeName;\\n\\n tradeInfo.sendToken = _sendToken;\\n tradeInfo.receiveToken = _receiveToken;\\n\\n tradeInfo.gardenTotalSupply = ERC20(address(tradeInfo.strategy.garden())).totalSupply();\\n\\n tradeInfo.totalSendQuantity = _sendQuantity;\\n\\n tradeInfo.totalMinReceiveQuantity = _minReceiveQuantity;\\n\\n tradeInfo.preTradeSendTokenBalance = ERC20(_sendToken).balanceOf(_strategy);\\n tradeInfo.preTradeReceiveTokenBalance = ERC20(_receiveToken).balanceOf(_strategy);\\n\\n return tradeInfo;\\n }\\n\\n /**\\n * Validate pre trade data. Check exchange is valid, token quantity is valid.\\n *\\n * @param _tradeInfo Struct containing trade information used in internal functions\\n * @param _sendQuantity Units of token in SetToken sent to the exchange\\n */\\n function _validatePreTradeData(TradeInfo memory _tradeInfo, uint256 _sendQuantity) internal view {\\n require(_tradeInfo.totalSendQuantity > 0, 'Token to sell must be nonzero');\\n IUniswapV3Pool _pool = _getUniswapPoolWithMostLiquidity(_tradeInfo);\\n\\n uint256 minLiquidityReserveAsset = _tradeInfo.garden.minLiquidityAsset();\\n uint256 poolLiquidity = uint256(_pool.liquidity());\\n uint256 liquidityInReserve;\\n\\n if (_pool.token0() == _tradeInfo.garden.reserveAsset()) {\\n liquidityInReserve = poolLiquidity.mul(poolLiquidity).div(ERC20(_pool.token1()).balanceOf(address(_pool)));\\n }\\n if (_pool.token1() == _tradeInfo.garden.reserveAsset()) {\\n liquidityInReserve = poolLiquidity.mul(poolLiquidity).div(ERC20(_pool.token0()).balanceOf(address(_pool)));\\n }\\n require(liquidityInReserve >= minLiquidityReserveAsset, 'Not enough liquidity');\\n require(\\n ERC20(_tradeInfo.sendToken).balanceOf(address(_tradeInfo.strategy)) >= _sendQuantity,\\n 'Garden needs to have enough liquid tokens'\\n );\\n }\\n\\n function _getUniswapPoolWithMostLiquidity(TradeInfo memory _tradeInfo) internal view returns (IUniswapV3Pool) {\\n IUniswapV3Factory factory = IUniswapV3Factory(IBabController(controller).uniswapFactory());\\n IUniswapV3Pool poolLow =\\n IUniswapV3Pool(factory.getPool(_tradeInfo.sendToken, _tradeInfo.receiveToken, FEE_LOW));\\n IUniswapV3Pool poolMedium =\\n IUniswapV3Pool(factory.getPool(_tradeInfo.sendToken, _tradeInfo.receiveToken, FEE_MEDIUM));\\n IUniswapV3Pool poolHigh =\\n IUniswapV3Pool(factory.getPool(_tradeInfo.sendToken, _tradeInfo.receiveToken, FEE_HIGH));\\n\\n uint128 liquidityLow = poolLow.liquidity();\\n uint128 liquidityMedium = poolMedium.liquidity();\\n uint128 liquidityHigh = poolHigh.liquidity();\\n if (liquidityLow > liquidityMedium && liquidityLow >= liquidityHigh) {\\n return poolLow;\\n }\\n if (liquidityMedium > liquidityLow && liquidityMedium >= liquidityHigh) {\\n return poolMedium;\\n }\\n return poolHigh;\\n }\\n\\n /**\\n * Validate post trade data.\\n *\\n * @param _tradeInfo Struct containing trade information used in internal functions\\n * @return uint256 Total quantity of receive token that was exchanged\\n */\\n function _validatePostTrade(TradeInfo memory _tradeInfo) internal view returns (uint256) {\\n uint256 exchangedQuantity =\\n ERC20(_tradeInfo.receiveToken).balanceOf(address(_tradeInfo.strategy)).sub(\\n _tradeInfo.preTradeReceiveTokenBalance\\n );\\n // Get reserve asset decimals\\n uint8 tokenDecimals = ERC20(_tradeInfo.receiveToken).decimals();\\n uint256 normalizedExchangedQuantity =\\n tokenDecimals != 18 ? exchangedQuantity.mul(10**(18 - tokenDecimals)) : exchangedQuantity;\\n require(normalizedExchangedQuantity >= _tradeInfo.totalMinReceiveQuantity, 'Slippage greater than allowed');\\n\\n return normalizedExchangedQuantity;\\n }\\n\\n /**\\n * Return exchange calldata which is already generated from the exchange API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _sendToken Address of the token to be sent to the exchange\\n * hparam _sendQuantity Units of reserve asset token sent to the exchange\\n * hparam _receiveToken Address of the token that will be received from the exchange\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getTradeCallData(\\n address, /* _strategy */\\n address, /* _sendToken */\\n uint256, /*_sendQuantity */\\n address /* _receiveToken */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n /**\\n * Returns the address to approve source tokens to for trading. This is the TokenTaker address\\n *\\n * @return address Address of the contract to approve tokens to\\n */\\n function _getSpender() internal view virtual returns (address);\\n}\\n\",\"keccak256\":\"0x18815f793516feeadfbd14af259bd01b19b4e0ed1c38d01ca966e5081b329b07\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editGardenNFT(address _newGardenNFT) external;\\n\\n function editStrategyNFT(address _newStrategyNFT) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function editUniswapFactory(address _newUniswapFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\\n\\n function maxContributorsPerGarden() external view returns (uint256);\\n\\n function gardenCreationIsOpen() external view returns (bool);\\n\\n function openPublicGardenCreation() external;\\n\\n function setMaxContributorsPerGarden(uint256 _newMax) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function gardenNFT() external view returns (address);\\n\\n function strategyNFT() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\\n\\n function uniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0xdee5a27301c24f507d312f32249487fa9b0a756062a7e479405a1d1ee9ee7bb8\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function isGardenStrategy(address _strategy) external view returns (bool);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategyActiveInGarden(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to,\\n bool _withPenalty\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x88f1786ffee23e386aaa1735177912e1b5a7cdd440dafe52fb139fe50fd621b4\",\"license\":\"Apache License\"},\"contracts/interfaces/IIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIntegration\\n * @author Babylon Finance\\n *\\n * Interface for protocol integrations\\n */\\ninterface IIntegration {\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xee03c9274ddf3257e3bfd2bb229fea3412c9105f178e64174f59efeafd53182c\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n address,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x850597ec9a68eb86f31f13b6b77d3b31350b4ed3d0019dedfbd3550ad1a1d9e2\",\"license\":\"Apache License\"},\"contracts/interfaces/ITradeIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title ITrade\\n * @author Babylon Finance\\n *\\n * Interface for trading protocol integrations\\n */\\ninterface ITradeIntegration {\\n function trade(\\n address _strategy,\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken,\\n uint256 _minReceiveQuantity\\n ) external;\\n\\n function getConversionRates(\\n address _sourceToken,\\n address _destinationToken,\\n uint256 _sourceQuantity\\n ) external returns (uint256, uint256);\\n}\\n\",\"keccak256\":\"0x95df25f2cbfd3d82a9e22c9202f9fc2c497e90fd6e5fcfb00c4162f6447c0cbd\",\"license\":\"Apache License\"},\"contracts/interfaces/external/kyber/IKyberNetworkProxy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\ninterface IKyberNetworkProxy {\\n function getExpectedRate(\\n address _src,\\n address _dest,\\n uint256 _srcQty\\n ) external view returns (uint256, uint256);\\n\\n function trade(\\n address _src,\\n uint256 _srcAmount,\\n address _dest,\\n address _destAddress,\\n uint256 _maxDestAmount,\\n uint256 _minConversionRate,\\n address _referalFeeAddress\\n ) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x9fc1e180cd247544fa1d672e8830e51512bbacf9c0abdbf44e5ef54202132aad\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001dc638038062001dc6833981810160405260608110156200003757600080fd5b5080516020808301516040938401518451808601909552600585526435bcb132b960d91b92850192909252919282848282826001600160a01b038116620000c5576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c6572206d75737420626520646566696e6564000000000000604482015290519081900360640190fd5b8251620000da9060019060208601906200012f565b50600080546001600160a01b03199081166001600160a01b039384161790915560609290921b6001600160601b03191660805260016003556004805490921696169590951790945550620001db945050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001675760008555620001b2565b82601f106200018257805160ff1916838001178555620001b2565b82800160010185558215620001b2579182015b82811115620001b257825182559160200191906001019062000195565b50620001c0929150620001c4565b5090565b5b80821115620001c05760008155600101620001c5565b60805160601c611bcd620001f9600039806103485250611bcd6000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063aa0b24fa1161005b578063aa0b24fa1461013e578063b10198fb1461018d578063f77c4791146101c7578063fa1ca820146101cf57610088565b806306fdde031461008d57806312e41a771461010a57806317d7de7c1461012e5780633fc8cef314610136575b600080fd5b610095610215565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100cf5781810151838201526020016100b7565b50505050905090810190601f1680156100fc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101126102a2565b604080516001600160a01b039092168252519081900360200190f35b6100956102b1565b610112610346565b6101746004803603606081101561015457600080fd5b506001600160a01b0381358116916020810135909116906040013561036a565b6040805192835260208301919091528051918290030190f35b6101b3600480360360208110156101a357600080fd5b50356001600160a01b0316610406565b604080519115158252519081900360200190f35b61011261041b565b610213600480360360a08110156101e557600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135909116906080013561042a565b005b60018054604080516020600284861615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561029a5780601f1061026f5761010080835404028352916020019161029a565b820191906000526020600020905b81548152906001019060200180831161027d57829003601f168201915b505050505081565b6004546001600160a01b031681565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526060939092909183018282801561033c5780601f106103115761010080835404028352916020019161033c565b820191906000526020600020905b81548152906001019060200180831161031f57829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b600480546040805163809a9e5560e01b81526001600160a01b038781169482019490945285841660248201526044810185905281516000948594169263809a9e559260648082019391829003018186803b1580156103c757600080fd5b505afa1580156103db573d6000803e3d6000fd5b505050506040513d60408110156103f157600080fd5b50805160209091015190969095509350505050565b60026020526000908152604090205460ff1681565b6000546001600160a01b031681565b60026003541415610482576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080517f13bc6d4b00000000000000000000000000000000000000000000000000000000815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b1580156104eb57600080fd5b505afa1580156104ff573d6000803e3d6000fd5b505050506040513d602081101561051557600080fd5b5051610568576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152600093610603938a938301828280156105f55780601f106105ca576101008083540402835291602001916105f5565b820191906000526020600020905b8154815290600101906020018083116105d857829003601f168201915b5050505050878688876109b8565b905061060f8185610c60565b80602001516001600160a01b03166397ccdc6061062a611221565b83606001518460c001516040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561068a57600080fd5b505af115801561069e573d6000803e3d6000fd5b5050505060008060006106bf8985606001518660c001518760800151611230565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561073c578181015183820152602001610724565b50505050905090810190601f1680156107695780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561078a57600080fd5b505af115801561079e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156107c757600080fd5b81019080805160405193929190846401000000008211156107e757600080fd5b9083019060208201858111156107fc57600080fd5b825164010000000081118282018810171561081657600080fd5b82525081516020918201929091019080838360005b8381101561084357818101518382015260200161082b565b50505050905090810190601f1680156108705780820380516001836020036101000a031916815260200191505b5060405250505050600061088385611388565b905060006108a38660c0015187610100015161151790919063ffffffff16565b905060006108bf8388610120015161157990919063ffffffff16565b90508a6001600160a01b031687602001516001600160a01b031688600001516001600160a01b03167f6896e8a2de09380c881b23755435130206166901028e7413fce46cd6ecafdb758c8b60400151878760405180856001600160a01b0316815260200180602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b83811015610968578181015183820152602001610950565b50505050905090810190601f1680156109955780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a45050600160035550505050505050505050565b6109c0611ad6565b6109c8611ad6565b6001600160a01b038816602080830182905260408051630ad7511760e31b815290516356ba88b892600480840193919291829003018186803b158015610a0d57600080fd5b505afa158015610a21573d6000803e3d6000fd5b505050506040513d6020811015610a3757600080fd5b50516001600160a01b0390811682526040808301899052878216606084015286821660808401526020838101518251630ad7511760e31b815292519316926356ba88b8926004808201939291829003018186803b158015610a9757600080fd5b505afa158015610aab573d6000803e3d6000fd5b505050506040513d6020811015610ac157600080fd5b5051604080517f18160ddd00000000000000000000000000000000000000000000000000000000815290516001600160a01b03909216916318160ddd91600480820192602092909190829003018186803b158015610b1e57600080fd5b505afa158015610b32573d6000803e3d6000fd5b505050506040513d6020811015610b4857600080fd5b505160a082015260c0810184905260e08101839052604080516370a0823160e01b81526001600160a01b038a811660048301529151918816916370a0823191602480820192602092909190829003018186803b158015610ba757600080fd5b505afa158015610bbb573d6000803e3d6000fd5b505050506040513d6020811015610bd157600080fd5b5051610100820152604080516370a0823160e01b81526001600160a01b038a811660048301529151918716916370a0823191602480820192602092909190829003018186803b158015610c2357600080fd5b505afa158015610c37573d6000803e3d6000fd5b505050506040513d6020811015610c4d57600080fd5b5051610120820152979650505050505050565b60008260c0015111610cb9576040805162461bcd60e51b815260206004820152601d60248201527f546f6b656e20746f2073656c6c206d757374206265206e6f6e7a65726f000000604482015290519081900360640190fd5b6000610cc4836115da565b9050600083600001516001600160a01b031663a63c643d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d0557600080fd5b505afa158015610d19573d6000803e3d6000fd5b505050506040513d6020811015610d2f57600080fd5b505160408051630d34328160e11b815290519192506000916001600160a01b03851691631a686502916004808301926020929190829003018186803b158015610d7757600080fd5b505afa158015610d8b573d6000803e3d6000fd5b505050506040513d6020811015610da157600080fd5b50518551604080517ff85cb5c800000000000000000000000000000000000000000000000000000000815290516001600160801b0390931693506000926001600160a01b039092169163f85cb5c891600480820192602092909190829003018186803b158015610e1057600080fd5b505afa158015610e24573d6000803e3d6000fd5b505050506040513d6020811015610e3a57600080fd5b5051604080517f0dfe168100000000000000000000000000000000000000000000000000000000815290516001600160a01b0392831692871691630dfe1681916004808301926020929190829003018186803b158015610e9957600080fd5b505afa158015610ead573d6000803e3d6000fd5b505050506040513d6020811015610ec357600080fd5b50516001600160a01b03161415610fc557610fc2846001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610f1057600080fd5b505afa158015610f24573d6000803e3d6000fd5b505050506040513d6020811015610f3a57600080fd5b5051604080516370a0823160e01b81526001600160a01b038881166004830152915191909216916370a08231916024808301926020929190829003018186803b158015610f8657600080fd5b505afa158015610f9a573d6000803e3d6000fd5b505050506040513d6020811015610fb057600080fd5b5051610fbc8480611a10565b90611a69565b90505b85600001516001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561100257600080fd5b505afa158015611016573d6000803e3d6000fd5b505050506040513d602081101561102c57600080fd5b5051604080517fd21220a700000000000000000000000000000000000000000000000000000000815290516001600160a01b039283169287169163d21220a7916004808301926020929190829003018186803b15801561108b57600080fd5b505afa15801561109f573d6000803e3d6000fd5b505050506040513d60208110156110b557600080fd5b50516001600160a01b0316141561110557611102846001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610f1057600080fd5b90505b8281101561115a576040805162461bcd60e51b815260206004820152601460248201527f4e6f7420656e6f756768206c6971756964697479000000000000000000000000604482015290519081900360640190fd5b8486606001516001600160a01b03166370a0823188602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156111b057600080fd5b505afa1580156111c4573d6000803e3d6000fd5b505050506040513d60208110156111da57600080fd5b505110156112195760405162461bcd60e51b8152600401808060200182810382526029815260200180611b6f6029913960400191505060405180910390fd5b505050505050565b6004546001600160a01b031690565b600480546040805163809a9e5560e01b81526001600160a01b0387811694820194909452848416602482015260448101869052815160009485946060948694929091169263809a9e55926064808201939291829003018186803b15801561129657600080fd5b505afa1580156112aa573d6000803e3d6000fd5b505050506040513d60408110156112c057600080fd5b5060200151905060008787878b6112d5611ad0565b604080516001600160a01b03968716602482015260448101959095529285166064850152908416608484015260a483015260c482019490945299811660e4808c01919091528351808c039091018152610104909a01909252506020880180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fcb3c28c70000000000000000000000000000000000000000000000000000000017905260045416976000979650945050505050565b60008061141b83610120015184608001516001600160a01b03166370a0823186602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156113e957600080fd5b505afa1580156113fd573d6000803e3d6000fd5b505050506040513d602081101561141357600080fd5b505190611517565b9050600083608001516001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561145c57600080fd5b505afa158015611470573d6000803e3d6000fd5b505050506040513d602081101561148657600080fd5b505190506000601260ff8316141561149e57826114b2565b6114b28360ff601285900316600a0a611a10565b90508460e0015181101561150d576040805162461bcd60e51b815260206004820152601d60248201527f536c6970706167652067726561746572207468616e20616c6c6f776564000000604482015290519081900360640190fd5b925050505b919050565b60008282111561156e576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b508082035b92915050565b6000828201838110156115d3576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60008054604080517f8bdb2afa000000000000000000000000000000000000000000000000000000008152905183926001600160a01b031691638bdb2afa916004808301926020929190829003018186803b15801561163857600080fd5b505afa15801561164c573d6000803e3d6000fd5b505050506040513d602081101561166257600080fd5b50516060840151608085015160408051630b4c774160e11b81526001600160a01b03938416600482015291831660248301526101f460448301525192935060009291841691631698ee8291606480820192602092909190829003018186803b1580156116cd57600080fd5b505afa1580156116e1573d6000803e3d6000fd5b505050506040513d60208110156116f757600080fd5b50516060850151608086015160408051630b4c774160e11b81526001600160a01b0393841660048201529183166024830152610bb860448301525192935060009291851691631698ee8291606480820192602092909190829003018186803b15801561176257600080fd5b505afa158015611776573d6000803e3d6000fd5b505050506040513d602081101561178c57600080fd5b50516060860151608087015160408051630b4c774160e11b81526001600160a01b039384166004820152918316602483015261271060448301525192935060009291861691631698ee8291606480820192602092909190829003018186803b1580156117f757600080fd5b505afa15801561180b573d6000803e3d6000fd5b505050506040513d602081101561182157600080fd5b505160408051630d34328160e11b815290519192506000916001600160a01b03861691631a686502916004808301926020929190829003018186803b15801561186957600080fd5b505afa15801561187d573d6000803e3d6000fd5b505050506040513d602081101561189357600080fd5b505160408051630d34328160e11b815290519192506000916001600160a01b03861691631a686502916004808301926020929190829003018186803b1580156118db57600080fd5b505afa1580156118ef573d6000803e3d6000fd5b505050506040513d602081101561190557600080fd5b505160408051630d34328160e11b815290519192506000916001600160a01b03861691631a686502916004808301926020929190829003018186803b15801561194d57600080fd5b505afa158015611961573d6000803e3d6000fd5b505050506040513d602081101561197757600080fd5b505190506001600160801b038083169084161180156119a85750806001600160801b0316836001600160801b031610155b156119bc5785975050505050505050611512565b826001600160801b0316826001600160801b03161180156119ef5750806001600160801b0316826001600160801b031610155b15611a035784975050505050505050611512565b5091979650505050505050565b600082611a1f57506000611573565b82820282848281611a2c57fe5b04146115d35760405162461bcd60e51b8152600401808060200182810382526021815260200180611b4e6021913960400191505060405180910390fd5b6000808211611abf576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611ac857fe5b049392505050565b60001990565b60405180610140016040528060006001600160a01b0316815260200160006001600160a01b031681526020016060815260200160006001600160a01b0316815260200160006001600160a01b031681526020016000815260200160008152602001600081526020016000815260200160008152509056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7747617264656e206e6565647320746f206861766520656e6f756768206c697175696420746f6b656e73a2646970667358221220c6dae24f106df28073801deac2f3f68363f0b5fba671a779760ae0764c203cbf64736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c8063aa0b24fa1161005b578063aa0b24fa1461013e578063b10198fb1461018d578063f77c4791146101c7578063fa1ca820146101cf57610088565b806306fdde031461008d57806312e41a771461010a57806317d7de7c1461012e5780633fc8cef314610136575b600080fd5b610095610215565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100cf5781810151838201526020016100b7565b50505050905090810190601f1680156100fc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101126102a2565b604080516001600160a01b039092168252519081900360200190f35b6100956102b1565b610112610346565b6101746004803603606081101561015457600080fd5b506001600160a01b0381358116916020810135909116906040013561036a565b6040805192835260208301919091528051918290030190f35b6101b3600480360360208110156101a357600080fd5b50356001600160a01b0316610406565b604080519115158252519081900360200190f35b61011261041b565b610213600480360360a08110156101e557600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135909116906080013561042a565b005b60018054604080516020600284861615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561029a5780601f1061026f5761010080835404028352916020019161029a565b820191906000526020600020905b81548152906001019060200180831161027d57829003601f168201915b505050505081565b6004546001600160a01b031681565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526060939092909183018282801561033c5780601f106103115761010080835404028352916020019161033c565b820191906000526020600020905b81548152906001019060200180831161031f57829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b600480546040805163809a9e5560e01b81526001600160a01b038781169482019490945285841660248201526044810185905281516000948594169263809a9e559260648082019391829003018186803b1580156103c757600080fd5b505afa1580156103db573d6000803e3d6000fd5b505050506040513d60408110156103f157600080fd5b50805160209091015190969095509350505050565b60026020526000908152604090205460ff1681565b6000546001600160a01b031681565b60026003541415610482576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080517f13bc6d4b00000000000000000000000000000000000000000000000000000000815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b1580156104eb57600080fd5b505afa1580156104ff573d6000803e3d6000fd5b505050506040513d602081101561051557600080fd5b5051610568576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152600093610603938a938301828280156105f55780601f106105ca576101008083540402835291602001916105f5565b820191906000526020600020905b8154815290600101906020018083116105d857829003601f168201915b5050505050878688876109b8565b905061060f8185610c60565b80602001516001600160a01b03166397ccdc6061062a611221565b83606001518460c001516040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561068a57600080fd5b505af115801561069e573d6000803e3d6000fd5b5050505060008060006106bf8985606001518660c001518760800151611230565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561073c578181015183820152602001610724565b50505050905090810190601f1680156107695780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561078a57600080fd5b505af115801561079e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156107c757600080fd5b81019080805160405193929190846401000000008211156107e757600080fd5b9083019060208201858111156107fc57600080fd5b825164010000000081118282018810171561081657600080fd5b82525081516020918201929091019080838360005b8381101561084357818101518382015260200161082b565b50505050905090810190601f1680156108705780820380516001836020036101000a031916815260200191505b5060405250505050600061088385611388565b905060006108a38660c0015187610100015161151790919063ffffffff16565b905060006108bf8388610120015161157990919063ffffffff16565b90508a6001600160a01b031687602001516001600160a01b031688600001516001600160a01b03167f6896e8a2de09380c881b23755435130206166901028e7413fce46cd6ecafdb758c8b60400151878760405180856001600160a01b0316815260200180602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b83811015610968578181015183820152602001610950565b50505050905090810190601f1680156109955780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a45050600160035550505050505050505050565b6109c0611ad6565b6109c8611ad6565b6001600160a01b038816602080830182905260408051630ad7511760e31b815290516356ba88b892600480840193919291829003018186803b158015610a0d57600080fd5b505afa158015610a21573d6000803e3d6000fd5b505050506040513d6020811015610a3757600080fd5b50516001600160a01b0390811682526040808301899052878216606084015286821660808401526020838101518251630ad7511760e31b815292519316926356ba88b8926004808201939291829003018186803b158015610a9757600080fd5b505afa158015610aab573d6000803e3d6000fd5b505050506040513d6020811015610ac157600080fd5b5051604080517f18160ddd00000000000000000000000000000000000000000000000000000000815290516001600160a01b03909216916318160ddd91600480820192602092909190829003018186803b158015610b1e57600080fd5b505afa158015610b32573d6000803e3d6000fd5b505050506040513d6020811015610b4857600080fd5b505160a082015260c0810184905260e08101839052604080516370a0823160e01b81526001600160a01b038a811660048301529151918816916370a0823191602480820192602092909190829003018186803b158015610ba757600080fd5b505afa158015610bbb573d6000803e3d6000fd5b505050506040513d6020811015610bd157600080fd5b5051610100820152604080516370a0823160e01b81526001600160a01b038a811660048301529151918716916370a0823191602480820192602092909190829003018186803b158015610c2357600080fd5b505afa158015610c37573d6000803e3d6000fd5b505050506040513d6020811015610c4d57600080fd5b5051610120820152979650505050505050565b60008260c0015111610cb9576040805162461bcd60e51b815260206004820152601d60248201527f546f6b656e20746f2073656c6c206d757374206265206e6f6e7a65726f000000604482015290519081900360640190fd5b6000610cc4836115da565b9050600083600001516001600160a01b031663a63c643d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d0557600080fd5b505afa158015610d19573d6000803e3d6000fd5b505050506040513d6020811015610d2f57600080fd5b505160408051630d34328160e11b815290519192506000916001600160a01b03851691631a686502916004808301926020929190829003018186803b158015610d7757600080fd5b505afa158015610d8b573d6000803e3d6000fd5b505050506040513d6020811015610da157600080fd5b50518551604080517ff85cb5c800000000000000000000000000000000000000000000000000000000815290516001600160801b0390931693506000926001600160a01b039092169163f85cb5c891600480820192602092909190829003018186803b158015610e1057600080fd5b505afa158015610e24573d6000803e3d6000fd5b505050506040513d6020811015610e3a57600080fd5b5051604080517f0dfe168100000000000000000000000000000000000000000000000000000000815290516001600160a01b0392831692871691630dfe1681916004808301926020929190829003018186803b158015610e9957600080fd5b505afa158015610ead573d6000803e3d6000fd5b505050506040513d6020811015610ec357600080fd5b50516001600160a01b03161415610fc557610fc2846001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610f1057600080fd5b505afa158015610f24573d6000803e3d6000fd5b505050506040513d6020811015610f3a57600080fd5b5051604080516370a0823160e01b81526001600160a01b038881166004830152915191909216916370a08231916024808301926020929190829003018186803b158015610f8657600080fd5b505afa158015610f9a573d6000803e3d6000fd5b505050506040513d6020811015610fb057600080fd5b5051610fbc8480611a10565b90611a69565b90505b85600001516001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561100257600080fd5b505afa158015611016573d6000803e3d6000fd5b505050506040513d602081101561102c57600080fd5b5051604080517fd21220a700000000000000000000000000000000000000000000000000000000815290516001600160a01b039283169287169163d21220a7916004808301926020929190829003018186803b15801561108b57600080fd5b505afa15801561109f573d6000803e3d6000fd5b505050506040513d60208110156110b557600080fd5b50516001600160a01b0316141561110557611102846001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610f1057600080fd5b90505b8281101561115a576040805162461bcd60e51b815260206004820152601460248201527f4e6f7420656e6f756768206c6971756964697479000000000000000000000000604482015290519081900360640190fd5b8486606001516001600160a01b03166370a0823188602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156111b057600080fd5b505afa1580156111c4573d6000803e3d6000fd5b505050506040513d60208110156111da57600080fd5b505110156112195760405162461bcd60e51b8152600401808060200182810382526029815260200180611b6f6029913960400191505060405180910390fd5b505050505050565b6004546001600160a01b031690565b600480546040805163809a9e5560e01b81526001600160a01b0387811694820194909452848416602482015260448101869052815160009485946060948694929091169263809a9e55926064808201939291829003018186803b15801561129657600080fd5b505afa1580156112aa573d6000803e3d6000fd5b505050506040513d60408110156112c057600080fd5b5060200151905060008787878b6112d5611ad0565b604080516001600160a01b03968716602482015260448101959095529285166064850152908416608484015260a483015260c482019490945299811660e4808c01919091528351808c039091018152610104909a01909252506020880180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fcb3c28c70000000000000000000000000000000000000000000000000000000017905260045416976000979650945050505050565b60008061141b83610120015184608001516001600160a01b03166370a0823186602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156113e957600080fd5b505afa1580156113fd573d6000803e3d6000fd5b505050506040513d602081101561141357600080fd5b505190611517565b9050600083608001516001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561145c57600080fd5b505afa158015611470573d6000803e3d6000fd5b505050506040513d602081101561148657600080fd5b505190506000601260ff8316141561149e57826114b2565b6114b28360ff601285900316600a0a611a10565b90508460e0015181101561150d576040805162461bcd60e51b815260206004820152601d60248201527f536c6970706167652067726561746572207468616e20616c6c6f776564000000604482015290519081900360640190fd5b925050505b919050565b60008282111561156e576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b508082035b92915050565b6000828201838110156115d3576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60008054604080517f8bdb2afa000000000000000000000000000000000000000000000000000000008152905183926001600160a01b031691638bdb2afa916004808301926020929190829003018186803b15801561163857600080fd5b505afa15801561164c573d6000803e3d6000fd5b505050506040513d602081101561166257600080fd5b50516060840151608085015160408051630b4c774160e11b81526001600160a01b03938416600482015291831660248301526101f460448301525192935060009291841691631698ee8291606480820192602092909190829003018186803b1580156116cd57600080fd5b505afa1580156116e1573d6000803e3d6000fd5b505050506040513d60208110156116f757600080fd5b50516060850151608086015160408051630b4c774160e11b81526001600160a01b0393841660048201529183166024830152610bb860448301525192935060009291851691631698ee8291606480820192602092909190829003018186803b15801561176257600080fd5b505afa158015611776573d6000803e3d6000fd5b505050506040513d602081101561178c57600080fd5b50516060860151608087015160408051630b4c774160e11b81526001600160a01b039384166004820152918316602483015261271060448301525192935060009291861691631698ee8291606480820192602092909190829003018186803b1580156117f757600080fd5b505afa15801561180b573d6000803e3d6000fd5b505050506040513d602081101561182157600080fd5b505160408051630d34328160e11b815290519192506000916001600160a01b03861691631a686502916004808301926020929190829003018186803b15801561186957600080fd5b505afa15801561187d573d6000803e3d6000fd5b505050506040513d602081101561189357600080fd5b505160408051630d34328160e11b815290519192506000916001600160a01b03861691631a686502916004808301926020929190829003018186803b1580156118db57600080fd5b505afa1580156118ef573d6000803e3d6000fd5b505050506040513d602081101561190557600080fd5b505160408051630d34328160e11b815290519192506000916001600160a01b03861691631a686502916004808301926020929190829003018186803b15801561194d57600080fd5b505afa158015611961573d6000803e3d6000fd5b505050506040513d602081101561197757600080fd5b505190506001600160801b038083169084161180156119a85750806001600160801b0316836001600160801b031610155b156119bc5785975050505050505050611512565b826001600160801b0316826001600160801b03161180156119ef5750806001600160801b0316826001600160801b031610155b15611a035784975050505050505050611512565b5091979650505050505050565b600082611a1f57506000611573565b82820282848281611a2c57fe5b04146115d35760405162461bcd60e51b8152600401808060200182810382526021815260200180611b4e6021913960400191505060405180910390fd5b6000808211611abf576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611ac857fe5b049392505050565b60001990565b60405180610140016040528060006001600160a01b0316815260200160006001600160a01b031681526020016060815260200160006001600160a01b0316815260200160006001600160a01b031681526020016000815260200160008152602001600081526020016000815260200160008152509056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7747617264656e206e6565647320746f206861766520656e6f756768206c697175696420746f6b656e73a2646970667358221220c6dae24f106df28073801deac2f3f68363f0b5fba671a779760ae0764c203cbf64736f6c63430007060033", "devdoc": { "author": "Babylon Finance Protocol Kyber protocol trade integration", "kind": "dev", @@ -304,7 +304,7 @@ "storageLayout": { "storage": [ { - "astId": 18742, + "astId": 17657, "contract": "contracts/integrations/trade/KyberTradeIntegration.sol:KyberTradeIntegration", "label": "controller", "offset": 0, @@ -312,7 +312,7 @@ "type": "t_address" }, { - "astId": 18746, + "astId": 17661, "contract": "contracts/integrations/trade/KyberTradeIntegration.sol:KyberTradeIntegration", "label": "name", "offset": 0, @@ -320,7 +320,7 @@ "type": "t_string_storage" }, { - "astId": 18750, + "astId": 17665, "contract": "contracts/integrations/trade/KyberTradeIntegration.sol:KyberTradeIntegration", "label": "initializedByGarden", "offset": 0, @@ -328,7 +328,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 7995, + "astId": 5603, "contract": "contracts/integrations/trade/KyberTradeIntegration.sol:KyberTradeIntegration", "label": "_status", "offset": 0, @@ -336,7 +336,7 @@ "type": "t_uint256" }, { - "astId": 22597, + "astId": 21501, "contract": "contracts/integrations/trade/KyberTradeIntegration.sol:KyberTradeIntegration", "label": "kyberNetworkProxyAddress", "offset": 0, diff --git a/deployments/artifacts/mainnet/LendOperation.json b/deployments/artifacts/mainnet/LendOperation.json index 008ee6390..db5d429b7 100644 --- a/deployments/artifacts/mainnet/LendOperation.json +++ b/deployments/artifacts/mainnet/LendOperation.json @@ -1,5 +1,5 @@ { - "address": "0x1Dbf58244095a0Cd45f5Fa7B816eC6B9ffbfaB31", + "address": "0x38b37a0b7e25a8D73344CeA0b9765F669b011C16", "abi": [ { "inputs": [ @@ -196,30 +196,30 @@ "type": "function" } ], - "transactionHash": "0x6565a761600cbe65a3be31192a7e3e35bd55d47df482f09a0bf5185d72afdb99", + "transactionHash": "0xa06e17d5d9cf43f0e57bf21fc39a74eb635df2ffcca68f84e5247fed14a77105", "receipt": { "to": null, "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", - "contractAddress": "0x1Dbf58244095a0Cd45f5Fa7B816eC6B9ffbfaB31", - "transactionIndex": 101, - "gasUsed": "1529476", + "contractAddress": "0x38b37a0b7e25a8D73344CeA0b9765F669b011C16", + "transactionIndex": 280, + "gasUsed": "1528612", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xbeaba828fdf05a81cdc58d1513a571e8b3037ee618f487318e038292b87661ef", - "transactionHash": "0x6565a761600cbe65a3be31192a7e3e35bd55d47df482f09a0bf5185d72afdb99", + "blockHash": "0xf8d33da00f99e5f09f0cda0c62be4e59371e2d5d3c7d9444f96fdf00f2f80175", + "transactionHash": "0xa06e17d5d9cf43f0e57bf21fc39a74eb635df2ffcca68f84e5247fed14a77105", "logs": [], - "blockNumber": 12361049, - "cumulativeGasUsed": "6380732", + "blockNumber": 12451354, + "cumulativeGasUsed": "11582775", "status": 1, "byzantium": true }, "args": [ "lend", - "0xffe7c30daDb1B132b86aB7bbede496615d54c8Ac" + "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F" ], - "solcInputHash": "a02a2075cf667a20c416d2d0a5e8f337", - "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_capital\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"}],\"name\":\"executeOperation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_percentage\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"}],\"name\":\"exitOperation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_assetToken\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"}],\"name\":\"getNAV\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"validateOperation\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Executes a lend operation\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of the controller\",\"_name\":\"Name of the integration\"}},\"executeOperation(address,uint256,uint8,address,address,address)\":{\"params\":{\"_capital\":\"Amount of capital received from the garden\"}},\"exitOperation(uint256,address,address,address)\":{\"params\":{\"_percentage\":\"of capital to exit from the strategy\"}},\"getNAV(address,address,address)\":{\"returns\":{\"_0\":\"_nav NAV of the strategy\"}},\"validateOperation(address,address,address,uint256)\":{\"params\":{\"_data\":\"Operation data\"}}},\"title\":\"LendOperatin\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates the integration\"},\"executeOperation(address,uint256,uint8,address,address,address)\":{\"notice\":\"Executes the lend operation\"},\"exitOperation(uint256,address,address,address)\":{\"notice\":\"Exits the lend operation.\"},\"getNAV(address,address,address)\":{\"notice\":\"Gets the NAV of the lend op in the reserve asset\"},\"getName()\":{\"notice\":\"Returns the name of the operation\"},\"validateOperation(address,address,address,uint256)\":{\"notice\":\"Sets operation data for the lend operation\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/strategies/operations/LendOperation.sol\":\"LendOperation\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityMinimum(uint256 _minRiskyPairLiquidityEth) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minRiskyPairLiquidityEth() external view returns (uint256);\\n\\n function getUniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0x57cf4ece98219f805a416e8c24728d30d9b37c4126d66785d2617b97e35ffae6\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function nftAddress() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategy(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function reenableEthForStrategies() external;\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x5e460136e0b45024ea1c1f32cde607f3ce75dd5b14cee34007d6bbd08beabc82\",\"license\":\"Apache License\"},\"contracts/interfaces/ILendIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title ILendIntegration\\n * @author Babylon Finance\\n *\\n * Interface for lending integrations such as Compound, Aave.\\n */\\ninterface ILendIntegration {\\n function supplyTokens(\\n address _strategy,\\n address _assetToken,\\n uint256 _numTokensToSupply,\\n uint256 _minAmountExpected\\n ) external;\\n\\n function redeemTokens(\\n address _strategy,\\n address _assetToken,\\n uint256 _numTokensToRedeem,\\n uint256 _minAmountExpected\\n ) external;\\n\\n function getExpectedShares(address _assetToken, uint256 _numTokensToSupply) external view returns (uint256);\\n\\n function getExchangeRatePerToken(address _assetToken) external view returns (uint256);\\n\\n function getInvestmentToken(address _assetToken) external view returns (address);\\n}\\n\",\"keccak256\":\"0x28ca8cb40b050139b7416224c43de2c14fa7991e0b3769f7bab349e3422fc34f\",\"license\":\"Apache License\"},\"contracts/interfaces/IOperation.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from './IGarden.sol';\\nimport {IStrategy} from './IStrategy.sol';\\n\\n/**\\n * @title IOperation\\n * @author Babylon Finance\\n *\\n * Interface for an strategy operation\\n */\\ninterface IOperation {\\n function validateOperation(\\n address _data,\\n IGarden _garden,\\n address _integration,\\n uint256 _index\\n ) external view;\\n\\n function executeOperation(\\n address _asset,\\n uint256 _capital,\\n uint8 _assetStatus,\\n address _data,\\n IGarden _garden,\\n address _integration\\n )\\n external\\n returns (\\n address,\\n uint256,\\n uint8\\n );\\n\\n function exitOperation(\\n uint256 _percentage,\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external;\\n\\n function getNAV(\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external view returns (uint256);\\n\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x856e173e6c8e1fdbe54988df58d0805a23a6a2f8408bd4f90a488a1978e762ed\",\"license\":\"Apache License\"},\"contracts/interfaces/IPriceOracle.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol IPriceOracle)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPriceOracle\\n * @author Babylon Finance\\n *\\n * Interface for interacting with PriceOracle\\n */\\ninterface IPriceOracle {\\n /* ============ Functions ============ */\\n\\n function getPrice(address _assetOne, address _assetTwo) external view returns (uint256);\\n\\n function updateAdapters(address _assetOne, address _assetTwo) external;\\n}\\n\",\"keccak256\":\"0xa22e0e5e166f6f6714553b736ee921b916c37bc5b557042bf6042cc010d2a041\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital,\\n address _strategyNft\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function strategyNft() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x4396906e436eb68c96715e0a53ae1656ac5d7934ebdaeb58ec3c33953465bc39\",\"license\":\"Apache License\"},\"contracts/interfaces/ITradeIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title ITrade\\n * @author Babylon Finance\\n *\\n * Interface for trading protocol integrations\\n */\\ninterface ITradeIntegration {\\n function trade(\\n address _strategy,\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken,\\n uint256 _minReceiveQuantity\\n ) external;\\n\\n function getConversionRates(\\n address _sourceToken,\\n address _destinationToken,\\n uint256 _sourceQuantity\\n ) external returns (uint256, uint256);\\n}\\n\",\"keccak256\":\"0x95df25f2cbfd3d82a9e22c9202f9fc2c497e90fd6e5fcfb00c4162f6447c0cbd\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"contracts/strategies/operations/LendOperation.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Operation} from './Operation.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\\nimport {ILendIntegration} from '../../interfaces/ILendIntegration.sol';\\n\\n/**\\n * @title LendOperatin\\n * @author Babylon Finance\\n *\\n * Executes a lend operation\\n */\\ncontract LendOperation is Operation {\\n using SafeMath for uint256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _controller Address of the controller\\n */\\n constructor(string memory _name, address _controller) Operation(_name, _controller) {}\\n\\n /**\\n * Sets operation data for the lend operation\\n *\\n * @param _data Operation data\\n */\\n function validateOperation(\\n address _data,\\n IGarden _garden,\\n address, /* _integration */\\n uint256 /* _index */\\n ) external view override onlyStrategy {\\n require(_data != _garden.reserveAsset(), 'Receive token must be different');\\n }\\n\\n /**\\n * Executes the lend operation\\n * @param _capital Amount of capital received from the garden\\n */\\n function executeOperation(\\n address _asset,\\n uint256 _capital,\\n uint8, /* _assetStatus */\\n address _data,\\n IGarden, /* _garden */\\n address _integration\\n )\\n external\\n override\\n onlyStrategy\\n returns (\\n address,\\n uint256,\\n uint8\\n )\\n {\\n address assetToken = _data;\\n if (assetToken != _asset) {\\n IStrategy(msg.sender).trade(_asset, _capital, assetToken);\\n }\\n uint256 numTokensToSupply = IERC20(assetToken).balanceOf(msg.sender);\\n uint256 exactAmount = ILendIntegration(_integration).getExpectedShares(assetToken, numTokensToSupply);\\n uint256 minAmountExpected = exactAmount.sub(exactAmount.preciseMul(SLIPPAGE_ALLOWED));\\n ILendIntegration(_integration).supplyTokens(msg.sender, assetToken, numTokensToSupply, minAmountExpected);\\n return (assetToken, numTokensToSupply, 1); // put as collateral\\n }\\n\\n /**\\n * Exits the lend operation.\\n * @param _percentage of capital to exit from the strategy\\n */\\n function exitOperation(\\n uint256 _percentage,\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external override onlyStrategy {\\n require(_percentage <= HUNDRED_PERCENT, 'Unwind Percentage <= 100%');\\n address assetToken = _data;\\n uint256 numTokensToRedeem =\\n IERC20(ILendIntegration(_integration).getInvestmentToken(assetToken)).balanceOf(msg.sender).preciseMul(\\n _percentage\\n );\\n ILendIntegration(_integration).redeemTokens(\\n msg.sender,\\n assetToken,\\n numTokensToRedeem,\\n ILendIntegration(_integration).getExchangeRatePerToken(assetToken).mul(\\n numTokensToRedeem.sub(numTokensToRedeem.preciseMul(SLIPPAGE_ALLOWED))\\n )\\n );\\n if (assetToken != _garden.reserveAsset()) {\\n IStrategy(msg.sender).trade(assetToken, IERC20(assetToken).balanceOf(msg.sender), _garden.reserveAsset());\\n }\\n }\\n\\n /**\\n * Gets the NAV of the lend op in the reserve asset\\n *\\n * @return _nav NAV of the strategy\\n */\\n function getNAV(\\n address _assetToken,\\n IGarden _garden,\\n address _integration\\n ) external view override onlyStrategy returns (uint256) {\\n if (!IStrategy(msg.sender).isStrategyActive()) {\\n return 0;\\n }\\n uint256 numTokensToRedeem =\\n IERC20(ILendIntegration(_integration).getInvestmentToken(_assetToken)).balanceOf(msg.sender);\\n uint256 assetTokensAmount =\\n ILendIntegration(_integration).getExchangeRatePerToken(_assetToken).mul(numTokensToRedeem);\\n uint256 price = _getPrice(_garden.reserveAsset(), _assetToken);\\n uint256 NAV = _normalizeDecimals(_assetToken, assetTokensAmount).preciseDiv(price);\\n require(NAV != 0, 'NAV has to be bigger 0');\\n return NAV;\\n }\\n}\\n\",\"keccak256\":\"0xc0c883940f402008ea1a88790b5b4dde9c38108a169e5f0975cb54a01a665d11\",\"license\":\"Apache License\"},\"contracts/strategies/operations/Operation.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {IOperation} from '../../interfaces/IOperation.sol';\\nimport {ITradeIntegration} from '../../interfaces/ITradeIntegration.sol';\\nimport {IPriceOracle} from '../../interfaces/IPriceOracle.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\n\\n/**\\n * @title LongStrategy\\n * @author Babylon Finance\\n *\\n * Holds the data for a long strategy\\n */\\nabstract contract Operation is IOperation {\\n using SafeMath for uint256;\\n /* ============ Modifiers ============ */\\n\\n modifier onlyStrategy() {\\n IStrategy strategy = IStrategy(msg.sender);\\n IGarden garden = strategy.garden();\\n require(IBabController(controller).isSystemContract(address(garden)), 'Only a garden can call this');\\n require(garden.isStrategy(msg.sender), 'Sender must be a strategy');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n uint256 internal constant SLIPPAGE_ALLOWED = 1e16; // 1%\\n uint256 internal constant HUNDRED_PERCENT = 1e18; // 100%\\n address internal constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\\n\\n // Address of the controller\\n address public controller;\\n // Name of the operation\\n string public name;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _controller Address of the controller\\n */\\n constructor(string memory _name, address _controller) {\\n require(_controller != address(0), 'Controller must be defined');\\n name = _name;\\n controller = _controller;\\n }\\n\\n /* ============ Virtual External Functions ============ */\\n\\n function validateOperation(\\n address _data,\\n IGarden _garden,\\n address _integration,\\n uint256 _index\\n ) external view virtual override;\\n\\n function executeOperation(\\n address _asset,\\n uint256 _capital,\\n uint8 _assetStatus,\\n address _data,\\n IGarden _garden,\\n address _integration\\n )\\n external\\n virtual\\n override\\n returns (\\n address,\\n uint256,\\n uint8\\n );\\n\\n function exitOperation(\\n uint256 _percentage,\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external virtual override;\\n\\n function getNAV(\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external view virtual override returns (uint256);\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the name of the operation\\n */\\n function getName() external view override returns (string memory) {\\n return name;\\n }\\n\\n /**\\n * Returns the price of the pair through the price oracle\\n */\\n function _getPrice(address _assetOne, address _assetTwo) internal view returns (uint256) {\\n IPriceOracle oracle = IPriceOracle(IBabController(controller).priceOracle());\\n return oracle.getPrice(_assetOne, _assetTwo);\\n }\\n\\n function _normalizeDecimals(address _asset, uint256 _quantity) internal view returns (uint256) {\\n uint8 tokenDecimals = ERC20(_asset).decimals();\\n return tokenDecimals != 18 ? _quantity.mul(10**(18 - tokenDecimals)) : _quantity;\\n }\\n}\\n\",\"keccak256\":\"0x9b65b8d307d5c35ba537bf051095d28fbb3128c593091cc1ac16de22b4370d8e\",\"license\":\"Apache License\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b5060405162001c1838038062001c18833981810160405260408110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001519150829050816001600160a01b03811662000150576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c6572206d75737420626520646566696e6564000000000000604482015290519081900360640190fd5b81516200016590600190602085019062000190565b50600080546001600160a01b0319166001600160a01b0392909216919091179055506200023c915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001c8576000855562000213565b82601f10620001e357805160ff191683800117855562000213565b8280016001018555821562000213579182015b8281111562000213578251825591602001919060010190620001f6565b506200022192915062000225565b5090565b5b8082111562000221576000815560010162000226565b6119cc806200024c6000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80634222326a1161005b5780634222326a1461014757806355d9750b14610191578063c8cd307514610209578063f77c4791146102455761007d565b806306fdde031461008257806317d7de7c146100ff578063419ea18a14610107575b600080fd5b61008a610269565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100c45781810151838201526020016100ac565b50505050905090810190601f1680156100f15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61008a6102f6565b6101456004803603608081101561011d57600080fd5b508035906001600160a01b03602082013581169160408101358216916060909101351661038b565b005b61017f6004803603606081101561015d57600080fd5b506001600160a01b038135811691602081013582169160409091013516610a32565b60408051918252519081900360200190f35b6101de600480360360c08110156101a757600080fd5b506001600160a01b03813581169160208101359160ff604083013516916060810135821691608082013581169160a0013516610eeb565b604080516001600160a01b039094168452602084019290925260ff1682820152519081900360600190f35b6101456004803603608081101561021f57600080fd5b506001600160a01b0381358116916020810135821691604082013516906060013561137e565b61024d611646565b604080516001600160a01b039092168252519081900360200190f35b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102ee5780601f106102c3576101008083540402835291602001916102ee565b820191906000526020600020905b8154815290600101906020018083116102d157829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156103815780601f1061035657610100808354040283529160200191610381565b820191906000526020600020905b81548152906001019060200180831161036457829003601f168201915b5050505050905090565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156103cb57600080fd5b505afa1580156103df573d6000803e3d6000fd5b505050506040513d60208110156103f557600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561044657600080fd5b505afa15801561045a573d6000803e3d6000fd5b505050506040513d602081101561047057600080fd5b50516104c3576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b15801561050957600080fd5b505afa15801561051d573d6000803e3d6000fd5b505050506040513d602081101561053357600080fd5b5051610586576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b670de0b6b3a76400008611156105e3576040805162461bcd60e51b815260206004820152601960248201527f556e77696e642050657263656e74616765203c3d203130302500000000000000604482015290519081900360640190fd5b600085905060006106e188866001600160a01b031663eb40e600856040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561063b57600080fd5b505afa15801561064f573d6000803e3d6000fd5b505050506040513d602081101561066557600080fd5b5051604080516370a0823160e01b815233600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b1580156106af57600080fd5b505afa1580156106c3573d6000803e3d6000fd5b505050506040513d60208110156106d957600080fd5b505190611655565b90506001600160a01b03851663d0d2d3a233848461079261071361070c83662386f26fc10000611655565b889061167c565b8b6001600160a01b03166307b54c6f8a6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561076057600080fd5b505afa158015610774573d6000803e3d6000fd5b505050506040513d602081101561078a57600080fd5b5051906116d9565b6040518563ffffffff1660e01b815260040180856001600160a01b03168152602001846001600160a01b03168152602001838152602001828152602001945050505050600060405180830381600087803b1580156107ef57600080fd5b505af1158015610803573d6000803e3d6000fd5b50505050856001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561084057600080fd5b505afa158015610854573d6000803e3d6000fd5b505050506040513d602081101561086a57600080fd5b50516001600160a01b03838116911614610a2857336001600160a01b0316630e32db5283846001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156108db57600080fd5b505afa1580156108ef573d6000803e3d6000fd5b505050506040513d602081101561090557600080fd5b5051604080517ff85cb5c800000000000000000000000000000000000000000000000000000000815290516001600160a01b038c169163f85cb5c8916004808301926020929190829003018186803b15801561096057600080fd5b505afa158015610974573d6000803e3d6000fd5b505050506040513d602081101561098a57600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b1681526001600160a01b039485166004820152602481019390935292166044820152905160648083019260209291908290030181600087803b1580156109fb57600080fd5b505af1158015610a0f573d6000803e3d6000fd5b505050506040513d6020811015610a2557600080fd5b50505b5050505050505050565b6000803390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015610a7357600080fd5b505afa158015610a87573d6000803e3d6000fd5b505050506040513d6020811015610a9d57600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b158015610aee57600080fd5b505afa158015610b02573d6000803e3d6000fd5b505050506040513d6020811015610b1857600080fd5b5051610b6b576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b158015610bb157600080fd5b505afa158015610bc5573d6000803e3d6000fd5b505050506040513d6020811015610bdb57600080fd5b5051610c2e576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b336001600160a01b031663e4df5e1a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c6757600080fd5b505afa158015610c7b573d6000803e3d6000fd5b505050506040513d6020811015610c9157600080fd5b5051610ca05760009250610ee2565b6000846001600160a01b031663eb40e600886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610cef57600080fd5b505afa158015610d03573d6000803e3d6000fd5b505050506040513d6020811015610d1957600080fd5b5051604080516370a0823160e01b815233600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610d6357600080fd5b505afa158015610d77573d6000803e3d6000fd5b505050506040513d6020811015610d8d57600080fd5b5051604080517f07b54c6f0000000000000000000000000000000000000000000000000000000081526001600160a01b038a811660048301529151929350600092610dfe928592908a16916307b54c6f91602480820192602092909190829003018186803b15801561076057600080fd5b90506000610e70886001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b158015610e3e57600080fd5b505afa158015610e52573d6000803e3d6000fd5b505050506040513d6020811015610e6857600080fd5b50518a611732565b90506000610e8882610e828c8661185e565b906118f6565b905080610edc576040805162461bcd60e51b815260206004820152601660248201527f4e41562068617320746f20626520626967676572203000000000000000000000604482015290519081900360640190fd5b95505050505b50509392505050565b6000806000803390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2f57600080fd5b505afa158015610f43573d6000803e3d6000fd5b505050506040513d6020811015610f5957600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b158015610faa57600080fd5b505afa158015610fbe573d6000803e3d6000fd5b505050506040513d6020811015610fd457600080fd5b5051611027576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b15801561106d57600080fd5b505afa158015611081573d6000803e3d6000fd5b505050506040513d602081101561109757600080fd5b50516110ea576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b876001600160a01b03808216908d161461119b57604080517f0e32db520000000000000000000000000000000000000000000000000000000081526001600160a01b038e81166004830152602482018e90528316604482015290513391630e32db529160648083019260209291908290030181600087803b15801561116e57600080fd5b505af1158015611182573d6000803e3d6000fd5b505050506040513d602081101561119857600080fd5b50505b6000816001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156111ea57600080fd5b505afa1580156111fe573d6000803e3d6000fd5b505050506040513d602081101561121457600080fd5b5051604080517f4deef6490000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152602482018490529151929350600092918b1691634deef64991604480820192602092909190829003018186803b15801561128657600080fd5b505afa15801561129a573d6000803e3d6000fd5b505050506040513d60208110156112b057600080fd5b5051905060006112d16112ca83662386f26fc10000611655565b839061167c565b604080517ff14b57880000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03878116602483015260448201879052606482018490529151929350908c169163f14b57889160848082019260009290919082900301818387803b15801561134c57600080fd5b505af1158015611360573d6000803e3d6000fd5b50959a50939850600197505050505050505096509650969350505050565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156113be57600080fd5b505afa1580156113d2573d6000803e3d6000fd5b505050506040513d60208110156113e857600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561143957600080fd5b505afa15801561144d573d6000803e3d6000fd5b505050506040513d602081101561146357600080fd5b50516114b6576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b1580156114fc57600080fd5b505afa158015611510573d6000803e3d6000fd5b505050506040513d602081101561152657600080fd5b5051611579576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b846001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b1580156115b257600080fd5b505afa1580156115c6573d6000803e3d6000fd5b505050506040513d60208110156115dc57600080fd5b50516001600160a01b038781169116141561163e576040805162461bcd60e51b815260206004820152601f60248201527f5265636569766520746f6b656e206d75737420626520646966666572656e7400604482015290519081900360640190fd5b505050505050565b6000546001600160a01b031681565b6000611673670de0b6b3a764000061166d85856116d9565b9061190e565b90505b92915050565b6000828211156116d3576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000826116e857506000611676565b828202828482816116f557fe5b04146116735760405162461bcd60e51b81526004018080602001828103825260218152602001806119766021913960400191505060405180910390fd5b60008054604080517f2630c12f000000000000000000000000000000000000000000000000000000008152905183926001600160a01b031691632630c12f916004808301926020929190829003018186803b15801561179057600080fd5b505afa1580156117a4573d6000803e3d6000fd5b505050506040513d60208110156117ba57600080fd5b5051604080517fac41865a0000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152868116602483015291519293509083169163ac41865a91604480820192602092909190829003018186803b15801561182a57600080fd5b505afa15801561183e573d6000803e3d6000fd5b505050506040513d602081101561185457600080fd5b5051949350505050565b600080836001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561189a57600080fd5b505afa1580156118ae573d6000803e3d6000fd5b505050506040513d60208110156118c457600080fd5b50519050601260ff821614156118da57826118ee565b6118ee8360ff601284900316600a0a6116d9565b949350505050565b60006116738261166d85670de0b6b3a76400006116d9565b6000808211611964576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161196d57fe5b04939250505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220360f8e2aa8033ee9eba353bd1ab64919c69b667999f26dfaebc68ae86882a5fd64736f6c63430007060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80634222326a1161005b5780634222326a1461014757806355d9750b14610191578063c8cd307514610209578063f77c4791146102455761007d565b806306fdde031461008257806317d7de7c146100ff578063419ea18a14610107575b600080fd5b61008a610269565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100c45781810151838201526020016100ac565b50505050905090810190601f1680156100f15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61008a6102f6565b6101456004803603608081101561011d57600080fd5b508035906001600160a01b03602082013581169160408101358216916060909101351661038b565b005b61017f6004803603606081101561015d57600080fd5b506001600160a01b038135811691602081013582169160409091013516610a32565b60408051918252519081900360200190f35b6101de600480360360c08110156101a757600080fd5b506001600160a01b03813581169160208101359160ff604083013516916060810135821691608082013581169160a0013516610eeb565b604080516001600160a01b039094168452602084019290925260ff1682820152519081900360600190f35b6101456004803603608081101561021f57600080fd5b506001600160a01b0381358116916020810135821691604082013516906060013561137e565b61024d611646565b604080516001600160a01b039092168252519081900360200190f35b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102ee5780601f106102c3576101008083540402835291602001916102ee565b820191906000526020600020905b8154815290600101906020018083116102d157829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156103815780601f1061035657610100808354040283529160200191610381565b820191906000526020600020905b81548152906001019060200180831161036457829003601f168201915b5050505050905090565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156103cb57600080fd5b505afa1580156103df573d6000803e3d6000fd5b505050506040513d60208110156103f557600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561044657600080fd5b505afa15801561045a573d6000803e3d6000fd5b505050506040513d602081101561047057600080fd5b50516104c3576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b15801561050957600080fd5b505afa15801561051d573d6000803e3d6000fd5b505050506040513d602081101561053357600080fd5b5051610586576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b670de0b6b3a76400008611156105e3576040805162461bcd60e51b815260206004820152601960248201527f556e77696e642050657263656e74616765203c3d203130302500000000000000604482015290519081900360640190fd5b600085905060006106e188866001600160a01b031663eb40e600856040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561063b57600080fd5b505afa15801561064f573d6000803e3d6000fd5b505050506040513d602081101561066557600080fd5b5051604080516370a0823160e01b815233600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b1580156106af57600080fd5b505afa1580156106c3573d6000803e3d6000fd5b505050506040513d60208110156106d957600080fd5b505190611655565b90506001600160a01b03851663d0d2d3a233848461079261071361070c83662386f26fc10000611655565b889061167c565b8b6001600160a01b03166307b54c6f8a6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561076057600080fd5b505afa158015610774573d6000803e3d6000fd5b505050506040513d602081101561078a57600080fd5b5051906116d9565b6040518563ffffffff1660e01b815260040180856001600160a01b03168152602001846001600160a01b03168152602001838152602001828152602001945050505050600060405180830381600087803b1580156107ef57600080fd5b505af1158015610803573d6000803e3d6000fd5b50505050856001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561084057600080fd5b505afa158015610854573d6000803e3d6000fd5b505050506040513d602081101561086a57600080fd5b50516001600160a01b03838116911614610a2857336001600160a01b0316630e32db5283846001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156108db57600080fd5b505afa1580156108ef573d6000803e3d6000fd5b505050506040513d602081101561090557600080fd5b5051604080517ff85cb5c800000000000000000000000000000000000000000000000000000000815290516001600160a01b038c169163f85cb5c8916004808301926020929190829003018186803b15801561096057600080fd5b505afa158015610974573d6000803e3d6000fd5b505050506040513d602081101561098a57600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b1681526001600160a01b039485166004820152602481019390935292166044820152905160648083019260209291908290030181600087803b1580156109fb57600080fd5b505af1158015610a0f573d6000803e3d6000fd5b505050506040513d6020811015610a2557600080fd5b50505b5050505050505050565b6000803390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015610a7357600080fd5b505afa158015610a87573d6000803e3d6000fd5b505050506040513d6020811015610a9d57600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b158015610aee57600080fd5b505afa158015610b02573d6000803e3d6000fd5b505050506040513d6020811015610b1857600080fd5b5051610b6b576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b158015610bb157600080fd5b505afa158015610bc5573d6000803e3d6000fd5b505050506040513d6020811015610bdb57600080fd5b5051610c2e576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b336001600160a01b031663e4df5e1a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c6757600080fd5b505afa158015610c7b573d6000803e3d6000fd5b505050506040513d6020811015610c9157600080fd5b5051610ca05760009250610ee2565b6000846001600160a01b031663eb40e600886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610cef57600080fd5b505afa158015610d03573d6000803e3d6000fd5b505050506040513d6020811015610d1957600080fd5b5051604080516370a0823160e01b815233600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610d6357600080fd5b505afa158015610d77573d6000803e3d6000fd5b505050506040513d6020811015610d8d57600080fd5b5051604080517f07b54c6f0000000000000000000000000000000000000000000000000000000081526001600160a01b038a811660048301529151929350600092610dfe928592908a16916307b54c6f91602480820192602092909190829003018186803b15801561076057600080fd5b90506000610e70886001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b158015610e3e57600080fd5b505afa158015610e52573d6000803e3d6000fd5b505050506040513d6020811015610e6857600080fd5b50518a611732565b90506000610e8882610e828c8661185e565b906118f6565b905080610edc576040805162461bcd60e51b815260206004820152601660248201527f4e41562068617320746f20626520626967676572203000000000000000000000604482015290519081900360640190fd5b95505050505b50509392505050565b6000806000803390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2f57600080fd5b505afa158015610f43573d6000803e3d6000fd5b505050506040513d6020811015610f5957600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b158015610faa57600080fd5b505afa158015610fbe573d6000803e3d6000fd5b505050506040513d6020811015610fd457600080fd5b5051611027576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b15801561106d57600080fd5b505afa158015611081573d6000803e3d6000fd5b505050506040513d602081101561109757600080fd5b50516110ea576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b876001600160a01b03808216908d161461119b57604080517f0e32db520000000000000000000000000000000000000000000000000000000081526001600160a01b038e81166004830152602482018e90528316604482015290513391630e32db529160648083019260209291908290030181600087803b15801561116e57600080fd5b505af1158015611182573d6000803e3d6000fd5b505050506040513d602081101561119857600080fd5b50505b6000816001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156111ea57600080fd5b505afa1580156111fe573d6000803e3d6000fd5b505050506040513d602081101561121457600080fd5b5051604080517f4deef6490000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152602482018490529151929350600092918b1691634deef64991604480820192602092909190829003018186803b15801561128657600080fd5b505afa15801561129a573d6000803e3d6000fd5b505050506040513d60208110156112b057600080fd5b5051905060006112d16112ca83662386f26fc10000611655565b839061167c565b604080517ff14b57880000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03878116602483015260448201879052606482018490529151929350908c169163f14b57889160848082019260009290919082900301818387803b15801561134c57600080fd5b505af1158015611360573d6000803e3d6000fd5b50959a50939850600197505050505050505096509650969350505050565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156113be57600080fd5b505afa1580156113d2573d6000803e3d6000fd5b505050506040513d60208110156113e857600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561143957600080fd5b505afa15801561144d573d6000803e3d6000fd5b505050506040513d602081101561146357600080fd5b50516114b6576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b604080516317475d5760e11b815233600482015290516001600160a01b03831691632e8ebaae916024808301926020929190829003018186803b1580156114fc57600080fd5b505afa158015611510573d6000803e3d6000fd5b505050506040513d602081101561152657600080fd5b5051611579576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b846001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b1580156115b257600080fd5b505afa1580156115c6573d6000803e3d6000fd5b505050506040513d60208110156115dc57600080fd5b50516001600160a01b038781169116141561163e576040805162461bcd60e51b815260206004820152601f60248201527f5265636569766520746f6b656e206d75737420626520646966666572656e7400604482015290519081900360640190fd5b505050505050565b6000546001600160a01b031681565b6000611673670de0b6b3a764000061166d85856116d9565b9061190e565b90505b92915050565b6000828211156116d3576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000826116e857506000611676565b828202828482816116f557fe5b04146116735760405162461bcd60e51b81526004018080602001828103825260218152602001806119766021913960400191505060405180910390fd5b60008054604080517f2630c12f000000000000000000000000000000000000000000000000000000008152905183926001600160a01b031691632630c12f916004808301926020929190829003018186803b15801561179057600080fd5b505afa1580156117a4573d6000803e3d6000fd5b505050506040513d60208110156117ba57600080fd5b5051604080517fac41865a0000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152868116602483015291519293509083169163ac41865a91604480820192602092909190829003018186803b15801561182a57600080fd5b505afa15801561183e573d6000803e3d6000fd5b505050506040513d602081101561185457600080fd5b5051949350505050565b600080836001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561189a57600080fd5b505afa1580156118ae573d6000803e3d6000fd5b505050506040513d60208110156118c457600080fd5b50519050601260ff821614156118da57826118ee565b6118ee8360ff601284900316600a0a6116d9565b949350505050565b60006116738261166d85670de0b6b3a76400006116d9565b6000808211611964576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161196d57fe5b04939250505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220360f8e2aa8033ee9eba353bd1ab64919c69b667999f26dfaebc68ae86882a5fd64736f6c63430007060033", + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_capital\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"}],\"name\":\"executeOperation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_percentage\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"}],\"name\":\"exitOperation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_assetToken\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_integration\",\"type\":\"address\"}],\"name\":\"getNAV\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_data\",\"type\":\"address\"},{\"internalType\":\"contract IGarden\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"validateOperation\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Executes a lend operation\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of the controller\",\"_name\":\"Name of the integration\"}},\"executeOperation(address,uint256,uint8,address,address,address)\":{\"params\":{\"_capital\":\"Amount of capital received from the garden\"}},\"exitOperation(uint256,address,address,address)\":{\"params\":{\"_percentage\":\"of capital to exit from the strategy\"}},\"getNAV(address,address,address)\":{\"returns\":{\"_0\":\"_nav NAV of the strategy\"}},\"validateOperation(address,address,address,uint256)\":{\"params\":{\"_data\":\"Operation data\"}}},\"title\":\"LendOperatin\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates the integration\"},\"executeOperation(address,uint256,uint8,address,address,address)\":{\"notice\":\"Executes the lend operation\"},\"exitOperation(uint256,address,address,address)\":{\"notice\":\"Exits the lend operation.\"},\"getNAV(address,address,address)\":{\"notice\":\"Gets the NAV of the lend op in the reserve asset\"},\"getName()\":{\"notice\":\"Returns the name of the operation\"},\"validateOperation(address,address,address,uint256)\":{\"notice\":\"Sets operation data for the lend operation\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/strategies/operations/LendOperation.sol\":\"LendOperation\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editGardenNFT(address _newGardenNFT) external;\\n\\n function editStrategyNFT(address _newStrategyNFT) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function editUniswapFactory(address _newUniswapFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\\n\\n function maxContributorsPerGarden() external view returns (uint256);\\n\\n function gardenCreationIsOpen() external view returns (bool);\\n\\n function openPublicGardenCreation() external;\\n\\n function setMaxContributorsPerGarden(uint256 _newMax) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function gardenNFT() external view returns (address);\\n\\n function strategyNFT() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\\n\\n function uniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0xdee5a27301c24f507d312f32249487fa9b0a756062a7e479405a1d1ee9ee7bb8\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function isGardenStrategy(address _strategy) external view returns (bool);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategyActiveInGarden(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to,\\n bool _withPenalty\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x88f1786ffee23e386aaa1735177912e1b5a7cdd440dafe52fb139fe50fd621b4\",\"license\":\"Apache License\"},\"contracts/interfaces/ILendIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title ILendIntegration\\n * @author Babylon Finance\\n *\\n * Interface for lending integrations such as Compound, Aave.\\n */\\ninterface ILendIntegration {\\n function supplyTokens(\\n address _strategy,\\n address _assetToken,\\n uint256 _numTokensToSupply,\\n uint256 _minAmountExpected\\n ) external;\\n\\n function redeemTokens(\\n address _strategy,\\n address _assetToken,\\n uint256 _numTokensToRedeem,\\n uint256 _minAmountExpected\\n ) external;\\n\\n function getExpectedShares(address _assetToken, uint256 _numTokensToSupply) external view returns (uint256);\\n\\n function getExchangeRatePerToken(address _assetToken) external view returns (uint256);\\n\\n function getInvestmentToken(address _assetToken) external view returns (address);\\n}\\n\",\"keccak256\":\"0x28ca8cb40b050139b7416224c43de2c14fa7991e0b3769f7bab349e3422fc34f\",\"license\":\"Apache License\"},\"contracts/interfaces/IOperation.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from './IGarden.sol';\\nimport {IStrategy} from './IStrategy.sol';\\n\\n/**\\n * @title IOperation\\n * @author Babylon Finance\\n *\\n * Interface for an strategy operation\\n */\\ninterface IOperation {\\n function validateOperation(\\n address _data,\\n IGarden _garden,\\n address _integration,\\n uint256 _index\\n ) external view;\\n\\n function executeOperation(\\n address _asset,\\n uint256 _capital,\\n uint8 _assetStatus,\\n address _data,\\n IGarden _garden,\\n address _integration\\n )\\n external\\n returns (\\n address,\\n uint256,\\n uint8\\n );\\n\\n function exitOperation(\\n uint256 _percentage,\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external;\\n\\n function getNAV(\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external view returns (uint256);\\n\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x856e173e6c8e1fdbe54988df58d0805a23a6a2f8408bd4f90a488a1978e762ed\",\"license\":\"Apache License\"},\"contracts/interfaces/IPriceOracle.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol IPriceOracle)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPriceOracle\\n * @author Babylon Finance\\n *\\n * Interface for interacting with PriceOracle\\n */\\ninterface IPriceOracle {\\n /* ============ Functions ============ */\\n\\n function getPrice(address _assetOne, address _assetTwo) external view returns (uint256);\\n\\n function updateAdapters(address _assetOne, address _assetTwo) external;\\n}\\n\",\"keccak256\":\"0xa22e0e5e166f6f6714553b736ee921b916c37bc5b557042bf6042cc010d2a041\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n address,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x850597ec9a68eb86f31f13b6b77d3b31350b4ed3d0019dedfbd3550ad1a1d9e2\",\"license\":\"Apache License\"},\"contracts/interfaces/ITradeIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title ITrade\\n * @author Babylon Finance\\n *\\n * Interface for trading protocol integrations\\n */\\ninterface ITradeIntegration {\\n function trade(\\n address _strategy,\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken,\\n uint256 _minReceiveQuantity\\n ) external;\\n\\n function getConversionRates(\\n address _sourceToken,\\n address _destinationToken,\\n uint256 _sourceQuantity\\n ) external returns (uint256, uint256);\\n}\\n\",\"keccak256\":\"0x95df25f2cbfd3d82a9e22c9202f9fc2c497e90fd6e5fcfb00c4162f6447c0cbd\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"contracts/strategies/operations/LendOperation.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Operation} from './Operation.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\\nimport {ILendIntegration} from '../../interfaces/ILendIntegration.sol';\\n\\n/**\\n * @title LendOperatin\\n * @author Babylon Finance\\n *\\n * Executes a lend operation\\n */\\ncontract LendOperation is Operation {\\n using SafeMath for uint256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _controller Address of the controller\\n */\\n constructor(string memory _name, address _controller) Operation(_name, _controller) {}\\n\\n /**\\n * Sets operation data for the lend operation\\n *\\n * @param _data Operation data\\n */\\n function validateOperation(\\n address _data,\\n IGarden _garden,\\n address, /* _integration */\\n uint256 /* _index */\\n ) external view override onlyStrategy {\\n require(_data != _garden.reserveAsset(), 'Receive token must be different');\\n }\\n\\n /**\\n * Executes the lend operation\\n * @param _capital Amount of capital received from the garden\\n */\\n function executeOperation(\\n address _asset,\\n uint256 _capital,\\n uint8, /* _assetStatus */\\n address _data,\\n IGarden, /* _garden */\\n address _integration\\n )\\n external\\n override\\n onlyStrategy\\n returns (\\n address,\\n uint256,\\n uint8\\n )\\n {\\n address assetToken = _data;\\n if (assetToken != _asset) {\\n IStrategy(msg.sender).trade(_asset, _capital, assetToken);\\n }\\n uint256 numTokensToSupply = IERC20(assetToken).balanceOf(msg.sender);\\n uint256 exactAmount = ILendIntegration(_integration).getExpectedShares(assetToken, numTokensToSupply);\\n uint256 minAmountExpected = exactAmount.sub(exactAmount.preciseMul(SLIPPAGE_ALLOWED));\\n ILendIntegration(_integration).supplyTokens(msg.sender, assetToken, numTokensToSupply, minAmountExpected);\\n return (assetToken, numTokensToSupply, 1); // put as collateral\\n }\\n\\n /**\\n * Exits the lend operation.\\n * @param _percentage of capital to exit from the strategy\\n */\\n function exitOperation(\\n uint256 _percentage,\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external override onlyStrategy {\\n require(_percentage <= HUNDRED_PERCENT, 'Unwind Percentage <= 100%');\\n address assetToken = _data;\\n uint256 numTokensToRedeem =\\n IERC20(ILendIntegration(_integration).getInvestmentToken(assetToken)).balanceOf(msg.sender).preciseMul(\\n _percentage\\n );\\n ILendIntegration(_integration).redeemTokens(\\n msg.sender,\\n assetToken,\\n numTokensToRedeem,\\n ILendIntegration(_integration).getExchangeRatePerToken(assetToken).mul(\\n numTokensToRedeem.sub(numTokensToRedeem.preciseMul(SLIPPAGE_ALLOWED))\\n )\\n );\\n if (assetToken != _garden.reserveAsset()) {\\n IStrategy(msg.sender).trade(assetToken, IERC20(assetToken).balanceOf(msg.sender), _garden.reserveAsset());\\n }\\n }\\n\\n /**\\n * Gets the NAV of the lend op in the reserve asset\\n *\\n * @return _nav NAV of the strategy\\n */\\n function getNAV(\\n address _assetToken,\\n IGarden _garden,\\n address _integration\\n ) external view override onlyStrategy returns (uint256) {\\n if (!IStrategy(msg.sender).isStrategyActive()) {\\n return 0;\\n }\\n uint256 numTokensToRedeem =\\n IERC20(ILendIntegration(_integration).getInvestmentToken(_assetToken)).balanceOf(msg.sender);\\n uint256 assetTokensAmount =\\n ILendIntegration(_integration).getExchangeRatePerToken(_assetToken).mul(numTokensToRedeem);\\n uint256 price = _getPrice(_garden.reserveAsset(), _assetToken);\\n uint256 NAV = _normalizeDecimals(_assetToken, assetTokensAmount).preciseDiv(price);\\n require(NAV != 0, 'NAV has to be bigger 0');\\n return NAV;\\n }\\n}\\n\",\"keccak256\":\"0x5bf9b7784c5e4fb13a545927f58e1f4a74f2ef1a1b3bb95175313d1efabdbd0f\",\"license\":\"Apache License\"},\"contracts/strategies/operations/Operation.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {IOperation} from '../../interfaces/IOperation.sol';\\nimport {ITradeIntegration} from '../../interfaces/ITradeIntegration.sol';\\nimport {IPriceOracle} from '../../interfaces/IPriceOracle.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\n\\n/**\\n * @title LongStrategy\\n * @author Babylon Finance\\n *\\n * Holds the data for a long strategy\\n */\\nabstract contract Operation is IOperation {\\n using SafeMath for uint256;\\n /* ============ Modifiers ============ */\\n\\n modifier onlyStrategy() {\\n IStrategy strategy = IStrategy(msg.sender);\\n IGarden garden = strategy.garden();\\n require(IBabController(controller).isSystemContract(address(garden)), 'Only a garden can call this');\\n require(garden.isStrategyActiveInGarden(msg.sender), 'Sender must be a strategy');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n uint256 internal constant SLIPPAGE_ALLOWED = 1e16; // 1%\\n uint256 internal constant HUNDRED_PERCENT = 1e18; // 100%\\n address internal constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\\n\\n // Address of the controller\\n address public controller;\\n // Name of the operation\\n string public name;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _controller Address of the controller\\n */\\n constructor(string memory _name, address _controller) {\\n require(_controller != address(0), 'Controller must be defined');\\n name = _name;\\n controller = _controller;\\n }\\n\\n /* ============ Virtual External Functions ============ */\\n\\n function validateOperation(\\n address _data,\\n IGarden _garden,\\n address _integration,\\n uint256 _index\\n ) external view virtual override;\\n\\n function executeOperation(\\n address _asset,\\n uint256 _capital,\\n uint8 _assetStatus,\\n address _data,\\n IGarden _garden,\\n address _integration\\n )\\n external\\n virtual\\n override\\n returns (\\n address,\\n uint256,\\n uint8\\n );\\n\\n function exitOperation(\\n uint256 _percentage,\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external virtual override;\\n\\n function getNAV(\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external view virtual override returns (uint256);\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the name of the operation\\n */\\n function getName() external view override returns (string memory) {\\n return name;\\n }\\n\\n /**\\n * Returns the price of the pair through the price oracle\\n */\\n function _getPrice(address _assetOne, address _assetTwo) internal view returns (uint256) {\\n IPriceOracle oracle = IPriceOracle(IBabController(controller).priceOracle());\\n return oracle.getPrice(_assetOne, _assetTwo);\\n }\\n\\n function _normalizeDecimals(address _asset, uint256 _quantity) internal view returns (uint256) {\\n uint8 tokenDecimals = ERC20(_asset).decimals();\\n return tokenDecimals != 18 ? _quantity.mul(10**(18 - tokenDecimals)) : _quantity;\\n }\\n}\\n\",\"keccak256\":\"0x0baba132298f5c3b3082ee381eed5314ab4587179905af9635e038c1b1845418\",\"license\":\"Apache License\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b5060405162001c1438038062001c14833981810160405260408110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001519150829050816001600160a01b03811662000150576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c6572206d75737420626520646566696e6564000000000000604482015290519081900360640190fd5b81516200016590600190602085019062000190565b50600080546001600160a01b0319166001600160a01b0392909216919091179055506200023c915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001c8576000855562000213565b82601f10620001e357805160ff191683800117855562000213565b8280016001018555821562000213579182015b8281111562000213578251825591602001919060010190620001f6565b506200022192915062000225565b5090565b5b8082111562000221576000815560010162000226565b6119c8806200024c6000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80634222326a1161005b5780634222326a1461014757806355d9750b14610191578063c8cd307514610209578063f77c4791146102455761007d565b806306fdde031461008257806317d7de7c146100ff578063419ea18a14610107575b600080fd5b61008a610269565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100c45781810151838201526020016100ac565b50505050905090810190601f1680156100f15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61008a6102f6565b6101456004803603608081101561011d57600080fd5b508035906001600160a01b03602082013581169160408101358216916060909101351661038b565b005b61017f6004803603606081101561015d57600080fd5b506001600160a01b038135811691602081013582169160409091013516610a31565b60408051918252519081900360200190f35b6101de600480360360c08110156101a757600080fd5b506001600160a01b03813581169160208101359160ff604083013516916060810135821691608082013581169160a0013516610ee9565b604080516001600160a01b039094168452602084019290925260ff1682820152519081900360600190f35b6101456004803603608081101561021f57600080fd5b506001600160a01b0381358116916020810135821691604082013516906060013561137b565b61024d611642565b604080516001600160a01b039092168252519081900360200190f35b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102ee5780601f106102c3576101008083540402835291602001916102ee565b820191906000526020600020905b8154815290600101906020018083116102d157829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156103815780601f1061035657610100808354040283529160200191610381565b820191906000526020600020905b81548152906001019060200180831161036457829003601f168201915b5050505050905090565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156103cb57600080fd5b505afa1580156103df573d6000803e3d6000fd5b505050506040513d60208110156103f557600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561044657600080fd5b505afa15801561045a573d6000803e3d6000fd5b505050506040513d602081101561047057600080fd5b50516104c3576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b6040805162bd5cf960e51b815233600482015290516001600160a01b038316916317ab9f20916024808301926020929190829003018186803b15801561050857600080fd5b505afa15801561051c573d6000803e3d6000fd5b505050506040513d602081101561053257600080fd5b5051610585576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b670de0b6b3a76400008611156105e2576040805162461bcd60e51b815260206004820152601960248201527f556e77696e642050657263656e74616765203c3d203130302500000000000000604482015290519081900360640190fd5b600085905060006106e088866001600160a01b031663eb40e600856040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561063a57600080fd5b505afa15801561064e573d6000803e3d6000fd5b505050506040513d602081101561066457600080fd5b5051604080516370a0823160e01b815233600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b1580156106ae57600080fd5b505afa1580156106c2573d6000803e3d6000fd5b505050506040513d60208110156106d857600080fd5b505190611651565b90506001600160a01b03851663d0d2d3a233848461079161071261070b83662386f26fc10000611651565b8890611678565b8b6001600160a01b03166307b54c6f8a6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561075f57600080fd5b505afa158015610773573d6000803e3d6000fd5b505050506040513d602081101561078957600080fd5b5051906116d5565b6040518563ffffffff1660e01b815260040180856001600160a01b03168152602001846001600160a01b03168152602001838152602001828152602001945050505050600060405180830381600087803b1580156107ee57600080fd5b505af1158015610802573d6000803e3d6000fd5b50505050856001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561083f57600080fd5b505afa158015610853573d6000803e3d6000fd5b505050506040513d602081101561086957600080fd5b50516001600160a01b03838116911614610a2757336001600160a01b0316630e32db5283846001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156108da57600080fd5b505afa1580156108ee573d6000803e3d6000fd5b505050506040513d602081101561090457600080fd5b5051604080517ff85cb5c800000000000000000000000000000000000000000000000000000000815290516001600160a01b038c169163f85cb5c8916004808301926020929190829003018186803b15801561095f57600080fd5b505afa158015610973573d6000803e3d6000fd5b505050506040513d602081101561098957600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b1681526001600160a01b039485166004820152602481019390935292166044820152905160648083019260209291908290030181600087803b1580156109fa57600080fd5b505af1158015610a0e573d6000803e3d6000fd5b505050506040513d6020811015610a2457600080fd5b50505b5050505050505050565b6000803390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015610a7257600080fd5b505afa158015610a86573d6000803e3d6000fd5b505050506040513d6020811015610a9c57600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b158015610aed57600080fd5b505afa158015610b01573d6000803e3d6000fd5b505050506040513d6020811015610b1757600080fd5b5051610b6a576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b6040805162bd5cf960e51b815233600482015290516001600160a01b038316916317ab9f20916024808301926020929190829003018186803b158015610baf57600080fd5b505afa158015610bc3573d6000803e3d6000fd5b505050506040513d6020811015610bd957600080fd5b5051610c2c576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b336001600160a01b031663e4df5e1a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c6557600080fd5b505afa158015610c79573d6000803e3d6000fd5b505050506040513d6020811015610c8f57600080fd5b5051610c9e5760009250610ee0565b6000846001600160a01b031663eb40e600886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610ced57600080fd5b505afa158015610d01573d6000803e3d6000fd5b505050506040513d6020811015610d1757600080fd5b5051604080516370a0823160e01b815233600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610d6157600080fd5b505afa158015610d75573d6000803e3d6000fd5b505050506040513d6020811015610d8b57600080fd5b5051604080517f07b54c6f0000000000000000000000000000000000000000000000000000000081526001600160a01b038a811660048301529151929350600092610dfc928592908a16916307b54c6f91602480820192602092909190829003018186803b15801561075f57600080fd5b90506000610e6e886001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b158015610e3c57600080fd5b505afa158015610e50573d6000803e3d6000fd5b505050506040513d6020811015610e6657600080fd5b50518a61172e565b90506000610e8682610e808c8661185a565b906118f2565b905080610eda576040805162461bcd60e51b815260206004820152601660248201527f4e41562068617320746f20626520626967676572203000000000000000000000604482015290519081900360640190fd5b95505050505b50509392505050565b6000806000803390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2d57600080fd5b505afa158015610f41573d6000803e3d6000fd5b505050506040513d6020811015610f5757600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b158015610fa857600080fd5b505afa158015610fbc573d6000803e3d6000fd5b505050506040513d6020811015610fd257600080fd5b5051611025576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b6040805162bd5cf960e51b815233600482015290516001600160a01b038316916317ab9f20916024808301926020929190829003018186803b15801561106a57600080fd5b505afa15801561107e573d6000803e3d6000fd5b505050506040513d602081101561109457600080fd5b50516110e7576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b876001600160a01b03808216908d161461119857604080517f0e32db520000000000000000000000000000000000000000000000000000000081526001600160a01b038e81166004830152602482018e90528316604482015290513391630e32db529160648083019260209291908290030181600087803b15801561116b57600080fd5b505af115801561117f573d6000803e3d6000fd5b505050506040513d602081101561119557600080fd5b50505b6000816001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156111e757600080fd5b505afa1580156111fb573d6000803e3d6000fd5b505050506040513d602081101561121157600080fd5b5051604080517f4deef6490000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152602482018490529151929350600092918b1691634deef64991604480820192602092909190829003018186803b15801561128357600080fd5b505afa158015611297573d6000803e3d6000fd5b505050506040513d60208110156112ad57600080fd5b5051905060006112ce6112c783662386f26fc10000611651565b8390611678565b604080517ff14b57880000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03878116602483015260448201879052606482018490529151929350908c169163f14b57889160848082019260009290919082900301818387803b15801561134957600080fd5b505af115801561135d573d6000803e3d6000fd5b50959a50939850600197505050505050505096509650969350505050565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156113bb57600080fd5b505afa1580156113cf573d6000803e3d6000fd5b505050506040513d60208110156113e557600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561143657600080fd5b505afa15801561144a573d6000803e3d6000fd5b505050506040513d602081101561146057600080fd5b50516114b3576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b6040805162bd5cf960e51b815233600482015290516001600160a01b038316916317ab9f20916024808301926020929190829003018186803b1580156114f857600080fd5b505afa15801561150c573d6000803e3d6000fd5b505050506040513d602081101561152257600080fd5b5051611575576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b846001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b1580156115ae57600080fd5b505afa1580156115c2573d6000803e3d6000fd5b505050506040513d60208110156115d857600080fd5b50516001600160a01b038781169116141561163a576040805162461bcd60e51b815260206004820152601f60248201527f5265636569766520746f6b656e206d75737420626520646966666572656e7400604482015290519081900360640190fd5b505050505050565b6000546001600160a01b031681565b600061166f670de0b6b3a764000061166985856116d5565b9061190a565b90505b92915050565b6000828211156116cf576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000826116e457506000611672565b828202828482816116f157fe5b041461166f5760405162461bcd60e51b81526004018080602001828103825260218152602001806119726021913960400191505060405180910390fd5b60008054604080517f2630c12f000000000000000000000000000000000000000000000000000000008152905183926001600160a01b031691632630c12f916004808301926020929190829003018186803b15801561178c57600080fd5b505afa1580156117a0573d6000803e3d6000fd5b505050506040513d60208110156117b657600080fd5b5051604080517fac41865a0000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152868116602483015291519293509083169163ac41865a91604480820192602092909190829003018186803b15801561182657600080fd5b505afa15801561183a573d6000803e3d6000fd5b505050506040513d602081101561185057600080fd5b5051949350505050565b600080836001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561189657600080fd5b505afa1580156118aa573d6000803e3d6000fd5b505050506040513d60208110156118c057600080fd5b50519050601260ff821614156118d657826118ea565b6118ea8360ff601284900316600a0a6116d5565b949350505050565b600061166f8261166985670de0b6b3a76400006116d5565b6000808211611960576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161196957fe5b04939250505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220f052767b72946cb0dc05dcaef12410eb823cb81b5314ae47546aab761b0b95d264736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80634222326a1161005b5780634222326a1461014757806355d9750b14610191578063c8cd307514610209578063f77c4791146102455761007d565b806306fdde031461008257806317d7de7c146100ff578063419ea18a14610107575b600080fd5b61008a610269565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100c45781810151838201526020016100ac565b50505050905090810190601f1680156100f15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61008a6102f6565b6101456004803603608081101561011d57600080fd5b508035906001600160a01b03602082013581169160408101358216916060909101351661038b565b005b61017f6004803603606081101561015d57600080fd5b506001600160a01b038135811691602081013582169160409091013516610a31565b60408051918252519081900360200190f35b6101de600480360360c08110156101a757600080fd5b506001600160a01b03813581169160208101359160ff604083013516916060810135821691608082013581169160a0013516610ee9565b604080516001600160a01b039094168452602084019290925260ff1682820152519081900360600190f35b6101456004803603608081101561021f57600080fd5b506001600160a01b0381358116916020810135821691604082013516906060013561137b565b61024d611642565b604080516001600160a01b039092168252519081900360200190f35b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102ee5780601f106102c3576101008083540402835291602001916102ee565b820191906000526020600020905b8154815290600101906020018083116102d157829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156103815780601f1061035657610100808354040283529160200191610381565b820191906000526020600020905b81548152906001019060200180831161036457829003601f168201915b5050505050905090565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156103cb57600080fd5b505afa1580156103df573d6000803e3d6000fd5b505050506040513d60208110156103f557600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561044657600080fd5b505afa15801561045a573d6000803e3d6000fd5b505050506040513d602081101561047057600080fd5b50516104c3576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b6040805162bd5cf960e51b815233600482015290516001600160a01b038316916317ab9f20916024808301926020929190829003018186803b15801561050857600080fd5b505afa15801561051c573d6000803e3d6000fd5b505050506040513d602081101561053257600080fd5b5051610585576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b670de0b6b3a76400008611156105e2576040805162461bcd60e51b815260206004820152601960248201527f556e77696e642050657263656e74616765203c3d203130302500000000000000604482015290519081900360640190fd5b600085905060006106e088866001600160a01b031663eb40e600856040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561063a57600080fd5b505afa15801561064e573d6000803e3d6000fd5b505050506040513d602081101561066457600080fd5b5051604080516370a0823160e01b815233600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b1580156106ae57600080fd5b505afa1580156106c2573d6000803e3d6000fd5b505050506040513d60208110156106d857600080fd5b505190611651565b90506001600160a01b03851663d0d2d3a233848461079161071261070b83662386f26fc10000611651565b8890611678565b8b6001600160a01b03166307b54c6f8a6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561075f57600080fd5b505afa158015610773573d6000803e3d6000fd5b505050506040513d602081101561078957600080fd5b5051906116d5565b6040518563ffffffff1660e01b815260040180856001600160a01b03168152602001846001600160a01b03168152602001838152602001828152602001945050505050600060405180830381600087803b1580156107ee57600080fd5b505af1158015610802573d6000803e3d6000fd5b50505050856001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561083f57600080fd5b505afa158015610853573d6000803e3d6000fd5b505050506040513d602081101561086957600080fd5b50516001600160a01b03838116911614610a2757336001600160a01b0316630e32db5283846001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156108da57600080fd5b505afa1580156108ee573d6000803e3d6000fd5b505050506040513d602081101561090457600080fd5b5051604080517ff85cb5c800000000000000000000000000000000000000000000000000000000815290516001600160a01b038c169163f85cb5c8916004808301926020929190829003018186803b15801561095f57600080fd5b505afa158015610973573d6000803e3d6000fd5b505050506040513d602081101561098957600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b1681526001600160a01b039485166004820152602481019390935292166044820152905160648083019260209291908290030181600087803b1580156109fa57600080fd5b505af1158015610a0e573d6000803e3d6000fd5b505050506040513d6020811015610a2457600080fd5b50505b5050505050505050565b6000803390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015610a7257600080fd5b505afa158015610a86573d6000803e3d6000fd5b505050506040513d6020811015610a9c57600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b158015610aed57600080fd5b505afa158015610b01573d6000803e3d6000fd5b505050506040513d6020811015610b1757600080fd5b5051610b6a576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b6040805162bd5cf960e51b815233600482015290516001600160a01b038316916317ab9f20916024808301926020929190829003018186803b158015610baf57600080fd5b505afa158015610bc3573d6000803e3d6000fd5b505050506040513d6020811015610bd957600080fd5b5051610c2c576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b336001600160a01b031663e4df5e1a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c6557600080fd5b505afa158015610c79573d6000803e3d6000fd5b505050506040513d6020811015610c8f57600080fd5b5051610c9e5760009250610ee0565b6000846001600160a01b031663eb40e600886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610ced57600080fd5b505afa158015610d01573d6000803e3d6000fd5b505050506040513d6020811015610d1757600080fd5b5051604080516370a0823160e01b815233600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610d6157600080fd5b505afa158015610d75573d6000803e3d6000fd5b505050506040513d6020811015610d8b57600080fd5b5051604080517f07b54c6f0000000000000000000000000000000000000000000000000000000081526001600160a01b038a811660048301529151929350600092610dfc928592908a16916307b54c6f91602480820192602092909190829003018186803b15801561075f57600080fd5b90506000610e6e886001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b158015610e3c57600080fd5b505afa158015610e50573d6000803e3d6000fd5b505050506040513d6020811015610e6657600080fd5b50518a61172e565b90506000610e8682610e808c8661185a565b906118f2565b905080610eda576040805162461bcd60e51b815260206004820152601660248201527f4e41562068617320746f20626520626967676572203000000000000000000000604482015290519081900360640190fd5b95505050505b50509392505050565b6000806000803390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2d57600080fd5b505afa158015610f41573d6000803e3d6000fd5b505050506040513d6020811015610f5757600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b158015610fa857600080fd5b505afa158015610fbc573d6000803e3d6000fd5b505050506040513d6020811015610fd257600080fd5b5051611025576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b6040805162bd5cf960e51b815233600482015290516001600160a01b038316916317ab9f20916024808301926020929190829003018186803b15801561106a57600080fd5b505afa15801561107e573d6000803e3d6000fd5b505050506040513d602081101561109457600080fd5b50516110e7576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b876001600160a01b03808216908d161461119857604080517f0e32db520000000000000000000000000000000000000000000000000000000081526001600160a01b038e81166004830152602482018e90528316604482015290513391630e32db529160648083019260209291908290030181600087803b15801561116b57600080fd5b505af115801561117f573d6000803e3d6000fd5b505050506040513d602081101561119557600080fd5b50505b6000816001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156111e757600080fd5b505afa1580156111fb573d6000803e3d6000fd5b505050506040513d602081101561121157600080fd5b5051604080517f4deef6490000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152602482018490529151929350600092918b1691634deef64991604480820192602092909190829003018186803b15801561128357600080fd5b505afa158015611297573d6000803e3d6000fd5b505050506040513d60208110156112ad57600080fd5b5051905060006112ce6112c783662386f26fc10000611651565b8390611678565b604080517ff14b57880000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03878116602483015260448201879052606482018490529151929350908c169163f14b57889160848082019260009290919082900301818387803b15801561134957600080fd5b505af115801561135d573d6000803e3d6000fd5b50959a50939850600197505050505050505096509650969350505050565b60003390506000816001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156113bb57600080fd5b505afa1580156113cf573d6000803e3d6000fd5b505050506040513d60208110156113e557600080fd5b5051600054604080516313bc6d4b60e01b81526001600160a01b03808516600483015291519394509116916313bc6d4b91602480820192602092909190829003018186803b15801561143657600080fd5b505afa15801561144a573d6000803e3d6000fd5b505050506040513d602081101561146057600080fd5b50516114b3576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920612067617264656e2063616e2063616c6c20746869730000000000604482015290519081900360640190fd5b6040805162bd5cf960e51b815233600482015290516001600160a01b038316916317ab9f20916024808301926020929190829003018186803b1580156114f857600080fd5b505afa15801561150c573d6000803e3d6000fd5b505050506040513d602081101561152257600080fd5b5051611575576040805162461bcd60e51b815260206004820152601960248201527f53656e646572206d757374206265206120737472617465677900000000000000604482015290519081900360640190fd5b846001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b1580156115ae57600080fd5b505afa1580156115c2573d6000803e3d6000fd5b505050506040513d60208110156115d857600080fd5b50516001600160a01b038781169116141561163a576040805162461bcd60e51b815260206004820152601f60248201527f5265636569766520746f6b656e206d75737420626520646966666572656e7400604482015290519081900360640190fd5b505050505050565b6000546001600160a01b031681565b600061166f670de0b6b3a764000061166985856116d5565b9061190a565b90505b92915050565b6000828211156116cf576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000826116e457506000611672565b828202828482816116f157fe5b041461166f5760405162461bcd60e51b81526004018080602001828103825260218152602001806119726021913960400191505060405180910390fd5b60008054604080517f2630c12f000000000000000000000000000000000000000000000000000000008152905183926001600160a01b031691632630c12f916004808301926020929190829003018186803b15801561178c57600080fd5b505afa1580156117a0573d6000803e3d6000fd5b505050506040513d60208110156117b657600080fd5b5051604080517fac41865a0000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152868116602483015291519293509083169163ac41865a91604480820192602092909190829003018186803b15801561182657600080fd5b505afa15801561183a573d6000803e3d6000fd5b505050506040513d602081101561185057600080fd5b5051949350505050565b600080836001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561189657600080fd5b505afa1580156118aa573d6000803e3d6000fd5b505050506040513d60208110156118c057600080fd5b50519050601260ff821614156118d657826118ea565b6118ea8360ff601284900316600a0a6116d5565b949350505050565b600061166f8261166985670de0b6b3a76400006116d5565b6000808211611960576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161196957fe5b04939250505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220f052767b72946cb0dc05dcaef12410eb823cb81b5314ae47546aab761b0b95d264736f6c63430007060033", "devdoc": { "author": "Babylon Finance Executes a lend operation", "kind": "dev", @@ -281,7 +281,7 @@ "storageLayout": { "storage": [ { - "astId": 33459, + "astId": 33052, "contract": "contracts/strategies/operations/LendOperation.sol:LendOperation", "label": "controller", "offset": 0, @@ -289,7 +289,7 @@ "type": "t_address" }, { - "astId": 33461, + "astId": 33054, "contract": "contracts/strategies/operations/LendOperation.sol:LendOperation", "label": "name", "offset": 0, diff --git a/deployments/artifacts/mainnet/OneInchPoolIntegration.json b/deployments/artifacts/mainnet/OneInchPoolIntegration.json index 44bf73173..725913448 100644 --- a/deployments/artifacts/mainnet/OneInchPoolIntegration.json +++ b/deployments/artifacts/mainnet/OneInchPoolIntegration.json @@ -1,5 +1,5 @@ { - "address": "0xD0A53010217EBF8C93f44d0C607C04552728a400", + "address": "0x830F694737c1e4E5F80135b87cF0924987097f49", "abi": [ { "inputs": [ @@ -345,31 +345,31 @@ "type": "function" } ], - "transactionHash": "0xdbc470833a5b86aa35dd061e4a4191e6374bd631f51df2c2f0ea807c1bb38ee2", + "transactionHash": "0xfdcbeb4d2f0fab938bb8deb433e9020684587a1f52e3126b64390b3e99c46a9f", "receipt": { "to": null, "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", - "contractAddress": "0xD0A53010217EBF8C93f44d0C607C04552728a400", - "transactionIndex": 169, - "gasUsed": "1975549", + "contractAddress": "0x830F694737c1e4E5F80135b87cF0924987097f49", + "transactionIndex": 125, + "gasUsed": "1975561", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x735b6d4a46f7f3e1b3f5a692b828217ac11e6f9fd51854b74212005c20c4ea44", - "transactionHash": "0xdbc470833a5b86aa35dd061e4a4191e6374bd631f51df2c2f0ea807c1bb38ee2", + "blockHash": "0x0374104b910b68068784aaa94b5c9592bc0afa7194c1b5177c71b0cc0d516a5f", + "transactionHash": "0xfdcbeb4d2f0fab938bb8deb433e9020684587a1f52e3126b64390b3e99c46a9f", "logs": [], - "blockNumber": 12360984, - "cumulativeGasUsed": "9758749", + "blockNumber": 12451296, + "cumulativeGasUsed": "9000386", "status": 1, "byzantium": true }, "args": [ - "0xffe7c30daDb1B132b86aB7bbede496615d54c8Ac", + "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F", "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", "0xbAF9A5d4b0052359326A6CDAb54BABAa3a3A9643" ], - "solcInputHash": "a02a2075cf667a20c416d2d0a5e8f337", - "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_weth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_mooniswapFactoryAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_pool\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_poolTokensOut\",\"type\":\"uint256\"}],\"name\":\"PoolEntered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_pool\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_poolTokensIn\",\"type\":\"uint256\"}],\"name\":\"PoolExited\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_poolTokensIn\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"_tokensOut\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_minAmountsOut\",\"type\":\"uint256[]\"}],\"name\":\"exitPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_liquidity\",\"type\":\"uint256\"}],\"name\":\"getPoolMinAmountsOut\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_minAmountsOut\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"}],\"name\":\"getPoolTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getPoolTokensOut\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"getPoolWeights\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"initializedByGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"}],\"name\":\"isPool\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_poolTokensOut\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"_tokensIn\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_maxAmountsIn\",\"type\":\"uint256[]\"}],\"name\":\"joinPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"mooniswapFactory\",\"outputs\":[{\"internalType\":\"contract IMooniswapFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Protocol Kyber protocol trade integration\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of the controller\",\"_mooniswapFactoryAddress\":\"Address of the Mooniswap factory\",\"_weth\":\"Address of the WETH ERC20\"}},\"exitPool(address,address,uint256,address[],uint256[])\":{\"params\":{\"_minAmountsOut\":\"Array of min token quantities to receive from the pool\",\"_poolAddress\":\"Address of the pool token to join\",\"_poolTokensIn\":\"Pool tokens to exchange for the underlying tokens\",\"_strategy\":\"Address of the strategy\",\"_tokensOut\":\"Array of token addresses to withdraw\"}},\"isPool(address)\":{\"params\":{\"_poolAddress\":\"Pool address to check\"},\"returns\":{\"_0\":\"bool True if the address is a pool\"}},\"joinPool(address,address,uint256,address[],uint256[])\":{\"params\":{\"_maxAmountsIn\":\"Array of max token quantities to pull out from the garden\",\"_poolAddress\":\"Address of the pool token to join\",\"_poolTokensOut\":\"Min amount of pool tokens to receive\",\"_strategy\":\"Address of the strategy\",\"_tokensIn\":\"Array of token addresses to deposit\"}}},\"title\":\"BalancerIntegration\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates the integration\"},\"exitPool(address,address,uint256,address[],uint256[])\":{\"notice\":\"Exits a liquidity pool. Accrue protocol fee (if any)\"},\"getName()\":{\"notice\":\"Returns the name of the integration\"},\"isPool(address)\":{\"notice\":\"Checks whether a pool address is valid\"},\"joinPool(address,address,uint256,address[],uint256[])\":{\"notice\":\"Joins a pool\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/integrations/pool/OneInchPoolIntegration.sol\":\"OneInchPoolIntegration\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\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 /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\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, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x7b2b8baa20fd60ab4a328c8e34c64a353651b80ba4b5b157cbb61813f6f85d55\",\"license\":\"MIT\"},\"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol\":{\"content\":\"pragma solidity >=0.5.0;\\n\\ninterface IUniswapV2Pair {\\n event Approval(address indexed owner, address indexed spender, uint value);\\n event Transfer(address indexed from, address indexed to, uint value);\\n\\n function name() external pure returns (string memory);\\n function symbol() external pure returns (string memory);\\n function decimals() external pure returns (uint8);\\n function totalSupply() external view returns (uint);\\n function balanceOf(address owner) external view returns (uint);\\n function allowance(address owner, address spender) external view returns (uint);\\n\\n function approve(address spender, uint value) external returns (bool);\\n function transfer(address to, uint value) external returns (bool);\\n function transferFrom(address from, address to, uint value) external returns (bool);\\n\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n function PERMIT_TYPEHASH() external pure returns (bytes32);\\n function nonces(address owner) external view returns (uint);\\n\\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\\n\\n event Mint(address indexed sender, uint amount0, uint amount1);\\n event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\\n event Swap(\\n address indexed sender,\\n uint amount0In,\\n uint amount1In,\\n uint amount0Out,\\n uint amount1Out,\\n address indexed to\\n );\\n event Sync(uint112 reserve0, uint112 reserve1);\\n\\n function MINIMUM_LIQUIDITY() external pure returns (uint);\\n function factory() external view returns (address);\\n function token0() external view returns (address);\\n function token1() external view returns (address);\\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\\n function price0CumulativeLast() external view returns (uint);\\n function price1CumulativeLast() external view returns (uint);\\n function kLast() external view returns (uint);\\n\\n function mint(address to) external returns (uint liquidity);\\n function burn(address to) external returns (uint amount0, uint amount1);\\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\\n function skim(address to) external;\\n function sync() external;\\n\\n function initialize(address, address) external;\\n}\\n\",\"keccak256\":\"0x7c9bc70e5996c763e02ff38905282bc24fb242b0ef2519a003b36824fc524a4b\"},\"contracts/integrations/BaseIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IIntegration} from '../interfaces/IIntegration.sol';\\nimport {IWETH} from '../interfaces/external/weth/IWETH.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\n\\n/**\\n * @title BaseIntegration\\n * @author Babylon Finance\\n *\\n * Abstract class that houses common Integration-related state and functions.\\n */\\nabstract contract BaseIntegration {\\n using SafeCast for int256;\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlySystemContract() {\\n require(IBabController(controller).isSystemContract(msg.sender), 'Only system can call this');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the controller\\n address public controller;\\n // Wrapped ETH address\\n address public immutable weth;\\n // Name of the integration\\n string public name;\\n mapping(address => bool) public initializedByGarden;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) {\\n require(_controller != address(0), 'Controller must be defined');\\n name = _name;\\n controller = _controller;\\n weth = _weth;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the name of the integration\\n */\\n function getName() external view returns (string memory) {\\n return name;\\n }\\n}\\n\",\"keccak256\":\"0xf15da8b024a5a4f205b363420cb5851fd1c4225970999aed5f00d829bbd4f638\",\"license\":\"Apache License\"},\"contracts/integrations/pool/OneInchPoolIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';\\nimport {PoolIntegration} from './PoolIntegration.sol';\\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\\nimport {IMooniswapFactory} from '../../interfaces/external/1inch/IMooniswapFactory.sol';\\nimport {IMooniswap} from '../../interfaces/external/1inch/IMooniswap.sol';\\n\\n/**\\n * @title BalancerIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Kyber protocol trade integration\\n */\\ncontract OneInchPoolIntegration is PoolIntegration {\\n using SafeMath for uint256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ State Variables ============ */\\n\\n // Address of Uniswap V2 Router\\n IMooniswapFactory public mooniswapFactory;\\n\\n /* ============ Constants ============ */\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _controller Address of the controller\\n * @param _weth Address of the WETH ERC20\\n * @param _mooniswapFactoryAddress Address of the Mooniswap factory\\n */\\n constructor(\\n address _controller,\\n address _weth,\\n address _mooniswapFactoryAddress\\n ) PoolIntegration('oneinch_pool', _weth, _controller) {\\n mooniswapFactory = IMooniswapFactory(_mooniswapFactoryAddress);\\n }\\n\\n /* ============ External Functions ============ */\\n\\n function getPoolTokens(address _poolAddress) external view override returns (address[] memory) {\\n return IMooniswap(_poolAddress).getTokens();\\n }\\n\\n function getPoolWeights(\\n address /* _poolAddress */\\n ) external pure override returns (uint256[] memory) {\\n uint256[] memory result = new uint256[](2);\\n result[0] = 5e17; // 50%\\n result[1] = 5e17; // 50%\\n return result;\\n }\\n\\n function getPoolTokensOut(\\n address, /* _poolAddress */\\n address, /* _poolToken */\\n uint256 /* _maxAmountsIn */\\n ) external pure override returns (uint256) {\\n // return 1 since _poolTokensOut are not used\\n return 1;\\n }\\n\\n function getPoolMinAmountsOut(address _poolAddress, uint256 _liquidity)\\n external\\n view\\n override\\n returns (uint256[] memory _minAmountsOut)\\n {\\n address[] memory tokens = IMooniswap(_poolAddress).getTokens();\\n uint256 totalSupply = IMooniswap(_poolAddress).totalSupply();\\n uint256[] memory result = new uint256[](2);\\n uint256 token0Balance =\\n (tokens[0] != address(0) ? IERC20(tokens[0]).balanceOf(_poolAddress) : _poolAddress.balance);\\n uint256 token1Balance =\\n (tokens[1] != address(0) ? IERC20(tokens[1]).balanceOf(_poolAddress) : _poolAddress.balance);\\n result[0] = token0Balance.mul(_liquidity).div(totalSupply).preciseMul(1e18 - SLIPPAGE_ALLOWED);\\n result[1] = token1Balance.mul(_liquidity).div(totalSupply).preciseMul(1e18 - SLIPPAGE_ALLOWED);\\n return result;\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n function _isPool(address _poolAddress) internal view override returns (bool) {\\n return IMooniswapFactory(mooniswapFactory).isPool(IMooniswap(_poolAddress));\\n }\\n\\n function _getSpender(address _poolAddress) internal pure override returns (address) {\\n return _poolAddress;\\n }\\n\\n /**\\n * Return join pool calldata which is already generated from the pool API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * hparam _poolTokensOut Amount of pool tokens to send\\n * @param _tokensIn Addresses of tokens to send to the pool\\n * @param _maxAmountsIn Amounts of tokens to send to the pool\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getJoinPoolCalldata(\\n address, /* _strategy */\\n address _poolAddress,\\n uint256, /* _poolTokensOut */\\n address[] calldata _tokensIn,\\n uint256[] calldata _maxAmountsIn\\n )\\n internal\\n pure\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n // Encode method data for Garden to invoke\\n require(_tokensIn.length == 2, 'Two tokens required');\\n require(_maxAmountsIn.length == 2, 'Two amounts required');\\n bytes memory methodData =\\n abi.encodeWithSignature(\\n 'deposit(uint256[2],uint256[2])',\\n _maxAmountsIn[0],\\n _maxAmountsIn[1],\\n _maxAmountsIn[0].sub(_maxAmountsIn[0].preciseMul(SLIPPAGE_ALLOWED * 2)),\\n _maxAmountsIn[1].sub(_maxAmountsIn[1].preciseMul(SLIPPAGE_ALLOWED * 2))\\n );\\n uint256 value = 0;\\n // Add ETH if one of the tokens\\n if (_tokensIn[0] == address(0)) {\\n value = _maxAmountsIn[0];\\n }\\n if (_tokensIn[1] == address(0)) {\\n value = _maxAmountsIn[1];\\n }\\n\\n return (address(_poolAddress), value, methodData);\\n }\\n\\n /**\\n * Return exit pool calldata which is already generated from the pool API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * @param _poolTokensIn Amount of pool tokens to receive\\n * @param _tokensOut Addresses of tokens to receive\\n * @param _minAmountsOut Amounts of pool tokens to receive\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getExitPoolCalldata(\\n address, /* _strategy */\\n address _poolAddress,\\n uint256 _poolTokensIn,\\n address[] calldata _tokensOut,\\n uint256[] calldata _minAmountsOut\\n )\\n internal\\n pure\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n require(_tokensOut.length == 2, 'Two tokens required');\\n require(_minAmountsOut.length == 2, 'Two amounts required');\\n // Encode method data for Garden to invoke\\n bytes memory methodData = abi.encodeWithSignature('withdraw(uint256,uint256[])', _poolTokensIn, _minAmountsOut);\\n\\n return (address(_poolAddress), 0, methodData);\\n }\\n}\\n\",\"keccak256\":\"0xba7c34280b18e71de8a81ddff7383a136b0583439568557d893f91dd9bcd4e9f\",\"license\":\"Apache License\"},\"contracts/integrations/pool/PoolIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\n\\nimport {IPoolIntegration} from '../../interfaces/IPoolIntegration.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\n\\nimport {BaseIntegration} from '../BaseIntegration.sol';\\n\\n/**\\n * @title PoolIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Base class for integration with trading protocols\\n */\\nabstract contract PoolIntegration is BaseIntegration, ReentrancyGuard, IPoolIntegration {\\n using SafeMath for uint256;\\n using SafeCast for uint256;\\n\\n /* ============ Struct ============ */\\n\\n struct PoolInfo {\\n IGarden garden; // Garden address\\n IStrategy strategy; // Strategy address\\n address pool; // Pool address\\n uint256 totalSupply; // Total Supply of the pool\\n uint256 poolTokensInTransaction; // Pool tokens affected by this transaction\\n uint256 poolTokensInStrategy; // Pool tokens strategy balance\\n uint256[] limitPoolTokenQuantities;\\n }\\n\\n /* ============ Events ============ */\\n\\n event PoolEntered(address indexed _strategy, address indexed _garden, address _pool, uint256 _poolTokensOut);\\n\\n event PoolExited(address indexed _strategy, address indexed _garden, address _pool, uint256 _poolTokensIn);\\n\\n /* ============ Constants ============ */\\n\\n uint256 internal constant SLIPPAGE_ALLOWED = 1e16; // 1%\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) BaseIntegration(_name, _weth, _controller) {}\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Joins a pool\\n *\\n * @param _strategy Address of the strategy\\n * @param _poolAddress Address of the pool token to join\\n * @param _poolTokensOut Min amount of pool tokens to receive\\n * @param _tokensIn Array of token addresses to deposit\\n * @param _maxAmountsIn Array of max token quantities to pull out from the garden\\n */\\n function joinPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensOut,\\n address[] calldata _tokensIn,\\n uint256[] calldata _maxAmountsIn\\n ) external override nonReentrant onlySystemContract {\\n PoolInfo memory poolInfo = _createPoolInfo(_strategy, _poolAddress, _poolTokensOut, _tokensIn, _maxAmountsIn);\\n _validatePreJoinPoolData(poolInfo);\\n // Approve spending of the tokens\\n for (uint256 i = 0; i < _tokensIn.length; i++) {\\n // No need to approve ETH\\n if (_tokensIn[i] != address(0)) {\\n poolInfo.strategy.invokeApprove(_getSpender(_poolAddress), _tokensIn[i], _maxAmountsIn[i]);\\n }\\n }\\n (address targetPool, uint256 callValue, bytes memory methodData) =\\n _getJoinPoolCalldata(_strategy, _poolAddress, _poolTokensOut, _tokensIn, _maxAmountsIn);\\n poolInfo.strategy.invokeFromIntegration(targetPool, callValue, methodData);\\n poolInfo.poolTokensInTransaction = IERC20(poolInfo.pool).balanceOf(address(poolInfo.strategy)).sub(\\n poolInfo.poolTokensInStrategy\\n );\\n _validatePostJoinPoolData(poolInfo);\\n\\n emit PoolEntered(address(poolInfo.strategy), address(poolInfo.garden), poolInfo.pool, _poolTokensOut);\\n }\\n\\n /**\\n * Exits a liquidity pool. Accrue protocol fee (if any)\\n *\\n * @param _strategy Address of the strategy\\n * @param _poolAddress Address of the pool token to join\\n * @param _poolTokensIn Pool tokens to exchange for the underlying tokens\\n * @param _tokensOut Array of token addresses to withdraw\\n * @param _minAmountsOut Array of min token quantities to receive from the pool\\n */\\n function exitPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensIn,\\n address[] calldata _tokensOut,\\n uint256[] calldata _minAmountsOut\\n ) external override nonReentrant onlySystemContract {\\n PoolInfo memory poolInfo = _createPoolInfo(_strategy, _poolAddress, _poolTokensIn, _tokensOut, _minAmountsOut);\\n _validatePreExitPoolData(poolInfo);\\n // Approve spending of the pool token\\n poolInfo.strategy.invokeApprove(_getSpender(_poolAddress), _poolAddress, _poolTokensIn);\\n\\n (address targetPool, uint256 callValue, bytes memory methodData) =\\n _getExitPoolCalldata(_strategy, _poolAddress, _poolTokensIn, _tokensOut, _minAmountsOut);\\n poolInfo.strategy.invokeFromIntegration(targetPool, callValue, methodData);\\n _validatePostExitPoolData(poolInfo);\\n\\n emit PoolExited(address(poolInfo.strategy), address(poolInfo.garden), poolInfo.pool, _poolTokensIn);\\n }\\n\\n /**\\n * Checks whether a pool address is valid\\n *\\n * @param _poolAddress Pool address to check\\n * @return bool True if the address is a pool\\n */\\n function isPool(address _poolAddress) external view override returns (bool) {\\n return _isPool(_poolAddress);\\n }\\n\\n function getPoolTokens(\\n address /* _poolAddress */\\n ) external view virtual override returns (address[] memory);\\n\\n function getPoolWeights(\\n address /*_poolAddress */\\n ) external view virtual override returns (uint256[] memory);\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Create and return PoolInfo struct\\n *\\n * @param _strategy Address of the strategy\\n * @param _pool Address of the pool\\n * @param _poolTokensInTransaction Number of pool tokens involved\\n * hparam _poolTokens Addresseses of the pool tokens\\n * @param _limitPoolTokenQuantities Limit quantity of the pool tokens\\n *\\n * return PoolInfo Struct containing data for pool\\n */\\n function _createPoolInfo(\\n address _strategy,\\n address _pool,\\n uint256 _poolTokensInTransaction,\\n address[] calldata, /* _poolTokens */\\n uint256[] calldata _limitPoolTokenQuantities\\n ) internal view returns (PoolInfo memory) {\\n PoolInfo memory poolInfo;\\n poolInfo.strategy = IStrategy(_strategy);\\n poolInfo.garden = IGarden(poolInfo.strategy.garden());\\n poolInfo.pool = _pool;\\n poolInfo.totalSupply = IERC20(_pool).totalSupply();\\n poolInfo.poolTokensInStrategy = IERC20(_pool).balanceOf(_strategy);\\n poolInfo.poolTokensInTransaction = _poolTokensInTransaction;\\n poolInfo.limitPoolTokenQuantities = _limitPoolTokenQuantities;\\n\\n return poolInfo;\\n }\\n\\n /**\\n * Validate pre pool join data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePreJoinPoolData(PoolInfo memory _poolInfo) internal view {\\n require(_isPool(_poolInfo.pool), 'The pool address is not valid');\\n require(_poolInfo.poolTokensInTransaction > 0, 'Min pool tokens to receive must be greater than 0');\\n }\\n\\n /**\\n * Validate pre pool data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePreExitPoolData(PoolInfo memory _poolInfo) internal view {\\n require(_isPool(_poolInfo.pool), 'The pool address is not valid');\\n require(_poolInfo.poolTokensInTransaction > 0, 'Pool tokens to exchange must be greater than 0');\\n require(\\n _poolInfo.poolTokensInStrategy >= _poolInfo.poolTokensInTransaction,\\n 'The strategy does not have enough pool tokens'\\n );\\n }\\n\\n /**\\n * Validate post join pool data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePostJoinPoolData(PoolInfo memory _poolInfo) internal view {\\n require(\\n (IERC20(_poolInfo.pool).balanceOf(address(_poolInfo.strategy)) > _poolInfo.poolTokensInStrategy),\\n 'The strategy did not receive the pool tokens'\\n );\\n }\\n\\n /**\\n * Validate post exit pool data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePostExitPoolData(PoolInfo memory _poolInfo) internal view {\\n require(\\n IERC20(_poolInfo.pool).balanceOf(address(_poolInfo.strategy)) ==\\n _poolInfo.poolTokensInStrategy - _poolInfo.poolTokensInTransaction,\\n 'The strategy did not return the pool tokens'\\n );\\n // TODO: validate individual tokens received\\n }\\n\\n /**\\n * Return join pool calldata which is already generated from the pool API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * hparam _poolTokensOut Amount of pool tokens to send\\n * hparam _tokensIn Addresses of tokens to send to the pool\\n * hparam _maxAmountsIn Amounts of tokens to send to the pool\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getJoinPoolCalldata(\\n address, /* _strategy */\\n address, /* _poolAddress */\\n uint256, /* _poolTokensOut */\\n address[] calldata, /* _tokensIn */\\n uint256[] calldata /* _maxAmountsIn */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n /**\\n * Return exit pool calldata which is already generated from the pool API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * hparam _poolTokensIn Amount of pool tokens to receive\\n * hparam _tokensOut Addresses of tokens to receive\\n * hparam _minAmountsOut Amounts of pool tokens to receive\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getExitPoolCalldata(\\n address, /* _strategy */\\n address, /* _poolAddress */\\n uint256, /* _poolTokensIn */\\n address[] calldata, /* _tokensOut */\\n uint256[] calldata /* _minAmountsOut */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n function _isPool(\\n address /* _poolAddress */\\n ) internal view virtual returns (bool);\\n\\n function _getSpender(\\n address /* _poolAddress */\\n ) internal view virtual returns (address);\\n}\\n\",\"keccak256\":\"0x0b8b81675c457a05c1a2ab85cf840cd8504bb7a6a1d68c0969d80755b423c3e6\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityMinimum(uint256 _minRiskyPairLiquidityEth) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minRiskyPairLiquidityEth() external view returns (uint256);\\n\\n function getUniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0x57cf4ece98219f805a416e8c24728d30d9b37c4126d66785d2617b97e35ffae6\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function nftAddress() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategy(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function reenableEthForStrategies() external;\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x5e460136e0b45024ea1c1f32cde607f3ce75dd5b14cee34007d6bbd08beabc82\",\"license\":\"Apache License\"},\"contracts/interfaces/IIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIntegration\\n * @author Babylon Finance\\n *\\n * Interface for protocol integrations\\n */\\ninterface IIntegration {\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xee03c9274ddf3257e3bfd2bb229fea3412c9105f178e64174f59efeafd53182c\",\"license\":\"Apache License\"},\"contracts/interfaces/IPoolIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPoolIntegration\\n * @author Babylon Finance\\n *\\n * Interface for liquiditypool protocol integrations\\n */\\ninterface IPoolIntegration {\\n function joinPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensOut,\\n address[] memory _poolTokens,\\n uint256[] memory _maxAmountsIn\\n ) external;\\n\\n function exitPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensIn,\\n address[] memory _poolTokens,\\n uint256[] memory _minAmountsOut\\n ) external;\\n\\n function getPoolTokens(address _poolAddress) external view returns (address[] memory);\\n\\n function getPoolWeights(address _poolAddress) external view returns (uint256[] memory);\\n\\n function getPoolTokensOut(\\n address _poolAdress,\\n address _tokenAddress,\\n uint256 _maxAmountsIn\\n ) external view returns (uint256);\\n\\n function getPoolMinAmountsOut(address _poolAddress, uint256 _poolTokenAmount)\\n external\\n view\\n returns (uint256[] memory _minAmountsOut);\\n\\n function isPool(address _poolAddress) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xee7df0934dad8d729ee6dacf85e1ec327a0c8e17bcabaa2afa7d14d93325f9ac\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital,\\n address _strategyNft\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function strategyNft() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x4396906e436eb68c96715e0a53ae1656ac5d7934ebdaeb58ec3c33953465bc39\",\"license\":\"Apache License\"},\"contracts/interfaces/external/1inch/IMooniswap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface IMooniswap is IERC20 {\\n function getTokens() external view returns (address[] memory _tokens);\\n\\n function tokens(uint256 i) external view returns (IERC20);\\n\\n function getBalanceForAddition(IERC20 token) external view returns (uint256);\\n\\n function getBalanceForRemoval(IERC20 token) external view returns (uint256);\\n\\n function getReturn(\\n IERC20 src,\\n IERC20 dst,\\n uint256 amount\\n ) external view returns (uint256);\\n\\n function deposit(uint256[2] memory maxAmounts, uint256[2] memory minAmounts)\\n external\\n payable\\n returns (uint256 fairSupply, uint256[2] memory receivedAmounts);\\n\\n function depositFor(\\n uint256[2] memory maxAmounts,\\n uint256[2] memory minAmounts,\\n address target\\n ) external payable returns (uint256 fairSupply, uint256[2] memory receivedAmounts);\\n\\n function withdraw(uint256 amount, uint256[] memory minReturns)\\n external\\n returns (uint256[2] memory withdrawnAmounts);\\n\\n function withdrawFor(\\n uint256 amount,\\n uint256[] memory minReturns,\\n address payable target\\n ) external returns (uint256[2] memory withdrawnAmounts);\\n\\n function swap(\\n IERC20 src,\\n IERC20 dst,\\n uint256 amount,\\n uint256 minReturn,\\n address referral\\n ) external payable returns (uint256 result);\\n\\n function swapFor(\\n IERC20 src,\\n IERC20 dst,\\n uint256 amount,\\n uint256 minReturn,\\n address referral,\\n address payable receiver\\n ) external payable returns (uint256 result);\\n}\\n\",\"keccak256\":\"0x16f0a33e6bd490cba4db46c24ae12c0386a75a47896efa35735a2cd0e7742cfe\",\"license\":\"MIT\"},\"contracts/interfaces/external/1inch/IMooniswapFactory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport './IMooniswap.sol';\\nimport './IMooniswapFactoryGovernance.sol';\\n\\ninterface IMooniswapFactory is IMooniswapFactoryGovernance {\\n function pools(IERC20 token0, IERC20 token1) external view returns (IMooniswap);\\n\\n function isPool(IMooniswap mooniswap) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5f1aea26f1950be4af5861b3551acc5820181d62df7641cb88540bb06e8d4911\",\"license\":\"MIT\"},\"contracts/interfaces/external/1inch/IMooniswapFactoryGovernance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\ninterface IMooniswapFactoryGovernance {\\n function shareParameters()\\n external\\n view\\n returns (\\n uint256 _referralShare,\\n uint256 _governanceShare,\\n address _governanceWallet,\\n address _referralFeeReceiver\\n );\\n\\n function defaults()\\n external\\n view\\n returns (\\n uint256 _defaultFee,\\n uint256 _defaultSlippageFee,\\n uint256 _defaultDecayPeriod\\n );\\n\\n function defaultFee() external view returns (uint256);\\n\\n function defaultSlippageFee() external view returns (uint256);\\n\\n function defaultDecayPeriod() external view returns (uint256);\\n\\n function virtualDefaultFee()\\n external\\n view\\n returns (\\n uint104,\\n uint104,\\n uint48\\n );\\n\\n function virtualDefaultSlippageFee()\\n external\\n view\\n returns (\\n uint104,\\n uint104,\\n uint48\\n );\\n\\n function virtualDefaultDecayPeriod()\\n external\\n view\\n returns (\\n uint104,\\n uint104,\\n uint48\\n );\\n\\n function referralShare() external view returns (uint256);\\n\\n function governanceShare() external view returns (uint256);\\n\\n function governanceWallet() external view returns (address);\\n\\n function feeCollector() external view returns (address);\\n\\n function isFeeCollector(address) external view returns (bool);\\n\\n function isActive() external view returns (bool);\\n}\\n\",\"keccak256\":\"0x1f3915aa7e0ff44dd3cf506f850510c8777f68c98d325e5c8de10325877bfdff\",\"license\":\"MIT\"},\"contracts/interfaces/external/weth/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface IWETH is IERC20 {\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n}\\n\",\"keccak256\":\"0xacc7980a650b7a753ee51f1bbc0ae4f641e84261bcc02cfdaf87ee8136483684\",\"license\":\"MIT\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523480156200001157600080fd5b506040516200231538038062002315833981810160405260608110156200003757600080fd5b5080516020808301516040938401518451808601909552600c85526b1bdb995a5b98da17dc1bdbdb60a21b92850192909252919282848282826001600160a01b038116620000cc576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c6572206d75737420626520646566696e6564000000000000604482015290519081900360640190fd5b8251620000e190600190602086019062000136565b50600080546001600160a01b03199081166001600160a01b039384161790915560609290921b6001600160601b03191660805260016003556004805490921696169590951790945550620001e2945050505050565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826200016e5760008555620001b9565b82601f106200018957805160ff1916838001178555620001b9565b82800160010185558215620001b9579182015b82811115620001b95782518255916020019190600101906200019c565b50620001c7929150620001cb565b5090565b5b80821115620001c75760008155600101620001cc565b60805160601c612115620002006000398061060052506121156000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c8063708a34761161008c578063bd9d8ad911610066578063bd9d8ad914610403578063ca4f280314610479578063f5e393251461049f578063f77c4791146104cb576100df565b8063708a3476146102f357806385731140146103d5578063b10198fb146103dd576100df565b80633fc8cef3116100bd5780633fc8cef3146101b15780635b16ebb7146101d557806362cc395a1461020f576100df565b806306fdde03146100e457806317d7de7c146101615780633cd5bd9514610169575b600080fd5b6100ec6104d3565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012657818101518382015260200161010e565b50505050905090810190601f1680156101535780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100ec610560565b61019f6004803603606081101561017f57600080fd5b506001600160a01b038135811691602081013590911690604001356105f5565b60408051918252519081900360200190f35b6101b96105fe565b604080516001600160a01b039092168252519081900360200190f35b6101fb600480360360208110156101eb57600080fd5b50356001600160a01b0316610622565b604080519115158252519081900360200190f35b6102f1600480360360a081101561022557600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561026057600080fd5b82018360208201111561027257600080fd5b8035906020019184602083028401116401000000008311171561029457600080fd5b9193909290916020810190356401000000008111156102b257600080fd5b8201836020820111156102c457600080fd5b803590602001918460208302840111640100000000831117156102e657600080fd5b509092509050610633565b005b6102f1600480360360a081101561030957600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561034457600080fd5b82018360208201111561035657600080fd5b8035906020019184602083028401116401000000008311171561037857600080fd5b91939092909160208101903564010000000081111561039657600080fd5b8201836020820111156103a857600080fd5b803590602001918460208302840111640100000000831117156103ca57600080fd5b509092509050610a50565b6101b9610f6f565b6101fb600480360360208110156103f357600080fd5b50356001600160a01b0316610f7e565b6104296004803603602081101561041957600080fd5b50356001600160a01b0316610f93565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561046557818101518382015260200161044d565b505050509050019250505060405180910390f35b6104296004803603602081101561048f57600080fd5b50356001600160a01b0316611001565b610429600480360360408110156104b557600080fd5b506001600160a01b03813516906020013561110c565b6101b96114bd565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105585780601f1061052d57610100808354040283529160200191610558565b820191906000526020600020905b81548152906001019060200180831161053b57829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156105eb5780601f106105c0576101008083540402835291602001916105eb565b820191906000526020600020905b8154815290600101906020018083116105ce57829003601f168201915b5050505050905090565b60019392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061062d826114cc565b92915050565b6002600354141561068b576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b1580156106db57600080fd5b505afa1580156106ef573d6000803e3d6000fd5b505050506040513d602081101561070557600080fd5b5051610758576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b600061076988888888888888611562565b90506107748161176e565b80602001516001600160a01b03166397ccdc6061079089611859565b89896040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b1580156107e857600080fd5b505af11580156107fc573d6000803e3d6000fd5b5050505060008060006108148b8b8b8b8b8b8b61185c565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610891578181015183820152602001610879565b50505050905090810190601f1680156108be5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1580156108df57600080fd5b505af11580156108f3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561091c57600080fd5b810190808051604051939291908464010000000082111561093c57600080fd5b90830190602082018581111561095157600080fd5b825164010000000081118282018810171561096b57600080fd5b82525081516020918201929091019080838360005b83811015610998578181015183820152602001610980565b50505050905090810190601f1680156109c55780820380516001836020036101000a031916815260200191505b50604052505050506109d6846119c2565b83600001516001600160a01b031684602001516001600160a01b03167f7659e40cf608296ce5aa9eff9c80adc7a49cb481173fc4e302e3983827b042df86604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b60026003541415610aa8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b158015610af857600080fd5b505afa158015610b0c573d6000803e3d6000fd5b505050506040513d6020811015610b2257600080fd5b5051610b75576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b6000610b8688888888888888611562565b9050610b9181611a8a565b60005b84811015610c8a576000868683818110610baa57fe5b905060200201356001600160a01b03166001600160a01b031614610c825781602001516001600160a01b03166397ccdc60610be48a611859565b888885818110610bf057fe5b905060200201356001600160a01b0316878786818110610c0c57fe5b905060200201356040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015610c6957600080fd5b505af1158015610c7d573d6000803e3d6000fd5b505050505b600101610b94565b506000806000610c9f8b8b8b8b8b8b8b611b2b565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610d1c578181015183820152602001610d04565b50505050905090810190601f168015610d495780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610d6a57600080fd5b505af1158015610d7e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610da757600080fd5b8101908080516040519392919084640100000000821115610dc757600080fd5b908301906020820185811115610ddc57600080fd5b8251640100000000811182820188101715610df657600080fd5b82525081516020918201929091019080838360005b83811015610e23578181015183820152602001610e0b565b50505050905090810190601f168015610e505780820380516001836020036101000a031916815260200191505b5060405250505050610ee78460a0015185604001516001600160a01b03166370a0823187602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610eb557600080fd5b505afa158015610ec9573d6000803e3d6000fd5b505050506040513d6020811015610edf57600080fd5b505190611d85565b6080850152610ef584611de2565b83600001516001600160a01b031684602001516001600160a01b03167fe5ca6288535c5c6c2462c912b4033eade15b80926717896a2d58a2defdeb912886604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b6004546001600160a01b031681565b60026020526000908152604090205460ff1681565b604080516002808252606080830184529260009291906020830190803683370190505090506706f05b59d3b2000081600081518110610fce57fe5b6020026020010181815250506706f05b59d3b2000081600181518110610ff057fe5b602090810291909101015292915050565b6060816001600160a01b031663aa6ca8086040518163ffffffff1660e01b815260040160006040518083038186803b15801561103c57600080fd5b505afa158015611050573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561107957600080fd5b810190808051604051939291908464010000000082111561109957600080fd5b9083019060208201858111156110ae57600080fd5b82518660208202830111640100000000821117156110cb57600080fd5b82525081516020918201928201910280838360005b838110156110f85781810151838201526020016110e0565b505050509050016040525050509050919050565b60606000836001600160a01b031663aa6ca8086040518163ffffffff1660e01b815260040160006040518083038186803b15801561114957600080fd5b505afa15801561115d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561118657600080fd5b81019080805160405193929190846401000000008211156111a657600080fd5b9083019060208201858111156111bb57600080fd5b82518660208202830111640100000000821117156111d857600080fd5b82525081516020918201928201910280838360005b838110156112055781810151838201526020016111ed565b5050505090500160405250505090506000846001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561124f57600080fd5b505afa158015611263573d6000803e3d6000fd5b505050506040513d602081101561127957600080fd5b505160408051600280825260608201835292935060009290916020830190803683370190505090506000806001600160a01b0316846000815181106112ba57fe5b60200260200101516001600160a01b031614156112e157866001600160a01b03163161136f565b836000815181106112ee57fe5b60200260200101516001600160a01b03166370a08231886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561134257600080fd5b505afa158015611356573d6000803e3d6000fd5b505050506040513d602081101561136c57600080fd5b50515b90506000806001600160a01b03168560018151811061138a57fe5b60200260200101516001600160a01b031614156113b157876001600160a01b03163161143f565b846001815181106113be57fe5b60200260200101516001600160a01b03166370a08231896040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561141257600080fd5b505afa158015611426573d6000803e3d6000fd5b505050506040513d602081101561143c57600080fd5b50515b9050611467670dbd2fc137a300006114618661145b868c611ea4565b90611f04565b90611f6b565b8360008151811061147457fe5b6020908102919091010152611499670dbd2fc137a300006114618661145b858c611ea4565b836001815181106114a657fe5b602090810291909101015250909695505050505050565b6000546001600160a01b031681565b6000600460009054906101000a90046001600160a01b03166001600160a01b0316635b16ebb7836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561153057600080fd5b505afa158015611544573d6000803e3d6000fd5b505050506040513d602081101561155a57600080fd5b505192915050565b61156a611f83565b611572611f83565b6001600160a01b0389166020808301829052604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b892600480840193919291829003018186803b1580156115d057600080fd5b505afa1580156115e4573d6000803e3d6000fd5b505050506040513d60208110156115fa57600080fd5b50516001600160a01b0390811682528816604080830182905280517f18160ddd00000000000000000000000000000000000000000000000000000000815290516318160ddd91600480820192602092909190829003018186803b15801561166057600080fd5b505afa158015611674573d6000803e3d6000fd5b505050506040513d602081101561168a57600080fd5b50516060820152604080517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b038b811660048301529151918a16916370a0823191602480820192602092909190829003018186803b1580156116f457600080fd5b505afa158015611708573d6000803e3d6000fd5b505050506040513d602081101561171e57600080fd5b505160a0820152608081018790526040805160208581028281018201909352858252909186918691829185019084908082843760009201919091525050505060c082015298975050505050505050565b61177b81604001516114cc565b6117cc576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b600081608001511161180f5760405162461bcd60e51b815260040180806020018281038252602e81526020018061202e602e913960400191505060405180910390fd5b80608001518160a0015110156118565760405162461bcd60e51b815260040180806020018281038252602d815260200180612088602d913960400191505060405180910390fd5b50565b90565b6000806060600286146118b6576040805162461bcd60e51b815260206004820152601360248201527f54776f20746f6b656e7320726571756972656400000000000000000000000000604482015290519081900360640190fd5b6002841461190b576040805162461bcd60e51b815260206004820152601460248201527f54776f20616d6f756e7473207265717569726564000000000000000000000000604482015290519081900360640190fd5b600088868660405160240180848152602001806020018281038252848482818152602001925060200280828437600081840152601f19601f8201169050808301925050509450505050506040516020818303038152906040527f5915d806000000000000000000000000000000000000000000000000000000006001600160e01b0319166020820180516001600160e01b038381831617835250505050905089600082935093509350509750975097945050505050565b80608001518160a001510381604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611a2257600080fd5b505afa158015611a36573d6000803e3d6000fd5b505050506040513d6020811015611a4c57600080fd5b5051146118565760405162461bcd60e51b815260040180806020018281038252602b8152602001806120b5602b913960400191505060405180910390fd5b611a9781604001516114cc565b611ae8576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b60008160800151116118565760405162461bcd60e51b8152600401808060200182810382526031815260200180611fdc6031913960400191505060405180910390fd5b600080606060028614611b85576040805162461bcd60e51b815260206004820152601360248201527f54776f20746f6b656e7320726571756972656400000000000000000000000000604482015290519081900360640190fd5b60028414611bda576040805162461bcd60e51b815260206004820152601460248201527f54776f20616d6f756e7473207265717569726564000000000000000000000000604482015290519081900360640190fd5b600085856000818110611be957fe5b9050602002013586866001818110611bfd57fe5b90506020020135611c59611c37662386f26fc100006002028a8a6000818110611c2257fe5b90506020020135611f6b90919063ffffffff16565b89896000818110611c4457fe5b90506020020135611d8590919063ffffffff16565b611c81611c7466470de4df8200008b8b6001818110611c2257fe5b8a8a6001818110611c4457fe5b604080516024810195909552604485019390935260648401919091526084808401919091528151808403909101815260a490920190526020810180516001600160e01b03167f3049105d00000000000000000000000000000000000000000000000000000000179052905060008089898281611cf957fe5b905060200201356001600160a01b03166001600160a01b03161415611d2f5786866000818110611d2557fe5b9050602002013590505b600089896001818110611d3e57fe5b905060200201356001600160a01b03166001600160a01b03161415611d745786866001818110611d6a57fe5b9050602002013590505b999b999a5098975050505050505050565b600082821115611ddc576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b8060a0015181604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611e3c57600080fd5b505afa158015611e50573d6000803e3d6000fd5b505050506040513d6020811015611e6657600080fd5b5051116118565760405162461bcd60e51b815260040180806020018281038252602c81526020018061205c602c913960400191505060405180910390fd5b600082611eb35750600061062d565b82820282848281611ec057fe5b0414611efd5760405162461bcd60e51b815260040180806020018281038252602181526020018061200d6021913960400191505060405180910390fd5b9392505050565b6000808211611f5a576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611f6357fe5b049392505050565b6000611efd670de0b6b3a764000061145b8585611ea4565b6040518060e0016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160608152509056fe4d696e20706f6f6c20746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77506f6f6c20746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520737472617465677920646964206e6f7420726563656976652074686520706f6f6c20746f6b656e7354686520737472617465677920646f6573206e6f74206861766520656e6f75676820706f6f6c20746f6b656e7354686520737472617465677920646964206e6f742072657475726e2074686520706f6f6c20746f6b656e73a264697066735822122029d7104068e886f2b2b1f2993c00fb8738fcbb4889dca7bb3373b83b19cfb53c64736f6c63430007060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100df5760003560e01c8063708a34761161008c578063bd9d8ad911610066578063bd9d8ad914610403578063ca4f280314610479578063f5e393251461049f578063f77c4791146104cb576100df565b8063708a3476146102f357806385731140146103d5578063b10198fb146103dd576100df565b80633fc8cef3116100bd5780633fc8cef3146101b15780635b16ebb7146101d557806362cc395a1461020f576100df565b806306fdde03146100e457806317d7de7c146101615780633cd5bd9514610169575b600080fd5b6100ec6104d3565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012657818101518382015260200161010e565b50505050905090810190601f1680156101535780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100ec610560565b61019f6004803603606081101561017f57600080fd5b506001600160a01b038135811691602081013590911690604001356105f5565b60408051918252519081900360200190f35b6101b96105fe565b604080516001600160a01b039092168252519081900360200190f35b6101fb600480360360208110156101eb57600080fd5b50356001600160a01b0316610622565b604080519115158252519081900360200190f35b6102f1600480360360a081101561022557600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561026057600080fd5b82018360208201111561027257600080fd5b8035906020019184602083028401116401000000008311171561029457600080fd5b9193909290916020810190356401000000008111156102b257600080fd5b8201836020820111156102c457600080fd5b803590602001918460208302840111640100000000831117156102e657600080fd5b509092509050610633565b005b6102f1600480360360a081101561030957600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561034457600080fd5b82018360208201111561035657600080fd5b8035906020019184602083028401116401000000008311171561037857600080fd5b91939092909160208101903564010000000081111561039657600080fd5b8201836020820111156103a857600080fd5b803590602001918460208302840111640100000000831117156103ca57600080fd5b509092509050610a50565b6101b9610f6f565b6101fb600480360360208110156103f357600080fd5b50356001600160a01b0316610f7e565b6104296004803603602081101561041957600080fd5b50356001600160a01b0316610f93565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561046557818101518382015260200161044d565b505050509050019250505060405180910390f35b6104296004803603602081101561048f57600080fd5b50356001600160a01b0316611001565b610429600480360360408110156104b557600080fd5b506001600160a01b03813516906020013561110c565b6101b96114bd565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105585780601f1061052d57610100808354040283529160200191610558565b820191906000526020600020905b81548152906001019060200180831161053b57829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156105eb5780601f106105c0576101008083540402835291602001916105eb565b820191906000526020600020905b8154815290600101906020018083116105ce57829003601f168201915b5050505050905090565b60019392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061062d826114cc565b92915050565b6002600354141561068b576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b1580156106db57600080fd5b505afa1580156106ef573d6000803e3d6000fd5b505050506040513d602081101561070557600080fd5b5051610758576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b600061076988888888888888611562565b90506107748161176e565b80602001516001600160a01b03166397ccdc6061079089611859565b89896040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b1580156107e857600080fd5b505af11580156107fc573d6000803e3d6000fd5b5050505060008060006108148b8b8b8b8b8b8b61185c565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610891578181015183820152602001610879565b50505050905090810190601f1680156108be5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1580156108df57600080fd5b505af11580156108f3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561091c57600080fd5b810190808051604051939291908464010000000082111561093c57600080fd5b90830190602082018581111561095157600080fd5b825164010000000081118282018810171561096b57600080fd5b82525081516020918201929091019080838360005b83811015610998578181015183820152602001610980565b50505050905090810190601f1680156109c55780820380516001836020036101000a031916815260200191505b50604052505050506109d6846119c2565b83600001516001600160a01b031684602001516001600160a01b03167f7659e40cf608296ce5aa9eff9c80adc7a49cb481173fc4e302e3983827b042df86604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b60026003541415610aa8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b158015610af857600080fd5b505afa158015610b0c573d6000803e3d6000fd5b505050506040513d6020811015610b2257600080fd5b5051610b75576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b6000610b8688888888888888611562565b9050610b9181611a8a565b60005b84811015610c8a576000868683818110610baa57fe5b905060200201356001600160a01b03166001600160a01b031614610c825781602001516001600160a01b03166397ccdc60610be48a611859565b888885818110610bf057fe5b905060200201356001600160a01b0316878786818110610c0c57fe5b905060200201356040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015610c6957600080fd5b505af1158015610c7d573d6000803e3d6000fd5b505050505b600101610b94565b506000806000610c9f8b8b8b8b8b8b8b611b2b565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610d1c578181015183820152602001610d04565b50505050905090810190601f168015610d495780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610d6a57600080fd5b505af1158015610d7e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610da757600080fd5b8101908080516040519392919084640100000000821115610dc757600080fd5b908301906020820185811115610ddc57600080fd5b8251640100000000811182820188101715610df657600080fd5b82525081516020918201929091019080838360005b83811015610e23578181015183820152602001610e0b565b50505050905090810190601f168015610e505780820380516001836020036101000a031916815260200191505b5060405250505050610ee78460a0015185604001516001600160a01b03166370a0823187602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610eb557600080fd5b505afa158015610ec9573d6000803e3d6000fd5b505050506040513d6020811015610edf57600080fd5b505190611d85565b6080850152610ef584611de2565b83600001516001600160a01b031684602001516001600160a01b03167fe5ca6288535c5c6c2462c912b4033eade15b80926717896a2d58a2defdeb912886604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b6004546001600160a01b031681565b60026020526000908152604090205460ff1681565b604080516002808252606080830184529260009291906020830190803683370190505090506706f05b59d3b2000081600081518110610fce57fe5b6020026020010181815250506706f05b59d3b2000081600181518110610ff057fe5b602090810291909101015292915050565b6060816001600160a01b031663aa6ca8086040518163ffffffff1660e01b815260040160006040518083038186803b15801561103c57600080fd5b505afa158015611050573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561107957600080fd5b810190808051604051939291908464010000000082111561109957600080fd5b9083019060208201858111156110ae57600080fd5b82518660208202830111640100000000821117156110cb57600080fd5b82525081516020918201928201910280838360005b838110156110f85781810151838201526020016110e0565b505050509050016040525050509050919050565b60606000836001600160a01b031663aa6ca8086040518163ffffffff1660e01b815260040160006040518083038186803b15801561114957600080fd5b505afa15801561115d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561118657600080fd5b81019080805160405193929190846401000000008211156111a657600080fd5b9083019060208201858111156111bb57600080fd5b82518660208202830111640100000000821117156111d857600080fd5b82525081516020918201928201910280838360005b838110156112055781810151838201526020016111ed565b5050505090500160405250505090506000846001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561124f57600080fd5b505afa158015611263573d6000803e3d6000fd5b505050506040513d602081101561127957600080fd5b505160408051600280825260608201835292935060009290916020830190803683370190505090506000806001600160a01b0316846000815181106112ba57fe5b60200260200101516001600160a01b031614156112e157866001600160a01b03163161136f565b836000815181106112ee57fe5b60200260200101516001600160a01b03166370a08231886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561134257600080fd5b505afa158015611356573d6000803e3d6000fd5b505050506040513d602081101561136c57600080fd5b50515b90506000806001600160a01b03168560018151811061138a57fe5b60200260200101516001600160a01b031614156113b157876001600160a01b03163161143f565b846001815181106113be57fe5b60200260200101516001600160a01b03166370a08231896040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561141257600080fd5b505afa158015611426573d6000803e3d6000fd5b505050506040513d602081101561143c57600080fd5b50515b9050611467670dbd2fc137a300006114618661145b868c611ea4565b90611f04565b90611f6b565b8360008151811061147457fe5b6020908102919091010152611499670dbd2fc137a300006114618661145b858c611ea4565b836001815181106114a657fe5b602090810291909101015250909695505050505050565b6000546001600160a01b031681565b6000600460009054906101000a90046001600160a01b03166001600160a01b0316635b16ebb7836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561153057600080fd5b505afa158015611544573d6000803e3d6000fd5b505050506040513d602081101561155a57600080fd5b505192915050565b61156a611f83565b611572611f83565b6001600160a01b0389166020808301829052604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b892600480840193919291829003018186803b1580156115d057600080fd5b505afa1580156115e4573d6000803e3d6000fd5b505050506040513d60208110156115fa57600080fd5b50516001600160a01b0390811682528816604080830182905280517f18160ddd00000000000000000000000000000000000000000000000000000000815290516318160ddd91600480820192602092909190829003018186803b15801561166057600080fd5b505afa158015611674573d6000803e3d6000fd5b505050506040513d602081101561168a57600080fd5b50516060820152604080517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b038b811660048301529151918a16916370a0823191602480820192602092909190829003018186803b1580156116f457600080fd5b505afa158015611708573d6000803e3d6000fd5b505050506040513d602081101561171e57600080fd5b505160a0820152608081018790526040805160208581028281018201909352858252909186918691829185019084908082843760009201919091525050505060c082015298975050505050505050565b61177b81604001516114cc565b6117cc576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b600081608001511161180f5760405162461bcd60e51b815260040180806020018281038252602e81526020018061202e602e913960400191505060405180910390fd5b80608001518160a0015110156118565760405162461bcd60e51b815260040180806020018281038252602d815260200180612088602d913960400191505060405180910390fd5b50565b90565b6000806060600286146118b6576040805162461bcd60e51b815260206004820152601360248201527f54776f20746f6b656e7320726571756972656400000000000000000000000000604482015290519081900360640190fd5b6002841461190b576040805162461bcd60e51b815260206004820152601460248201527f54776f20616d6f756e7473207265717569726564000000000000000000000000604482015290519081900360640190fd5b600088868660405160240180848152602001806020018281038252848482818152602001925060200280828437600081840152601f19601f8201169050808301925050509450505050506040516020818303038152906040527f5915d806000000000000000000000000000000000000000000000000000000006001600160e01b0319166020820180516001600160e01b038381831617835250505050905089600082935093509350509750975097945050505050565b80608001518160a001510381604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611a2257600080fd5b505afa158015611a36573d6000803e3d6000fd5b505050506040513d6020811015611a4c57600080fd5b5051146118565760405162461bcd60e51b815260040180806020018281038252602b8152602001806120b5602b913960400191505060405180910390fd5b611a9781604001516114cc565b611ae8576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b60008160800151116118565760405162461bcd60e51b8152600401808060200182810382526031815260200180611fdc6031913960400191505060405180910390fd5b600080606060028614611b85576040805162461bcd60e51b815260206004820152601360248201527f54776f20746f6b656e7320726571756972656400000000000000000000000000604482015290519081900360640190fd5b60028414611bda576040805162461bcd60e51b815260206004820152601460248201527f54776f20616d6f756e7473207265717569726564000000000000000000000000604482015290519081900360640190fd5b600085856000818110611be957fe5b9050602002013586866001818110611bfd57fe5b90506020020135611c59611c37662386f26fc100006002028a8a6000818110611c2257fe5b90506020020135611f6b90919063ffffffff16565b89896000818110611c4457fe5b90506020020135611d8590919063ffffffff16565b611c81611c7466470de4df8200008b8b6001818110611c2257fe5b8a8a6001818110611c4457fe5b604080516024810195909552604485019390935260648401919091526084808401919091528151808403909101815260a490920190526020810180516001600160e01b03167f3049105d00000000000000000000000000000000000000000000000000000000179052905060008089898281611cf957fe5b905060200201356001600160a01b03166001600160a01b03161415611d2f5786866000818110611d2557fe5b9050602002013590505b600089896001818110611d3e57fe5b905060200201356001600160a01b03166001600160a01b03161415611d745786866001818110611d6a57fe5b9050602002013590505b999b999a5098975050505050505050565b600082821115611ddc576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b8060a0015181604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611e3c57600080fd5b505afa158015611e50573d6000803e3d6000fd5b505050506040513d6020811015611e6657600080fd5b5051116118565760405162461bcd60e51b815260040180806020018281038252602c81526020018061205c602c913960400191505060405180910390fd5b600082611eb35750600061062d565b82820282848281611ec057fe5b0414611efd5760405162461bcd60e51b815260040180806020018281038252602181526020018061200d6021913960400191505060405180910390fd5b9392505050565b6000808211611f5a576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611f6357fe5b049392505050565b6000611efd670de0b6b3a764000061145b8585611ea4565b6040518060e0016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160608152509056fe4d696e20706f6f6c20746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77506f6f6c20746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520737472617465677920646964206e6f7420726563656976652074686520706f6f6c20746f6b656e7354686520737472617465677920646f6573206e6f74206861766520656e6f75676820706f6f6c20746f6b656e7354686520737472617465677920646964206e6f742072657475726e2074686520706f6f6c20746f6b656e73a264697066735822122029d7104068e886f2b2b1f2993c00fb8738fcbb4889dca7bb3373b83b19cfb53c64736f6c63430007060033", + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_weth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_mooniswapFactoryAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_pool\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_poolTokensOut\",\"type\":\"uint256\"}],\"name\":\"PoolEntered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_pool\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_poolTokensIn\",\"type\":\"uint256\"}],\"name\":\"PoolExited\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_poolTokensIn\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"_tokensOut\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_minAmountsOut\",\"type\":\"uint256[]\"}],\"name\":\"exitPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_liquidity\",\"type\":\"uint256\"}],\"name\":\"getPoolMinAmountsOut\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_minAmountsOut\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"}],\"name\":\"getPoolTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getPoolTokensOut\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"getPoolWeights\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"initializedByGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"}],\"name\":\"isPool\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_poolTokensOut\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"_tokensIn\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_maxAmountsIn\",\"type\":\"uint256[]\"}],\"name\":\"joinPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"mooniswapFactory\",\"outputs\":[{\"internalType\":\"contract IMooniswapFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Protocol Kyber protocol trade integration\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of the controller\",\"_mooniswapFactoryAddress\":\"Address of the Mooniswap factory\",\"_weth\":\"Address of the WETH ERC20\"}},\"exitPool(address,address,uint256,address[],uint256[])\":{\"params\":{\"_minAmountsOut\":\"Array of min token quantities to receive from the pool\",\"_poolAddress\":\"Address of the pool token to join\",\"_poolTokensIn\":\"Pool tokens to exchange for the underlying tokens\",\"_strategy\":\"Address of the strategy\",\"_tokensOut\":\"Array of token addresses to withdraw\"}},\"isPool(address)\":{\"params\":{\"_poolAddress\":\"Pool address to check\"},\"returns\":{\"_0\":\"bool True if the address is a pool\"}},\"joinPool(address,address,uint256,address[],uint256[])\":{\"params\":{\"_maxAmountsIn\":\"Array of max token quantities to pull out from the garden\",\"_poolAddress\":\"Address of the pool token to join\",\"_poolTokensOut\":\"Min amount of pool tokens to receive\",\"_strategy\":\"Address of the strategy\",\"_tokensIn\":\"Array of token addresses to deposit\"}}},\"title\":\"BalancerIntegration\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates the integration\"},\"exitPool(address,address,uint256,address[],uint256[])\":{\"notice\":\"Exits a liquidity pool. Accrue protocol fee (if any)\"},\"getName()\":{\"notice\":\"Returns the name of the integration\"},\"isPool(address)\":{\"notice\":\"Checks whether a pool address is valid\"},\"joinPool(address,address,uint256,address[],uint256[])\":{\"notice\":\"Joins a pool\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/integrations/pool/OneInchPoolIntegration.sol\":\"OneInchPoolIntegration\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\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 /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\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, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x7b2b8baa20fd60ab4a328c8e34c64a353651b80ba4b5b157cbb61813f6f85d55\",\"license\":\"MIT\"},\"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol\":{\"content\":\"pragma solidity >=0.5.0;\\n\\ninterface IUniswapV2Pair {\\n event Approval(address indexed owner, address indexed spender, uint value);\\n event Transfer(address indexed from, address indexed to, uint value);\\n\\n function name() external pure returns (string memory);\\n function symbol() external pure returns (string memory);\\n function decimals() external pure returns (uint8);\\n function totalSupply() external view returns (uint);\\n function balanceOf(address owner) external view returns (uint);\\n function allowance(address owner, address spender) external view returns (uint);\\n\\n function approve(address spender, uint value) external returns (bool);\\n function transfer(address to, uint value) external returns (bool);\\n function transferFrom(address from, address to, uint value) external returns (bool);\\n\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n function PERMIT_TYPEHASH() external pure returns (bytes32);\\n function nonces(address owner) external view returns (uint);\\n\\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\\n\\n event Mint(address indexed sender, uint amount0, uint amount1);\\n event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\\n event Swap(\\n address indexed sender,\\n uint amount0In,\\n uint amount1In,\\n uint amount0Out,\\n uint amount1Out,\\n address indexed to\\n );\\n event Sync(uint112 reserve0, uint112 reserve1);\\n\\n function MINIMUM_LIQUIDITY() external pure returns (uint);\\n function factory() external view returns (address);\\n function token0() external view returns (address);\\n function token1() external view returns (address);\\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\\n function price0CumulativeLast() external view returns (uint);\\n function price1CumulativeLast() external view returns (uint);\\n function kLast() external view returns (uint);\\n\\n function mint(address to) external returns (uint liquidity);\\n function burn(address to) external returns (uint amount0, uint amount1);\\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\\n function skim(address to) external;\\n function sync() external;\\n\\n function initialize(address, address) external;\\n}\\n\",\"keccak256\":\"0x7c9bc70e5996c763e02ff38905282bc24fb242b0ef2519a003b36824fc524a4b\"},\"contracts/integrations/BaseIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IIntegration} from '../interfaces/IIntegration.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\n\\n/**\\n * @title BaseIntegration\\n * @author Babylon Finance\\n *\\n * Abstract class that houses common Integration-related state and functions.\\n */\\nabstract contract BaseIntegration {\\n using SafeCast for int256;\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlySystemContract() {\\n require(IBabController(controller).isSystemContract(msg.sender), 'Only system can call this');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the controller\\n address public controller;\\n // Wrapped ETH address\\n address public immutable weth;\\n // Name of the integration\\n string public name;\\n mapping(address => bool) public initializedByGarden;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) {\\n require(_controller != address(0), 'Controller must be defined');\\n name = _name;\\n controller = _controller;\\n weth = _weth;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the name of the integration\\n */\\n function getName() external view returns (string memory) {\\n return name;\\n }\\n}\\n\",\"keccak256\":\"0x2834e38218ae7abce3038140002a433c22ea9303d65b2d929cd88f6d5f712812\",\"license\":\"Apache License\"},\"contracts/integrations/pool/OneInchPoolIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';\\nimport {PoolIntegration} from './PoolIntegration.sol';\\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\\nimport {IMooniswapFactory} from '../../interfaces/external/1inch/IMooniswapFactory.sol';\\nimport {IMooniswap} from '../../interfaces/external/1inch/IMooniswap.sol';\\n\\n/**\\n * @title BalancerIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Kyber protocol trade integration\\n */\\ncontract OneInchPoolIntegration is PoolIntegration {\\n using SafeMath for uint256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ State Variables ============ */\\n\\n // Address of Uniswap V2 Router\\n IMooniswapFactory public mooniswapFactory;\\n\\n /* ============ Constants ============ */\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _controller Address of the controller\\n * @param _weth Address of the WETH ERC20\\n * @param _mooniswapFactoryAddress Address of the Mooniswap factory\\n */\\n constructor(\\n address _controller,\\n address _weth,\\n address _mooniswapFactoryAddress\\n ) PoolIntegration('oneinch_pool', _weth, _controller) {\\n mooniswapFactory = IMooniswapFactory(_mooniswapFactoryAddress);\\n }\\n\\n /* ============ External Functions ============ */\\n\\n function getPoolTokens(address _poolAddress) external view override returns (address[] memory) {\\n return IMooniswap(_poolAddress).getTokens();\\n }\\n\\n function getPoolWeights(\\n address /* _poolAddress */\\n ) external pure override returns (uint256[] memory) {\\n uint256[] memory result = new uint256[](2);\\n result[0] = 5e17; // 50%\\n result[1] = 5e17; // 50%\\n return result;\\n }\\n\\n function getPoolTokensOut(\\n address, /* _poolAddress */\\n address, /* _poolToken */\\n uint256 /* _maxAmountsIn */\\n ) external pure override returns (uint256) {\\n // return 1 since _poolTokensOut are not used\\n return 1;\\n }\\n\\n function getPoolMinAmountsOut(address _poolAddress, uint256 _liquidity)\\n external\\n view\\n override\\n returns (uint256[] memory _minAmountsOut)\\n {\\n address[] memory tokens = IMooniswap(_poolAddress).getTokens();\\n uint256 totalSupply = IMooniswap(_poolAddress).totalSupply();\\n uint256[] memory result = new uint256[](2);\\n uint256 token0Balance =\\n (tokens[0] != address(0) ? IERC20(tokens[0]).balanceOf(_poolAddress) : _poolAddress.balance);\\n uint256 token1Balance =\\n (tokens[1] != address(0) ? IERC20(tokens[1]).balanceOf(_poolAddress) : _poolAddress.balance);\\n result[0] = token0Balance.mul(_liquidity).div(totalSupply).preciseMul(1e18 - SLIPPAGE_ALLOWED);\\n result[1] = token1Balance.mul(_liquidity).div(totalSupply).preciseMul(1e18 - SLIPPAGE_ALLOWED);\\n return result;\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n function _isPool(address _poolAddress) internal view override returns (bool) {\\n return IMooniswapFactory(mooniswapFactory).isPool(IMooniswap(_poolAddress));\\n }\\n\\n function _getSpender(address _poolAddress) internal pure override returns (address) {\\n return _poolAddress;\\n }\\n\\n /**\\n * Return join pool calldata which is already generated from the pool API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * hparam _poolTokensOut Amount of pool tokens to send\\n * @param _tokensIn Addresses of tokens to send to the pool\\n * @param _maxAmountsIn Amounts of tokens to send to the pool\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getJoinPoolCalldata(\\n address, /* _strategy */\\n address _poolAddress,\\n uint256, /* _poolTokensOut */\\n address[] calldata _tokensIn,\\n uint256[] calldata _maxAmountsIn\\n )\\n internal\\n pure\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n // Encode method data for Garden to invoke\\n require(_tokensIn.length == 2, 'Two tokens required');\\n require(_maxAmountsIn.length == 2, 'Two amounts required');\\n bytes memory methodData =\\n abi.encodeWithSignature(\\n 'deposit(uint256[2],uint256[2])',\\n _maxAmountsIn[0],\\n _maxAmountsIn[1],\\n _maxAmountsIn[0].sub(_maxAmountsIn[0].preciseMul(SLIPPAGE_ALLOWED * 2)),\\n _maxAmountsIn[1].sub(_maxAmountsIn[1].preciseMul(SLIPPAGE_ALLOWED * 2))\\n );\\n uint256 value = 0;\\n // Add ETH if one of the tokens\\n if (_tokensIn[0] == address(0)) {\\n value = _maxAmountsIn[0];\\n }\\n if (_tokensIn[1] == address(0)) {\\n value = _maxAmountsIn[1];\\n }\\n\\n return (address(_poolAddress), value, methodData);\\n }\\n\\n /**\\n * Return exit pool calldata which is already generated from the pool API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * @param _poolTokensIn Amount of pool tokens to receive\\n * @param _tokensOut Addresses of tokens to receive\\n * @param _minAmountsOut Amounts of pool tokens to receive\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getExitPoolCalldata(\\n address, /* _strategy */\\n address _poolAddress,\\n uint256 _poolTokensIn,\\n address[] calldata _tokensOut,\\n uint256[] calldata _minAmountsOut\\n )\\n internal\\n pure\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n require(_tokensOut.length == 2, 'Two tokens required');\\n require(_minAmountsOut.length == 2, 'Two amounts required');\\n // Encode method data for Garden to invoke\\n bytes memory methodData = abi.encodeWithSignature('withdraw(uint256,uint256[])', _poolTokensIn, _minAmountsOut);\\n\\n return (address(_poolAddress), 0, methodData);\\n }\\n}\\n\",\"keccak256\":\"0x5b5541c115f63b586b1af950ef0436a8f60038fc92a0350d418d64ac44575450\",\"license\":\"Apache License\"},\"contracts/integrations/pool/PoolIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\n\\nimport {IPoolIntegration} from '../../interfaces/IPoolIntegration.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\n\\nimport {BaseIntegration} from '../BaseIntegration.sol';\\n\\n/**\\n * @title PoolIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Base class for integration with trading protocols\\n */\\nabstract contract PoolIntegration is BaseIntegration, ReentrancyGuard, IPoolIntegration {\\n using SafeMath for uint256;\\n using SafeCast for uint256;\\n\\n /* ============ Struct ============ */\\n\\n struct PoolInfo {\\n IGarden garden; // Garden address\\n IStrategy strategy; // Strategy address\\n address pool; // Pool address\\n uint256 totalSupply; // Total Supply of the pool\\n uint256 poolTokensInTransaction; // Pool tokens affected by this transaction\\n uint256 poolTokensInStrategy; // Pool tokens strategy balance\\n uint256[] limitPoolTokenQuantities;\\n }\\n\\n /* ============ Events ============ */\\n\\n event PoolEntered(address indexed _strategy, address indexed _garden, address _pool, uint256 _poolTokensOut);\\n\\n event PoolExited(address indexed _strategy, address indexed _garden, address _pool, uint256 _poolTokensIn);\\n\\n /* ============ Constants ============ */\\n\\n uint256 internal constant SLIPPAGE_ALLOWED = 1e16; // 1%\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) BaseIntegration(_name, _weth, _controller) {}\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Joins a pool\\n *\\n * @param _strategy Address of the strategy\\n * @param _poolAddress Address of the pool token to join\\n * @param _poolTokensOut Min amount of pool tokens to receive\\n * @param _tokensIn Array of token addresses to deposit\\n * @param _maxAmountsIn Array of max token quantities to pull out from the garden\\n */\\n function joinPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensOut,\\n address[] calldata _tokensIn,\\n uint256[] calldata _maxAmountsIn\\n ) external override nonReentrant onlySystemContract {\\n PoolInfo memory poolInfo = _createPoolInfo(_strategy, _poolAddress, _poolTokensOut, _tokensIn, _maxAmountsIn);\\n _validatePreJoinPoolData(poolInfo);\\n // Approve spending of the tokens\\n for (uint256 i = 0; i < _tokensIn.length; i++) {\\n // No need to approve ETH\\n if (_tokensIn[i] != address(0)) {\\n poolInfo.strategy.invokeApprove(_getSpender(_poolAddress), _tokensIn[i], _maxAmountsIn[i]);\\n }\\n }\\n (address targetPool, uint256 callValue, bytes memory methodData) =\\n _getJoinPoolCalldata(_strategy, _poolAddress, _poolTokensOut, _tokensIn, _maxAmountsIn);\\n poolInfo.strategy.invokeFromIntegration(targetPool, callValue, methodData);\\n poolInfo.poolTokensInTransaction = IERC20(poolInfo.pool).balanceOf(address(poolInfo.strategy)).sub(\\n poolInfo.poolTokensInStrategy\\n );\\n _validatePostJoinPoolData(poolInfo);\\n\\n emit PoolEntered(address(poolInfo.strategy), address(poolInfo.garden), poolInfo.pool, _poolTokensOut);\\n }\\n\\n /**\\n * Exits a liquidity pool. Accrue protocol fee (if any)\\n *\\n * @param _strategy Address of the strategy\\n * @param _poolAddress Address of the pool token to join\\n * @param _poolTokensIn Pool tokens to exchange for the underlying tokens\\n * @param _tokensOut Array of token addresses to withdraw\\n * @param _minAmountsOut Array of min token quantities to receive from the pool\\n */\\n function exitPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensIn,\\n address[] calldata _tokensOut,\\n uint256[] calldata _minAmountsOut\\n ) external override nonReentrant onlySystemContract {\\n PoolInfo memory poolInfo = _createPoolInfo(_strategy, _poolAddress, _poolTokensIn, _tokensOut, _minAmountsOut);\\n _validatePreExitPoolData(poolInfo);\\n // Approve spending of the pool token\\n poolInfo.strategy.invokeApprove(_getSpender(_poolAddress), _poolAddress, _poolTokensIn);\\n\\n (address targetPool, uint256 callValue, bytes memory methodData) =\\n _getExitPoolCalldata(_strategy, _poolAddress, _poolTokensIn, _tokensOut, _minAmountsOut);\\n poolInfo.strategy.invokeFromIntegration(targetPool, callValue, methodData);\\n _validatePostExitPoolData(poolInfo);\\n\\n emit PoolExited(address(poolInfo.strategy), address(poolInfo.garden), poolInfo.pool, _poolTokensIn);\\n }\\n\\n /**\\n * Checks whether a pool address is valid\\n *\\n * @param _poolAddress Pool address to check\\n * @return bool True if the address is a pool\\n */\\n function isPool(address _poolAddress) external view override returns (bool) {\\n return _isPool(_poolAddress);\\n }\\n\\n function getPoolTokens(\\n address /* _poolAddress */\\n ) external view virtual override returns (address[] memory);\\n\\n function getPoolWeights(\\n address /*_poolAddress */\\n ) external view virtual override returns (uint256[] memory);\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Create and return PoolInfo struct\\n *\\n * @param _strategy Address of the strategy\\n * @param _pool Address of the pool\\n * @param _poolTokensInTransaction Number of pool tokens involved\\n * hparam _poolTokens Addresseses of the pool tokens\\n * @param _limitPoolTokenQuantities Limit quantity of the pool tokens\\n *\\n * return PoolInfo Struct containing data for pool\\n */\\n function _createPoolInfo(\\n address _strategy,\\n address _pool,\\n uint256 _poolTokensInTransaction,\\n address[] calldata, /* _poolTokens */\\n uint256[] calldata _limitPoolTokenQuantities\\n ) internal view returns (PoolInfo memory) {\\n PoolInfo memory poolInfo;\\n poolInfo.strategy = IStrategy(_strategy);\\n poolInfo.garden = IGarden(poolInfo.strategy.garden());\\n poolInfo.pool = _pool;\\n poolInfo.totalSupply = IERC20(_pool).totalSupply();\\n poolInfo.poolTokensInStrategy = IERC20(_pool).balanceOf(_strategy);\\n poolInfo.poolTokensInTransaction = _poolTokensInTransaction;\\n poolInfo.limitPoolTokenQuantities = _limitPoolTokenQuantities;\\n\\n return poolInfo;\\n }\\n\\n /**\\n * Validate pre pool join data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePreJoinPoolData(PoolInfo memory _poolInfo) internal view {\\n require(_isPool(_poolInfo.pool), 'The pool address is not valid');\\n require(_poolInfo.poolTokensInTransaction > 0, 'Min pool tokens to receive must be greater than 0');\\n }\\n\\n /**\\n * Validate pre pool data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePreExitPoolData(PoolInfo memory _poolInfo) internal view {\\n require(_isPool(_poolInfo.pool), 'The pool address is not valid');\\n require(_poolInfo.poolTokensInTransaction > 0, 'Pool tokens to exchange must be greater than 0');\\n require(\\n _poolInfo.poolTokensInStrategy >= _poolInfo.poolTokensInTransaction,\\n 'The strategy does not have enough pool tokens'\\n );\\n }\\n\\n /**\\n * Validate post join pool data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePostJoinPoolData(PoolInfo memory _poolInfo) internal view {\\n require(\\n (IERC20(_poolInfo.pool).balanceOf(address(_poolInfo.strategy)) > _poolInfo.poolTokensInStrategy),\\n 'The strategy did not receive the pool tokens'\\n );\\n }\\n\\n /**\\n * Validate post exit pool data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePostExitPoolData(PoolInfo memory _poolInfo) internal view {\\n require(\\n IERC20(_poolInfo.pool).balanceOf(address(_poolInfo.strategy)) ==\\n _poolInfo.poolTokensInStrategy - _poolInfo.poolTokensInTransaction,\\n 'The strategy did not return the pool tokens'\\n );\\n // TODO: validate individual tokens received\\n }\\n\\n /**\\n * Return join pool calldata which is already generated from the pool API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * hparam _poolTokensOut Amount of pool tokens to send\\n * hparam _tokensIn Addresses of tokens to send to the pool\\n * hparam _maxAmountsIn Amounts of tokens to send to the pool\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getJoinPoolCalldata(\\n address, /* _strategy */\\n address, /* _poolAddress */\\n uint256, /* _poolTokensOut */\\n address[] calldata, /* _tokensIn */\\n uint256[] calldata /* _maxAmountsIn */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n /**\\n * Return exit pool calldata which is already generated from the pool API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * hparam _poolTokensIn Amount of pool tokens to receive\\n * hparam _tokensOut Addresses of tokens to receive\\n * hparam _minAmountsOut Amounts of pool tokens to receive\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getExitPoolCalldata(\\n address, /* _strategy */\\n address, /* _poolAddress */\\n uint256, /* _poolTokensIn */\\n address[] calldata, /* _tokensOut */\\n uint256[] calldata /* _minAmountsOut */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n function _isPool(\\n address /* _poolAddress */\\n ) internal view virtual returns (bool);\\n\\n function _getSpender(\\n address /* _poolAddress */\\n ) internal view virtual returns (address);\\n}\\n\",\"keccak256\":\"0xdb4cc931a671cbf8ab93c43a5e9e2853b8d5cfc744eeec928ad3659b23f2db90\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editGardenNFT(address _newGardenNFT) external;\\n\\n function editStrategyNFT(address _newStrategyNFT) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function editUniswapFactory(address _newUniswapFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\\n\\n function maxContributorsPerGarden() external view returns (uint256);\\n\\n function gardenCreationIsOpen() external view returns (bool);\\n\\n function openPublicGardenCreation() external;\\n\\n function setMaxContributorsPerGarden(uint256 _newMax) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function gardenNFT() external view returns (address);\\n\\n function strategyNFT() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\\n\\n function uniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0xdee5a27301c24f507d312f32249487fa9b0a756062a7e479405a1d1ee9ee7bb8\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function isGardenStrategy(address _strategy) external view returns (bool);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategyActiveInGarden(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to,\\n bool _withPenalty\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x88f1786ffee23e386aaa1735177912e1b5a7cdd440dafe52fb139fe50fd621b4\",\"license\":\"Apache License\"},\"contracts/interfaces/IIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIntegration\\n * @author Babylon Finance\\n *\\n * Interface for protocol integrations\\n */\\ninterface IIntegration {\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xee03c9274ddf3257e3bfd2bb229fea3412c9105f178e64174f59efeafd53182c\",\"license\":\"Apache License\"},\"contracts/interfaces/IPoolIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPoolIntegration\\n * @author Babylon Finance\\n *\\n * Interface for liquiditypool protocol integrations\\n */\\ninterface IPoolIntegration {\\n function joinPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensOut,\\n address[] memory _poolTokens,\\n uint256[] memory _maxAmountsIn\\n ) external;\\n\\n function exitPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensIn,\\n address[] memory _poolTokens,\\n uint256[] memory _minAmountsOut\\n ) external;\\n\\n function getPoolTokens(address _poolAddress) external view returns (address[] memory);\\n\\n function getPoolWeights(address _poolAddress) external view returns (uint256[] memory);\\n\\n function getPoolTokensOut(\\n address _poolAdress,\\n address _tokenAddress,\\n uint256 _maxAmountsIn\\n ) external view returns (uint256);\\n\\n function getPoolMinAmountsOut(address _poolAddress, uint256 _poolTokenAmount)\\n external\\n view\\n returns (uint256[] memory _minAmountsOut);\\n\\n function isPool(address _poolAddress) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xee7df0934dad8d729ee6dacf85e1ec327a0c8e17bcabaa2afa7d14d93325f9ac\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n address,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x850597ec9a68eb86f31f13b6b77d3b31350b4ed3d0019dedfbd3550ad1a1d9e2\",\"license\":\"Apache License\"},\"contracts/interfaces/external/1inch/IMooniswap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface IMooniswap is IERC20 {\\n function getTokens() external view returns (address[] memory _tokens);\\n\\n function tokens(uint256 i) external view returns (IERC20);\\n\\n function getBalanceForAddition(IERC20 token) external view returns (uint256);\\n\\n function getBalanceForRemoval(IERC20 token) external view returns (uint256);\\n\\n function getReturn(\\n IERC20 src,\\n IERC20 dst,\\n uint256 amount\\n ) external view returns (uint256);\\n\\n function deposit(uint256[2] memory maxAmounts, uint256[2] memory minAmounts)\\n external\\n payable\\n returns (uint256 fairSupply, uint256[2] memory receivedAmounts);\\n\\n function depositFor(\\n uint256[2] memory maxAmounts,\\n uint256[2] memory minAmounts,\\n address target\\n ) external payable returns (uint256 fairSupply, uint256[2] memory receivedAmounts);\\n\\n function withdraw(uint256 amount, uint256[] memory minReturns)\\n external\\n returns (uint256[2] memory withdrawnAmounts);\\n\\n function withdrawFor(\\n uint256 amount,\\n uint256[] memory minReturns,\\n address payable target\\n ) external returns (uint256[2] memory withdrawnAmounts);\\n\\n function swap(\\n IERC20 src,\\n IERC20 dst,\\n uint256 amount,\\n uint256 minReturn,\\n address referral\\n ) external payable returns (uint256 result);\\n\\n function swapFor(\\n IERC20 src,\\n IERC20 dst,\\n uint256 amount,\\n uint256 minReturn,\\n address referral,\\n address payable receiver\\n ) external payable returns (uint256 result);\\n}\\n\",\"keccak256\":\"0x16f0a33e6bd490cba4db46c24ae12c0386a75a47896efa35735a2cd0e7742cfe\",\"license\":\"MIT\"},\"contracts/interfaces/external/1inch/IMooniswapFactory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport './IMooniswap.sol';\\nimport './IMooniswapFactoryGovernance.sol';\\n\\ninterface IMooniswapFactory is IMooniswapFactoryGovernance {\\n function pools(IERC20 token0, IERC20 token1) external view returns (IMooniswap);\\n\\n function isPool(IMooniswap mooniswap) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5f1aea26f1950be4af5861b3551acc5820181d62df7641cb88540bb06e8d4911\",\"license\":\"MIT\"},\"contracts/interfaces/external/1inch/IMooniswapFactoryGovernance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\ninterface IMooniswapFactoryGovernance {\\n function shareParameters()\\n external\\n view\\n returns (\\n uint256 _referralShare,\\n uint256 _governanceShare,\\n address _governanceWallet,\\n address _referralFeeReceiver\\n );\\n\\n function defaults()\\n external\\n view\\n returns (\\n uint256 _defaultFee,\\n uint256 _defaultSlippageFee,\\n uint256 _defaultDecayPeriod\\n );\\n\\n function defaultFee() external view returns (uint256);\\n\\n function defaultSlippageFee() external view returns (uint256);\\n\\n function defaultDecayPeriod() external view returns (uint256);\\n\\n function virtualDefaultFee()\\n external\\n view\\n returns (\\n uint104,\\n uint104,\\n uint48\\n );\\n\\n function virtualDefaultSlippageFee()\\n external\\n view\\n returns (\\n uint104,\\n uint104,\\n uint48\\n );\\n\\n function virtualDefaultDecayPeriod()\\n external\\n view\\n returns (\\n uint104,\\n uint104,\\n uint48\\n );\\n\\n function referralShare() external view returns (uint256);\\n\\n function governanceShare() external view returns (uint256);\\n\\n function governanceWallet() external view returns (address);\\n\\n function feeCollector() external view returns (address);\\n\\n function isFeeCollector(address) external view returns (bool);\\n\\n function isActive() external view returns (bool);\\n}\\n\",\"keccak256\":\"0x1f3915aa7e0ff44dd3cf506f850510c8777f68c98d325e5c8de10325877bfdff\",\"license\":\"MIT\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b506040516200231538038062002315833981810160405260608110156200003757600080fd5b5080516020808301516040938401518451808601909552600c85526b1bdb995a5b98da17dc1bdbdb60a21b92850192909252919282848282826001600160a01b038116620000cc576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c6572206d75737420626520646566696e6564000000000000604482015290519081900360640190fd5b8251620000e190600190602086019062000136565b50600080546001600160a01b03199081166001600160a01b039384161790915560609290921b6001600160601b03191660805260016003556004805490921696169590951790945550620001e2945050505050565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826200016e5760008555620001b9565b82601f106200018957805160ff1916838001178555620001b9565b82800160010185558215620001b9579182015b82811115620001b95782518255916020019190600101906200019c565b50620001c7929150620001cb565b5090565b5b80821115620001c75760008155600101620001cc565b60805160601c612115620002006000398061060052506121156000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c8063708a34761161008c578063bd9d8ad911610066578063bd9d8ad914610403578063ca4f280314610479578063f5e393251461049f578063f77c4791146104cb576100df565b8063708a3476146102f357806385731140146103d5578063b10198fb146103dd576100df565b80633fc8cef3116100bd5780633fc8cef3146101b15780635b16ebb7146101d557806362cc395a1461020f576100df565b806306fdde03146100e457806317d7de7c146101615780633cd5bd9514610169575b600080fd5b6100ec6104d3565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012657818101518382015260200161010e565b50505050905090810190601f1680156101535780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100ec610560565b61019f6004803603606081101561017f57600080fd5b506001600160a01b038135811691602081013590911690604001356105f5565b60408051918252519081900360200190f35b6101b96105fe565b604080516001600160a01b039092168252519081900360200190f35b6101fb600480360360208110156101eb57600080fd5b50356001600160a01b0316610622565b604080519115158252519081900360200190f35b6102f1600480360360a081101561022557600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561026057600080fd5b82018360208201111561027257600080fd5b8035906020019184602083028401116401000000008311171561029457600080fd5b9193909290916020810190356401000000008111156102b257600080fd5b8201836020820111156102c457600080fd5b803590602001918460208302840111640100000000831117156102e657600080fd5b509092509050610633565b005b6102f1600480360360a081101561030957600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561034457600080fd5b82018360208201111561035657600080fd5b8035906020019184602083028401116401000000008311171561037857600080fd5b91939092909160208101903564010000000081111561039657600080fd5b8201836020820111156103a857600080fd5b803590602001918460208302840111640100000000831117156103ca57600080fd5b509092509050610a50565b6101b9610f6f565b6101fb600480360360208110156103f357600080fd5b50356001600160a01b0316610f7e565b6104296004803603602081101561041957600080fd5b50356001600160a01b0316610f93565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561046557818101518382015260200161044d565b505050509050019250505060405180910390f35b6104296004803603602081101561048f57600080fd5b50356001600160a01b0316611001565b610429600480360360408110156104b557600080fd5b506001600160a01b03813516906020013561110c565b6101b96114bd565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105585780601f1061052d57610100808354040283529160200191610558565b820191906000526020600020905b81548152906001019060200180831161053b57829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156105eb5780601f106105c0576101008083540402835291602001916105eb565b820191906000526020600020905b8154815290600101906020018083116105ce57829003601f168201915b5050505050905090565b60019392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061062d826114cc565b92915050565b6002600354141561068b576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b1580156106db57600080fd5b505afa1580156106ef573d6000803e3d6000fd5b505050506040513d602081101561070557600080fd5b5051610758576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b600061076988888888888888611562565b90506107748161176e565b80602001516001600160a01b03166397ccdc6061079089611859565b89896040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b1580156107e857600080fd5b505af11580156107fc573d6000803e3d6000fd5b5050505060008060006108148b8b8b8b8b8b8b61185c565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610891578181015183820152602001610879565b50505050905090810190601f1680156108be5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1580156108df57600080fd5b505af11580156108f3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561091c57600080fd5b810190808051604051939291908464010000000082111561093c57600080fd5b90830190602082018581111561095157600080fd5b825164010000000081118282018810171561096b57600080fd5b82525081516020918201929091019080838360005b83811015610998578181015183820152602001610980565b50505050905090810190601f1680156109c55780820380516001836020036101000a031916815260200191505b50604052505050506109d6846119c2565b83600001516001600160a01b031684602001516001600160a01b03167f7659e40cf608296ce5aa9eff9c80adc7a49cb481173fc4e302e3983827b042df86604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b60026003541415610aa8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b158015610af857600080fd5b505afa158015610b0c573d6000803e3d6000fd5b505050506040513d6020811015610b2257600080fd5b5051610b75576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b6000610b8688888888888888611562565b9050610b9181611a8a565b60005b84811015610c8a576000868683818110610baa57fe5b905060200201356001600160a01b03166001600160a01b031614610c825781602001516001600160a01b03166397ccdc60610be48a611859565b888885818110610bf057fe5b905060200201356001600160a01b0316878786818110610c0c57fe5b905060200201356040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015610c6957600080fd5b505af1158015610c7d573d6000803e3d6000fd5b505050505b600101610b94565b506000806000610c9f8b8b8b8b8b8b8b611b2b565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610d1c578181015183820152602001610d04565b50505050905090810190601f168015610d495780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610d6a57600080fd5b505af1158015610d7e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610da757600080fd5b8101908080516040519392919084640100000000821115610dc757600080fd5b908301906020820185811115610ddc57600080fd5b8251640100000000811182820188101715610df657600080fd5b82525081516020918201929091019080838360005b83811015610e23578181015183820152602001610e0b565b50505050905090810190601f168015610e505780820380516001836020036101000a031916815260200191505b5060405250505050610ee78460a0015185604001516001600160a01b03166370a0823187602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610eb557600080fd5b505afa158015610ec9573d6000803e3d6000fd5b505050506040513d6020811015610edf57600080fd5b505190611d85565b6080850152610ef584611de2565b83600001516001600160a01b031684602001516001600160a01b03167fe5ca6288535c5c6c2462c912b4033eade15b80926717896a2d58a2defdeb912886604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b6004546001600160a01b031681565b60026020526000908152604090205460ff1681565b604080516002808252606080830184529260009291906020830190803683370190505090506706f05b59d3b2000081600081518110610fce57fe5b6020026020010181815250506706f05b59d3b2000081600181518110610ff057fe5b602090810291909101015292915050565b6060816001600160a01b031663aa6ca8086040518163ffffffff1660e01b815260040160006040518083038186803b15801561103c57600080fd5b505afa158015611050573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561107957600080fd5b810190808051604051939291908464010000000082111561109957600080fd5b9083019060208201858111156110ae57600080fd5b82518660208202830111640100000000821117156110cb57600080fd5b82525081516020918201928201910280838360005b838110156110f85781810151838201526020016110e0565b505050509050016040525050509050919050565b60606000836001600160a01b031663aa6ca8086040518163ffffffff1660e01b815260040160006040518083038186803b15801561114957600080fd5b505afa15801561115d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561118657600080fd5b81019080805160405193929190846401000000008211156111a657600080fd5b9083019060208201858111156111bb57600080fd5b82518660208202830111640100000000821117156111d857600080fd5b82525081516020918201928201910280838360005b838110156112055781810151838201526020016111ed565b5050505090500160405250505090506000846001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561124f57600080fd5b505afa158015611263573d6000803e3d6000fd5b505050506040513d602081101561127957600080fd5b505160408051600280825260608201835292935060009290916020830190803683370190505090506000806001600160a01b0316846000815181106112ba57fe5b60200260200101516001600160a01b031614156112e157866001600160a01b03163161136f565b836000815181106112ee57fe5b60200260200101516001600160a01b03166370a08231886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561134257600080fd5b505afa158015611356573d6000803e3d6000fd5b505050506040513d602081101561136c57600080fd5b50515b90506000806001600160a01b03168560018151811061138a57fe5b60200260200101516001600160a01b031614156113b157876001600160a01b03163161143f565b846001815181106113be57fe5b60200260200101516001600160a01b03166370a08231896040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561141257600080fd5b505afa158015611426573d6000803e3d6000fd5b505050506040513d602081101561143c57600080fd5b50515b9050611467670dbd2fc137a300006114618661145b868c611ea4565b90611f04565b90611f6b565b8360008151811061147457fe5b6020908102919091010152611499670dbd2fc137a300006114618661145b858c611ea4565b836001815181106114a657fe5b602090810291909101015250909695505050505050565b6000546001600160a01b031681565b6000600460009054906101000a90046001600160a01b03166001600160a01b0316635b16ebb7836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561153057600080fd5b505afa158015611544573d6000803e3d6000fd5b505050506040513d602081101561155a57600080fd5b505192915050565b61156a611f83565b611572611f83565b6001600160a01b0389166020808301829052604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b892600480840193919291829003018186803b1580156115d057600080fd5b505afa1580156115e4573d6000803e3d6000fd5b505050506040513d60208110156115fa57600080fd5b50516001600160a01b0390811682528816604080830182905280517f18160ddd00000000000000000000000000000000000000000000000000000000815290516318160ddd91600480820192602092909190829003018186803b15801561166057600080fd5b505afa158015611674573d6000803e3d6000fd5b505050506040513d602081101561168a57600080fd5b50516060820152604080517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b038b811660048301529151918a16916370a0823191602480820192602092909190829003018186803b1580156116f457600080fd5b505afa158015611708573d6000803e3d6000fd5b505050506040513d602081101561171e57600080fd5b505160a0820152608081018790526040805160208581028281018201909352858252909186918691829185019084908082843760009201919091525050505060c082015298975050505050505050565b61177b81604001516114cc565b6117cc576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b600081608001511161180f5760405162461bcd60e51b815260040180806020018281038252602e81526020018061202e602e913960400191505060405180910390fd5b80608001518160a0015110156118565760405162461bcd60e51b815260040180806020018281038252602d815260200180612088602d913960400191505060405180910390fd5b50565b90565b6000806060600286146118b6576040805162461bcd60e51b815260206004820152601360248201527f54776f20746f6b656e7320726571756972656400000000000000000000000000604482015290519081900360640190fd5b6002841461190b576040805162461bcd60e51b815260206004820152601460248201527f54776f20616d6f756e7473207265717569726564000000000000000000000000604482015290519081900360640190fd5b600088868660405160240180848152602001806020018281038252848482818152602001925060200280828437600081840152601f19601f8201169050808301925050509450505050506040516020818303038152906040527f5915d806000000000000000000000000000000000000000000000000000000006001600160e01b0319166020820180516001600160e01b038381831617835250505050905089600082935093509350509750975097945050505050565b80608001518160a001510381604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611a2257600080fd5b505afa158015611a36573d6000803e3d6000fd5b505050506040513d6020811015611a4c57600080fd5b5051146118565760405162461bcd60e51b815260040180806020018281038252602b8152602001806120b5602b913960400191505060405180910390fd5b611a9781604001516114cc565b611ae8576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b60008160800151116118565760405162461bcd60e51b8152600401808060200182810382526031815260200180611fdc6031913960400191505060405180910390fd5b600080606060028614611b85576040805162461bcd60e51b815260206004820152601360248201527f54776f20746f6b656e7320726571756972656400000000000000000000000000604482015290519081900360640190fd5b60028414611bda576040805162461bcd60e51b815260206004820152601460248201527f54776f20616d6f756e7473207265717569726564000000000000000000000000604482015290519081900360640190fd5b600085856000818110611be957fe5b9050602002013586866001818110611bfd57fe5b90506020020135611c59611c37662386f26fc100006002028a8a6000818110611c2257fe5b90506020020135611f6b90919063ffffffff16565b89896000818110611c4457fe5b90506020020135611d8590919063ffffffff16565b611c81611c7466470de4df8200008b8b6001818110611c2257fe5b8a8a6001818110611c4457fe5b604080516024810195909552604485019390935260648401919091526084808401919091528151808403909101815260a490920190526020810180516001600160e01b03167f3049105d00000000000000000000000000000000000000000000000000000000179052905060008089898281611cf957fe5b905060200201356001600160a01b03166001600160a01b03161415611d2f5786866000818110611d2557fe5b9050602002013590505b600089896001818110611d3e57fe5b905060200201356001600160a01b03166001600160a01b03161415611d745786866001818110611d6a57fe5b9050602002013590505b999b999a5098975050505050505050565b600082821115611ddc576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b8060a0015181604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611e3c57600080fd5b505afa158015611e50573d6000803e3d6000fd5b505050506040513d6020811015611e6657600080fd5b5051116118565760405162461bcd60e51b815260040180806020018281038252602c81526020018061205c602c913960400191505060405180910390fd5b600082611eb35750600061062d565b82820282848281611ec057fe5b0414611efd5760405162461bcd60e51b815260040180806020018281038252602181526020018061200d6021913960400191505060405180910390fd5b9392505050565b6000808211611f5a576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611f6357fe5b049392505050565b6000611efd670de0b6b3a764000061145b8585611ea4565b6040518060e0016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160608152509056fe4d696e20706f6f6c20746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77506f6f6c20746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520737472617465677920646964206e6f7420726563656976652074686520706f6f6c20746f6b656e7354686520737472617465677920646f6573206e6f74206861766520656e6f75676820706f6f6c20746f6b656e7354686520737472617465677920646964206e6f742072657475726e2074686520706f6f6c20746f6b656e73a26469706673582212201eb8866e6dd0e6bb363ffae3f7ca0292c846f3b4d15bc64983ce27e09a34a70a64736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100df5760003560e01c8063708a34761161008c578063bd9d8ad911610066578063bd9d8ad914610403578063ca4f280314610479578063f5e393251461049f578063f77c4791146104cb576100df565b8063708a3476146102f357806385731140146103d5578063b10198fb146103dd576100df565b80633fc8cef3116100bd5780633fc8cef3146101b15780635b16ebb7146101d557806362cc395a1461020f576100df565b806306fdde03146100e457806317d7de7c146101615780633cd5bd9514610169575b600080fd5b6100ec6104d3565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012657818101518382015260200161010e565b50505050905090810190601f1680156101535780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100ec610560565b61019f6004803603606081101561017f57600080fd5b506001600160a01b038135811691602081013590911690604001356105f5565b60408051918252519081900360200190f35b6101b96105fe565b604080516001600160a01b039092168252519081900360200190f35b6101fb600480360360208110156101eb57600080fd5b50356001600160a01b0316610622565b604080519115158252519081900360200190f35b6102f1600480360360a081101561022557600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561026057600080fd5b82018360208201111561027257600080fd5b8035906020019184602083028401116401000000008311171561029457600080fd5b9193909290916020810190356401000000008111156102b257600080fd5b8201836020820111156102c457600080fd5b803590602001918460208302840111640100000000831117156102e657600080fd5b509092509050610633565b005b6102f1600480360360a081101561030957600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561034457600080fd5b82018360208201111561035657600080fd5b8035906020019184602083028401116401000000008311171561037857600080fd5b91939092909160208101903564010000000081111561039657600080fd5b8201836020820111156103a857600080fd5b803590602001918460208302840111640100000000831117156103ca57600080fd5b509092509050610a50565b6101b9610f6f565b6101fb600480360360208110156103f357600080fd5b50356001600160a01b0316610f7e565b6104296004803603602081101561041957600080fd5b50356001600160a01b0316610f93565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561046557818101518382015260200161044d565b505050509050019250505060405180910390f35b6104296004803603602081101561048f57600080fd5b50356001600160a01b0316611001565b610429600480360360408110156104b557600080fd5b506001600160a01b03813516906020013561110c565b6101b96114bd565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105585780601f1061052d57610100808354040283529160200191610558565b820191906000526020600020905b81548152906001019060200180831161053b57829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156105eb5780601f106105c0576101008083540402835291602001916105eb565b820191906000526020600020905b8154815290600101906020018083116105ce57829003601f168201915b5050505050905090565b60019392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061062d826114cc565b92915050565b6002600354141561068b576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b1580156106db57600080fd5b505afa1580156106ef573d6000803e3d6000fd5b505050506040513d602081101561070557600080fd5b5051610758576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b600061076988888888888888611562565b90506107748161176e565b80602001516001600160a01b03166397ccdc6061079089611859565b89896040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b1580156107e857600080fd5b505af11580156107fc573d6000803e3d6000fd5b5050505060008060006108148b8b8b8b8b8b8b61185c565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610891578181015183820152602001610879565b50505050905090810190601f1680156108be5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1580156108df57600080fd5b505af11580156108f3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561091c57600080fd5b810190808051604051939291908464010000000082111561093c57600080fd5b90830190602082018581111561095157600080fd5b825164010000000081118282018810171561096b57600080fd5b82525081516020918201929091019080838360005b83811015610998578181015183820152602001610980565b50505050905090810190601f1680156109c55780820380516001836020036101000a031916815260200191505b50604052505050506109d6846119c2565b83600001516001600160a01b031684602001516001600160a01b03167f7659e40cf608296ce5aa9eff9c80adc7a49cb481173fc4e302e3983827b042df86604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b60026003541415610aa8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b158015610af857600080fd5b505afa158015610b0c573d6000803e3d6000fd5b505050506040513d6020811015610b2257600080fd5b5051610b75576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b6000610b8688888888888888611562565b9050610b9181611a8a565b60005b84811015610c8a576000868683818110610baa57fe5b905060200201356001600160a01b03166001600160a01b031614610c825781602001516001600160a01b03166397ccdc60610be48a611859565b888885818110610bf057fe5b905060200201356001600160a01b0316878786818110610c0c57fe5b905060200201356040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015610c6957600080fd5b505af1158015610c7d573d6000803e3d6000fd5b505050505b600101610b94565b506000806000610c9f8b8b8b8b8b8b8b611b2b565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610d1c578181015183820152602001610d04565b50505050905090810190601f168015610d495780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610d6a57600080fd5b505af1158015610d7e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610da757600080fd5b8101908080516040519392919084640100000000821115610dc757600080fd5b908301906020820185811115610ddc57600080fd5b8251640100000000811182820188101715610df657600080fd5b82525081516020918201929091019080838360005b83811015610e23578181015183820152602001610e0b565b50505050905090810190601f168015610e505780820380516001836020036101000a031916815260200191505b5060405250505050610ee78460a0015185604001516001600160a01b03166370a0823187602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610eb557600080fd5b505afa158015610ec9573d6000803e3d6000fd5b505050506040513d6020811015610edf57600080fd5b505190611d85565b6080850152610ef584611de2565b83600001516001600160a01b031684602001516001600160a01b03167fe5ca6288535c5c6c2462c912b4033eade15b80926717896a2d58a2defdeb912886604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b6004546001600160a01b031681565b60026020526000908152604090205460ff1681565b604080516002808252606080830184529260009291906020830190803683370190505090506706f05b59d3b2000081600081518110610fce57fe5b6020026020010181815250506706f05b59d3b2000081600181518110610ff057fe5b602090810291909101015292915050565b6060816001600160a01b031663aa6ca8086040518163ffffffff1660e01b815260040160006040518083038186803b15801561103c57600080fd5b505afa158015611050573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561107957600080fd5b810190808051604051939291908464010000000082111561109957600080fd5b9083019060208201858111156110ae57600080fd5b82518660208202830111640100000000821117156110cb57600080fd5b82525081516020918201928201910280838360005b838110156110f85781810151838201526020016110e0565b505050509050016040525050509050919050565b60606000836001600160a01b031663aa6ca8086040518163ffffffff1660e01b815260040160006040518083038186803b15801561114957600080fd5b505afa15801561115d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561118657600080fd5b81019080805160405193929190846401000000008211156111a657600080fd5b9083019060208201858111156111bb57600080fd5b82518660208202830111640100000000821117156111d857600080fd5b82525081516020918201928201910280838360005b838110156112055781810151838201526020016111ed565b5050505090500160405250505090506000846001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561124f57600080fd5b505afa158015611263573d6000803e3d6000fd5b505050506040513d602081101561127957600080fd5b505160408051600280825260608201835292935060009290916020830190803683370190505090506000806001600160a01b0316846000815181106112ba57fe5b60200260200101516001600160a01b031614156112e157866001600160a01b03163161136f565b836000815181106112ee57fe5b60200260200101516001600160a01b03166370a08231886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561134257600080fd5b505afa158015611356573d6000803e3d6000fd5b505050506040513d602081101561136c57600080fd5b50515b90506000806001600160a01b03168560018151811061138a57fe5b60200260200101516001600160a01b031614156113b157876001600160a01b03163161143f565b846001815181106113be57fe5b60200260200101516001600160a01b03166370a08231896040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561141257600080fd5b505afa158015611426573d6000803e3d6000fd5b505050506040513d602081101561143c57600080fd5b50515b9050611467670dbd2fc137a300006114618661145b868c611ea4565b90611f04565b90611f6b565b8360008151811061147457fe5b6020908102919091010152611499670dbd2fc137a300006114618661145b858c611ea4565b836001815181106114a657fe5b602090810291909101015250909695505050505050565b6000546001600160a01b031681565b6000600460009054906101000a90046001600160a01b03166001600160a01b0316635b16ebb7836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561153057600080fd5b505afa158015611544573d6000803e3d6000fd5b505050506040513d602081101561155a57600080fd5b505192915050565b61156a611f83565b611572611f83565b6001600160a01b0389166020808301829052604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b892600480840193919291829003018186803b1580156115d057600080fd5b505afa1580156115e4573d6000803e3d6000fd5b505050506040513d60208110156115fa57600080fd5b50516001600160a01b0390811682528816604080830182905280517f18160ddd00000000000000000000000000000000000000000000000000000000815290516318160ddd91600480820192602092909190829003018186803b15801561166057600080fd5b505afa158015611674573d6000803e3d6000fd5b505050506040513d602081101561168a57600080fd5b50516060820152604080517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b038b811660048301529151918a16916370a0823191602480820192602092909190829003018186803b1580156116f457600080fd5b505afa158015611708573d6000803e3d6000fd5b505050506040513d602081101561171e57600080fd5b505160a0820152608081018790526040805160208581028281018201909352858252909186918691829185019084908082843760009201919091525050505060c082015298975050505050505050565b61177b81604001516114cc565b6117cc576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b600081608001511161180f5760405162461bcd60e51b815260040180806020018281038252602e81526020018061202e602e913960400191505060405180910390fd5b80608001518160a0015110156118565760405162461bcd60e51b815260040180806020018281038252602d815260200180612088602d913960400191505060405180910390fd5b50565b90565b6000806060600286146118b6576040805162461bcd60e51b815260206004820152601360248201527f54776f20746f6b656e7320726571756972656400000000000000000000000000604482015290519081900360640190fd5b6002841461190b576040805162461bcd60e51b815260206004820152601460248201527f54776f20616d6f756e7473207265717569726564000000000000000000000000604482015290519081900360640190fd5b600088868660405160240180848152602001806020018281038252848482818152602001925060200280828437600081840152601f19601f8201169050808301925050509450505050506040516020818303038152906040527f5915d806000000000000000000000000000000000000000000000000000000006001600160e01b0319166020820180516001600160e01b038381831617835250505050905089600082935093509350509750975097945050505050565b80608001518160a001510381604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611a2257600080fd5b505afa158015611a36573d6000803e3d6000fd5b505050506040513d6020811015611a4c57600080fd5b5051146118565760405162461bcd60e51b815260040180806020018281038252602b8152602001806120b5602b913960400191505060405180910390fd5b611a9781604001516114cc565b611ae8576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b60008160800151116118565760405162461bcd60e51b8152600401808060200182810382526031815260200180611fdc6031913960400191505060405180910390fd5b600080606060028614611b85576040805162461bcd60e51b815260206004820152601360248201527f54776f20746f6b656e7320726571756972656400000000000000000000000000604482015290519081900360640190fd5b60028414611bda576040805162461bcd60e51b815260206004820152601460248201527f54776f20616d6f756e7473207265717569726564000000000000000000000000604482015290519081900360640190fd5b600085856000818110611be957fe5b9050602002013586866001818110611bfd57fe5b90506020020135611c59611c37662386f26fc100006002028a8a6000818110611c2257fe5b90506020020135611f6b90919063ffffffff16565b89896000818110611c4457fe5b90506020020135611d8590919063ffffffff16565b611c81611c7466470de4df8200008b8b6001818110611c2257fe5b8a8a6001818110611c4457fe5b604080516024810195909552604485019390935260648401919091526084808401919091528151808403909101815260a490920190526020810180516001600160e01b03167f3049105d00000000000000000000000000000000000000000000000000000000179052905060008089898281611cf957fe5b905060200201356001600160a01b03166001600160a01b03161415611d2f5786866000818110611d2557fe5b9050602002013590505b600089896001818110611d3e57fe5b905060200201356001600160a01b03166001600160a01b03161415611d745786866001818110611d6a57fe5b9050602002013590505b999b999a5098975050505050505050565b600082821115611ddc576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b8060a0015181604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611e3c57600080fd5b505afa158015611e50573d6000803e3d6000fd5b505050506040513d6020811015611e6657600080fd5b5051116118565760405162461bcd60e51b815260040180806020018281038252602c81526020018061205c602c913960400191505060405180910390fd5b600082611eb35750600061062d565b82820282848281611ec057fe5b0414611efd5760405162461bcd60e51b815260040180806020018281038252602181526020018061200d6021913960400191505060405180910390fd5b9392505050565b6000808211611f5a576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611f6357fe5b049392505050565b6000611efd670de0b6b3a764000061145b8585611ea4565b6040518060e0016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160608152509056fe4d696e20706f6f6c20746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77506f6f6c20746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520737472617465677920646964206e6f7420726563656976652074686520706f6f6c20746f6b656e7354686520737472617465677920646f6573206e6f74206861766520656e6f75676820706f6f6c20746f6b656e7354686520737472617465677920646964206e6f742072657475726e2074686520706f6f6c20746f6b656e73a26469706673582212201eb8866e6dd0e6bb363ffae3f7ca0292c846f3b4d15bc64983ce27e09a34a70a64736f6c63430007060033", "devdoc": { "author": "Babylon Finance Protocol Kyber protocol trade integration", "kind": "dev", @@ -435,7 +435,7 @@ "storageLayout": { "storage": [ { - "astId": 18742, + "astId": 17657, "contract": "contracts/integrations/pool/OneInchPoolIntegration.sol:OneInchPoolIntegration", "label": "controller", "offset": 0, @@ -443,7 +443,7 @@ "type": "t_address" }, { - "astId": 18746, + "astId": 17661, "contract": "contracts/integrations/pool/OneInchPoolIntegration.sol:OneInchPoolIntegration", "label": "name", "offset": 0, @@ -451,7 +451,7 @@ "type": "t_string_storage" }, { - "astId": 18750, + "astId": 17665, "contract": "contracts/integrations/pool/OneInchPoolIntegration.sol:OneInchPoolIntegration", "label": "initializedByGarden", "offset": 0, @@ -459,7 +459,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 7995, + "astId": 5603, "contract": "contracts/integrations/pool/OneInchPoolIntegration.sol:OneInchPoolIntegration", "label": "_status", "offset": 0, @@ -467,12 +467,12 @@ "type": "t_uint256" }, { - "astId": 21075, + "astId": 19983, "contract": "contracts/integrations/pool/OneInchPoolIntegration.sol:OneInchPoolIntegration", "label": "mooniswapFactory", "offset": 0, "slot": "4", - "type": "t_contract(IMooniswapFactory)25296" + "type": "t_contract(IMooniswapFactory)24399" } ], "types": { @@ -486,7 +486,7 @@ "label": "bool", "numberOfBytes": "1" }, - "t_contract(IMooniswapFactory)25296": { + "t_contract(IMooniswapFactory)24399": { "encoding": "inplace", "label": "contract IMooniswapFactory", "numberOfBytes": "20" diff --git a/deployments/artifacts/mainnet/OneInchTradeIntegration.json b/deployments/artifacts/mainnet/OneInchTradeIntegration.json index 8c57ff1e8..22bacf4de 100644 --- a/deployments/artifacts/mainnet/OneInchTradeIntegration.json +++ b/deployments/artifacts/mainnet/OneInchTradeIntegration.json @@ -1,5 +1,5 @@ { - "address": "0xa02DaE2F6f3576556B0f941AaCBb38dC54D1b82a", + "address": "0x38acAf88F679604EaBd1Cd68740ab80a9F074af2", "abi": [ { "inputs": [ @@ -236,31 +236,31 @@ "type": "function" } ], - "transactionHash": "0x34fc6831e6ba102e61edcbe1cbd92f940160e7798c8336bf54ce8d87f24036fb", + "transactionHash": "0x55ff712b08e8fcfd9286bbb04049bdb524a0993e60e5c5147381afbeebe4e116", "receipt": { "to": null, "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", - "contractAddress": "0xa02DaE2F6f3576556B0f941AaCBb38dC54D1b82a", - "transactionIndex": 15, - "gasUsed": "1557528", + "contractAddress": "0x38acAf88F679604EaBd1Cd68740ab80a9F074af2", + "transactionIndex": 161, + "gasUsed": "1782677", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x85a712ea8f1946e21b785b86f3425f0cabf126f9e57feb238a40afc2dd155f60", - "transactionHash": "0x34fc6831e6ba102e61edcbe1cbd92f940160e7798c8336bf54ce8d87f24036fb", + "blockHash": "0xa6b8225bee558034f1307c9c49a1cf8e5abdb89934a386e08482a56e1b44f748", + "transactionHash": "0x55ff712b08e8fcfd9286bbb04049bdb524a0993e60e5c5147381afbeebe4e116", "logs": [], - "blockNumber": 12360948, - "cumulativeGasUsed": "2705151", + "blockNumber": 12451272, + "cumulativeGasUsed": "14323169", "status": 1, "byzantium": true }, "args": [ - "0xffe7c30daDb1B132b86aB7bbede496615d54c8Ac", + "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F", "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", "0xC586BeF4a0992C495Cf22e1aeEE4E446CECDee0E" ], - "solcInputHash": "a02a2075cf667a20c416d2d0a5e8f337", - "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_weth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_oneInchExchangeAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IGarden\",\"name\":\"_garden\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IStrategy\",\"name\":\"_strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_sendToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_receiveToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_exchangeName\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_totalSendAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_totalReceiveAmount\",\"type\":\"uint256\"}],\"name\":\"ComponentExchanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getConversionRates\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"initializedByGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oneInchExchangeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_sendToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sendQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_receiveToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minReceiveQuantity\",\"type\":\"uint256\"}],\"name\":\"trade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newExchangeAddress\",\"type\":\"address\"}],\"name\":\"updateExchangeAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Protocol 1Inch protocol trade integration\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of the controller\",\"_oneInchExchangeAddress\":\"Address of 1inch exchange contract\",\"_weth\":\"Address of the WETH ERC20\"}},\"getConversionRates(address,address,uint256)\":{\"returns\":{\"_0\":\"uint256 Conversion rate in wei\",\"_1\":\"uint256 Slippage rate in wei\"}},\"trade(address,address,uint256,address,uint256)\":{\"details\":\"@param _strategy Address of the strategy\",\"params\":{\"_minReceiveQuantity\":\"Min units of wanted token to be received from the exchange\",\"_receiveToken\":\"Address of the token that will be received from the exchange\",\"_sendQuantity\":\"Units of reserve asset token sent to the exchange\",\"_sendToken\":\"Address of the token to be sent to the exchange\"}}},\"title\":\"1InchTradeIntegration\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates the integration\"},\"getConversionRates(address,address,uint256)\":{\"notice\":\"Returns the conversion rate between the source token and the destination token in 18 decimals, regardless of component token's decimals hparam _sourceToken Address of source token to be sold hparam _destinationToken Address of destination token to buy hparam _sourceQuantity Amount of source token to sell\"},\"getName()\":{\"notice\":\"Returns the name of the integration\"},\"trade(address,address,uint256,address,uint256)\":{\"notice\":\"Executes a trade on a supported DEX.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/integrations/trade/OneInchTradeIntegration.sol\":\"OneInchTradeIntegration\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\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 /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\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, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x7b2b8baa20fd60ab4a328c8e34c64a353651b80ba4b5b157cbb61813f6f85d55\",\"license\":\"MIT\"},\"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol\":{\"content\":\"pragma solidity >=0.5.0;\\n\\ninterface IUniswapV2Pair {\\n event Approval(address indexed owner, address indexed spender, uint value);\\n event Transfer(address indexed from, address indexed to, uint value);\\n\\n function name() external pure returns (string memory);\\n function symbol() external pure returns (string memory);\\n function decimals() external pure returns (uint8);\\n function totalSupply() external view returns (uint);\\n function balanceOf(address owner) external view returns (uint);\\n function allowance(address owner, address spender) external view returns (uint);\\n\\n function approve(address spender, uint value) external returns (bool);\\n function transfer(address to, uint value) external returns (bool);\\n function transferFrom(address from, address to, uint value) external returns (bool);\\n\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n function PERMIT_TYPEHASH() external pure returns (bytes32);\\n function nonces(address owner) external view returns (uint);\\n\\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\\n\\n event Mint(address indexed sender, uint amount0, uint amount1);\\n event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\\n event Swap(\\n address indexed sender,\\n uint amount0In,\\n uint amount1In,\\n uint amount0Out,\\n uint amount1Out,\\n address indexed to\\n );\\n event Sync(uint112 reserve0, uint112 reserve1);\\n\\n function MINIMUM_LIQUIDITY() external pure returns (uint);\\n function factory() external view returns (address);\\n function token0() external view returns (address);\\n function token1() external view returns (address);\\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\\n function price0CumulativeLast() external view returns (uint);\\n function price1CumulativeLast() external view returns (uint);\\n function kLast() external view returns (uint);\\n\\n function mint(address to) external returns (uint liquidity);\\n function burn(address to) external returns (uint amount0, uint amount1);\\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\\n function skim(address to) external;\\n function sync() external;\\n\\n function initialize(address, address) external;\\n}\\n\",\"keccak256\":\"0x7c9bc70e5996c763e02ff38905282bc24fb242b0ef2519a003b36824fc524a4b\"},\"@uniswap/v2-periphery/contracts/libraries/SafeMath.sol\":{\"content\":\"pragma solidity >=0.5.0;\\n\\n// a library for performing overflow-safe math, courtesy of DappHub (https://github.com/dapphub/ds-math)\\n\\nlibrary SafeMath {\\n function add(uint x, uint y) internal pure returns (uint z) {\\n require((z = x + y) >= x, 'ds-math-add-overflow');\\n }\\n\\n function sub(uint x, uint y) internal pure returns (uint z) {\\n require((z = x - y) <= x, 'ds-math-sub-underflow');\\n }\\n\\n function mul(uint x, uint y) internal pure returns (uint z) {\\n require(y == 0 || (z = x * y) / y == x, 'ds-math-mul-overflow');\\n }\\n}\\n\",\"keccak256\":\"0x1fc06badffc7e465ffbf73154a4e0d618a7aac154eaa1657646d95f9abeb320c\"},\"@uniswap/v2-periphery/contracts/libraries/UniswapV2Library.sol\":{\"content\":\"pragma solidity >=0.5.0;\\n\\nimport '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';\\n\\nimport \\\"./SafeMath.sol\\\";\\n\\nlibrary UniswapV2Library {\\n using SafeMath for uint;\\n\\n // returns sorted token addresses, used to handle return values from pairs sorted in this order\\n function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {\\n require(tokenA != tokenB, 'UniswapV2Library: IDENTICAL_ADDRESSES');\\n (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);\\n require(token0 != address(0), 'UniswapV2Library: ZERO_ADDRESS');\\n }\\n\\n // calculates the CREATE2 address for a pair without making any external calls\\n function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) {\\n (address token0, address token1) = sortTokens(tokenA, tokenB);\\n pair = address(uint(keccak256(abi.encodePacked(\\n hex'ff',\\n factory,\\n keccak256(abi.encodePacked(token0, token1)),\\n hex'96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f' // init code hash\\n ))));\\n }\\n\\n // fetches and sorts the reserves for a pair\\n function getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) {\\n (address token0,) = sortTokens(tokenA, tokenB);\\n (uint reserve0, uint reserve1,) = IUniswapV2Pair(pairFor(factory, tokenA, tokenB)).getReserves();\\n (reserveA, reserveB) = tokenA == token0 ? (reserve0, reserve1) : (reserve1, reserve0);\\n }\\n\\n // given some amount of an asset and pair reserves, returns an equivalent amount of the other asset\\n function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) {\\n require(amountA > 0, 'UniswapV2Library: INSUFFICIENT_AMOUNT');\\n require(reserveA > 0 && reserveB > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');\\n amountB = amountA.mul(reserveB) / reserveA;\\n }\\n\\n // given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset\\n function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) {\\n require(amountIn > 0, 'UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT');\\n require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');\\n uint amountInWithFee = amountIn.mul(997);\\n uint numerator = amountInWithFee.mul(reserveOut);\\n uint denominator = reserveIn.mul(1000).add(amountInWithFee);\\n amountOut = numerator / denominator;\\n }\\n\\n // given an output amount of an asset and pair reserves, returns a required input amount of the other asset\\n function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn) {\\n require(amountOut > 0, 'UniswapV2Library: INSUFFICIENT_OUTPUT_AMOUNT');\\n require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');\\n uint numerator = reserveIn.mul(amountOut).mul(1000);\\n uint denominator = reserveOut.sub(amountOut).mul(997);\\n amountIn = (numerator / denominator).add(1);\\n }\\n\\n // performs chained getAmountOut calculations on any number of pairs\\n function getAmountsOut(address factory, uint amountIn, address[] memory path) internal view returns (uint[] memory amounts) {\\n require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');\\n amounts = new uint[](path.length);\\n amounts[0] = amountIn;\\n for (uint i; i < path.length - 1; i++) {\\n (uint reserveIn, uint reserveOut) = getReserves(factory, path[i], path[i + 1]);\\n amounts[i + 1] = getAmountOut(amounts[i], reserveIn, reserveOut);\\n }\\n }\\n\\n // performs chained getAmountIn calculations on any number of pairs\\n function getAmountsIn(address factory, uint amountOut, address[] memory path) internal view returns (uint[] memory amounts) {\\n require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');\\n amounts = new uint[](path.length);\\n amounts[amounts.length - 1] = amountOut;\\n for (uint i = path.length - 1; i > 0; i--) {\\n (uint reserveIn, uint reserveOut) = getReserves(factory, path[i - 1], path[i]);\\n amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2e125bac8733dde3c937e4245f15dcd56633a1aecf5d7760ba2018e9e374f378\"},\"contracts/integrations/BaseIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IIntegration} from '../interfaces/IIntegration.sol';\\nimport {IWETH} from '../interfaces/external/weth/IWETH.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\n\\n/**\\n * @title BaseIntegration\\n * @author Babylon Finance\\n *\\n * Abstract class that houses common Integration-related state and functions.\\n */\\nabstract contract BaseIntegration {\\n using SafeCast for int256;\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlySystemContract() {\\n require(IBabController(controller).isSystemContract(msg.sender), 'Only system can call this');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the controller\\n address public controller;\\n // Wrapped ETH address\\n address public immutable weth;\\n // Name of the integration\\n string public name;\\n mapping(address => bool) public initializedByGarden;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) {\\n require(_controller != address(0), 'Controller must be defined');\\n name = _name;\\n controller = _controller;\\n weth = _weth;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the name of the integration\\n */\\n function getName() external view returns (string memory) {\\n return name;\\n }\\n}\\n\",\"keccak256\":\"0xf15da8b024a5a4f205b363420cb5851fd1c4225970999aed5f00d829bbd4f638\",\"license\":\"Apache License\"},\"contracts/integrations/trade/OneInchTradeIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {IOneInchExchange} from '../../interfaces/external/1inch/IOneInchExchange.sol';\\nimport {TradeIntegration} from './TradeIntegration.sol';\\n\\n/**\\n * @title 1InchTradeIntegration\\n * @author Babylon Finance Protocol\\n *\\n * 1Inch protocol trade integration\\n */\\ncontract OneInchTradeIntegration is TradeIntegration {\\n using SafeMath for uint256;\\n\\n /* ============ Modifiers ============ */\\n\\n /**\\n * Throws if the sender is not the protocol\\n */\\n modifier onlyProtocol() {\\n require(msg.sender == controller, 'Only controller can call this');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Address of 1Inch exchange address\\n address public oneInchExchangeAddress;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n * @param _oneInchExchangeAddress Address of 1inch exchange contract\\n */\\n constructor(\\n address _controller,\\n address _weth,\\n address _oneInchExchangeAddress\\n ) TradeIntegration('1inch', _weth, _controller) {\\n oneInchExchangeAddress = _oneInchExchangeAddress;\\n }\\n\\n /* ============ External Functions ============ */\\n /**\\n * Returns the conversion rate between the source token and the destination token\\n * in 18 decimals, regardless of component token's decimals\\n *\\n * hparam _sourceToken Address of source token to be sold\\n * hparam _destinationToken Address of destination token to buy\\n * hparam _sourceQuantity Amount of source token to sell\\n *\\n * @return uint256 Conversion rate in wei\\n * @return uint256 Slippage rate in wei\\n */\\n function getConversionRates(\\n address,\\n address,\\n uint256\\n ) external pure override returns (uint256, uint256) {\\n revert('not implemented');\\n return (0, 0);\\n }\\n\\n function updateExchangeAddress(address _newExchangeAddress) public onlyProtocol {\\n oneInchExchangeAddress = _newExchangeAddress;\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Executes the trade through 1Inch.\\n *\\n * hparam _strategy Address of the strategy\\n * @param _sendToken Address of the token to be sent to the exchange\\n * @param _sendQuantity Units of reserve asset token sent to the exchange\\n * @param _receiveToken Address of the token that will be received from the exchange\\n */\\n function _getTradeCallData(\\n address, /*_strategy*/\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n )\\n internal\\n view\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n (uint256 _returnAmount, uint256[] memory _distribution) =\\n IOneInchExchange(oneInchExchangeAddress).getExpectedReturn(_sendToken, _receiveToken, _sendQuantity, 1, 0);\\n\\n bytes memory methodData =\\n abi.encodeWithSignature(\\n 'swap(address,address,uint256,uint256,uint256[],uint256)',\\n _sendToken,\\n _receiveToken,\\n _sendQuantity,\\n _returnAmount,\\n _distribution,\\n 0\\n );\\n return (oneInchExchangeAddress, 0, methodData);\\n }\\n\\n /**\\n * Returns the address to approve source tokens to for trading. This is the TokenTaker address\\n *\\n * @return address Address of the contract to approve tokens to\\n */\\n function _getSpender() internal view override returns (address) {\\n return oneInchExchangeAddress;\\n }\\n}\\n\",\"keccak256\":\"0x961c3628739f8b96099fc7c42e0aa850cdb40271eac0a3d0c214d2cc8c371bf7\",\"license\":\"Apache License\"},\"contracts/integrations/trade/TradeIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\n\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\nimport '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';\\nimport '@uniswap/v2-periphery/contracts/libraries/UniswapV2Library.sol';\\n\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {ITradeIntegration} from '../../interfaces/ITradeIntegration.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\n\\nimport {BaseIntegration} from '../BaseIntegration.sol';\\n\\n/**\\n * @title BorrowIntetration\\n * @author Babylon Finance Protocol\\n *\\n * Base class for integration with trading protocols\\n */\\nabstract contract TradeIntegration is BaseIntegration, ReentrancyGuard, ITradeIntegration {\\n using SafeMath for uint256;\\n using SafeCast for uint256;\\n\\n /* ============ Struct ============ */\\n\\n struct TradeInfo {\\n IGarden garden; // Garden\\n IStrategy strategy; // Strategy\\n string exchangeName; // Which exchange to use\\n address sendToken; // Address of token being sold\\n address receiveToken; // Address of token being bought\\n uint256 gardenTotalSupply; // Total supply of Garden in Precise Units (10^18)\\n uint256 totalSendQuantity; // Total quantity of sold tokens\\n uint256 totalMinReceiveQuantity; // Total minimum quantity of token to receive back\\n uint256 preTradeSendTokenBalance; // Total initial balance of token being sold\\n uint256 preTradeReceiveTokenBalance; // Total initial balance of token being bought\\n }\\n\\n /* ============ Events ============ */\\n\\n event ComponentExchanged(\\n IGarden indexed _garden,\\n IStrategy indexed _strategy,\\n address indexed _sendToken,\\n address _receiveToken,\\n string _exchangeName,\\n uint256 _totalSendAmount,\\n uint256 _totalReceiveAmount\\n );\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) BaseIntegration(_name, _weth, _controller) {}\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Executes a trade on a supported DEX.\\n * @dev\\n *\\n * @param _strategy Address of the strategy\\n * @param _sendToken Address of the token to be sent to the exchange\\n * @param _sendQuantity Units of reserve asset token sent to the exchange\\n * @param _receiveToken Address of the token that will be received from the exchange\\n * @param _minReceiveQuantity Min units of wanted token to be received from the exchange\\n */\\n function trade(\\n address _strategy,\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken,\\n uint256 _minReceiveQuantity\\n ) external override nonReentrant onlySystemContract {\\n TradeInfo memory tradeInfo =\\n _createTradeInfo(_strategy, name, _sendToken, _receiveToken, _sendQuantity, _minReceiveQuantity);\\n _validatePreTradeData(tradeInfo, _sendQuantity);\\n // Get spender address from exchange adapter and invoke approve for exact amount on sendToken\\n tradeInfo.strategy.invokeApprove(_getSpender(), tradeInfo.sendToken, tradeInfo.totalSendQuantity);\\n (address targetExchange, uint256 callValue, bytes memory methodData) =\\n _getTradeCallData(_strategy, tradeInfo.sendToken, tradeInfo.totalSendQuantity, tradeInfo.receiveToken);\\n tradeInfo.strategy.invokeFromIntegration(targetExchange, callValue, methodData);\\n\\n uint256 exchangedQuantity = _validatePostTrade(tradeInfo);\\n uint256 newAmountSendTokens = tradeInfo.preTradeSendTokenBalance.sub(tradeInfo.totalSendQuantity);\\n uint256 newAmountReceiveTokens = tradeInfo.preTradeReceiveTokenBalance.add(exchangedQuantity);\\n emit ComponentExchanged(\\n tradeInfo.garden,\\n tradeInfo.strategy,\\n _sendToken,\\n _receiveToken,\\n tradeInfo.exchangeName,\\n newAmountSendTokens,\\n newAmountReceiveTokens\\n );\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Create and return TradeInfo struct\\n *\\n * @param _strategy Address of the strategy\\n * @param _exchangeName Human readable name of the exchange in the integrations registry\\n * @param _sendToken Address of the token to be sent to the exchange\\n * @param _receiveToken Address of the token that will be received from the exchange\\n * @param _sendQuantity Units of token in SetToken sent to the exchange\\n * @param _minReceiveQuantity Min units of token in SetToken to be received from the exchange\\n *\\n * return TradeInfo Struct containing data for trade\\n */\\n function _createTradeInfo(\\n address _strategy,\\n string memory _exchangeName,\\n address _sendToken,\\n address _receiveToken,\\n uint256 _sendQuantity,\\n uint256 _minReceiveQuantity\\n ) internal view returns (TradeInfo memory) {\\n TradeInfo memory tradeInfo;\\n\\n tradeInfo.strategy = IStrategy(_strategy);\\n tradeInfo.garden = tradeInfo.strategy.garden();\\n\\n tradeInfo.exchangeName = _exchangeName;\\n\\n tradeInfo.sendToken = _sendToken;\\n tradeInfo.receiveToken = _receiveToken;\\n\\n tradeInfo.gardenTotalSupply = ERC20(address(tradeInfo.strategy.garden())).totalSupply();\\n\\n tradeInfo.totalSendQuantity = _sendQuantity;\\n\\n tradeInfo.totalMinReceiveQuantity = _minReceiveQuantity;\\n\\n tradeInfo.preTradeSendTokenBalance = ERC20(_sendToken).balanceOf(_strategy);\\n tradeInfo.preTradeReceiveTokenBalance = ERC20(_receiveToken).balanceOf(_strategy);\\n\\n return tradeInfo;\\n }\\n\\n /**\\n * Validate pre trade data. Check exchange is valid, token quantity is valid.\\n *\\n * @param _tradeInfo Struct containing trade information used in internal functions\\n * @param _sendQuantity Units of token in SetToken sent to the exchange\\n */\\n function _validatePreTradeData(TradeInfo memory _tradeInfo, uint256 _sendQuantity) internal view {\\n require(_tradeInfo.totalSendQuantity > 0, 'Token to sell must be nonzero');\\n address pair =\\n UniswapV2Library.pairFor(\\n IBabController(controller).getUniswapFactory(),\\n _tradeInfo.sendToken,\\n _tradeInfo.receiveToken\\n );\\n uint256 minLiquidity = _tradeInfo.garden.minLiquidityAsset();\\n // Check that there is enough liquidity\\n (uint256 liquidity0, uint256 liquidity1, ) = IUniswapV2Pair(pair).getReserves();\\n require(\\n (IUniswapV2Pair(pair).token0() == weth && liquidity0 >= minLiquidity) ||\\n (IUniswapV2Pair(pair).token1() == weth && liquidity1 >= minLiquidity),\\n 'Not enough liquidity'\\n );\\n require(\\n ERC20(_tradeInfo.sendToken).balanceOf(address(_tradeInfo.strategy)) >= _sendQuantity,\\n 'Garden needs to have enough liquid tokens'\\n );\\n }\\n\\n /**\\n * Validate post trade data.\\n *\\n * @param _tradeInfo Struct containing trade information used in internal functions\\n * @return uint256 Total quantity of receive token that was exchanged\\n */\\n function _validatePostTrade(TradeInfo memory _tradeInfo) internal view returns (uint256) {\\n uint256 exchangedQuantity =\\n ERC20(_tradeInfo.receiveToken).balanceOf(address(_tradeInfo.strategy)).sub(\\n _tradeInfo.preTradeReceiveTokenBalance\\n );\\n // Get reserve asset decimals\\n uint8 tokenDecimals = ERC20(_tradeInfo.receiveToken).decimals();\\n uint256 normalizedExchangedQuantity =\\n tokenDecimals != 18 ? exchangedQuantity.mul(10**(18 - tokenDecimals)) : exchangedQuantity;\\n require(normalizedExchangedQuantity >= _tradeInfo.totalMinReceiveQuantity, 'Slippage greater than allowed');\\n\\n return normalizedExchangedQuantity;\\n }\\n\\n /**\\n * Return exchange calldata which is already generated from the exchange API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _sendToken Address of the token to be sent to the exchange\\n * hparam _sendQuantity Units of reserve asset token sent to the exchange\\n * hparam _receiveToken Address of the token that will be received from the exchange\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getTradeCallData(\\n address, /* _strategy */\\n address, /* _sendToken */\\n uint256, /*_sendQuantity */\\n address /* _receiveToken */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n /**\\n * Returns the address to approve source tokens to for trading. This is the TokenTaker address\\n *\\n * @return address Address of the contract to approve tokens to\\n */\\n function _getSpender() internal view virtual returns (address);\\n}\\n\",\"keccak256\":\"0x02a5a72eea1ecebb0a23fee6afe9fc09bcc78a1ccefff49d3a55eec375d42bea\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityMinimum(uint256 _minRiskyPairLiquidityEth) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minRiskyPairLiquidityEth() external view returns (uint256);\\n\\n function getUniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0x57cf4ece98219f805a416e8c24728d30d9b37c4126d66785d2617b97e35ffae6\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function nftAddress() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategy(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function reenableEthForStrategies() external;\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x5e460136e0b45024ea1c1f32cde607f3ce75dd5b14cee34007d6bbd08beabc82\",\"license\":\"Apache License\"},\"contracts/interfaces/IIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIntegration\\n * @author Babylon Finance\\n *\\n * Interface for protocol integrations\\n */\\ninterface IIntegration {\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xee03c9274ddf3257e3bfd2bb229fea3412c9105f178e64174f59efeafd53182c\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital,\\n address _strategyNft\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function strategyNft() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x4396906e436eb68c96715e0a53ae1656ac5d7934ebdaeb58ec3c33953465bc39\",\"license\":\"Apache License\"},\"contracts/interfaces/ITradeIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title ITrade\\n * @author Babylon Finance\\n *\\n * Interface for trading protocol integrations\\n */\\ninterface ITradeIntegration {\\n function trade(\\n address _strategy,\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken,\\n uint256 _minReceiveQuantity\\n ) external;\\n\\n function getConversionRates(\\n address _sourceToken,\\n address _destinationToken,\\n uint256 _sourceQuantity\\n ) external returns (uint256, uint256);\\n}\\n\",\"keccak256\":\"0x95df25f2cbfd3d82a9e22c9202f9fc2c497e90fd6e5fcfb00c4162f6447c0cbd\",\"license\":\"Apache License\"},\"contracts/interfaces/external/1inch/IOneInchExchange.sol\":{\"content\":\"pragma solidity >=0.7.0 <0.9.0;\\n\\ninterface IOneInchExchange {\\n function swap(\\n address fromToken,\\n address destToken,\\n uint256 amount,\\n uint256 minReturn,\\n uint256[] memory distribution,\\n uint256 flags\\n ) external payable returns (uint256);\\n\\n function getExpectedReturn(\\n address fromToken,\\n address destToken,\\n uint256 amount,\\n uint256 parts,\\n uint256 flags\\n ) external view returns (uint256 returnAmount, uint256[] memory distribution);\\n}\\n\",\"keccak256\":\"0x0813160a0dfa74762c8572719a88cb7d5c912d66c3e41fca9d9d12b26996ad82\"},\"contracts/interfaces/external/weth/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface IWETH is IERC20 {\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n}\\n\",\"keccak256\":\"0xacc7980a650b7a753ee51f1bbc0ae4f641e84261bcc02cfdaf87ee8136483684\",\"license\":\"MIT\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001b8e38038062001b8e833981810160405260608110156200003757600080fd5b50805160208083015160409384015184518086019095526005855264062d2dcc6d60db1b92850192909252919282848282826001600160a01b038116620000c5576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c6572206d75737420626520646566696e6564000000000000604482015290519081900360640190fd5b8251620000da9060019060208601906200012f565b50600080546001600160a01b03199081166001600160a01b039384161790915560609290921b6001600160601b03191660805260016003556004805490921696169590951790945550620001db945050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001675760008555620001b2565b82601f106200018257805160ff1916838001178555620001b2565b82800160010185558215620001b2579182015b82811115620001b257825182559160200191906001019062000195565b50620001c0929150620001c4565b5090565b5b80821115620001c05760008155600101620001c5565b60805160601c61198b62000203600039806104135280610f335280610fc5525061198b6000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c8063aa0b24fa11610076578063c7868ace1161005b578063c7868ace14610202578063f77c47911461020a578063fa1ca82014610212576100a3565b8063aa0b24fa14610179578063b10198fb146101c8576100a3565b806306fdde03146100a857806317d7de7c1461012557806331415a651461012d5780633fc8cef314610155575b600080fd5b6100b0610256565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100ea5781810151838201526020016100d2565b50505050905090810190601f1680156101175780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100b06102e3565b6101536004803603602081101561014357600080fd5b50356001600160a01b0316610378565b005b61015d610411565b604080516001600160a01b039092168252519081900360200190f35b6101af6004803603606081101561018f57600080fd5b506001600160a01b03813581169160208101359091169060400135610435565b6040805192835260208301919091528051918290030190f35b6101ee600480360360208110156101de57600080fd5b50356001600160a01b0316610487565b604080519115158252519081900360200190f35b61015d61049c565b61015d6104ab565b610153600480360360a081101561022857600080fd5b506001600160a01b0381358116916020810135821691604082013591606081013590911690608001356104ba565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102db5780601f106102b0576101008083540402835291602001916102db565b820191906000526020600020905b8154815290600101906020018083116102be57829003601f168201915b505050505081565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526060939092909183018282801561036e5780601f106103435761010080835404028352916020019161036e565b820191906000526020600020905b81548152906001019060200180831161035157829003601f168201915b5050505050905090565b6000546001600160a01b031633146103d7576040805162461bcd60e51b815260206004820152601d60248201527f4f6e6c7920636f6e74726f6c6c65722063616e2063616c6c2074686973000000604482015290519081900360640190fd5b600480547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b7f000000000000000000000000000000000000000000000000000000000000000081565b6040805162461bcd60e51b815260206004820152600f60248201527f6e6f7420696d706c656d656e74656400000000000000000000000000000000006044820152905160009182919081900360640190fd5b60026020526000908152604090205460ff1681565b6004546001600160a01b031681565b6000546001600160a01b031681565b60026003541415610512576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080517f13bc6d4b00000000000000000000000000000000000000000000000000000000815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b15801561057b57600080fd5b505afa15801561058f573d6000803e3d6000fd5b505050506040513d60208110156105a557600080fd5b50516105f8576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152600093610693938a938301828280156106855780601f1061065a57610100808354040283529160200191610685565b820191906000526020600020905b81548152906001019060200180831161066857829003601f168201915b505050505087868887610a48565b905061069f8185610cf0565b80602001516001600160a01b03166397ccdc606106ba611180565b83606001518460c001516040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561071a57600080fd5b505af115801561072e573d6000803e3d6000fd5b50505050600080600061074f8985606001518660c00151876080015161118f565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156107cc5781810151838201526020016107b4565b50505050905090810190601f1680156107f95780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561081a57600080fd5b505af115801561082e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561085757600080fd5b810190808051604051939291908464010000000082111561087757600080fd5b90830190602082018581111561088c57600080fd5b82516401000000008111828201881017156108a657600080fd5b82525081516020918201929091019080838360005b838110156108d35781810151838201526020016108bb565b50505050905090810190601f1680156109005780820380516001836020036101000a031916815260200191505b506040525050505060006109138561142b565b905060006109338660c001518761010001516115b890919063ffffffff16565b9050600061094f8388610120015161161690919063ffffffff16565b90508a6001600160a01b031687602001516001600160a01b031688600001516001600160a01b03167f6896e8a2de09380c881b23755435130206166901028e7413fce46cd6ecafdb758c8b60400151878760405180856001600160a01b0316815260200180602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b838110156109f85781810151838201526020016109e0565b50505050905090810190601f168015610a255780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a45050600160035550505050505050505050565b610a50611890565b610a58611890565b6001600160a01b038816602080830182905260408051630ad7511760e31b815290516356ba88b892600480840193919291829003018186803b158015610a9d57600080fd5b505afa158015610ab1573d6000803e3d6000fd5b505050506040513d6020811015610ac757600080fd5b50516001600160a01b0390811682526040808301899052878216606084015286821660808401526020838101518251630ad7511760e31b815292519316926356ba88b8926004808201939291829003018186803b158015610b2757600080fd5b505afa158015610b3b573d6000803e3d6000fd5b505050506040513d6020811015610b5157600080fd5b5051604080517f18160ddd00000000000000000000000000000000000000000000000000000000815290516001600160a01b03909216916318160ddd91600480820192602092909190829003018186803b158015610bae57600080fd5b505afa158015610bc2573d6000803e3d6000fd5b505050506040513d6020811015610bd857600080fd5b505160a082015260c0810184905260e08101839052604080516370a0823160e01b81526001600160a01b038a811660048301529151918816916370a0823191602480820192602092909190829003018186803b158015610c3757600080fd5b505afa158015610c4b573d6000803e3d6000fd5b505050506040513d6020811015610c6157600080fd5b5051610100820152604080516370a0823160e01b81526001600160a01b038a811660048301529151918716916370a0823191602480820192602092909190829003018186803b158015610cb357600080fd5b505afa158015610cc7573d6000803e3d6000fd5b505050506040513d6020811015610cdd57600080fd5b5051610120820152979650505050505050565b60008260c0015111610d49576040805162461bcd60e51b815260206004820152601d60248201527f546f6b656e20746f2073656c6c206d757374206265206e6f6e7a65726f000000604482015290519081900360640190fd5b60008054604080517f3e6dfa360000000000000000000000000000000000000000000000000000000081529051610de4926001600160a01b031691633e6dfa36916004808301926020929190829003018186803b158015610da957600080fd5b505afa158015610dbd573d6000803e3d6000fd5b505050506040513d6020811015610dd357600080fd5b50516060850151608086015161166e565b9050600083600001516001600160a01b031663a63c643d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e2557600080fd5b505afa158015610e39573d6000803e3d6000fd5b505050506040513d6020811015610e4f57600080fd5b5051604080517f0902f1ac000000000000000000000000000000000000000000000000000000008152905191925060009182916001600160a01b03861691630902f1ac91600480820192606092909190829003018186803b158015610eb357600080fd5b505afa158015610ec7573d6000803e3d6000fd5b505050506040513d6060811015610edd57600080fd5b508051602091820151604080517f0dfe168100000000000000000000000000000000000000000000000000000000815290516dffffffffffffffffffffffffffff93841696509290911693506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169390881692630dfe1681926004808201939291829003018186803b158015610f7b57600080fd5b505afa158015610f8f573d6000803e3d6000fd5b505050506040513d6020811015610fa557600080fd5b50516001600160a01b0316148015610fbd5750828210155b8061106857507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561102657600080fd5b505afa15801561103a573d6000803e3d6000fd5b505050506040513d602081101561105057600080fd5b50516001600160a01b03161480156110685750828110155b6110b9576040805162461bcd60e51b815260206004820152601460248201527f4e6f7420656e6f756768206c6971756964697479000000000000000000000000604482015290519081900360640190fd5b8486606001516001600160a01b03166370a0823188602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561110f57600080fd5b505afa158015611123573d6000803e3d6000fd5b505050506040513d602081101561113957600080fd5b505110156111785760405162461bcd60e51b815260040180806020018281038252602981526020018061192d6029913960400191505060405180910390fd5b505050505050565b6004546001600160a01b031690565b60048054604080517f085e2c5b0000000000000000000000000000000000000000000000000000000081526001600160a01b038781169482019490945284841660248201526044810186905260016064820152600060848201819052915191938493606093859384939092169163085e2c5b9160a48083019286929190829003018186803b15801561122057600080fd5b505afa158015611234573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561125d57600080fd5b81516020830180516040519294929383019291908464010000000082111561128457600080fd5b90830190602082018581111561129957600080fd5b82518660208202830111640100000000821117156112b657600080fd5b82525081516020918201928201910280838360005b838110156112e35781810151838201526020016112cb565b505050509050016040525050509150915060008887898585600060405160240180876001600160a01b03168152602001866001600160a01b0316815260200185815260200184815260200180602001838152602001828103825284818151815260200191508051906020019060200280838360005b83811015611370578181015183820152602001611358565b505050509050019750505050505050506040516020818303038152906040527fe2a7515e000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600460009054906101000a90046001600160a01b03166000829550955095505050509450945094915050565b6000806114be83610120015184608001516001600160a01b03166370a0823186602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561148c57600080fd5b505afa1580156114a0573d6000803e3d6000fd5b505050506040513d60208110156114b657600080fd5b5051906115b8565b9050600083608001516001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156114ff57600080fd5b505afa158015611513573d6000803e3d6000fd5b505050506040513d602081101561152957600080fd5b505190506000601260ff831614156115415782611555565b6115558360ff601285900316600a0a611746565b90508460e001518110156115b0576040805162461bcd60e51b815260206004820152601d60248201527f536c6970706167652067726561746572207468616e20616c6c6f776564000000604482015290519081900360640190fd5b949350505050565b80820382811115611610576040805162461bcd60e51b815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b92915050565b80820182811015611610576040805162461bcd60e51b815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b600080600061167d85856117b2565b604080516bffffffffffffffffffffffff19606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501207fff0000000000000000000000000000000000000000000000000000000000000060688401529a90941b9093166069840152607d8301989098527f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b60008115806117615750508082028282828161175e57fe5b04145b611610576040805162461bcd60e51b815260206004820152601460248201527f64732d6d6174682d6d756c2d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b600080826001600160a01b0316846001600160a01b031614156118065760405162461bcd60e51b81526004018080602001828103825260258152602001806119086025913960400191505060405180910390fd5b826001600160a01b0316846001600160a01b031610611826578284611829565b83835b90925090506001600160a01b038216611889576040805162461bcd60e51b815260206004820152601e60248201527f556e697377617056324c6962726172793a205a45524f5f414444524553530000604482015290519081900360640190fd5b9250929050565b60405180610140016040528060006001600160a01b0316815260200160006001600160a01b031681526020016060815260200160006001600160a01b0316815260200160006001600160a01b031681526020016000815260200160008152602001600081526020016000815260200160008152509056fe556e697377617056324c6962726172793a204944454e544943414c5f41444452455353455347617264656e206e6565647320746f206861766520656e6f756768206c697175696420746f6b656e73a2646970667358221220ddbb7dffd5dcb90a8b5c967dbbbc9a13a464acff75526149e249d87df9616a8f64736f6c63430007060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a35760003560e01c8063aa0b24fa11610076578063c7868ace1161005b578063c7868ace14610202578063f77c47911461020a578063fa1ca82014610212576100a3565b8063aa0b24fa14610179578063b10198fb146101c8576100a3565b806306fdde03146100a857806317d7de7c1461012557806331415a651461012d5780633fc8cef314610155575b600080fd5b6100b0610256565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100ea5781810151838201526020016100d2565b50505050905090810190601f1680156101175780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100b06102e3565b6101536004803603602081101561014357600080fd5b50356001600160a01b0316610378565b005b61015d610411565b604080516001600160a01b039092168252519081900360200190f35b6101af6004803603606081101561018f57600080fd5b506001600160a01b03813581169160208101359091169060400135610435565b6040805192835260208301919091528051918290030190f35b6101ee600480360360208110156101de57600080fd5b50356001600160a01b0316610487565b604080519115158252519081900360200190f35b61015d61049c565b61015d6104ab565b610153600480360360a081101561022857600080fd5b506001600160a01b0381358116916020810135821691604082013591606081013590911690608001356104ba565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102db5780601f106102b0576101008083540402835291602001916102db565b820191906000526020600020905b8154815290600101906020018083116102be57829003601f168201915b505050505081565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526060939092909183018282801561036e5780601f106103435761010080835404028352916020019161036e565b820191906000526020600020905b81548152906001019060200180831161035157829003601f168201915b5050505050905090565b6000546001600160a01b031633146103d7576040805162461bcd60e51b815260206004820152601d60248201527f4f6e6c7920636f6e74726f6c6c65722063616e2063616c6c2074686973000000604482015290519081900360640190fd5b600480547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b7f000000000000000000000000000000000000000000000000000000000000000081565b6040805162461bcd60e51b815260206004820152600f60248201527f6e6f7420696d706c656d656e74656400000000000000000000000000000000006044820152905160009182919081900360640190fd5b60026020526000908152604090205460ff1681565b6004546001600160a01b031681565b6000546001600160a01b031681565b60026003541415610512576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080517f13bc6d4b00000000000000000000000000000000000000000000000000000000815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b15801561057b57600080fd5b505afa15801561058f573d6000803e3d6000fd5b505050506040513d60208110156105a557600080fd5b50516105f8576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152600093610693938a938301828280156106855780601f1061065a57610100808354040283529160200191610685565b820191906000526020600020905b81548152906001019060200180831161066857829003601f168201915b505050505087868887610a48565b905061069f8185610cf0565b80602001516001600160a01b03166397ccdc606106ba611180565b83606001518460c001516040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561071a57600080fd5b505af115801561072e573d6000803e3d6000fd5b50505050600080600061074f8985606001518660c00151876080015161118f565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156107cc5781810151838201526020016107b4565b50505050905090810190601f1680156107f95780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561081a57600080fd5b505af115801561082e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561085757600080fd5b810190808051604051939291908464010000000082111561087757600080fd5b90830190602082018581111561088c57600080fd5b82516401000000008111828201881017156108a657600080fd5b82525081516020918201929091019080838360005b838110156108d35781810151838201526020016108bb565b50505050905090810190601f1680156109005780820380516001836020036101000a031916815260200191505b506040525050505060006109138561142b565b905060006109338660c001518761010001516115b890919063ffffffff16565b9050600061094f8388610120015161161690919063ffffffff16565b90508a6001600160a01b031687602001516001600160a01b031688600001516001600160a01b03167f6896e8a2de09380c881b23755435130206166901028e7413fce46cd6ecafdb758c8b60400151878760405180856001600160a01b0316815260200180602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b838110156109f85781810151838201526020016109e0565b50505050905090810190601f168015610a255780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a45050600160035550505050505050505050565b610a50611890565b610a58611890565b6001600160a01b038816602080830182905260408051630ad7511760e31b815290516356ba88b892600480840193919291829003018186803b158015610a9d57600080fd5b505afa158015610ab1573d6000803e3d6000fd5b505050506040513d6020811015610ac757600080fd5b50516001600160a01b0390811682526040808301899052878216606084015286821660808401526020838101518251630ad7511760e31b815292519316926356ba88b8926004808201939291829003018186803b158015610b2757600080fd5b505afa158015610b3b573d6000803e3d6000fd5b505050506040513d6020811015610b5157600080fd5b5051604080517f18160ddd00000000000000000000000000000000000000000000000000000000815290516001600160a01b03909216916318160ddd91600480820192602092909190829003018186803b158015610bae57600080fd5b505afa158015610bc2573d6000803e3d6000fd5b505050506040513d6020811015610bd857600080fd5b505160a082015260c0810184905260e08101839052604080516370a0823160e01b81526001600160a01b038a811660048301529151918816916370a0823191602480820192602092909190829003018186803b158015610c3757600080fd5b505afa158015610c4b573d6000803e3d6000fd5b505050506040513d6020811015610c6157600080fd5b5051610100820152604080516370a0823160e01b81526001600160a01b038a811660048301529151918716916370a0823191602480820192602092909190829003018186803b158015610cb357600080fd5b505afa158015610cc7573d6000803e3d6000fd5b505050506040513d6020811015610cdd57600080fd5b5051610120820152979650505050505050565b60008260c0015111610d49576040805162461bcd60e51b815260206004820152601d60248201527f546f6b656e20746f2073656c6c206d757374206265206e6f6e7a65726f000000604482015290519081900360640190fd5b60008054604080517f3e6dfa360000000000000000000000000000000000000000000000000000000081529051610de4926001600160a01b031691633e6dfa36916004808301926020929190829003018186803b158015610da957600080fd5b505afa158015610dbd573d6000803e3d6000fd5b505050506040513d6020811015610dd357600080fd5b50516060850151608086015161166e565b9050600083600001516001600160a01b031663a63c643d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e2557600080fd5b505afa158015610e39573d6000803e3d6000fd5b505050506040513d6020811015610e4f57600080fd5b5051604080517f0902f1ac000000000000000000000000000000000000000000000000000000008152905191925060009182916001600160a01b03861691630902f1ac91600480820192606092909190829003018186803b158015610eb357600080fd5b505afa158015610ec7573d6000803e3d6000fd5b505050506040513d6060811015610edd57600080fd5b508051602091820151604080517f0dfe168100000000000000000000000000000000000000000000000000000000815290516dffffffffffffffffffffffffffff93841696509290911693506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169390881692630dfe1681926004808201939291829003018186803b158015610f7b57600080fd5b505afa158015610f8f573d6000803e3d6000fd5b505050506040513d6020811015610fa557600080fd5b50516001600160a01b0316148015610fbd5750828210155b8061106857507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561102657600080fd5b505afa15801561103a573d6000803e3d6000fd5b505050506040513d602081101561105057600080fd5b50516001600160a01b03161480156110685750828110155b6110b9576040805162461bcd60e51b815260206004820152601460248201527f4e6f7420656e6f756768206c6971756964697479000000000000000000000000604482015290519081900360640190fd5b8486606001516001600160a01b03166370a0823188602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561110f57600080fd5b505afa158015611123573d6000803e3d6000fd5b505050506040513d602081101561113957600080fd5b505110156111785760405162461bcd60e51b815260040180806020018281038252602981526020018061192d6029913960400191505060405180910390fd5b505050505050565b6004546001600160a01b031690565b60048054604080517f085e2c5b0000000000000000000000000000000000000000000000000000000081526001600160a01b038781169482019490945284841660248201526044810186905260016064820152600060848201819052915191938493606093859384939092169163085e2c5b9160a48083019286929190829003018186803b15801561122057600080fd5b505afa158015611234573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561125d57600080fd5b81516020830180516040519294929383019291908464010000000082111561128457600080fd5b90830190602082018581111561129957600080fd5b82518660208202830111640100000000821117156112b657600080fd5b82525081516020918201928201910280838360005b838110156112e35781810151838201526020016112cb565b505050509050016040525050509150915060008887898585600060405160240180876001600160a01b03168152602001866001600160a01b0316815260200185815260200184815260200180602001838152602001828103825284818151815260200191508051906020019060200280838360005b83811015611370578181015183820152602001611358565b505050509050019750505050505050506040516020818303038152906040527fe2a7515e000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600460009054906101000a90046001600160a01b03166000829550955095505050509450945094915050565b6000806114be83610120015184608001516001600160a01b03166370a0823186602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561148c57600080fd5b505afa1580156114a0573d6000803e3d6000fd5b505050506040513d60208110156114b657600080fd5b5051906115b8565b9050600083608001516001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156114ff57600080fd5b505afa158015611513573d6000803e3d6000fd5b505050506040513d602081101561152957600080fd5b505190506000601260ff831614156115415782611555565b6115558360ff601285900316600a0a611746565b90508460e001518110156115b0576040805162461bcd60e51b815260206004820152601d60248201527f536c6970706167652067726561746572207468616e20616c6c6f776564000000604482015290519081900360640190fd5b949350505050565b80820382811115611610576040805162461bcd60e51b815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b92915050565b80820182811015611610576040805162461bcd60e51b815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b600080600061167d85856117b2565b604080516bffffffffffffffffffffffff19606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501207fff0000000000000000000000000000000000000000000000000000000000000060688401529a90941b9093166069840152607d8301989098527f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b60008115806117615750508082028282828161175e57fe5b04145b611610576040805162461bcd60e51b815260206004820152601460248201527f64732d6d6174682d6d756c2d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b600080826001600160a01b0316846001600160a01b031614156118065760405162461bcd60e51b81526004018080602001828103825260258152602001806119086025913960400191505060405180910390fd5b826001600160a01b0316846001600160a01b031610611826578284611829565b83835b90925090506001600160a01b038216611889576040805162461bcd60e51b815260206004820152601e60248201527f556e697377617056324c6962726172793a205a45524f5f414444524553530000604482015290519081900360640190fd5b9250929050565b60405180610140016040528060006001600160a01b0316815260200160006001600160a01b031681526020016060815260200160006001600160a01b0316815260200160006001600160a01b031681526020016000815260200160008152602001600081526020016000815260200160008152509056fe556e697377617056324c6962726172793a204944454e544943414c5f41444452455353455347617264656e206e6565647320746f206861766520656e6f756768206c697175696420746f6b656e73a2646970667358221220ddbb7dffd5dcb90a8b5c967dbbbc9a13a464acff75526149e249d87df9616a8f64736f6c63430007060033", + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_weth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_oneInchExchangeAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IGarden\",\"name\":\"_garden\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IStrategy\",\"name\":\"_strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_sendToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_receiveToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_exchangeName\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_totalSendAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_totalReceiveAmount\",\"type\":\"uint256\"}],\"name\":\"ComponentExchanged\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getConversionRates\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"initializedByGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oneInchExchangeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_sendToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sendQuantity\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_receiveToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minReceiveQuantity\",\"type\":\"uint256\"}],\"name\":\"trade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newExchangeAddress\",\"type\":\"address\"}],\"name\":\"updateExchangeAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Protocol 1Inch protocol trade integration\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of the controller\",\"_oneInchExchangeAddress\":\"Address of 1inch exchange contract\",\"_weth\":\"Address of the WETH ERC20\"}},\"getConversionRates(address,address,uint256)\":{\"returns\":{\"_0\":\"uint256 Conversion rate in wei\",\"_1\":\"uint256 Slippage rate in wei\"}},\"trade(address,address,uint256,address,uint256)\":{\"details\":\"@param _strategy Address of the strategy\",\"params\":{\"_minReceiveQuantity\":\"Min units of wanted token to be received from the exchange\",\"_receiveToken\":\"Address of the token that will be received from the exchange\",\"_sendQuantity\":\"Units of reserve asset token sent to the exchange\",\"_sendToken\":\"Address of the token to be sent to the exchange\"}}},\"title\":\"1InchTradeIntegration\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates the integration\"},\"getConversionRates(address,address,uint256)\":{\"notice\":\"Returns the conversion rate between the source token and the destination token in 18 decimals, regardless of component token's decimals hparam _sourceToken Address of source token to be sold hparam _destinationToken Address of destination token to buy hparam _sourceQuantity Amount of source token to sell\"},\"getName()\":{\"notice\":\"Returns the name of the integration\"},\"trade(address,address,uint256,address,uint256)\":{\"notice\":\"Executes a trade on a supported DEX.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/integrations/trade/OneInchTradeIntegration.sol\":\"OneInchTradeIntegration\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\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 /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\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, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x7b2b8baa20fd60ab4a328c8e34c64a353651b80ba4b5b157cbb61813f6f85d55\",\"license\":\"MIT\"},\"@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title The interface for the Uniswap V3 Factory\\n/// @notice The Uniswap V3 Factory facilitates creation of Uniswap V3 pools and control over the protocol fees\\ninterface IUniswapV3Factory {\\n /// @notice Emitted when the owner of the factory is changed\\n /// @param oldOwner The owner before the owner was changed\\n /// @param newOwner The owner after the owner was changed\\n event OwnerChanged(address indexed oldOwner, address indexed newOwner);\\n\\n /// @notice Emitted when a pool is created\\n /// @param token0 The first token of the pool by address sort order\\n /// @param token1 The second token of the pool by address sort order\\n /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip\\n /// @param tickSpacing The minimum number of ticks between initialized ticks\\n /// @param pool The address of the created pool\\n event PoolCreated(\\n address indexed token0,\\n address indexed token1,\\n uint24 indexed fee,\\n int24 tickSpacing,\\n address pool\\n );\\n\\n /// @notice Emitted when a new fee amount is enabled for pool creation via the factory\\n /// @param fee The enabled fee, denominated in hundredths of a bip\\n /// @param tickSpacing The minimum number of ticks between initialized ticks for pools created with the given fee\\n event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing);\\n\\n /// @notice Returns the current owner of the factory\\n /// @dev Can be changed by the current owner via setOwner\\n /// @return The address of the factory owner\\n function owner() external view returns (address);\\n\\n /// @notice Returns the tick spacing for a given fee amount, if enabled, or 0 if not enabled\\n /// @dev A fee amount can never be removed, so this value should be hard coded or cached in the calling context\\n /// @param fee The enabled fee, denominated in hundredths of a bip. Returns 0 in case of unenabled fee\\n /// @return The tick spacing\\n function feeAmountTickSpacing(uint24 fee) external view returns (int24);\\n\\n /// @notice Returns the pool address for a given pair of tokens and a fee, or address 0 if it does not exist\\n /// @dev tokenA and tokenB may be passed in either token0/token1 or token1/token0 order\\n /// @param tokenA The contract address of either token0 or token1\\n /// @param tokenB The contract address of the other token\\n /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip\\n /// @return pool The pool address\\n function getPool(\\n address tokenA,\\n address tokenB,\\n uint24 fee\\n ) external view returns (address pool);\\n\\n /// @notice Creates a pool for the given two tokens and fee\\n /// @param tokenA One of the two tokens in the desired pool\\n /// @param tokenB The other of the two tokens in the desired pool\\n /// @param fee The desired fee for the pool\\n /// @dev tokenA and tokenB may be passed in either order: token0/token1 or token1/token0. tickSpacing is retrieved\\n /// from the fee. The call will revert if the pool already exists, the fee is invalid, or the token arguments\\n /// are invalid.\\n /// @return pool The address of the newly created pool\\n function createPool(\\n address tokenA,\\n address tokenB,\\n uint24 fee\\n ) external returns (address pool);\\n\\n /// @notice Updates the owner of the factory\\n /// @dev Must be called by the current owner\\n /// @param _owner The new owner of the factory\\n function setOwner(address _owner) external;\\n\\n /// @notice Enables a fee amount with the given tickSpacing\\n /// @dev Fee amounts may never be removed once enabled\\n /// @param fee The fee amount to enable, denominated in hundredths of a bip (i.e. 1e-6)\\n /// @param tickSpacing The spacing between ticks to be enforced for all pools created with the given fee amount\\n function enableFeeAmount(uint24 fee, int24 tickSpacing) external;\\n}\\n\",\"keccak256\":\"0xcc3d0c93fc9ac0febbe09f941b465b57f750bcf3b48432da0b97dc289cfdc489\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\nimport './pool/IUniswapV3PoolImmutables.sol';\\nimport './pool/IUniswapV3PoolState.sol';\\nimport './pool/IUniswapV3PoolDerivedState.sol';\\nimport './pool/IUniswapV3PoolActions.sol';\\nimport './pool/IUniswapV3PoolOwnerActions.sol';\\nimport './pool/IUniswapV3PoolEvents.sol';\\n\\n/// @title The interface for a Uniswap V3 Pool\\n/// @notice A Uniswap pool facilitates swapping and automated market making between any two assets that strictly conform\\n/// to the ERC20 specification\\n/// @dev The pool interface is broken up into many smaller pieces\\ninterface IUniswapV3Pool is\\n IUniswapV3PoolImmutables,\\n IUniswapV3PoolState,\\n IUniswapV3PoolDerivedState,\\n IUniswapV3PoolActions,\\n IUniswapV3PoolOwnerActions,\\n IUniswapV3PoolEvents\\n{\\n\\n}\\n\",\"keccak256\":\"0xfe6113d518466cd6652c85b111e01f33eb62157f49ae5ed7d5a3947a2044adb1\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolActions.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Permissionless pool actions\\n/// @notice Contains pool methods that can be called by anyone\\ninterface IUniswapV3PoolActions {\\n /// @notice Sets the initial price for the pool\\n /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value\\n /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96\\n function initialize(uint160 sqrtPriceX96) external;\\n\\n /// @notice Adds liquidity for the given recipient/tickLower/tickUpper position\\n /// @dev The caller of this method receives a callback in the form of IUniswapV3MintCallback#uniswapV3MintCallback\\n /// in which they must pay any token0 or token1 owed for the liquidity. The amount of token0/token1 due depends\\n /// on tickLower, tickUpper, the amount of liquidity, and the current price.\\n /// @param recipient The address for which the liquidity will be created\\n /// @param tickLower The lower tick of the position in which to add liquidity\\n /// @param tickUpper The upper tick of the position in which to add liquidity\\n /// @param amount The amount of liquidity to mint\\n /// @param data Any data that should be passed through to the callback\\n /// @return amount0 The amount of token0 that was paid to mint the given amount of liquidity. Matches the value in the callback\\n /// @return amount1 The amount of token1 that was paid to mint the given amount of liquidity. Matches the value in the callback\\n function mint(\\n address recipient,\\n int24 tickLower,\\n int24 tickUpper,\\n uint128 amount,\\n bytes calldata data\\n ) external returns (uint256 amount0, uint256 amount1);\\n\\n /// @notice Collects tokens owed to a position\\n /// @dev Does not recompute fees earned, which must be done either via mint or burn of any amount of liquidity.\\n /// Collect must be called by the position owner. To withdraw only token0 or only token1, amount0Requested or\\n /// amount1Requested may be set to zero. To withdraw all tokens owed, caller may pass any value greater than the\\n /// actual tokens owed, e.g. type(uint128).max. Tokens owed may be from accumulated swap fees or burned liquidity.\\n /// @param recipient The address which should receive the fees collected\\n /// @param tickLower The lower tick of the position for which to collect fees\\n /// @param tickUpper The upper tick of the position for which to collect fees\\n /// @param amount0Requested How much token0 should be withdrawn from the fees owed\\n /// @param amount1Requested How much token1 should be withdrawn from the fees owed\\n /// @return amount0 The amount of fees collected in token0\\n /// @return amount1 The amount of fees collected in token1\\n function collect(\\n address recipient,\\n int24 tickLower,\\n int24 tickUpper,\\n uint128 amount0Requested,\\n uint128 amount1Requested\\n ) external returns (uint128 amount0, uint128 amount1);\\n\\n /// @notice Burn liquidity from the sender and account tokens owed for the liquidity to the position\\n /// @dev Can be used to trigger a recalculation of fees owed to a position by calling with an amount of 0\\n /// @dev Fees must be collected separately via a call to #collect\\n /// @param tickLower The lower tick of the position for which to burn liquidity\\n /// @param tickUpper The upper tick of the position for which to burn liquidity\\n /// @param amount How much liquidity to burn\\n /// @return amount0 The amount of token0 sent to the recipient\\n /// @return amount1 The amount of token1 sent to the recipient\\n function burn(\\n int24 tickLower,\\n int24 tickUpper,\\n uint128 amount\\n ) external returns (uint256 amount0, uint256 amount1);\\n\\n /// @notice Swap token0 for token1, or token1 for token0\\n /// @dev The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback\\n /// @param recipient The address to receive the output of the swap\\n /// @param zeroForOne The direction of the swap, true for token0 to token1, false for token1 to token0\\n /// @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative)\\n /// @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this\\n /// value after the swap. If one for zero, the price cannot be greater than this value after the swap\\n /// @param data Any data to be passed through to the callback\\n /// @return amount0 The delta of the balance of token0 of the pool, exact when negative, minimum when positive\\n /// @return amount1 The delta of the balance of token1 of the pool, exact when negative, minimum when positive\\n function swap(\\n address recipient,\\n bool zeroForOne,\\n int256 amountSpecified,\\n uint160 sqrtPriceLimitX96,\\n bytes calldata data\\n ) external returns (int256 amount0, int256 amount1);\\n\\n /// @notice Receive token0 and/or token1 and pay it back, plus a fee, in the callback\\n /// @dev The caller of this method receives a callback in the form of IUniswapV3FlashCallback#uniswapV3FlashCallback\\n /// @dev Can be used to donate underlying tokens pro-rata to currently in-range liquidity providers by calling\\n /// with 0 amount{0,1} and sending the donation amount(s) from the callback\\n /// @param recipient The address which will receive the token0 and token1 amounts\\n /// @param amount0 The amount of token0 to send\\n /// @param amount1 The amount of token1 to send\\n /// @param data Any data to be passed through to the callback\\n function flash(\\n address recipient,\\n uint256 amount0,\\n uint256 amount1,\\n bytes calldata data\\n ) external;\\n\\n /// @notice Increase the maximum number of price and liquidity observations that this pool will store\\n /// @dev This method is no-op if the pool already has an observationCardinalityNext greater than or equal to\\n /// the input observationCardinalityNext.\\n /// @param observationCardinalityNext The desired minimum number of observations for the pool to store\\n function increaseObservationCardinalityNext(uint16 observationCardinalityNext) external;\\n}\\n\",\"keccak256\":\"0x9453dd0e7442188667d01d9b65de3f1e14e9511ff3e303179a15f6fc267f7634\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolDerivedState.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Pool state that is not stored\\n/// @notice Contains view functions to provide information about the pool that is computed rather than stored on the\\n/// blockchain. The functions here may have variable gas costs.\\ninterface IUniswapV3PoolDerivedState {\\n /// @notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp\\n /// @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing\\n /// the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick,\\n /// you must call it with secondsAgos = [3600, 0].\\n /// @dev The time weighted average tick represents the geometric time weighted average price of the pool, in\\n /// log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.\\n /// @param secondsAgos From how long ago each cumulative tick and liquidity value should be returned\\n /// @return tickCumulatives Cumulative tick values as of each `secondsAgos` from the current block timestamp\\n /// @return secondsPerLiquidityCumulativeX128s Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block\\n /// timestamp\\n function observe(uint32[] calldata secondsAgos)\\n external\\n view\\n returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s);\\n\\n /// @notice Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range\\n /// @dev Snapshots must only be compared to other snapshots, taken over a period for which a position existed.\\n /// I.e., snapshots cannot be compared if a position is not held for the entire period between when the first\\n /// snapshot is taken and the second snapshot is taken.\\n /// @param tickLower The lower tick of the range\\n /// @param tickUpper The upper tick of the range\\n /// @return tickCumulativeInside The snapshot of the tick accumulator for the range\\n /// @return secondsPerLiquidityInsideX128 The snapshot of seconds per liquidity for the range\\n /// @return secondsInside The snapshot of seconds per liquidity for the range\\n function snapshotCumulativesInside(int24 tickLower, int24 tickUpper)\\n external\\n view\\n returns (\\n int56 tickCumulativeInside,\\n uint160 secondsPerLiquidityInsideX128,\\n uint32 secondsInside\\n );\\n}\\n\",\"keccak256\":\"0xe603ac5b17ecdee73ba2b27efdf386c257a19c14206e87eee77e2017b742d9e5\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolEvents.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Events emitted by a pool\\n/// @notice Contains all events emitted by the pool\\ninterface IUniswapV3PoolEvents {\\n /// @notice Emitted exactly once by a pool when #initialize is first called on the pool\\n /// @dev Mint/Burn/Swap cannot be emitted by the pool before Initialize\\n /// @param sqrtPriceX96 The initial sqrt price of the pool, as a Q64.96\\n /// @param tick The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool\\n event Initialize(uint160 sqrtPriceX96, int24 tick);\\n\\n /// @notice Emitted when liquidity is minted for a given position\\n /// @param sender The address that minted the liquidity\\n /// @param owner The owner of the position and recipient of any minted liquidity\\n /// @param tickLower The lower tick of the position\\n /// @param tickUpper The upper tick of the position\\n /// @param amount The amount of liquidity minted to the position range\\n /// @param amount0 How much token0 was required for the minted liquidity\\n /// @param amount1 How much token1 was required for the minted liquidity\\n event Mint(\\n address sender,\\n address indexed owner,\\n int24 indexed tickLower,\\n int24 indexed tickUpper,\\n uint128 amount,\\n uint256 amount0,\\n uint256 amount1\\n );\\n\\n /// @notice Emitted when fees are collected by the owner of a position\\n /// @dev Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees\\n /// @param owner The owner of the position for which fees are collected\\n /// @param tickLower The lower tick of the position\\n /// @param tickUpper The upper tick of the position\\n /// @param amount0 The amount of token0 fees collected\\n /// @param amount1 The amount of token1 fees collected\\n event Collect(\\n address indexed owner,\\n address recipient,\\n int24 indexed tickLower,\\n int24 indexed tickUpper,\\n uint128 amount0,\\n uint128 amount1\\n );\\n\\n /// @notice Emitted when a position's liquidity is removed\\n /// @dev Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect\\n /// @param owner The owner of the position for which liquidity is removed\\n /// @param tickLower The lower tick of the position\\n /// @param tickUpper The upper tick of the position\\n /// @param amount The amount of liquidity to remove\\n /// @param amount0 The amount of token0 withdrawn\\n /// @param amount1 The amount of token1 withdrawn\\n event Burn(\\n address indexed owner,\\n int24 indexed tickLower,\\n int24 indexed tickUpper,\\n uint128 amount,\\n uint256 amount0,\\n uint256 amount1\\n );\\n\\n /// @notice Emitted by the pool for any swaps between token0 and token1\\n /// @param sender The address that initiated the swap call, and that received the callback\\n /// @param recipient The address that received the output of the swap\\n /// @param amount0 The delta of the token0 balance of the pool\\n /// @param amount1 The delta of the token1 balance of the pool\\n /// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96\\n /// @param liquidity The liquidity of the pool after the swap\\n /// @param tick The log base 1.0001 of price of the pool after the swap\\n event Swap(\\n address indexed sender,\\n address indexed recipient,\\n int256 amount0,\\n int256 amount1,\\n uint160 sqrtPriceX96,\\n uint128 liquidity,\\n int24 tick\\n );\\n\\n /// @notice Emitted by the pool for any flashes of token0/token1\\n /// @param sender The address that initiated the swap call, and that received the callback\\n /// @param recipient The address that received the tokens from flash\\n /// @param amount0 The amount of token0 that was flashed\\n /// @param amount1 The amount of token1 that was flashed\\n /// @param paid0 The amount of token0 paid for the flash, which can exceed the amount0 plus the fee\\n /// @param paid1 The amount of token1 paid for the flash, which can exceed the amount1 plus the fee\\n event Flash(\\n address indexed sender,\\n address indexed recipient,\\n uint256 amount0,\\n uint256 amount1,\\n uint256 paid0,\\n uint256 paid1\\n );\\n\\n /// @notice Emitted by the pool for increases to the number of observations that can be stored\\n /// @dev observationCardinalityNext is not the observation cardinality until an observation is written at the index\\n /// just before a mint/swap/burn.\\n /// @param observationCardinalityNextOld The previous value of the next observation cardinality\\n /// @param observationCardinalityNextNew The updated value of the next observation cardinality\\n event IncreaseObservationCardinalityNext(\\n uint16 observationCardinalityNextOld,\\n uint16 observationCardinalityNextNew\\n );\\n\\n /// @notice Emitted when the protocol fee is changed by the pool\\n /// @param feeProtocol0Old The previous value of the token0 protocol fee\\n /// @param feeProtocol1Old The previous value of the token1 protocol fee\\n /// @param feeProtocol0New The updated value of the token0 protocol fee\\n /// @param feeProtocol1New The updated value of the token1 protocol fee\\n event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New);\\n\\n /// @notice Emitted when the collected protocol fees are withdrawn by the factory owner\\n /// @param sender The address that collects the protocol fees\\n /// @param recipient The address that receives the collected protocol fees\\n /// @param amount0 The amount of token0 protocol fees that is withdrawn\\n /// @param amount0 The amount of token1 protocol fees that is withdrawn\\n event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1);\\n}\\n\",\"keccak256\":\"0x8071514d0fe5d17d6fbd31c191cdfb703031c24e0ece3621d88ab10e871375cd\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolImmutables.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Pool state that never changes\\n/// @notice These parameters are fixed for a pool forever, i.e., the methods will always return the same values\\ninterface IUniswapV3PoolImmutables {\\n /// @notice The contract that deployed the pool, which must adhere to the IUniswapV3Factory interface\\n /// @return The contract address\\n function factory() external view returns (address);\\n\\n /// @notice The first of the two tokens of the pool, sorted by address\\n /// @return The token contract address\\n function token0() external view returns (address);\\n\\n /// @notice The second of the two tokens of the pool, sorted by address\\n /// @return The token contract address\\n function token1() external view returns (address);\\n\\n /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6\\n /// @return The fee\\n function fee() external view returns (uint24);\\n\\n /// @notice The pool tick spacing\\n /// @dev Ticks can only be used at multiples of this value, minimum of 1 and always positive\\n /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ...\\n /// This value is an int24 to avoid casting even though it is always positive.\\n /// @return The tick spacing\\n function tickSpacing() external view returns (int24);\\n\\n /// @notice The maximum amount of position liquidity that can use any tick in the range\\n /// @dev This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and\\n /// also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool\\n /// @return The max amount of liquidity per tick\\n function maxLiquidityPerTick() external view returns (uint128);\\n}\\n\",\"keccak256\":\"0xf6e5d2cd1139c4c276bdbc8e1d2b256e456c866a91f1b868da265c6d2685c3f7\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolOwnerActions.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Permissioned pool actions\\n/// @notice Contains pool methods that may only be called by the factory owner\\ninterface IUniswapV3PoolOwnerActions {\\n /// @notice Set the denominator of the protocol's % share of the fees\\n /// @param feeProtocol0 new protocol fee for token0 of the pool\\n /// @param feeProtocol1 new protocol fee for token1 of the pool\\n function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external;\\n\\n /// @notice Collect the protocol fee accrued to the pool\\n /// @param recipient The address to which collected protocol fees should be sent\\n /// @param amount0Requested The maximum amount of token0 to send, can be 0 to collect fees in only token1\\n /// @param amount1Requested The maximum amount of token1 to send, can be 0 to collect fees in only token0\\n /// @return amount0 The protocol fee collected in token0\\n /// @return amount1 The protocol fee collected in token1\\n function collectProtocol(\\n address recipient,\\n uint128 amount0Requested,\\n uint128 amount1Requested\\n ) external returns (uint128 amount0, uint128 amount1);\\n}\\n\",\"keccak256\":\"0x759b78a2918af9e99e246dc3af084f654e48ef32bb4e4cb8a966aa3dcaece235\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolState.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Pool state that can change\\n/// @notice These methods compose the pool's state, and can change with any frequency including multiple times\\n/// per transaction\\ninterface IUniswapV3PoolState {\\n /// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas\\n /// when accessed externally.\\n /// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value\\n /// tick The current tick of the pool, i.e. according to the last tick transition that was run.\\n /// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick\\n /// boundary.\\n /// observationIndex The index of the last oracle observation that was written,\\n /// observationCardinality The current maximum number of observations stored in the pool,\\n /// observationCardinalityNext The next maximum number of observations, to be updated when the observation.\\n /// feeProtocol The protocol fee for both tokens of the pool.\\n /// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0\\n /// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee.\\n /// unlocked Whether the pool is currently locked to reentrancy\\n function slot0()\\n external\\n view\\n returns (\\n uint160 sqrtPriceX96,\\n int24 tick,\\n uint16 observationIndex,\\n uint16 observationCardinality,\\n uint16 observationCardinalityNext,\\n uint8 feeProtocol,\\n bool unlocked\\n );\\n\\n /// @notice The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool\\n /// @dev This value can overflow the uint256\\n function feeGrowthGlobal0X128() external view returns (uint256);\\n\\n /// @notice The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool\\n /// @dev This value can overflow the uint256\\n function feeGrowthGlobal1X128() external view returns (uint256);\\n\\n /// @notice The amounts of token0 and token1 that are owed to the protocol\\n /// @dev Protocol fees will never exceed uint128 max in either token\\n function protocolFees() external view returns (uint128 token0, uint128 token1);\\n\\n /// @notice The currently in range liquidity available to the pool\\n /// @dev This value has no relationship to the total liquidity across all ticks\\n function liquidity() external view returns (uint128);\\n\\n /// @notice Look up information about a specific tick in the pool\\n /// @param tick The tick to look up\\n /// @return liquidityGross the total amount of position liquidity that uses the pool either as tick lower or\\n /// tick upper,\\n /// liquidityNet how much liquidity changes when the pool price crosses the tick,\\n /// feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0,\\n /// feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1,\\n /// tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick\\n /// secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick,\\n /// secondsOutside the seconds spent on the other side of the tick from the current tick,\\n /// initialized Set to true if the tick is initialized, i.e. liquidityGross is greater than 0, otherwise equal to false.\\n /// Outside values can only be used if the tick is initialized, i.e. if liquidityGross is greater than 0.\\n /// In addition, these values are only relative and must be used only in comparison to previous snapshots for\\n /// a specific position.\\n function ticks(int24 tick)\\n external\\n view\\n returns (\\n uint128 liquidityGross,\\n int128 liquidityNet,\\n uint256 feeGrowthOutside0X128,\\n uint256 feeGrowthOutside1X128,\\n int56 tickCumulativeOutside,\\n uint160 secondsPerLiquidityOutsideX128,\\n uint32 secondsOutside,\\n bool initialized\\n );\\n\\n /// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information\\n function tickBitmap(int16 wordPosition) external view returns (uint256);\\n\\n /// @notice Returns the information about a position by the position's key\\n /// @param key The position's key is a hash of a preimage composed by the owner, tickLower and tickUpper\\n /// @return _liquidity The amount of liquidity in the position,\\n /// Returns feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke,\\n /// Returns feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke,\\n /// Returns tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke,\\n /// Returns tokensOwed1 the computed amount of token1 owed to the position as of the last mint/burn/poke\\n function positions(bytes32 key)\\n external\\n view\\n returns (\\n uint128 _liquidity,\\n uint256 feeGrowthInside0LastX128,\\n uint256 feeGrowthInside1LastX128,\\n uint128 tokensOwed0,\\n uint128 tokensOwed1\\n );\\n\\n /// @notice Returns data about a specific observation index\\n /// @param index The element of the observations array to fetch\\n /// @dev You most likely want to use #observe() instead of this method to get an observation as of some amount of time\\n /// ago, rather than at a specific index in the array.\\n /// @return blockTimestamp The timestamp of the observation,\\n /// Returns tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp,\\n /// Returns secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp,\\n /// Returns initialized whether the observation has been initialized and the values are safe to use\\n function observations(uint256 index)\\n external\\n view\\n returns (\\n uint32 blockTimestamp,\\n int56 tickCumulative,\\n uint160 secondsPerLiquidityCumulativeX128,\\n bool initialized\\n );\\n}\\n\",\"keccak256\":\"0x852dc1f5df7dcf7f11e7bb3eed79f0cea72ad4b25f6a9d2c35aafb48925fd49f\",\"license\":\"GPL-2.0-or-later\"},\"contracts/integrations/BaseIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IIntegration} from '../interfaces/IIntegration.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\n\\n/**\\n * @title BaseIntegration\\n * @author Babylon Finance\\n *\\n * Abstract class that houses common Integration-related state and functions.\\n */\\nabstract contract BaseIntegration {\\n using SafeCast for int256;\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlySystemContract() {\\n require(IBabController(controller).isSystemContract(msg.sender), 'Only system can call this');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the controller\\n address public controller;\\n // Wrapped ETH address\\n address public immutable weth;\\n // Name of the integration\\n string public name;\\n mapping(address => bool) public initializedByGarden;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) {\\n require(_controller != address(0), 'Controller must be defined');\\n name = _name;\\n controller = _controller;\\n weth = _weth;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the name of the integration\\n */\\n function getName() external view returns (string memory) {\\n return name;\\n }\\n}\\n\",\"keccak256\":\"0x2834e38218ae7abce3038140002a433c22ea9303d65b2d929cd88f6d5f712812\",\"license\":\"Apache License\"},\"contracts/integrations/trade/OneInchTradeIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {IOneInchExchange} from '../../interfaces/external/1inch/IOneInchExchange.sol';\\nimport {TradeIntegration} from './TradeIntegration.sol';\\n\\n/**\\n * @title 1InchTradeIntegration\\n * @author Babylon Finance Protocol\\n *\\n * 1Inch protocol trade integration\\n */\\ncontract OneInchTradeIntegration is TradeIntegration {\\n using SafeMath for uint256;\\n\\n /* ============ Modifiers ============ */\\n\\n /**\\n * Throws if the sender is not the protocol\\n */\\n modifier onlyProtocol() {\\n require(msg.sender == controller, 'Only controller can call this');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Address of 1Inch exchange address\\n address public oneInchExchangeAddress;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n * @param _oneInchExchangeAddress Address of 1inch exchange contract\\n */\\n constructor(\\n address _controller,\\n address _weth,\\n address _oneInchExchangeAddress\\n ) TradeIntegration('1inch', _weth, _controller) {\\n oneInchExchangeAddress = _oneInchExchangeAddress;\\n }\\n\\n /* ============ External Functions ============ */\\n /**\\n * Returns the conversion rate between the source token and the destination token\\n * in 18 decimals, regardless of component token's decimals\\n *\\n * hparam _sourceToken Address of source token to be sold\\n * hparam _destinationToken Address of destination token to buy\\n * hparam _sourceQuantity Amount of source token to sell\\n *\\n * @return uint256 Conversion rate in wei\\n * @return uint256 Slippage rate in wei\\n */\\n function getConversionRates(\\n address,\\n address,\\n uint256\\n ) external pure override returns (uint256, uint256) {\\n revert('not implemented');\\n return (0, 0);\\n }\\n\\n function updateExchangeAddress(address _newExchangeAddress) public onlyProtocol {\\n oneInchExchangeAddress = _newExchangeAddress;\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Executes the trade through 1Inch.\\n *\\n * hparam _strategy Address of the strategy\\n * @param _sendToken Address of the token to be sent to the exchange\\n * @param _sendQuantity Units of reserve asset token sent to the exchange\\n * @param _receiveToken Address of the token that will be received from the exchange\\n */\\n function _getTradeCallData(\\n address, /*_strategy*/\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n )\\n internal\\n view\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n (uint256 _returnAmount, uint256[] memory _distribution) =\\n IOneInchExchange(oneInchExchangeAddress).getExpectedReturn(_sendToken, _receiveToken, _sendQuantity, 1, 0);\\n\\n bytes memory methodData =\\n abi.encodeWithSignature(\\n 'swap(address,address,uint256,uint256,uint256[],uint256)',\\n _sendToken,\\n _receiveToken,\\n _sendQuantity,\\n _returnAmount,\\n _distribution,\\n 0\\n );\\n return (oneInchExchangeAddress, 0, methodData);\\n }\\n\\n /**\\n * Returns the address to approve source tokens to for trading. This is the TokenTaker address\\n *\\n * @return address Address of the contract to approve tokens to\\n */\\n function _getSpender() internal view override returns (address) {\\n return oneInchExchangeAddress;\\n }\\n}\\n\",\"keccak256\":\"0x37e32009f869da5447bc81195d65207c0f4b91d734265f395994deca0e791d5b\",\"license\":\"Apache License\"},\"contracts/integrations/trade/TradeIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\nimport '@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol';\\nimport '@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol';\\n\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {ITradeIntegration} from '../../interfaces/ITradeIntegration.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\n\\nimport {BaseIntegration} from '../BaseIntegration.sol';\\n\\n/**\\n * @title BorrowIntetration\\n * @author Babylon Finance Protocol\\n *\\n * Base class for integration with trading protocols\\n */\\nabstract contract TradeIntegration is BaseIntegration, ReentrancyGuard, ITradeIntegration {\\n using SafeMath for uint256;\\n using SafeCast for uint256;\\n\\n /* ============ Struct ============ */\\n\\n struct TradeInfo {\\n IGarden garden; // Garden\\n IStrategy strategy; // Strategy\\n string exchangeName; // Which exchange to use\\n address sendToken; // Address of token being sold\\n address receiveToken; // Address of token being bought\\n uint256 gardenTotalSupply; // Total supply of Garden in Precise Units (10^18)\\n uint256 totalSendQuantity; // Total quantity of sold tokens\\n uint256 totalMinReceiveQuantity; // Total minimum quantity of token to receive back\\n uint256 preTradeSendTokenBalance; // Total initial balance of token being sold\\n uint256 preTradeReceiveTokenBalance; // Total initial balance of token being bought\\n }\\n\\n /* ============ Events ============ */\\n\\n event ComponentExchanged(\\n IGarden indexed _garden,\\n IStrategy indexed _strategy,\\n address indexed _sendToken,\\n address _receiveToken,\\n string _exchangeName,\\n uint256 _totalSendAmount,\\n uint256 _totalReceiveAmount\\n );\\n\\n uint24 private constant FEE_LOW = 500;\\n uint24 private constant FEE_MEDIUM = 3000;\\n uint24 private constant FEE_HIGH = 10000;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) BaseIntegration(_name, _weth, _controller) {}\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Executes a trade on a supported DEX.\\n * @dev\\n *\\n * @param _strategy Address of the strategy\\n * @param _sendToken Address of the token to be sent to the exchange\\n * @param _sendQuantity Units of reserve asset token sent to the exchange\\n * @param _receiveToken Address of the token that will be received from the exchange\\n * @param _minReceiveQuantity Min units of wanted token to be received from the exchange\\n */\\n function trade(\\n address _strategy,\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken,\\n uint256 _minReceiveQuantity\\n ) external override nonReentrant onlySystemContract {\\n TradeInfo memory tradeInfo =\\n _createTradeInfo(_strategy, name, _sendToken, _receiveToken, _sendQuantity, _minReceiveQuantity);\\n _validatePreTradeData(tradeInfo, _sendQuantity);\\n // Get spender address from exchange adapter and invoke approve for exact amount on sendToken\\n tradeInfo.strategy.invokeApprove(_getSpender(), tradeInfo.sendToken, tradeInfo.totalSendQuantity);\\n (address targetExchange, uint256 callValue, bytes memory methodData) =\\n _getTradeCallData(_strategy, tradeInfo.sendToken, tradeInfo.totalSendQuantity, tradeInfo.receiveToken);\\n tradeInfo.strategy.invokeFromIntegration(targetExchange, callValue, methodData);\\n\\n uint256 exchangedQuantity = _validatePostTrade(tradeInfo);\\n uint256 newAmountSendTokens = tradeInfo.preTradeSendTokenBalance.sub(tradeInfo.totalSendQuantity);\\n uint256 newAmountReceiveTokens = tradeInfo.preTradeReceiveTokenBalance.add(exchangedQuantity);\\n emit ComponentExchanged(\\n tradeInfo.garden,\\n tradeInfo.strategy,\\n _sendToken,\\n _receiveToken,\\n tradeInfo.exchangeName,\\n newAmountSendTokens,\\n newAmountReceiveTokens\\n );\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Create and return TradeInfo struct\\n *\\n * @param _strategy Address of the strategy\\n * @param _exchangeName Human readable name of the exchange in the integrations registry\\n * @param _sendToken Address of the token to be sent to the exchange\\n * @param _receiveToken Address of the token that will be received from the exchange\\n * @param _sendQuantity Units of token in SetToken sent to the exchange\\n * @param _minReceiveQuantity Min units of token in SetToken to be received from the exchange\\n *\\n * return TradeInfo Struct containing data for trade\\n */\\n function _createTradeInfo(\\n address _strategy,\\n string memory _exchangeName,\\n address _sendToken,\\n address _receiveToken,\\n uint256 _sendQuantity,\\n uint256 _minReceiveQuantity\\n ) internal view returns (TradeInfo memory) {\\n TradeInfo memory tradeInfo;\\n\\n tradeInfo.strategy = IStrategy(_strategy);\\n tradeInfo.garden = tradeInfo.strategy.garden();\\n\\n tradeInfo.exchangeName = _exchangeName;\\n\\n tradeInfo.sendToken = _sendToken;\\n tradeInfo.receiveToken = _receiveToken;\\n\\n tradeInfo.gardenTotalSupply = ERC20(address(tradeInfo.strategy.garden())).totalSupply();\\n\\n tradeInfo.totalSendQuantity = _sendQuantity;\\n\\n tradeInfo.totalMinReceiveQuantity = _minReceiveQuantity;\\n\\n tradeInfo.preTradeSendTokenBalance = ERC20(_sendToken).balanceOf(_strategy);\\n tradeInfo.preTradeReceiveTokenBalance = ERC20(_receiveToken).balanceOf(_strategy);\\n\\n return tradeInfo;\\n }\\n\\n /**\\n * Validate pre trade data. Check exchange is valid, token quantity is valid.\\n *\\n * @param _tradeInfo Struct containing trade information used in internal functions\\n * @param _sendQuantity Units of token in SetToken sent to the exchange\\n */\\n function _validatePreTradeData(TradeInfo memory _tradeInfo, uint256 _sendQuantity) internal view {\\n require(_tradeInfo.totalSendQuantity > 0, 'Token to sell must be nonzero');\\n IUniswapV3Pool _pool = _getUniswapPoolWithMostLiquidity(_tradeInfo);\\n\\n uint256 minLiquidityReserveAsset = _tradeInfo.garden.minLiquidityAsset();\\n uint256 poolLiquidity = uint256(_pool.liquidity());\\n uint256 liquidityInReserve;\\n\\n if (_pool.token0() == _tradeInfo.garden.reserveAsset()) {\\n liquidityInReserve = poolLiquidity.mul(poolLiquidity).div(ERC20(_pool.token1()).balanceOf(address(_pool)));\\n }\\n if (_pool.token1() == _tradeInfo.garden.reserveAsset()) {\\n liquidityInReserve = poolLiquidity.mul(poolLiquidity).div(ERC20(_pool.token0()).balanceOf(address(_pool)));\\n }\\n require(liquidityInReserve >= minLiquidityReserveAsset, 'Not enough liquidity');\\n require(\\n ERC20(_tradeInfo.sendToken).balanceOf(address(_tradeInfo.strategy)) >= _sendQuantity,\\n 'Garden needs to have enough liquid tokens'\\n );\\n }\\n\\n function _getUniswapPoolWithMostLiquidity(TradeInfo memory _tradeInfo) internal view returns (IUniswapV3Pool) {\\n IUniswapV3Factory factory = IUniswapV3Factory(IBabController(controller).uniswapFactory());\\n IUniswapV3Pool poolLow =\\n IUniswapV3Pool(factory.getPool(_tradeInfo.sendToken, _tradeInfo.receiveToken, FEE_LOW));\\n IUniswapV3Pool poolMedium =\\n IUniswapV3Pool(factory.getPool(_tradeInfo.sendToken, _tradeInfo.receiveToken, FEE_MEDIUM));\\n IUniswapV3Pool poolHigh =\\n IUniswapV3Pool(factory.getPool(_tradeInfo.sendToken, _tradeInfo.receiveToken, FEE_HIGH));\\n\\n uint128 liquidityLow = poolLow.liquidity();\\n uint128 liquidityMedium = poolMedium.liquidity();\\n uint128 liquidityHigh = poolHigh.liquidity();\\n if (liquidityLow > liquidityMedium && liquidityLow >= liquidityHigh) {\\n return poolLow;\\n }\\n if (liquidityMedium > liquidityLow && liquidityMedium >= liquidityHigh) {\\n return poolMedium;\\n }\\n return poolHigh;\\n }\\n\\n /**\\n * Validate post trade data.\\n *\\n * @param _tradeInfo Struct containing trade information used in internal functions\\n * @return uint256 Total quantity of receive token that was exchanged\\n */\\n function _validatePostTrade(TradeInfo memory _tradeInfo) internal view returns (uint256) {\\n uint256 exchangedQuantity =\\n ERC20(_tradeInfo.receiveToken).balanceOf(address(_tradeInfo.strategy)).sub(\\n _tradeInfo.preTradeReceiveTokenBalance\\n );\\n // Get reserve asset decimals\\n uint8 tokenDecimals = ERC20(_tradeInfo.receiveToken).decimals();\\n uint256 normalizedExchangedQuantity =\\n tokenDecimals != 18 ? exchangedQuantity.mul(10**(18 - tokenDecimals)) : exchangedQuantity;\\n require(normalizedExchangedQuantity >= _tradeInfo.totalMinReceiveQuantity, 'Slippage greater than allowed');\\n\\n return normalizedExchangedQuantity;\\n }\\n\\n /**\\n * Return exchange calldata which is already generated from the exchange API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _sendToken Address of the token to be sent to the exchange\\n * hparam _sendQuantity Units of reserve asset token sent to the exchange\\n * hparam _receiveToken Address of the token that will be received from the exchange\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getTradeCallData(\\n address, /* _strategy */\\n address, /* _sendToken */\\n uint256, /*_sendQuantity */\\n address /* _receiveToken */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n /**\\n * Returns the address to approve source tokens to for trading. This is the TokenTaker address\\n *\\n * @return address Address of the contract to approve tokens to\\n */\\n function _getSpender() internal view virtual returns (address);\\n}\\n\",\"keccak256\":\"0x18815f793516feeadfbd14af259bd01b19b4e0ed1c38d01ca966e5081b329b07\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editGardenNFT(address _newGardenNFT) external;\\n\\n function editStrategyNFT(address _newStrategyNFT) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function editUniswapFactory(address _newUniswapFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\\n\\n function maxContributorsPerGarden() external view returns (uint256);\\n\\n function gardenCreationIsOpen() external view returns (bool);\\n\\n function openPublicGardenCreation() external;\\n\\n function setMaxContributorsPerGarden(uint256 _newMax) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function gardenNFT() external view returns (address);\\n\\n function strategyNFT() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\\n\\n function uniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0xdee5a27301c24f507d312f32249487fa9b0a756062a7e479405a1d1ee9ee7bb8\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function isGardenStrategy(address _strategy) external view returns (bool);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategyActiveInGarden(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to,\\n bool _withPenalty\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x88f1786ffee23e386aaa1735177912e1b5a7cdd440dafe52fb139fe50fd621b4\",\"license\":\"Apache License\"},\"contracts/interfaces/IIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIntegration\\n * @author Babylon Finance\\n *\\n * Interface for protocol integrations\\n */\\ninterface IIntegration {\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xee03c9274ddf3257e3bfd2bb229fea3412c9105f178e64174f59efeafd53182c\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n address,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x850597ec9a68eb86f31f13b6b77d3b31350b4ed3d0019dedfbd3550ad1a1d9e2\",\"license\":\"Apache License\"},\"contracts/interfaces/ITradeIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title ITrade\\n * @author Babylon Finance\\n *\\n * Interface for trading protocol integrations\\n */\\ninterface ITradeIntegration {\\n function trade(\\n address _strategy,\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken,\\n uint256 _minReceiveQuantity\\n ) external;\\n\\n function getConversionRates(\\n address _sourceToken,\\n address _destinationToken,\\n uint256 _sourceQuantity\\n ) external returns (uint256, uint256);\\n}\\n\",\"keccak256\":\"0x95df25f2cbfd3d82a9e22c9202f9fc2c497e90fd6e5fcfb00c4162f6447c0cbd\",\"license\":\"Apache License\"},\"contracts/interfaces/external/1inch/IOneInchExchange.sol\":{\"content\":\"pragma solidity >=0.7.0 <0.9.0;\\n\\ninterface IOneInchExchange {\\n function swap(\\n address fromToken,\\n address destToken,\\n uint256 amount,\\n uint256 minReturn,\\n uint256[] memory distribution,\\n uint256 flags\\n ) external payable returns (uint256);\\n\\n function getExpectedReturn(\\n address fromToken,\\n address destToken,\\n uint256 amount,\\n uint256 parts,\\n uint256 flags\\n ) external view returns (uint256 returnAmount, uint256[] memory distribution);\\n}\\n\",\"keccak256\":\"0x0813160a0dfa74762c8572719a88cb7d5c912d66c3e41fca9d9d12b26996ad82\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001f9438038062001f94833981810160405260608110156200003757600080fd5b50805160208083015160409384015184518086019095526005855264062d2dcc6d60db1b92850192909252919282848282826001600160a01b038116620000c5576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c6572206d75737420626520646566696e6564000000000000604482015290519081900360640190fd5b8251620000da9060019060208601906200012f565b50600080546001600160a01b03199081166001600160a01b039384161790915560609290921b6001600160601b03191660805260016003556004805490921696169590951790945550620001db945050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001675760008555620001b2565b82601f106200018257805160ff1916838001178555620001b2565b82800160010185558215620001b2579182015b82811115620001b257825182559160200191906001019062000195565b50620001c0929150620001c4565b5090565b5b80821115620001c05760008155600101620001c5565b60805160601c611d9b620001f9600039806104135250611d9b6000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c8063aa0b24fa11610076578063c7868ace1161005b578063c7868ace14610202578063f77c47911461020a578063fa1ca82014610212576100a3565b8063aa0b24fa14610179578063b10198fb146101c8576100a3565b806306fdde03146100a857806317d7de7c1461012557806331415a651461012d5780633fc8cef314610155575b600080fd5b6100b0610256565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100ea5781810151838201526020016100d2565b50505050905090810190601f1680156101175780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100b06102e3565b6101536004803603602081101561014357600080fd5b50356001600160a01b0316610378565b005b61015d610411565b604080516001600160a01b039092168252519081900360200190f35b6101af6004803603606081101561018f57600080fd5b506001600160a01b03813581169160208101359091169060400135610435565b6040805192835260208301919091528051918290030190f35b6101ee600480360360208110156101de57600080fd5b50356001600160a01b0316610487565b604080519115158252519081900360200190f35b61015d61049c565b61015d6104ab565b610153600480360360a081101561022857600080fd5b506001600160a01b0381358116916020810135821691604082013591606081013590911690608001356104ba565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102db5780601f106102b0576101008083540402835291602001916102db565b820191906000526020600020905b8154815290600101906020018083116102be57829003601f168201915b505050505081565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526060939092909183018282801561036e5780601f106103435761010080835404028352916020019161036e565b820191906000526020600020905b81548152906001019060200180831161035157829003601f168201915b5050505050905090565b6000546001600160a01b031633146103d7576040805162461bcd60e51b815260206004820152601d60248201527f4f6e6c7920636f6e74726f6c6c65722063616e2063616c6c2074686973000000604482015290519081900360640190fd5b600480547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b7f000000000000000000000000000000000000000000000000000000000000000081565b6040805162461bcd60e51b815260206004820152600f60248201527f6e6f7420696d706c656d656e74656400000000000000000000000000000000006044820152905160009182919081900360640190fd5b60026020526000908152604090205460ff1681565b6004546001600160a01b031681565b6000546001600160a01b031681565b60026003541415610512576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080517f13bc6d4b00000000000000000000000000000000000000000000000000000000815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b15801561057b57600080fd5b505afa15801561058f573d6000803e3d6000fd5b505050506040513d60208110156105a557600080fd5b50516105f8576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152600093610693938a938301828280156106855780601f1061065a57610100808354040283529160200191610685565b820191906000526020600020905b81548152906001019060200180831161066857829003601f168201915b505050505087868887610a48565b905061069f8185610cf0565b80602001516001600160a01b03166397ccdc606106ba6112b1565b83606001518460c001516040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561071a57600080fd5b505af115801561072e573d6000803e3d6000fd5b50505050600080600061074f8985606001518660c0015187608001516112c0565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156107cc5781810151838201526020016107b4565b50505050905090810190601f1680156107f95780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561081a57600080fd5b505af115801561082e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561085757600080fd5b810190808051604051939291908464010000000082111561087757600080fd5b90830190602082018581111561088c57600080fd5b82516401000000008111828201881017156108a657600080fd5b82525081516020918201929091019080838360005b838110156108d35781810151838201526020016108bb565b50505050905090810190601f1680156109005780820380516001836020036101000a031916815260200191505b506040525050505060006109138561155c565b905060006109338660c001518761010001516116eb90919063ffffffff16565b9050600061094f8388610120015161174d90919063ffffffff16565b90508a6001600160a01b031687602001516001600160a01b031688600001516001600160a01b03167f6896e8a2de09380c881b23755435130206166901028e7413fce46cd6ecafdb758c8b60400151878760405180856001600160a01b0316815260200180602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b838110156109f85781810151838201526020016109e0565b50505050905090810190601f168015610a255780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a45050600160035550505050505050505050565b610a50611ca4565b610a58611ca4565b6001600160a01b038816602080830182905260408051630ad7511760e31b815290516356ba88b892600480840193919291829003018186803b158015610a9d57600080fd5b505afa158015610ab1573d6000803e3d6000fd5b505050506040513d6020811015610ac757600080fd5b50516001600160a01b0390811682526040808301899052878216606084015286821660808401526020838101518251630ad7511760e31b815292519316926356ba88b8926004808201939291829003018186803b158015610b2757600080fd5b505afa158015610b3b573d6000803e3d6000fd5b505050506040513d6020811015610b5157600080fd5b5051604080517f18160ddd00000000000000000000000000000000000000000000000000000000815290516001600160a01b03909216916318160ddd91600480820192602092909190829003018186803b158015610bae57600080fd5b505afa158015610bc2573d6000803e3d6000fd5b505050506040513d6020811015610bd857600080fd5b505160a082015260c0810184905260e08101839052604080516370a0823160e01b81526001600160a01b038a811660048301529151918816916370a0823191602480820192602092909190829003018186803b158015610c3757600080fd5b505afa158015610c4b573d6000803e3d6000fd5b505050506040513d6020811015610c6157600080fd5b5051610100820152604080516370a0823160e01b81526001600160a01b038a811660048301529151918716916370a0823191602480820192602092909190829003018186803b158015610cb357600080fd5b505afa158015610cc7573d6000803e3d6000fd5b505050506040513d6020811015610cdd57600080fd5b5051610120820152979650505050505050565b60008260c0015111610d49576040805162461bcd60e51b815260206004820152601d60248201527f546f6b656e20746f2073656c6c206d757374206265206e6f6e7a65726f000000604482015290519081900360640190fd5b6000610d54836117ae565b9050600083600001516001600160a01b031663a63c643d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d9557600080fd5b505afa158015610da9573d6000803e3d6000fd5b505050506040513d6020811015610dbf57600080fd5b505160408051630d34328160e11b815290519192506000916001600160a01b03851691631a686502916004808301926020929190829003018186803b158015610e0757600080fd5b505afa158015610e1b573d6000803e3d6000fd5b505050506040513d6020811015610e3157600080fd5b50518551604080517ff85cb5c800000000000000000000000000000000000000000000000000000000815290516001600160801b0390931693506000926001600160a01b039092169163f85cb5c891600480820192602092909190829003018186803b158015610ea057600080fd5b505afa158015610eb4573d6000803e3d6000fd5b505050506040513d6020811015610eca57600080fd5b5051604080517f0dfe168100000000000000000000000000000000000000000000000000000000815290516001600160a01b0392831692871691630dfe1681916004808301926020929190829003018186803b158015610f2957600080fd5b505afa158015610f3d573d6000803e3d6000fd5b505050506040513d6020811015610f5357600080fd5b50516001600160a01b0316141561105557611052846001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610fa057600080fd5b505afa158015610fb4573d6000803e3d6000fd5b505050506040513d6020811015610fca57600080fd5b5051604080516370a0823160e01b81526001600160a01b038881166004830152915191909216916370a08231916024808301926020929190829003018186803b15801561101657600080fd5b505afa15801561102a573d6000803e3d6000fd5b505050506040513d602081101561104057600080fd5b505161104c8480611be4565b90611c3d565b90505b85600001516001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561109257600080fd5b505afa1580156110a6573d6000803e3d6000fd5b505050506040513d60208110156110bc57600080fd5b5051604080517fd21220a700000000000000000000000000000000000000000000000000000000815290516001600160a01b039283169287169163d21220a7916004808301926020929190829003018186803b15801561111b57600080fd5b505afa15801561112f573d6000803e3d6000fd5b505050506040513d602081101561114557600080fd5b50516001600160a01b0316141561119557611192846001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610fa057600080fd5b90505b828110156111ea576040805162461bcd60e51b815260206004820152601460248201527f4e6f7420656e6f756768206c6971756964697479000000000000000000000000604482015290519081900360640190fd5b8486606001516001600160a01b03166370a0823188602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561124057600080fd5b505afa158015611254573d6000803e3d6000fd5b505050506040513d602081101561126a57600080fd5b505110156112a95760405162461bcd60e51b8152600401808060200182810382526029815260200180611d3d6029913960400191505060405180910390fd5b505050505050565b6004546001600160a01b031690565b60048054604080517f085e2c5b0000000000000000000000000000000000000000000000000000000081526001600160a01b038781169482019490945284841660248201526044810186905260016064820152600060848201819052915191938493606093859384939092169163085e2c5b9160a48083019286929190829003018186803b15801561135157600080fd5b505afa158015611365573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561138e57600080fd5b8151602083018051604051929492938301929190846401000000008211156113b557600080fd5b9083019060208201858111156113ca57600080fd5b82518660208202830111640100000000821117156113e757600080fd5b82525081516020918201928201910280838360005b838110156114145781810151838201526020016113fc565b505050509050016040525050509150915060008887898585600060405160240180876001600160a01b03168152602001866001600160a01b0316815260200185815260200184815260200180602001838152602001828103825284818151815260200191508051906020019060200280838360005b838110156114a1578181015183820152602001611489565b505050509050019750505050505050506040516020818303038152906040527fe2a7515e000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600460009054906101000a90046001600160a01b03166000829550955095505050509450945094915050565b6000806115ef83610120015184608001516001600160a01b03166370a0823186602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156115bd57600080fd5b505afa1580156115d1573d6000803e3d6000fd5b505050506040513d60208110156115e757600080fd5b5051906116eb565b9050600083608001516001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561163057600080fd5b505afa158015611644573d6000803e3d6000fd5b505050506040513d602081101561165a57600080fd5b505190506000601260ff831614156116725782611686565b6116868360ff601285900316600a0a611be4565b90508460e001518110156116e1576040805162461bcd60e51b815260206004820152601d60248201527f536c6970706167652067726561746572207468616e20616c6c6f776564000000604482015290519081900360640190fd5b925050505b919050565b600082821115611742576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b508082035b92915050565b6000828201838110156117a7576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60008054604080517f8bdb2afa000000000000000000000000000000000000000000000000000000008152905183926001600160a01b031691638bdb2afa916004808301926020929190829003018186803b15801561180c57600080fd5b505afa158015611820573d6000803e3d6000fd5b505050506040513d602081101561183657600080fd5b50516060840151608085015160408051630b4c774160e11b81526001600160a01b03938416600482015291831660248301526101f460448301525192935060009291841691631698ee8291606480820192602092909190829003018186803b1580156118a157600080fd5b505afa1580156118b5573d6000803e3d6000fd5b505050506040513d60208110156118cb57600080fd5b50516060850151608086015160408051630b4c774160e11b81526001600160a01b0393841660048201529183166024830152610bb860448301525192935060009291851691631698ee8291606480820192602092909190829003018186803b15801561193657600080fd5b505afa15801561194a573d6000803e3d6000fd5b505050506040513d602081101561196057600080fd5b50516060860151608087015160408051630b4c774160e11b81526001600160a01b039384166004820152918316602483015261271060448301525192935060009291861691631698ee8291606480820192602092909190829003018186803b1580156119cb57600080fd5b505afa1580156119df573d6000803e3d6000fd5b505050506040513d60208110156119f557600080fd5b505160408051630d34328160e11b815290519192506000916001600160a01b03861691631a686502916004808301926020929190829003018186803b158015611a3d57600080fd5b505afa158015611a51573d6000803e3d6000fd5b505050506040513d6020811015611a6757600080fd5b505160408051630d34328160e11b815290519192506000916001600160a01b03861691631a686502916004808301926020929190829003018186803b158015611aaf57600080fd5b505afa158015611ac3573d6000803e3d6000fd5b505050506040513d6020811015611ad957600080fd5b505160408051630d34328160e11b815290519192506000916001600160a01b03861691631a686502916004808301926020929190829003018186803b158015611b2157600080fd5b505afa158015611b35573d6000803e3d6000fd5b505050506040513d6020811015611b4b57600080fd5b505190506001600160801b03808316908416118015611b7c5750806001600160801b0316836001600160801b031610155b15611b9057859750505050505050506116e6565b826001600160801b0316826001600160801b0316118015611bc35750806001600160801b0316826001600160801b031610155b15611bd757849750505050505050506116e6565b5091979650505050505050565b600082611bf357506000611747565b82820282848281611c0057fe5b04146117a75760405162461bcd60e51b8152600401808060200182810382526021815260200180611d1c6021913960400191505060405180910390fd5b6000808211611c93576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611c9c57fe5b049392505050565b60405180610140016040528060006001600160a01b0316815260200160006001600160a01b031681526020016060815260200160006001600160a01b0316815260200160006001600160a01b031681526020016000815260200160008152602001600081526020016000815260200160008152509056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7747617264656e206e6565647320746f206861766520656e6f756768206c697175696420746f6b656e73a2646970667358221220cb7a75c0a4a2f8c9c458189cedb6d0579d94c670a870f63d63a70f4c6e1a819364736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a35760003560e01c8063aa0b24fa11610076578063c7868ace1161005b578063c7868ace14610202578063f77c47911461020a578063fa1ca82014610212576100a3565b8063aa0b24fa14610179578063b10198fb146101c8576100a3565b806306fdde03146100a857806317d7de7c1461012557806331415a651461012d5780633fc8cef314610155575b600080fd5b6100b0610256565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100ea5781810151838201526020016100d2565b50505050905090810190601f1680156101175780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100b06102e3565b6101536004803603602081101561014357600080fd5b50356001600160a01b0316610378565b005b61015d610411565b604080516001600160a01b039092168252519081900360200190f35b6101af6004803603606081101561018f57600080fd5b506001600160a01b03813581169160208101359091169060400135610435565b6040805192835260208301919091528051918290030190f35b6101ee600480360360208110156101de57600080fd5b50356001600160a01b0316610487565b604080519115158252519081900360200190f35b61015d61049c565b61015d6104ab565b610153600480360360a081101561022857600080fd5b506001600160a01b0381358116916020810135821691604082013591606081013590911690608001356104ba565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102db5780601f106102b0576101008083540402835291602001916102db565b820191906000526020600020905b8154815290600101906020018083116102be57829003601f168201915b505050505081565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526060939092909183018282801561036e5780601f106103435761010080835404028352916020019161036e565b820191906000526020600020905b81548152906001019060200180831161035157829003601f168201915b5050505050905090565b6000546001600160a01b031633146103d7576040805162461bcd60e51b815260206004820152601d60248201527f4f6e6c7920636f6e74726f6c6c65722063616e2063616c6c2074686973000000604482015290519081900360640190fd5b600480547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b7f000000000000000000000000000000000000000000000000000000000000000081565b6040805162461bcd60e51b815260206004820152600f60248201527f6e6f7420696d706c656d656e74656400000000000000000000000000000000006044820152905160009182919081900360640190fd5b60026020526000908152604090205460ff1681565b6004546001600160a01b031681565b6000546001600160a01b031681565b60026003541415610512576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080517f13bc6d4b00000000000000000000000000000000000000000000000000000000815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b15801561057b57600080fd5b505afa15801561058f573d6000803e3d6000fd5b505050506040513d60208110156105a557600080fd5b50516105f8576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152600093610693938a938301828280156106855780601f1061065a57610100808354040283529160200191610685565b820191906000526020600020905b81548152906001019060200180831161066857829003601f168201915b505050505087868887610a48565b905061069f8185610cf0565b80602001516001600160a01b03166397ccdc606106ba6112b1565b83606001518460c001516040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561071a57600080fd5b505af115801561072e573d6000803e3d6000fd5b50505050600080600061074f8985606001518660c0015187608001516112c0565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156107cc5781810151838201526020016107b4565b50505050905090810190601f1680156107f95780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561081a57600080fd5b505af115801561082e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561085757600080fd5b810190808051604051939291908464010000000082111561087757600080fd5b90830190602082018581111561088c57600080fd5b82516401000000008111828201881017156108a657600080fd5b82525081516020918201929091019080838360005b838110156108d35781810151838201526020016108bb565b50505050905090810190601f1680156109005780820380516001836020036101000a031916815260200191505b506040525050505060006109138561155c565b905060006109338660c001518761010001516116eb90919063ffffffff16565b9050600061094f8388610120015161174d90919063ffffffff16565b90508a6001600160a01b031687602001516001600160a01b031688600001516001600160a01b03167f6896e8a2de09380c881b23755435130206166901028e7413fce46cd6ecafdb758c8b60400151878760405180856001600160a01b0316815260200180602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b838110156109f85781810151838201526020016109e0565b50505050905090810190601f168015610a255780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a45050600160035550505050505050505050565b610a50611ca4565b610a58611ca4565b6001600160a01b038816602080830182905260408051630ad7511760e31b815290516356ba88b892600480840193919291829003018186803b158015610a9d57600080fd5b505afa158015610ab1573d6000803e3d6000fd5b505050506040513d6020811015610ac757600080fd5b50516001600160a01b0390811682526040808301899052878216606084015286821660808401526020838101518251630ad7511760e31b815292519316926356ba88b8926004808201939291829003018186803b158015610b2757600080fd5b505afa158015610b3b573d6000803e3d6000fd5b505050506040513d6020811015610b5157600080fd5b5051604080517f18160ddd00000000000000000000000000000000000000000000000000000000815290516001600160a01b03909216916318160ddd91600480820192602092909190829003018186803b158015610bae57600080fd5b505afa158015610bc2573d6000803e3d6000fd5b505050506040513d6020811015610bd857600080fd5b505160a082015260c0810184905260e08101839052604080516370a0823160e01b81526001600160a01b038a811660048301529151918816916370a0823191602480820192602092909190829003018186803b158015610c3757600080fd5b505afa158015610c4b573d6000803e3d6000fd5b505050506040513d6020811015610c6157600080fd5b5051610100820152604080516370a0823160e01b81526001600160a01b038a811660048301529151918716916370a0823191602480820192602092909190829003018186803b158015610cb357600080fd5b505afa158015610cc7573d6000803e3d6000fd5b505050506040513d6020811015610cdd57600080fd5b5051610120820152979650505050505050565b60008260c0015111610d49576040805162461bcd60e51b815260206004820152601d60248201527f546f6b656e20746f2073656c6c206d757374206265206e6f6e7a65726f000000604482015290519081900360640190fd5b6000610d54836117ae565b9050600083600001516001600160a01b031663a63c643d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d9557600080fd5b505afa158015610da9573d6000803e3d6000fd5b505050506040513d6020811015610dbf57600080fd5b505160408051630d34328160e11b815290519192506000916001600160a01b03851691631a686502916004808301926020929190829003018186803b158015610e0757600080fd5b505afa158015610e1b573d6000803e3d6000fd5b505050506040513d6020811015610e3157600080fd5b50518551604080517ff85cb5c800000000000000000000000000000000000000000000000000000000815290516001600160801b0390931693506000926001600160a01b039092169163f85cb5c891600480820192602092909190829003018186803b158015610ea057600080fd5b505afa158015610eb4573d6000803e3d6000fd5b505050506040513d6020811015610eca57600080fd5b5051604080517f0dfe168100000000000000000000000000000000000000000000000000000000815290516001600160a01b0392831692871691630dfe1681916004808301926020929190829003018186803b158015610f2957600080fd5b505afa158015610f3d573d6000803e3d6000fd5b505050506040513d6020811015610f5357600080fd5b50516001600160a01b0316141561105557611052846001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610fa057600080fd5b505afa158015610fb4573d6000803e3d6000fd5b505050506040513d6020811015610fca57600080fd5b5051604080516370a0823160e01b81526001600160a01b038881166004830152915191909216916370a08231916024808301926020929190829003018186803b15801561101657600080fd5b505afa15801561102a573d6000803e3d6000fd5b505050506040513d602081101561104057600080fd5b505161104c8480611be4565b90611c3d565b90505b85600001516001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561109257600080fd5b505afa1580156110a6573d6000803e3d6000fd5b505050506040513d60208110156110bc57600080fd5b5051604080517fd21220a700000000000000000000000000000000000000000000000000000000815290516001600160a01b039283169287169163d21220a7916004808301926020929190829003018186803b15801561111b57600080fd5b505afa15801561112f573d6000803e3d6000fd5b505050506040513d602081101561114557600080fd5b50516001600160a01b0316141561119557611192846001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610fa057600080fd5b90505b828110156111ea576040805162461bcd60e51b815260206004820152601460248201527f4e6f7420656e6f756768206c6971756964697479000000000000000000000000604482015290519081900360640190fd5b8486606001516001600160a01b03166370a0823188602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561124057600080fd5b505afa158015611254573d6000803e3d6000fd5b505050506040513d602081101561126a57600080fd5b505110156112a95760405162461bcd60e51b8152600401808060200182810382526029815260200180611d3d6029913960400191505060405180910390fd5b505050505050565b6004546001600160a01b031690565b60048054604080517f085e2c5b0000000000000000000000000000000000000000000000000000000081526001600160a01b038781169482019490945284841660248201526044810186905260016064820152600060848201819052915191938493606093859384939092169163085e2c5b9160a48083019286929190829003018186803b15801561135157600080fd5b505afa158015611365573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604090815281101561138e57600080fd5b8151602083018051604051929492938301929190846401000000008211156113b557600080fd5b9083019060208201858111156113ca57600080fd5b82518660208202830111640100000000821117156113e757600080fd5b82525081516020918201928201910280838360005b838110156114145781810151838201526020016113fc565b505050509050016040525050509150915060008887898585600060405160240180876001600160a01b03168152602001866001600160a01b0316815260200185815260200184815260200180602001838152602001828103825284818151815260200191508051906020019060200280838360005b838110156114a1578181015183820152602001611489565b505050509050019750505050505050506040516020818303038152906040527fe2a7515e000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600460009054906101000a90046001600160a01b03166000829550955095505050509450945094915050565b6000806115ef83610120015184608001516001600160a01b03166370a0823186602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156115bd57600080fd5b505afa1580156115d1573d6000803e3d6000fd5b505050506040513d60208110156115e757600080fd5b5051906116eb565b9050600083608001516001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561163057600080fd5b505afa158015611644573d6000803e3d6000fd5b505050506040513d602081101561165a57600080fd5b505190506000601260ff831614156116725782611686565b6116868360ff601285900316600a0a611be4565b90508460e001518110156116e1576040805162461bcd60e51b815260206004820152601d60248201527f536c6970706167652067726561746572207468616e20616c6c6f776564000000604482015290519081900360640190fd5b925050505b919050565b600082821115611742576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b508082035b92915050565b6000828201838110156117a7576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60008054604080517f8bdb2afa000000000000000000000000000000000000000000000000000000008152905183926001600160a01b031691638bdb2afa916004808301926020929190829003018186803b15801561180c57600080fd5b505afa158015611820573d6000803e3d6000fd5b505050506040513d602081101561183657600080fd5b50516060840151608085015160408051630b4c774160e11b81526001600160a01b03938416600482015291831660248301526101f460448301525192935060009291841691631698ee8291606480820192602092909190829003018186803b1580156118a157600080fd5b505afa1580156118b5573d6000803e3d6000fd5b505050506040513d60208110156118cb57600080fd5b50516060850151608086015160408051630b4c774160e11b81526001600160a01b0393841660048201529183166024830152610bb860448301525192935060009291851691631698ee8291606480820192602092909190829003018186803b15801561193657600080fd5b505afa15801561194a573d6000803e3d6000fd5b505050506040513d602081101561196057600080fd5b50516060860151608087015160408051630b4c774160e11b81526001600160a01b039384166004820152918316602483015261271060448301525192935060009291861691631698ee8291606480820192602092909190829003018186803b1580156119cb57600080fd5b505afa1580156119df573d6000803e3d6000fd5b505050506040513d60208110156119f557600080fd5b505160408051630d34328160e11b815290519192506000916001600160a01b03861691631a686502916004808301926020929190829003018186803b158015611a3d57600080fd5b505afa158015611a51573d6000803e3d6000fd5b505050506040513d6020811015611a6757600080fd5b505160408051630d34328160e11b815290519192506000916001600160a01b03861691631a686502916004808301926020929190829003018186803b158015611aaf57600080fd5b505afa158015611ac3573d6000803e3d6000fd5b505050506040513d6020811015611ad957600080fd5b505160408051630d34328160e11b815290519192506000916001600160a01b03861691631a686502916004808301926020929190829003018186803b158015611b2157600080fd5b505afa158015611b35573d6000803e3d6000fd5b505050506040513d6020811015611b4b57600080fd5b505190506001600160801b03808316908416118015611b7c5750806001600160801b0316836001600160801b031610155b15611b9057859750505050505050506116e6565b826001600160801b0316826001600160801b0316118015611bc35750806001600160801b0316826001600160801b031610155b15611bd757849750505050505050506116e6565b5091979650505050505050565b600082611bf357506000611747565b82820282848281611c0057fe5b04146117a75760405162461bcd60e51b8152600401808060200182810382526021815260200180611d1c6021913960400191505060405180910390fd5b6000808211611c93576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611c9c57fe5b049392505050565b60405180610140016040528060006001600160a01b0316815260200160006001600160a01b031681526020016060815260200160006001600160a01b0316815260200160006001600160a01b031681526020016000815260200160008152602001600081526020016000815260200160008152509056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7747617264656e206e6565647320746f206861766520656e6f756768206c697175696420746f6b656e73a2646970667358221220cb7a75c0a4a2f8c9c458189cedb6d0579d94c670a870f63d63a70f4c6e1a819364736f6c63430007060033", "devdoc": { "author": "Babylon Finance Protocol 1Inch protocol trade integration", "kind": "dev", @@ -312,7 +312,7 @@ "storageLayout": { "storage": [ { - "astId": 18742, + "astId": 17657, "contract": "contracts/integrations/trade/OneInchTradeIntegration.sol:OneInchTradeIntegration", "label": "controller", "offset": 0, @@ -320,7 +320,7 @@ "type": "t_address" }, { - "astId": 18746, + "astId": 17661, "contract": "contracts/integrations/trade/OneInchTradeIntegration.sol:OneInchTradeIntegration", "label": "name", "offset": 0, @@ -328,7 +328,7 @@ "type": "t_string_storage" }, { - "astId": 18750, + "astId": 17665, "contract": "contracts/integrations/trade/OneInchTradeIntegration.sol:OneInchTradeIntegration", "label": "initializedByGarden", "offset": 0, @@ -336,7 +336,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 7995, + "astId": 5603, "contract": "contracts/integrations/trade/OneInchTradeIntegration.sol:OneInchTradeIntegration", "label": "_status", "offset": 0, @@ -344,7 +344,7 @@ "type": "t_uint256" }, { - "astId": 22735, + "astId": 21638, "contract": "contracts/integrations/trade/OneInchTradeIntegration.sol:OneInchTradeIntegration", "label": "oneInchExchangeAddress", "offset": 0, diff --git a/deployments/artifacts/mainnet/PriceOracle.json b/deployments/artifacts/mainnet/PriceOracle.json index 1da2a45f5..285c9df14 100644 --- a/deployments/artifacts/mainnet/PriceOracle.json +++ b/deployments/artifacts/mainnet/PriceOracle.json @@ -1,5 +1,5 @@ { - "address": "0xED063363482Ec52f09Fd9C2a96B5dC46312bdD5d", + "address": "0x0267576E3E56D2D11e858fF0Bca1a3e21F1654fb", "abi": [ { "inputs": [ @@ -221,6 +221,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "uniswapAssets", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -240,48 +259,48 @@ "type": "function" } ], - "transactionHash": "0xcc7a0466ec9b6d7b103e664ab6cc3557580de10e66c813308420294338e80bab", + "transactionHash": "0xe3dcc8e7372e71d369293d0daa983059c48395f5456444334a358dc5e5b45dee", "receipt": { "to": null, "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", - "contractAddress": "0xED063363482Ec52f09Fd9C2a96B5dC46312bdD5d", - "transactionIndex": 363, - "gasUsed": "1392117", - "logsBloom": "0x00000000000000000000000000000000000000000000000000802000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000004000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x988f2c7b99ed5530efbdc5677fc1243fa0f78bab7004224ff285a1f21c221022", - "transactionHash": "0xcc7a0466ec9b6d7b103e664ab6cc3557580de10e66c813308420294338e80bab", + "contractAddress": "0x0267576E3E56D2D11e858fF0Bca1a3e21F1654fb", + "transactionIndex": 247, + "gasUsed": "1586480", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000002000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000010000000000000000000000000000000000000000000000000000000000000200000000000000004000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xd0870f7c36118df5938ce0bf214400e95543d255a03d6dcf14a46b623c8b45ec", + "transactionHash": "0xe3dcc8e7372e71d369293d0daa983059c48395f5456444334a358dc5e5b45dee", "logs": [ { - "transactionIndex": 363, - "blockNumber": 12360925, - "transactionHash": "0xcc7a0466ec9b6d7b103e664ab6cc3557580de10e66c813308420294338e80bab", - "address": "0xED063363482Ec52f09Fd9C2a96B5dC46312bdD5d", + "transactionIndex": 247, + "blockNumber": 12451249, + "transactionHash": "0xe3dcc8e7372e71d369293d0daa983059c48395f5456444334a358dc5e5b45dee", + "address": "0x0267576E3E56D2D11e858fF0Bca1a3e21F1654fb", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000040cc3af8455f3c34d1df1d2a305e047a062bebf" ], "data": "0x", - "logIndex": 217, - "blockHash": "0x988f2c7b99ed5530efbdc5677fc1243fa0f78bab7004224ff285a1f21c221022" + "logIndex": 156, + "blockHash": "0xd0870f7c36118df5938ce0bf214400e95543d255a03d6dcf14a46b623c8b45ec" } ], - "blockNumber": 12360925, - "cumulativeGasUsed": "13556524", + "blockNumber": 12451249, + "cumulativeGasUsed": "10747822", "status": 1, "byzantium": true }, "args": [ - "0xffe7c30daDb1B132b86aB7bbede496615d54c8Ac", + "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F", "0x922018674c12a7f0d394ebeef9b58f186cde13c1", [ - "0x4d622957e49c1E7F5CdF0aaE5Bb02297ef884C87" + "0xDB1Bf4f4976A4BEd769B9106bd41E0211E342446" ] ], - "solcInputHash": "a02a2075cf667a20c416d2d0a5e8f337", - "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBabController\",\"name\":\"_controller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_uniswapAnchoredView\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"_adapters\",\"type\":\"address[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_adapter\",\"type\":\"address\"}],\"name\":\"AdapterAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_adapter\",\"type\":\"address\"}],\"name\":\"AdapterRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"adapters\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_adapter\",\"type\":\"address\"}],\"name\":\"addAdapter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"contract IBabController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAdapters\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_assetOne\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_assetTwo\",\"type\":\"address\"}],\"name\":\"getPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_adapter\",\"type\":\"address\"}],\"name\":\"removeAdapter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"uniswapAnchoredView\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_assetOne\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_assetTwo\",\"type\":\"address\"}],\"name\":\"updateAdapters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Contract that returns the price for any given asset pair. Price is retrieved either directly from an oracle, calculated using common asset pairs, or uses external data to calculate price. Note: Prices are returned in preciseUnits (i.e. 18 decimals of precision)\",\"kind\":\"dev\",\"methods\":{\"addAdapter(address)\":{\"params\":{\"_adapter\":\"Address of new adapter\"}},\"constructor\":{\"params\":{\"_adapters\":\"List of adapters used to price assets created by other protocols\",\"_controller\":\"Address of controller contract\",\"_uniswapAnchoredView\":\"Address of the uniswap anchored view that compound maintains\"}},\"getPrice(address,address)\":{\"params\":{\"_assetOne\":\"Address of first asset in pair\",\"_assetTwo\":\"Address of second asset in pair\"},\"returns\":{\"_0\":\"Price of asset pair to 18 decimals of precision\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"removeAdapter(address)\":{\"params\":{\"_adapter\":\"Address of adapter to remove\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateAdapters(address,address)\":{\"params\":{\"_assetOne\":\"First Asset of the pair\",\"_assetTwo\":\"Second Asset of the pair\"}}},\"title\":\"PriceOracle\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addAdapter(address)\":{\"notice\":\"GOVERNANCE FUNCTION: Add new oracle adapter.\"},\"constructor\":{\"notice\":\"Set state variables and map asset pairs to their oracles\"},\"getAdapters()\":{\"notice\":\"Returns an array of adapters\"},\"getPrice(address,address)\":{\"notice\":\"SYSTEM-ONLY PRIVELEGE: Find price of passed asset pair, if possible. The steps it takes are: 1) Check to see if a direct or inverse oracle of the pair exists, 2) If not, use masterQuoteAsset to link pairs together (i.e. BTC/ETH and ETH/USDC could be used to calculate BTC/USDC). 3) If not, check oracle adapters in case one or more of the assets needs external protocol data to price. 4) If all steps fail, revert.\"},\"removeAdapter(address)\":{\"notice\":\"GOVERNANCE FUNCTION: Remove oracle adapter.\"},\"updateAdapters(address,address)\":{\"notice\":\"Calls the update function in every adapter. e.g Uniswap TWAP\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/PriceOracle.sol\":\"PriceOracle\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () internal {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/PriceOracle.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol SetValuer)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\n\\nimport {AddressArrayUtils} from './lib/AddressArrayUtils.sol';\\nimport {PreciseUnitMath} from './lib/PreciseUnitMath.sol';\\n\\nimport {IBabController} from './interfaces/IBabController.sol';\\nimport {IUniswapAnchoredView} from './interfaces/external/compound/IUniswapAnchoredView.sol';\\nimport {IOracleAdapter} from './interfaces/IOracleAdapter.sol';\\nimport {IPriceOracle} from './interfaces/IPriceOracle.sol';\\n\\n/**\\n * @title PriceOracle\\n * @author Babylon Finance\\n *\\n * Contract that returns the price for any given asset pair. Price is retrieved either directly from an oracle,\\n * calculated using common asset pairs, or uses external data to calculate price.\\n * Note: Prices are returned in preciseUnits (i.e. 18 decimals of precision)\\n */\\ncontract PriceOracle is Ownable, IPriceOracle {\\n using PreciseUnitMath for uint256;\\n using AddressArrayUtils for address[];\\n\\n /* ============ Events ============ */\\n\\n event AdapterAdded(address _adapter);\\n event AdapterRemoved(address _adapter);\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the Controller contract\\n IBabController public controller;\\n\\n address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\\n\\n // Address of uniswap anchored view contract. See https://compound.finance/docs/prices#price\\n address public immutable uniswapAnchoredView;\\n\\n // List of IOracleAdapters used to return prices of third party protocols (e.g. Uniswap, Compound, Balancer)\\n address[] public adapters;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Set state variables and map asset pairs to their oracles\\n *\\n * @param _controller Address of controller contract\\n * @param _uniswapAnchoredView Address of the uniswap anchored view that compound maintains\\n * @param _adapters List of adapters used to price assets created by other protocols\\n */\\n constructor(\\n IBabController _controller,\\n address _uniswapAnchoredView,\\n address[] memory _adapters\\n ) {\\n controller = _controller;\\n uniswapAnchoredView = _uniswapAnchoredView;\\n adapters = _adapters;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * SYSTEM-ONLY PRIVELEGE: Find price of passed asset pair, if possible. The steps it takes are:\\n * 1) Check to see if a direct or inverse oracle of the pair exists,\\n * 2) If not, use masterQuoteAsset to link pairs together (i.e. BTC/ETH and ETH/USDC\\n * could be used to calculate BTC/USDC).\\n * 3) If not, check oracle adapters in case one or more of the assets needs external protocol data\\n * to price.\\n * 4) If all steps fail, revert.\\n *\\n * @param _assetOne Address of first asset in pair\\n * @param _assetTwo Address of second asset in pair\\n * @return Price of asset pair to 18 decimals of precision\\n */\\n function getPrice(address _assetOne, address _assetTwo) external view override returns (uint256) {\\n require(controller.isSystemContract(msg.sender) || msg.sender == owner(), 'Caller must be system contract');\\n // Same asset. Returns base unit\\n if (_assetOne == _assetTwo) {\\n return 10**18;\\n }\\n\\n bool priceFound;\\n uint256 price;\\n\\n (priceFound, price) = _getPriceFromUniswapAnchoredView(_assetOne, _assetTwo);\\n if (!priceFound) {\\n (priceFound, price) = _getPriceFromAdapters(_assetOne, _assetTwo);\\n }\\n\\n require(priceFound, 'Price not found');\\n return price;\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION: Add new oracle adapter.\\n *\\n * @param _adapter Address of new adapter\\n */\\n function addAdapter(address _adapter) external onlyOwner {\\n require(!adapters.contains(_adapter), 'Adapter already exists');\\n adapters.push(_adapter);\\n\\n emit AdapterAdded(_adapter);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION: Remove oracle adapter.\\n *\\n * @param _adapter Address of adapter to remove\\n */\\n function removeAdapter(address _adapter) external onlyOwner {\\n adapters = adapters.remove(_adapter);\\n\\n emit AdapterRemoved(_adapter);\\n }\\n\\n /* ============ External View Functions ============ */\\n\\n /**\\n * Returns an array of adapters\\n */\\n function getAdapters() external view returns (address[] memory) {\\n return adapters;\\n }\\n\\n /**\\n * Calls the update function in every adapter.\\n * e.g Uniswap TWAP\\n * @param _assetOne First Asset of the pair\\n * @param _assetTwo Second Asset of the pair\\n */\\n function updateAdapters(address _assetOne, address _assetTwo) external override {\\n for (uint256 i = 0; i < adapters.length; i += 1) {\\n IOracleAdapter(adapters[i]).update(_assetOne, _assetTwo);\\n }\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Try to calculate asset pair price by getting each asset in the pair's price relative to USD.\\n * Both prices must exist otherwise function returns false and no price.\\n *\\n * @param _assetOne Address of first asset in pair\\n * @param _assetTwo Address of second asset in pair\\n * @return bool Boolean indicating if oracle exists\\n * @return uint256 Price of asset pair to 18 decimal precision (if exists, otherwise 0)\\n */\\n function _getPriceFromUniswapAnchoredView(address _assetOne, address _assetTwo)\\n internal\\n view\\n returns (bool, uint256)\\n {\\n address assetToCheck = _assetOne;\\n if (_assetOne == WETH) {\\n assetToCheck = _assetTwo;\\n }\\n if (\\n assetToCheck == 0x6B175474E89094C44Da98b954EedeAC495271d0F || // dai\\n assetToCheck == 0x1985365e9f78359a9B6AD760e32412f4a445E862 || // rep\\n assetToCheck == 0xE41d2489571d322189246DaFA5ebDe1F4699F498 || // zrx\\n assetToCheck == 0x0D8775F648430679A709E98d2b0Cb6250d2887EF || // bat\\n assetToCheck == 0xdd974D5C2e2928deA5F71b9825b8b646686BD200 || // knc\\n assetToCheck == 0x514910771AF9Ca656af840dff83E8264EcF986CA || // link\\n assetToCheck == 0xc00e94Cb662C3520282E6f5717214004A7f26888 || // comp\\n assetToCheck == 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 || // USDC\\n assetToCheck == 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 // uni\\n ) {\\n string memory symbol1 = _assetOne == WETH ? 'ETH' : ERC20(_assetOne).symbol();\\n string memory symbol2 = _assetTwo == WETH ? 'ETH' : ERC20(_assetTwo).symbol();\\n uint256 assetOnePrice = IUniswapAnchoredView(uniswapAnchoredView).price(symbol1);\\n uint256 assetTwoPrice = IUniswapAnchoredView(uniswapAnchoredView).price(symbol2);\\n\\n if (assetOnePrice > 0 && assetTwoPrice > 0) {\\n return (true, assetOnePrice.preciseDiv(assetTwoPrice));\\n }\\n }\\n\\n return (false, 0);\\n }\\n\\n /**\\n * Scan adapters to see if one or more of the assets needs external protocol data to be priced. If\\n * does not exist return false and no price.\\n *\\n * @param _assetOne Address of first asset in pair\\n * @param _assetTwo Address of second asset in pair\\n * @return bool Boolean indicating if oracle exists\\n * @return uint256 Price of asset pair to 18 decimal precision (if exists, otherwise 0)\\n */\\n function _getPriceFromAdapters(address _assetOne, address _assetTwo) internal view returns (bool, uint256) {\\n for (uint256 i = 0; i < adapters.length; i++) {\\n (bool priceFound, uint256 price) = IOracleAdapter(adapters[i]).getPrice(_assetOne, _assetTwo);\\n\\n if (priceFound) {\\n return (priceFound, price);\\n }\\n }\\n\\n return (false, 0);\\n }\\n}\\n\",\"keccak256\":\"0x1a91b479f4c85df7e01d826f710462ad2fe2ee56492494b1c26e13e6b1b77974\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityMinimum(uint256 _minRiskyPairLiquidityEth) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minRiskyPairLiquidityEth() external view returns (uint256);\\n\\n function getUniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0x57cf4ece98219f805a416e8c24728d30d9b37c4126d66785d2617b97e35ffae6\",\"license\":\"Apache License\"},\"contracts/interfaces/IOracleAdapter.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol IOracleAdapter)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IOracleAdapter\\n * @author Babylon Finance\\n *\\n * Interface for calling an oracle adapter.\\n */\\ninterface IOracleAdapter {\\n /**\\n * Function for retrieving a price that requires sourcing data from outside protocols to calculate.\\n *\\n * @param _assetOne First asset in pair\\n * @param _assetTwo Second asset in pair\\n * @return Boolean indicating if oracle exists\\n * @return Current price of asset represented in uint256\\n */\\n function getPrice(address _assetOne, address _assetTwo) external view returns (bool, uint256);\\n\\n function update(address _assetOne, address _assetTwo) external;\\n}\\n\",\"keccak256\":\"0xe77f738e9740ce5a33165dbe4027b455eea635812cdceec302863f34952ce388\",\"license\":\"Apache License\"},\"contracts/interfaces/IPriceOracle.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol IPriceOracle)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPriceOracle\\n * @author Babylon Finance\\n *\\n * Interface for interacting with PriceOracle\\n */\\ninterface IPriceOracle {\\n /* ============ Functions ============ */\\n\\n function getPrice(address _assetOne, address _assetTwo) external view returns (uint256);\\n\\n function updateAdapters(address _assetOne, address _assetTwo) external;\\n}\\n\",\"keccak256\":\"0xa22e0e5e166f6f6714553b736ee921b916c37bc5b557042bf6042cc010d2a041\",\"license\":\"Apache License\"},\"contracts/interfaces/external/compound/IUniswapAnchoredView.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol IOracleAdapter)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IOracleAdapter\\n * @author Babylon Finance\\n *\\n * Interface for calling an oracle adapter.\\n */\\ninterface IUniswapAnchoredView {\\n function price(string memory symbol) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x60e2ddf7ad8a78bd54d9dbaa35cce8cf375aef9fa1fdf01e41083d5e4b72897f\",\"license\":\"Apache License\"},\"contracts/lib/AddressArrayUtils.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n/**\\n * @title AddressArrayUtils\\n * @author Set Protocol\\n *\\n * Utility functions to handle Address Arrays\\n */\\nlibrary AddressArrayUtils {\\n /**\\n * Finds the index of the first occurrence of the given element.\\n * @param A The input array to search\\n * @param a The value to find\\n * @return Returns (index and isIn) for the first occurrence starting from index 0\\n */\\n function indexOf(address[] memory A, address a) internal pure returns (uint256, bool) {\\n uint256 length = A.length;\\n for (uint256 i = 0; i < length; i++) {\\n if (A[i] == a) {\\n return (i, true);\\n }\\n }\\n return (uint256(-1), false);\\n }\\n\\n /**\\n * Returns true if the value is present in the list. Uses indexOf internally.\\n * @param A The input array to search\\n * @param a The value to find\\n * @return Returns isIn for the first occurrence starting from index 0\\n */\\n function contains(address[] memory A, address a) internal pure returns (bool) {\\n (, bool isIn) = indexOf(A, a);\\n return isIn;\\n }\\n\\n /**\\n * Returns true if there are 2 elements that are the same in an array\\n * @param A The input array to search\\n * @return Returns boolean for the first occurrence of a duplicate\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n require(A.length > 0, 'A is empty');\\n\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n address current = A[i];\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (current == A[j]) {\\n return true;\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @param A The input array to search\\n * @param a The address to remove\\n * @return Returns the array with the object removed.\\n */\\n function remove(address[] memory A, address a) internal pure returns (address[] memory) {\\n (uint256 index, bool isIn) = indexOf(A, a);\\n if (!isIn) {\\n revert('Address not in array.');\\n } else {\\n (address[] memory _A, ) = pop(A, index);\\n return _A;\\n }\\n }\\n\\n /**\\n * Removes specified index from array\\n * @param A The input array to search\\n * @param index The index to remove\\n * @return Returns the new array and the removed entry\\n */\\n function pop(address[] memory A, uint256 index) internal pure returns (address[] memory, address) {\\n uint256 length = A.length;\\n require(index < A.length, 'Index must be < A length');\\n address[] memory newAddresses = new address[](length - 1);\\n for (uint256 i = 0; i < index; i++) {\\n newAddresses[i] = A[i];\\n }\\n for (uint256 j = index + 1; j < length; j++) {\\n newAddresses[j - 1] = A[j];\\n }\\n return (newAddresses, A[index]);\\n }\\n\\n /**\\n * Returns the combination of the two arrays\\n * @param A The first array\\n * @param B The second array\\n * @return Returns A extended by B\\n */\\n function extend(address[] memory A, address[] memory B) internal pure returns (address[] memory) {\\n uint256 aLength = A.length;\\n uint256 bLength = B.length;\\n address[] memory newAddresses = new address[](aLength + bLength);\\n for (uint256 i = 0; i < aLength; i++) {\\n newAddresses[i] = A[i];\\n }\\n for (uint256 j = 0; j < bLength; j++) {\\n newAddresses[aLength + j] = B[j];\\n }\\n return newAddresses;\\n }\\n}\\n\",\"keccak256\":\"0x409127cd8cadb573e5de48fd992efbd8b0f1e243d235abc3c5f2fa873195c16a\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523480156200001157600080fd5b506040516200189d3803806200189d833981810160405260608110156200003757600080fd5b815160208301516040808501805191519395929483019291846401000000008211156200006357600080fd5b9083019060208201858111156200007957600080fd5b82518660208202830111640100000000821117156200009757600080fd5b82525081516020918201928201910280838360005b83811015620000c6578181015183820152602001620000ac565b505050509050016040525050506000620000e56200017b60201b60201c565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b0319166001600160a01b038516179055606082901b6001600160601b0319166080528051620001719060029060208401906200017f565b5050505062000200565b3390565b828054828255906000526020600020908101928215620001d7579160200282015b82811115620001d757825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620001a0565b50620001e5929150620001e9565b5090565b5b80821115620001e55760008155600101620001ea565b60805160601c61167562000228600039806102765280610fd152806110c652506116756000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c80638da5cb5b11610081578063b82e16e31161005b578063b82e16e3146101ee578063f2fde38b14610246578063f77c47911461026c576100d4565b80638da5cb5b1461019e578063ac41865a146101a6578063ad5c4648146101e6576100d4565b80635e684bb3116100b25780635e684bb31461014257806360d54d4114610170578063715018a614610196576100d4565b80630af45704146100d95780634ef501ac146100fd578063585cd34b1461011a575b600080fd5b6100e1610274565b604080516001600160a01b039092168252519081900360200190f35b6100e16004803603602081101561011357600080fd5b5035610298565b6101406004803603602081101561013057600080fd5b50356001600160a01b03166102c2565b005b6101406004803603604081101561015857600080fd5b506001600160a01b03813581169160200135166103f7565b6101406004803603602081101561018657600080fd5b50356001600160a01b03166104ac565b610140610670565b6100e161073b565b6101d4600480360360408110156101bc57600080fd5b506001600160a01b038135811691602001351661074a565b60408051918252519081900360200190f35b6100e16108fa565b6101f6610912565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561023257818101518382015260200161021a565b505050509050019250505060405180910390f35b6101406004803603602081101561025c57600080fd5b50356001600160a01b0316610974565b6100e1610a95565b7f000000000000000000000000000000000000000000000000000000000000000081565b600281815481106102a857600080fd5b6000918252602090912001546001600160a01b0316905081565b6102ca610aa4565b6001600160a01b03166102db61073b565b6001600160a01b031614610336576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6103a381600280548060200260200160405190810160405280929190818152602001828054801561039057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610372575b5050505050610aa890919063ffffffff16565b80516103b791600291602090910190611571565b50604080516001600160a01b038316815290517fdf980d21d8c7bb34800e668dbe003299093bac8e693614151d3c57f73f98a93d9181900360200190a150565b60005b6002548110156104a7576002818154811061041157fe5b6000918252602082200154604080517fc640752d0000000000000000000000000000000000000000000000000000000081526001600160a01b03878116600483015286811660248301529151919092169263c640752d926044808201939182900301818387803b15801561048457600080fd5b505af1158015610498573d6000803e3d6000fd5b505050506001810190506103fa565b505050565b6104b4610aa4565b6001600160a01b03166104c561073b565b6001600160a01b031614610520576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61058d81600280548060200260200160405190810160405280929190818152602001828054801561057a57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161055c575b5050505050610b2590919063ffffffff16565b156105df576040805162461bcd60e51b815260206004820152601660248201527f4164617074657220616c72656164792065786973747300000000000000000000604482015290519081900360640190fd5b600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff19909116811790915560408051918252517fcf9c2c7f9adbb156bd76affb04df84595f8f5e69cab2e61221b05b05a902fa269181900360200190a150565b610678610aa4565b6001600160a01b031661068961073b565b6001600160a01b0316146106e4576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000546001600160a01b031690565b600154604080517f13bc6d4b00000000000000000000000000000000000000000000000000000000815233600482015290516000926001600160a01b0316916313bc6d4b916024808301926020929190829003018186803b1580156107ae57600080fd5b505afa1580156107c2573d6000803e3d6000fd5b505050506040513d60208110156107d857600080fd5b5051806107fd57506107e861073b565b6001600160a01b0316336001600160a01b0316145b61084e576040805162461bcd60e51b815260206004820152601e60248201527f43616c6c6572206d7573742062652073797374656d20636f6e74726163740000604482015290519081900360640190fd5b816001600160a01b0316836001600160a01b031614156108775750670de0b6b3a76400006108f4565b6000806108848585610b3b565b90925090508161089e5761089885856111d1565b90925090505b816108f0576040805162461bcd60e51b815260206004820152600f60248201527f5072696365206e6f7420666f756e640000000000000000000000000000000000604482015290519081900360640190fd5b9150505b92915050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6060600280548060200260200160405190810160405280929190818152602001828054801561096a57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161094c575b5050505050905090565b61097c610aa4565b6001600160a01b031661098d61073b565b6001600160a01b0316146109e8576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610a2d5760405162461bcd60e51b81526004018080602001828103825260268152602001806115f96026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6001546001600160a01b031681565b3390565b6060600080610ab785856112c5565b9150915080610b0d576040805162461bcd60e51b815260206004820152601560248201527f41646472657373206e6f7420696e2061727261792e0000000000000000000000604482015290519081900360640190fd5b6000610b198684611328565b5093506108f492505050565b600080610b3284846112c5565b95945050505050565b600080836001600160a01b03811673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21415610b675750825b736b175474e89094c44da98b954eedeac495271d0f6001600160a01b0382161480610bae5750731985365e9f78359a9b6ad760e32412f4a445e8626001600160a01b038216145b80610bd5575073e41d2489571d322189246dafa5ebde1f4699f4986001600160a01b038216145b80610bfc5750730d8775f648430679a709e98d2b0cb6250d2887ef6001600160a01b038216145b80610c23575073dd974d5c2e2928dea5f71b9825b8b646686bd2006001600160a01b038216145b80610c4a575073514910771af9ca656af840dff83e8264ecf986ca6001600160a01b038216145b80610c71575073c00e94cb662c3520282e6f5717214004a7f268886001600160a01b038216145b80610c98575073a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b038216145b80610cbf5750731f9840a85d5af5bf1d1762f925bdaddc4201f9846001600160a01b038216145b156111c15760006001600160a01b03861673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc214610e1557856001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015610d2357600080fd5b505afa158015610d37573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610d6057600080fd5b8101908080516040519392919084640100000000821115610d8057600080fd5b908301906020820185811115610d9557600080fd5b8251640100000000811182820188101715610daf57600080fd5b82525081516020918201929091019080838360005b83811015610ddc578181015183820152602001610dc4565b50505050905090810190601f168015610e095780820380516001836020036101000a031916815260200191505b50604052505050610e32565b6040518060400160405280600381526020016208aa8960eb1b8152505b905060006001600160a01b03861673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc214610f8557856001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015610e9357600080fd5b505afa158015610ea7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610ed057600080fd5b8101908080516040519392919084640100000000821115610ef057600080fd5b908301906020820185811115610f0557600080fd5b8251640100000000811182820188101715610f1f57600080fd5b82525081516020918201929091019080838360005b83811015610f4c578181015183820152602001610f34565b50505050905090810190601f168015610f795780820380516001836020036101000a031916815260200191505b50604052505050610fa2565b6040518060400160405280600381526020016208aa8960eb1b8152505b604051631fc58c3360e31b81526020600482018181528551602484015285519394506000936001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169363fe2c6198938893928392604401918501908083838b5b83811015611021578181015183820152602001611009565b50505050905090810190601f16801561104e5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561106b57600080fd5b505afa15801561107f573d6000803e3d6000fd5b505050506040513d602081101561109557600080fd5b5051604051631fc58c3360e31b81526020600482018181528551602484015285519394506000936001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169363fe2c6198938893928392604401918501908083838b5b838110156111165781810151838201526020016110fe565b50505050905090810190601f1680156111435780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561116057600080fd5b505afa158015611174573d6000803e3d6000fd5b505050506040513d602081101561118a57600080fd5b50519050811580159061119d5750600081115b156111bc5760016111ae838361148c565b9650965050505050506111ca565b505050505b60008092509250505b9250929050565b60008060005b6002548110156112b857600080600283815481106111f157fe5b600091825260209091200154604080517fac41865a0000000000000000000000000000000000000000000000000000000081526001600160a01b038a811660048301528981166024830152825193169263ac41865a92604480840193919291829003018186803b15801561126457600080fd5b505afa158015611278573d6000803e3d6000fd5b505050506040513d604081101561128e57600080fd5b508051602090910151909250905081156112ae5790935091506111ca9050565b50506001016111d7565b5060009485945092505050565b81516000908190815b8181101561131857846001600160a01b03168682815181106112ec57fe5b60200260200101516001600160a01b03161415611310579250600191506111ca9050565b6001016112ce565b5060001995600095509350505050565b8151606090600090808410611384576040805162461bcd60e51b815260206004820152601860248201527f496e646578206d757374206265203c2041206c656e6774680000000000000000604482015290519081900360640190fd5b60006001820367ffffffffffffffff811180156113a057600080fd5b506040519080825280602002602001820160405280156113ca578160200160208202803683370190505b50905060005b85811015611418578681815181106113e457fe5b60200260200101518282815181106113f857fe5b6001600160a01b03909216602092830291909101909101526001016113d0565b50600185015b828110156114695786818151811061143257fe5b602002602001015182600183038151811061144957fe5b6001600160a01b039092166020928302919091019091015260010161141e565b508086868151811061147757fe5b60200260200101519350935050509250929050565b60006114aa826114a485670de0b6b3a76400006114b1565b9061150a565b9392505050565b6000826114c0575060006108f4565b828202828482816114cd57fe5b04146114aa5760405162461bcd60e51b815260040180806020018281038252602181526020018061161f6021913960400191505060405180910390fd5b6000808211611560576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161156957fe5b049392505050565b8280548282559060005260206000209081019282156115d3579160200282015b828111156115d3578251825473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909116178255602090920191600190910190611591565b506115df9291506115e3565b5090565b5b808211156115df57600081556001016115e456fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a264697066735822122061dcc9cdecfd62d113cc4f74494e052878ee5f495801e7f17e4330128970ced664736f6c63430007060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100d45760003560e01c80638da5cb5b11610081578063b82e16e31161005b578063b82e16e3146101ee578063f2fde38b14610246578063f77c47911461026c576100d4565b80638da5cb5b1461019e578063ac41865a146101a6578063ad5c4648146101e6576100d4565b80635e684bb3116100b25780635e684bb31461014257806360d54d4114610170578063715018a614610196576100d4565b80630af45704146100d95780634ef501ac146100fd578063585cd34b1461011a575b600080fd5b6100e1610274565b604080516001600160a01b039092168252519081900360200190f35b6100e16004803603602081101561011357600080fd5b5035610298565b6101406004803603602081101561013057600080fd5b50356001600160a01b03166102c2565b005b6101406004803603604081101561015857600080fd5b506001600160a01b03813581169160200135166103f7565b6101406004803603602081101561018657600080fd5b50356001600160a01b03166104ac565b610140610670565b6100e161073b565b6101d4600480360360408110156101bc57600080fd5b506001600160a01b038135811691602001351661074a565b60408051918252519081900360200190f35b6100e16108fa565b6101f6610912565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561023257818101518382015260200161021a565b505050509050019250505060405180910390f35b6101406004803603602081101561025c57600080fd5b50356001600160a01b0316610974565b6100e1610a95565b7f000000000000000000000000000000000000000000000000000000000000000081565b600281815481106102a857600080fd5b6000918252602090912001546001600160a01b0316905081565b6102ca610aa4565b6001600160a01b03166102db61073b565b6001600160a01b031614610336576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6103a381600280548060200260200160405190810160405280929190818152602001828054801561039057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610372575b5050505050610aa890919063ffffffff16565b80516103b791600291602090910190611571565b50604080516001600160a01b038316815290517fdf980d21d8c7bb34800e668dbe003299093bac8e693614151d3c57f73f98a93d9181900360200190a150565b60005b6002548110156104a7576002818154811061041157fe5b6000918252602082200154604080517fc640752d0000000000000000000000000000000000000000000000000000000081526001600160a01b03878116600483015286811660248301529151919092169263c640752d926044808201939182900301818387803b15801561048457600080fd5b505af1158015610498573d6000803e3d6000fd5b505050506001810190506103fa565b505050565b6104b4610aa4565b6001600160a01b03166104c561073b565b6001600160a01b031614610520576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61058d81600280548060200260200160405190810160405280929190818152602001828054801561057a57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161055c575b5050505050610b2590919063ffffffff16565b156105df576040805162461bcd60e51b815260206004820152601660248201527f4164617074657220616c72656164792065786973747300000000000000000000604482015290519081900360640190fd5b600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff19909116811790915560408051918252517fcf9c2c7f9adbb156bd76affb04df84595f8f5e69cab2e61221b05b05a902fa269181900360200190a150565b610678610aa4565b6001600160a01b031661068961073b565b6001600160a01b0316146106e4576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000546001600160a01b031690565b600154604080517f13bc6d4b00000000000000000000000000000000000000000000000000000000815233600482015290516000926001600160a01b0316916313bc6d4b916024808301926020929190829003018186803b1580156107ae57600080fd5b505afa1580156107c2573d6000803e3d6000fd5b505050506040513d60208110156107d857600080fd5b5051806107fd57506107e861073b565b6001600160a01b0316336001600160a01b0316145b61084e576040805162461bcd60e51b815260206004820152601e60248201527f43616c6c6572206d7573742062652073797374656d20636f6e74726163740000604482015290519081900360640190fd5b816001600160a01b0316836001600160a01b031614156108775750670de0b6b3a76400006108f4565b6000806108848585610b3b565b90925090508161089e5761089885856111d1565b90925090505b816108f0576040805162461bcd60e51b815260206004820152600f60248201527f5072696365206e6f7420666f756e640000000000000000000000000000000000604482015290519081900360640190fd5b9150505b92915050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6060600280548060200260200160405190810160405280929190818152602001828054801561096a57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161094c575b5050505050905090565b61097c610aa4565b6001600160a01b031661098d61073b565b6001600160a01b0316146109e8576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610a2d5760405162461bcd60e51b81526004018080602001828103825260268152602001806115f96026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6001546001600160a01b031681565b3390565b6060600080610ab785856112c5565b9150915080610b0d576040805162461bcd60e51b815260206004820152601560248201527f41646472657373206e6f7420696e2061727261792e0000000000000000000000604482015290519081900360640190fd5b6000610b198684611328565b5093506108f492505050565b600080610b3284846112c5565b95945050505050565b600080836001600160a01b03811673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21415610b675750825b736b175474e89094c44da98b954eedeac495271d0f6001600160a01b0382161480610bae5750731985365e9f78359a9b6ad760e32412f4a445e8626001600160a01b038216145b80610bd5575073e41d2489571d322189246dafa5ebde1f4699f4986001600160a01b038216145b80610bfc5750730d8775f648430679a709e98d2b0cb6250d2887ef6001600160a01b038216145b80610c23575073dd974d5c2e2928dea5f71b9825b8b646686bd2006001600160a01b038216145b80610c4a575073514910771af9ca656af840dff83e8264ecf986ca6001600160a01b038216145b80610c71575073c00e94cb662c3520282e6f5717214004a7f268886001600160a01b038216145b80610c98575073a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b038216145b80610cbf5750731f9840a85d5af5bf1d1762f925bdaddc4201f9846001600160a01b038216145b156111c15760006001600160a01b03861673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc214610e1557856001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015610d2357600080fd5b505afa158015610d37573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610d6057600080fd5b8101908080516040519392919084640100000000821115610d8057600080fd5b908301906020820185811115610d9557600080fd5b8251640100000000811182820188101715610daf57600080fd5b82525081516020918201929091019080838360005b83811015610ddc578181015183820152602001610dc4565b50505050905090810190601f168015610e095780820380516001836020036101000a031916815260200191505b50604052505050610e32565b6040518060400160405280600381526020016208aa8960eb1b8152505b905060006001600160a01b03861673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc214610f8557856001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015610e9357600080fd5b505afa158015610ea7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610ed057600080fd5b8101908080516040519392919084640100000000821115610ef057600080fd5b908301906020820185811115610f0557600080fd5b8251640100000000811182820188101715610f1f57600080fd5b82525081516020918201929091019080838360005b83811015610f4c578181015183820152602001610f34565b50505050905090810190601f168015610f795780820380516001836020036101000a031916815260200191505b50604052505050610fa2565b6040518060400160405280600381526020016208aa8960eb1b8152505b604051631fc58c3360e31b81526020600482018181528551602484015285519394506000936001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169363fe2c6198938893928392604401918501908083838b5b83811015611021578181015183820152602001611009565b50505050905090810190601f16801561104e5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561106b57600080fd5b505afa15801561107f573d6000803e3d6000fd5b505050506040513d602081101561109557600080fd5b5051604051631fc58c3360e31b81526020600482018181528551602484015285519394506000936001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169363fe2c6198938893928392604401918501908083838b5b838110156111165781810151838201526020016110fe565b50505050905090810190601f1680156111435780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561116057600080fd5b505afa158015611174573d6000803e3d6000fd5b505050506040513d602081101561118a57600080fd5b50519050811580159061119d5750600081115b156111bc5760016111ae838361148c565b9650965050505050506111ca565b505050505b60008092509250505b9250929050565b60008060005b6002548110156112b857600080600283815481106111f157fe5b600091825260209091200154604080517fac41865a0000000000000000000000000000000000000000000000000000000081526001600160a01b038a811660048301528981166024830152825193169263ac41865a92604480840193919291829003018186803b15801561126457600080fd5b505afa158015611278573d6000803e3d6000fd5b505050506040513d604081101561128e57600080fd5b508051602090910151909250905081156112ae5790935091506111ca9050565b50506001016111d7565b5060009485945092505050565b81516000908190815b8181101561131857846001600160a01b03168682815181106112ec57fe5b60200260200101516001600160a01b03161415611310579250600191506111ca9050565b6001016112ce565b5060001995600095509350505050565b8151606090600090808410611384576040805162461bcd60e51b815260206004820152601860248201527f496e646578206d757374206265203c2041206c656e6774680000000000000000604482015290519081900360640190fd5b60006001820367ffffffffffffffff811180156113a057600080fd5b506040519080825280602002602001820160405280156113ca578160200160208202803683370190505b50905060005b85811015611418578681815181106113e457fe5b60200260200101518282815181106113f857fe5b6001600160a01b03909216602092830291909101909101526001016113d0565b50600185015b828110156114695786818151811061143257fe5b602002602001015182600183038151811061144957fe5b6001600160a01b039092166020928302919091019091015260010161141e565b508086868151811061147757fe5b60200260200101519350935050509250929050565b60006114aa826114a485670de0b6b3a76400006114b1565b9061150a565b9392505050565b6000826114c0575060006108f4565b828202828482816114cd57fe5b04146114aa5760405162461bcd60e51b815260040180806020018281038252602181526020018061161f6021913960400191505060405180910390fd5b6000808211611560576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161156957fe5b049392505050565b8280548282559060005260206000209081019282156115d3579160200282015b828111156115d3578251825473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909116178255602090920191600190910190611591565b506115df9291506115e3565b5090565b5b808211156115df57600081556001016115e456fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a264697066735822122061dcc9cdecfd62d113cc4f74494e052878ee5f495801e7f17e4330128970ced664736f6c63430007060033", + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBabController\",\"name\":\"_controller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_uniswapAnchoredView\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"_adapters\",\"type\":\"address[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_adapter\",\"type\":\"address\"}],\"name\":\"AdapterAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_adapter\",\"type\":\"address\"}],\"name\":\"AdapterRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"adapters\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_adapter\",\"type\":\"address\"}],\"name\":\"addAdapter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"contract IBabController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAdapters\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_assetOne\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_assetTwo\",\"type\":\"address\"}],\"name\":\"getPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_adapter\",\"type\":\"address\"}],\"name\":\"removeAdapter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"uniswapAnchoredView\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"uniswapAssets\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_assetOne\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_assetTwo\",\"type\":\"address\"}],\"name\":\"updateAdapters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Contract that returns the price for any given asset pair. Price is retrieved either directly from an oracle, calculated using common asset pairs, or uses external data to calculate price. Note: Prices are returned in preciseUnits (i.e. 18 decimals of precision)\",\"kind\":\"dev\",\"methods\":{\"addAdapter(address)\":{\"params\":{\"_adapter\":\"Address of new adapter\"}},\"constructor\":{\"params\":{\"_adapters\":\"List of adapters used to price assets created by other protocols\",\"_controller\":\"Address of controller contract\",\"_uniswapAnchoredView\":\"Address of the uniswap anchored view that compound maintains\"}},\"getPrice(address,address)\":{\"params\":{\"_assetOne\":\"Address of first asset in pair\",\"_assetTwo\":\"Address of second asset in pair\"},\"returns\":{\"_0\":\"Price of asset pair to 18 decimals of precision\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"removeAdapter(address)\":{\"params\":{\"_adapter\":\"Address of adapter to remove\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateAdapters(address,address)\":{\"params\":{\"_assetOne\":\"First Asset of the pair\",\"_assetTwo\":\"Second Asset of the pair\"}}},\"title\":\"PriceOracle\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addAdapter(address)\":{\"notice\":\"GOVERNANCE FUNCTION: Add new oracle adapter.\"},\"constructor\":{\"notice\":\"Set state variables and map asset pairs to their oracles\"},\"getAdapters()\":{\"notice\":\"Returns an array of adapters\"},\"getPrice(address,address)\":{\"notice\":\"SYSTEM-ONLY PRIVELEGE: Find price of passed asset pair, if possible. The steps it takes are: 1) Check to see if a direct or inverse oracle of the pair exists, 2) If not, use masterQuoteAsset to link pairs together (i.e. BTC/ETH and ETH/USDC could be used to calculate BTC/USDC). 3) If not, check oracle adapters in case one or more of the assets needs external protocol data to price. 4) If all steps fail, revert.\"},\"removeAdapter(address)\":{\"notice\":\"GOVERNANCE FUNCTION: Remove oracle adapter.\"},\"updateAdapters(address,address)\":{\"notice\":\"Calls the update function in every adapter. e.g Uniswap TWAP\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/PriceOracle.sol\":\"PriceOracle\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () internal {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/PriceOracle.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol SetValuer)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\n\\nimport {AddressArrayUtils} from './lib/AddressArrayUtils.sol';\\nimport {PreciseUnitMath} from './lib/PreciseUnitMath.sol';\\n\\nimport {IBabController} from './interfaces/IBabController.sol';\\nimport {IUniswapAnchoredView} from './interfaces/external/compound/IUniswapAnchoredView.sol';\\nimport {IOracleAdapter} from './interfaces/IOracleAdapter.sol';\\nimport {IPriceOracle} from './interfaces/IPriceOracle.sol';\\n\\n/**\\n * @title PriceOracle\\n * @author Babylon Finance\\n *\\n * Contract that returns the price for any given asset pair. Price is retrieved either directly from an oracle,\\n * calculated using common asset pairs, or uses external data to calculate price.\\n * Note: Prices are returned in preciseUnits (i.e. 18 decimals of precision)\\n */\\ncontract PriceOracle is Ownable, IPriceOracle {\\n using PreciseUnitMath for uint256;\\n using AddressArrayUtils for address[];\\n\\n /* ============ Events ============ */\\n\\n event AdapterAdded(address _adapter);\\n event AdapterRemoved(address _adapter);\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the Controller contract\\n IBabController public controller;\\n\\n address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\\n mapping(address => bool) public uniswapAssets;\\n\\n // Address of uniswap anchored view contract. See https://compound.finance/docs/prices#price\\n address public immutable uniswapAnchoredView;\\n\\n // List of IOracleAdapters used to return prices of third party protocols (e.g. Uniswap, Compound, Balancer)\\n address[] public adapters;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Set state variables and map asset pairs to their oracles\\n *\\n * @param _controller Address of controller contract\\n * @param _uniswapAnchoredView Address of the uniswap anchored view that compound maintains\\n * @param _adapters List of adapters used to price assets created by other protocols\\n */\\n constructor(\\n IBabController _controller,\\n address _uniswapAnchoredView,\\n address[] memory _adapters\\n ) {\\n controller = _controller;\\n uniswapAnchoredView = _uniswapAnchoredView;\\n adapters = _adapters;\\n\\n uniswapAssets[0x6B175474E89094C44Da98b954EedeAC495271d0F] = true; // dai\\n uniswapAssets[0x1985365e9f78359a9B6AD760e32412f4a445E862] = true; // rep\\n uniswapAssets[0xE41d2489571d322189246DaFA5ebDe1F4699F498] = true; // zrx\\n uniswapAssets[0x0D8775F648430679A709E98d2b0Cb6250d2887EF] = true; // bat\\n uniswapAssets[0xdd974D5C2e2928deA5F71b9825b8b646686BD200] = true; // knc\\n uniswapAssets[0x514910771AF9Ca656af840dff83E8264EcF986CA] = true; // link\\n uniswapAssets[0xc00e94Cb662C3520282E6f5717214004A7f26888] = true; // comp\\n uniswapAssets[0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48] = true; // USDC\\n uniswapAssets[0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984] = true; // uni\\n uniswapAssets[address(0)] = true; // eth\\n uniswapAssets[WETH] = true; // weth\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * SYSTEM-ONLY PRIVELEGE: Find price of passed asset pair, if possible. The steps it takes are:\\n * 1) Check to see if a direct or inverse oracle of the pair exists,\\n * 2) If not, use masterQuoteAsset to link pairs together (i.e. BTC/ETH and ETH/USDC\\n * could be used to calculate BTC/USDC).\\n * 3) If not, check oracle adapters in case one or more of the assets needs external protocol data\\n * to price.\\n * 4) If all steps fail, revert.\\n *\\n * @param _assetOne Address of first asset in pair\\n * @param _assetTwo Address of second asset in pair\\n * @return Price of asset pair to 18 decimals of precision\\n */\\n function getPrice(address _assetOne, address _assetTwo) external view override returns (uint256) {\\n require(controller.isSystemContract(msg.sender) || msg.sender == owner(), 'Caller must be system contract');\\n // Same asset. Returns base unit\\n if (_assetOne == _assetTwo) {\\n return 10**18;\\n }\\n\\n bool priceFound;\\n uint256 price;\\n\\n (priceFound, price) = _getPriceFromUniswapAnchoredView(_assetOne, _assetTwo);\\n if (!priceFound) {\\n (priceFound, price) = _getPriceFromAdapters(_assetOne, _assetTwo);\\n }\\n\\n require(priceFound, 'Price not found');\\n return price;\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION: Add new oracle adapter.\\n *\\n * @param _adapter Address of new adapter\\n */\\n function addAdapter(address _adapter) external onlyOwner {\\n require(!adapters.contains(_adapter), 'Adapter already exists');\\n adapters.push(_adapter);\\n\\n emit AdapterAdded(_adapter);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION: Remove oracle adapter.\\n *\\n * @param _adapter Address of adapter to remove\\n */\\n function removeAdapter(address _adapter) external onlyOwner {\\n adapters = adapters.remove(_adapter);\\n\\n emit AdapterRemoved(_adapter);\\n }\\n\\n /* ============ External View Functions ============ */\\n\\n /**\\n * Returns an array of adapters\\n */\\n function getAdapters() external view returns (address[] memory) {\\n return adapters;\\n }\\n\\n /**\\n * Calls the update function in every adapter.\\n * e.g Uniswap TWAP\\n * @param _assetOne First Asset of the pair\\n * @param _assetTwo Second Asset of the pair\\n */\\n function updateAdapters(address _assetOne, address _assetTwo) external override {\\n for (uint256 i = 0; i < adapters.length; i += 1) {\\n IOracleAdapter(adapters[i]).update(_assetOne, _assetTwo);\\n }\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Try to calculate asset pair price by getting each asset in the pair's price relative to USD.\\n * Both prices must exist otherwise function returns false and no price.\\n *\\n * @param _assetOne Address of first asset in pair\\n * @param _assetTwo Address of second asset in pair\\n * @return bool Boolean indicating if oracle exists\\n * @return uint256 Price of asset pair to 18 decimal precision (if exists, otherwise 0)\\n */\\n function _getPriceFromUniswapAnchoredView(address _assetOne, address _assetTwo)\\n internal\\n view\\n returns (bool, uint256)\\n {\\n if (uniswapAssets[_assetOne] && uniswapAssets[_assetTwo]) {\\n IUniswapAnchoredView anchoredView = IUniswapAnchoredView(uniswapAnchoredView);\\n string memory symbol1 = _assetOne == WETH ? 'ETH' : ERC20(_assetOne).symbol();\\n string memory symbol2 = _assetTwo == WETH ? 'ETH' : ERC20(_assetTwo).symbol();\\n uint256 assetOnePrice = anchoredView.price(symbol1);\\n uint256 assetTwoPrice = anchoredView.price(symbol2);\\n\\n if (assetOnePrice > 0 && assetTwoPrice > 0) {\\n return (true, assetOnePrice.preciseDiv(assetTwoPrice));\\n }\\n }\\n\\n return (false, 0);\\n }\\n\\n /**\\n * Scan adapters to see if one or more of the assets needs external protocol data to be priced. If\\n * does not exist return false and no price.\\n *\\n * @param _assetOne Address of first asset in pair\\n * @param _assetTwo Address of second asset in pair\\n * @return bool Boolean indicating if oracle exists\\n * @return uint256 Price of asset pair to 18 decimal precision (if exists, otherwise 0)\\n */\\n function _getPriceFromAdapters(address _assetOne, address _assetTwo) internal view returns (bool, uint256) {\\n for (uint256 i = 0; i < adapters.length; i++) {\\n (bool priceFound, uint256 price) = IOracleAdapter(adapters[i]).getPrice(_assetOne, _assetTwo);\\n\\n if (priceFound) {\\n return (priceFound, price);\\n }\\n }\\n\\n return (false, 0);\\n }\\n}\\n\",\"keccak256\":\"0xae29e1c45a3bee3f7889dfcd8d402e675724b26c7ac58dd5536106a1a6c70bec\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editGardenNFT(address _newGardenNFT) external;\\n\\n function editStrategyNFT(address _newStrategyNFT) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function editUniswapFactory(address _newUniswapFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\\n\\n function maxContributorsPerGarden() external view returns (uint256);\\n\\n function gardenCreationIsOpen() external view returns (bool);\\n\\n function openPublicGardenCreation() external;\\n\\n function setMaxContributorsPerGarden(uint256 _newMax) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function gardenNFT() external view returns (address);\\n\\n function strategyNFT() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\\n\\n function uniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0xdee5a27301c24f507d312f32249487fa9b0a756062a7e479405a1d1ee9ee7bb8\",\"license\":\"Apache License\"},\"contracts/interfaces/IOracleAdapter.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol IOracleAdapter)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IOracleAdapter\\n * @author Babylon Finance\\n *\\n * Interface for calling an oracle adapter.\\n */\\ninterface IOracleAdapter {\\n /**\\n * Function for retrieving a price that requires sourcing data from outside protocols to calculate.\\n *\\n * @param _assetOne First asset in pair\\n * @param _assetTwo Second asset in pair\\n * @return Boolean indicating if oracle exists\\n * @return Current price of asset represented in uint256\\n */\\n function getPrice(address _assetOne, address _assetTwo) external view returns (bool, uint256);\\n\\n function update(address _assetOne, address _assetTwo) external;\\n}\\n\",\"keccak256\":\"0xe77f738e9740ce5a33165dbe4027b455eea635812cdceec302863f34952ce388\",\"license\":\"Apache License\"},\"contracts/interfaces/IPriceOracle.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol IPriceOracle)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPriceOracle\\n * @author Babylon Finance\\n *\\n * Interface for interacting with PriceOracle\\n */\\ninterface IPriceOracle {\\n /* ============ Functions ============ */\\n\\n function getPrice(address _assetOne, address _assetTwo) external view returns (uint256);\\n\\n function updateAdapters(address _assetOne, address _assetTwo) external;\\n}\\n\",\"keccak256\":\"0xa22e0e5e166f6f6714553b736ee921b916c37bc5b557042bf6042cc010d2a041\",\"license\":\"Apache License\"},\"contracts/interfaces/external/compound/IUniswapAnchoredView.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol IOracleAdapter)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IOracleAdapter\\n * @author Babylon Finance\\n *\\n * Interface for calling an oracle adapter.\\n */\\ninterface IUniswapAnchoredView {\\n function price(string memory symbol) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x60e2ddf7ad8a78bd54d9dbaa35cce8cf375aef9fa1fdf01e41083d5e4b72897f\",\"license\":\"Apache License\"},\"contracts/lib/AddressArrayUtils.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n/**\\n * @title AddressArrayUtils\\n * @author Set Protocol\\n *\\n * Utility functions to handle Address Arrays\\n */\\nlibrary AddressArrayUtils {\\n /**\\n * Finds the index of the first occurrence of the given element.\\n * @param A The input array to search\\n * @param a The value to find\\n * @return Returns (index and isIn) for the first occurrence starting from index 0\\n */\\n function indexOf(address[] memory A, address a) internal pure returns (uint256, bool) {\\n uint256 length = A.length;\\n for (uint256 i = 0; i < length; i++) {\\n if (A[i] == a) {\\n return (i, true);\\n }\\n }\\n return (uint256(-1), false);\\n }\\n\\n /**\\n * Returns true if the value is present in the list. Uses indexOf internally.\\n * @param A The input array to search\\n * @param a The value to find\\n * @return Returns isIn for the first occurrence starting from index 0\\n */\\n function contains(address[] memory A, address a) internal pure returns (bool) {\\n (, bool isIn) = indexOf(A, a);\\n return isIn;\\n }\\n\\n /**\\n * Returns true if there are 2 elements that are the same in an array\\n * @param A The input array to search\\n * @return Returns boolean for the first occurrence of a duplicate\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n require(A.length > 0, 'A is empty');\\n\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n address current = A[i];\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (current == A[j]) {\\n return true;\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @param A The input array to search\\n * @param a The address to remove\\n * @return Returns the array with the object removed.\\n */\\n function remove(address[] memory A, address a) internal pure returns (address[] memory) {\\n (uint256 index, bool isIn) = indexOf(A, a);\\n if (!isIn) {\\n revert('Address not in array.');\\n } else {\\n (address[] memory _A, ) = pop(A, index);\\n return _A;\\n }\\n }\\n\\n /**\\n * Removes specified index from array\\n * @param A The input array to search\\n * @param index The index to remove\\n * @return Returns the new array and the removed entry\\n */\\n function pop(address[] memory A, uint256 index) internal pure returns (address[] memory, address) {\\n uint256 length = A.length;\\n require(index < A.length, 'Index must be < A length');\\n address[] memory newAddresses = new address[](length - 1);\\n for (uint256 i = 0; i < index; i++) {\\n newAddresses[i] = A[i];\\n }\\n for (uint256 j = index + 1; j < length; j++) {\\n newAddresses[j - 1] = A[j];\\n }\\n return (newAddresses, A[index]);\\n }\\n\\n /**\\n * Returns the combination of the two arrays\\n * @param A The first array\\n * @param B The second array\\n * @return Returns A extended by B\\n */\\n function extend(address[] memory A, address[] memory B) internal pure returns (address[] memory) {\\n uint256 aLength = A.length;\\n uint256 bLength = B.length;\\n address[] memory newAddresses = new address[](aLength + bLength);\\n for (uint256 i = 0; i < aLength; i++) {\\n newAddresses[i] = A[i];\\n }\\n for (uint256 j = 0; j < bLength; j++) {\\n newAddresses[aLength + j] = B[j];\\n }\\n return newAddresses;\\n }\\n}\\n\",\"keccak256\":\"0x409127cd8cadb573e5de48fd992efbd8b0f1e243d235abc3c5f2fa873195c16a\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b506040516200197938038062001979833981810160405260608110156200003757600080fd5b815160208301516040808501805191519395929483019291846401000000008211156200006357600080fd5b9083019060208201858111156200007957600080fd5b82518660208202830111640100000000821117156200009757600080fd5b82525081516020918201928201910280838360005b83811015620000c6578181015183820152602001620000ac565b505050509050016040525050506000620000e56200036460201b60201c565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b0319166001600160a01b038516179055606082901b6001600160601b03191660805280516200017190600390602084019062000368565b5050600260205250507ff02f5385b52432c1a270c20c346d380219f286755cbd16bede4ce0fb454a47228054600160ff1991821681179092557fbc4f91af6423551ffb095ab57fd8affaf8c0c400f88b85432aa0b71ca6d09ab380548216831790557fc29c4999a78c3ebf71622ad23dd87d0a73f0b43e94d51a582a710fc0a0921d5780548216831790557f7be26d2af1bea3dd5deab9fbd0b6e87e4de83102162a2c5d67a45f045affba2280548216831790557f1f4dd463c37659e35d28ba19019b4855faa73d28cfc23cf4537ed418b65536d780548216831790557f698237dfa634d11da10159d70f72b31f9b252a79768d52db914572ce99f0c7b080548216831790557fb1c2a895b81f98ee8aadc4d2e6de299902d38600ad58ce7d06c7d9ac3e628c5e80548216831790557fb7598821b71eb990d952f174dec3507a6d48dc93be8e23cae785c98ca310bfbb80548216831790557f8e26ad65a8968434acdb37383cda23018c5945aba6d6e7c8399e7184ccde361780548216831790557fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b805482168317905573c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26000527fde032e96a833a2191f55c5766e34554d9b07734477ea9cb69c40158c1078e79380549091169091179055620003e9565b3390565b828054828255906000526020600020908101928215620003c0579160200282015b82811115620003c057825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000389565b50620003ce929150620003d2565b5090565b5b80821115620003ce5760008155600101620003d3565b60805160601c61156d6200040c600039806102bb5280610bde525061156d6000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c80638da5cb5b1161008c578063b82e16e311610066578063b82e16e3146101f9578063d2179e8d14610251578063f2fde38b1461028b578063f77c4791146102b1576100df565b80638da5cb5b146101a9578063ac41865a146101b1578063ad5c4648146101f1576100df565b80635e684bb3116100bd5780635e684bb31461014d57806360d54d411461017b578063715018a6146101a1576100df565b80630af45704146100e45780634ef501ac14610108578063585cd34b14610125575b600080fd5b6100ec6102b9565b604080516001600160a01b039092168252519081900360200190f35b6100ec6004803603602081101561011e57600080fd5b50356102dd565b61014b6004803603602081101561013b57600080fd5b50356001600160a01b0316610307565b005b61014b6004803603604081101561016357600080fd5b506001600160a01b038135811691602001351661043c565b61014b6004803603602081101561019157600080fd5b50356001600160a01b03166104f1565b61014b6106b5565b6100ec610780565b6101df600480360360408110156101c757600080fd5b506001600160a01b038135811691602001351661078f565b60408051918252519081900360200190f35b6100ec61093f565b610201610957565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561023d578181015183820152602001610225565b505050509050019250505060405180910390f35b6102776004803603602081101561026757600080fd5b50356001600160a01b03166109b9565b604080519115158252519081900360200190f35b61014b600480360360208110156102a157600080fd5b50356001600160a01b03166109ce565b6100ec610aef565b7f000000000000000000000000000000000000000000000000000000000000000081565b600381815481106102ed57600080fd5b6000918252602090912001546001600160a01b0316905081565b61030f610afe565b6001600160a01b0316610320610780565b6001600160a01b03161461037b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6103e88160038054806020026020016040519081016040528092919081815260200182805480156103d557602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116103b7575b5050505050610b0290919063ffffffff16565b80516103fc91600391602090910190611469565b50604080516001600160a01b038316815290517fdf980d21d8c7bb34800e668dbe003299093bac8e693614151d3c57f73f98a93d9181900360200190a150565b60005b6003548110156104ec576003818154811061045657fe5b6000918252602082200154604080517fc640752d0000000000000000000000000000000000000000000000000000000081526001600160a01b03878116600483015286811660248301529151919092169263c640752d926044808201939182900301818387803b1580156104c957600080fd5b505af11580156104dd573d6000803e3d6000fd5b5050505060018101905061043f565b505050565b6104f9610afe565b6001600160a01b031661050a610780565b6001600160a01b031614610565576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6105d28160038054806020026020016040519081016040528092919081815260200182805480156105bf57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116105a1575b5050505050610b7f90919063ffffffff16565b15610624576040805162461bcd60e51b815260206004820152601660248201527f4164617074657220616c72656164792065786973747300000000000000000000604482015290519081900360640190fd5b600380546001810182556000919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff19909116811790915560408051918252517fcf9c2c7f9adbb156bd76affb04df84595f8f5e69cab2e61221b05b05a902fa269181900360200190a150565b6106bd610afe565b6001600160a01b03166106ce610780565b6001600160a01b031614610729576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000546001600160a01b031690565b600154604080517f13bc6d4b00000000000000000000000000000000000000000000000000000000815233600482015290516000926001600160a01b0316916313bc6d4b916024808301926020929190829003018186803b1580156107f357600080fd5b505afa158015610807573d6000803e3d6000fd5b505050506040513d602081101561081d57600080fd5b505180610842575061082d610780565b6001600160a01b0316336001600160a01b0316145b610893576040805162461bcd60e51b815260206004820152601e60248201527f43616c6c6572206d7573742062652073797374656d20636f6e74726163740000604482015290519081900360640190fd5b816001600160a01b0316836001600160a01b031614156108bc5750670de0b6b3a7640000610939565b6000806108c98585610b95565b9092509050816108e3576108dd85856110c9565b90925090505b81610935576040805162461bcd60e51b815260206004820152600f60248201527f5072696365206e6f7420666f756e640000000000000000000000000000000000604482015290519081900360640190fd5b9150505b92915050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b606060038054806020026020016040519081016040528092919081815260200182805480156109af57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610991575b5050505050905090565b60026020526000908152604090205460ff1681565b6109d6610afe565b6001600160a01b03166109e7610780565b6001600160a01b031614610a42576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610a875760405162461bcd60e51b81526004018080602001828103825260268152602001806114f16026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6001546001600160a01b031681565b3390565b6060600080610b1185856111bd565b9150915080610b67576040805162461bcd60e51b815260206004820152601560248201527f41646472657373206e6f7420696e2061727261792e0000000000000000000000604482015290519081900360640190fd5b6000610b738684611220565b50935061093992505050565b600080610b8c84846111bd565b95945050505050565b6001600160a01b038216600090815260026020526040812054819060ff168015610bd757506001600160a01b03831660009081526002602052604090205460ff165b156110bb577f000000000000000000000000000000000000000000000000000000000000000060006001600160a01b03861673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc214610d4e57856001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015610c5c57600080fd5b505afa158015610c70573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610c9957600080fd5b8101908080516040519392919084640100000000821115610cb957600080fd5b908301906020820185811115610cce57600080fd5b8251640100000000811182820188101715610ce857600080fd5b82525081516020918201929091019080838360005b83811015610d15578181015183820152602001610cfd565b50505050905090810190601f168015610d425780820380516001836020036101000a031916815260200191505b50604052505050610d6b565b6040518060400160405280600381526020016208aa8960eb1b8152505b905060006001600160a01b03861673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc214610ebe57856001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015610dcc57600080fd5b505afa158015610de0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610e0957600080fd5b8101908080516040519392919084640100000000821115610e2957600080fd5b908301906020820185811115610e3e57600080fd5b8251640100000000811182820188101715610e5857600080fd5b82525081516020918201929091019080838360005b83811015610e85578181015183820152602001610e6d565b50505050905090810190601f168015610eb25780820380516001836020036101000a031916815260200191505b50604052505050610edb565b6040518060400160405280600381526020016208aa8960eb1b8152505b604051631fc58c3360e31b81526020600482018181528551602484015285519394506000936001600160a01b0388169363fe2c6198938893928392604401918501908083838b5b83811015610f3a578181015183820152602001610f22565b50505050905090810190601f168015610f675780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b158015610f8457600080fd5b505afa158015610f98573d6000803e3d6000fd5b505050506040513d6020811015610fae57600080fd5b5051604051631fc58c3360e31b81526020600482018181528551602484015285519394506000936001600160a01b0389169363fe2c6198938893928392604401918501908083838b5b8381101561100f578181015183820152602001610ff7565b50505050905090810190601f16801561103c5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561105957600080fd5b505afa15801561106d573d6000803e3d6000fd5b505050506040513d602081101561108357600080fd5b5051905081158015906110965750600081115b156110b55760016110a78383611384565b9650965050505050506110c2565b50505050505b5060009050805b9250929050565b60008060005b6003548110156111b057600080600383815481106110e957fe5b600091825260209091200154604080517fac41865a0000000000000000000000000000000000000000000000000000000081526001600160a01b038a811660048301528981166024830152825193169263ac41865a92604480840193919291829003018186803b15801561115c57600080fd5b505afa158015611170573d6000803e3d6000fd5b505050506040513d604081101561118657600080fd5b508051602090910151909250905081156111a65790935091506110c29050565b50506001016110cf565b5060009485945092505050565b81516000908190815b8181101561121057846001600160a01b03168682815181106111e457fe5b60200260200101516001600160a01b03161415611208579250600191506110c29050565b6001016111c6565b5060001995600095509350505050565b815160609060009080841061127c576040805162461bcd60e51b815260206004820152601860248201527f496e646578206d757374206265203c2041206c656e6774680000000000000000604482015290519081900360640190fd5b60006001820367ffffffffffffffff8111801561129857600080fd5b506040519080825280602002602001820160405280156112c2578160200160208202803683370190505b50905060005b85811015611310578681815181106112dc57fe5b60200260200101518282815181106112f057fe5b6001600160a01b03909216602092830291909101909101526001016112c8565b50600185015b828110156113615786818151811061132a57fe5b602002602001015182600183038151811061134157fe5b6001600160a01b0390921660209283029190910190910152600101611316565b508086868151811061136f57fe5b60200260200101519350935050509250929050565b60006113a28261139c85670de0b6b3a76400006113a9565b90611402565b9392505050565b6000826113b857506000610939565b828202828482816113c557fe5b04146113a25760405162461bcd60e51b81526004018080602001828103825260218152602001806115176021913960400191505060405180910390fd5b6000808211611458576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161146157fe5b049392505050565b8280548282559060005260206000209081019282156114cb579160200282015b828111156114cb578251825473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909116178255602090920191600190910190611489565b506114d79291506114db565b5090565b5b808211156114d757600081556001016114dc56fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a26469706673582212209aac1abd18a8afc1963d80947e3b52a2f9c5dd358a4671cc9cd3f38e71ba1def64736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100df5760003560e01c80638da5cb5b1161008c578063b82e16e311610066578063b82e16e3146101f9578063d2179e8d14610251578063f2fde38b1461028b578063f77c4791146102b1576100df565b80638da5cb5b146101a9578063ac41865a146101b1578063ad5c4648146101f1576100df565b80635e684bb3116100bd5780635e684bb31461014d57806360d54d411461017b578063715018a6146101a1576100df565b80630af45704146100e45780634ef501ac14610108578063585cd34b14610125575b600080fd5b6100ec6102b9565b604080516001600160a01b039092168252519081900360200190f35b6100ec6004803603602081101561011e57600080fd5b50356102dd565b61014b6004803603602081101561013b57600080fd5b50356001600160a01b0316610307565b005b61014b6004803603604081101561016357600080fd5b506001600160a01b038135811691602001351661043c565b61014b6004803603602081101561019157600080fd5b50356001600160a01b03166104f1565b61014b6106b5565b6100ec610780565b6101df600480360360408110156101c757600080fd5b506001600160a01b038135811691602001351661078f565b60408051918252519081900360200190f35b6100ec61093f565b610201610957565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561023d578181015183820152602001610225565b505050509050019250505060405180910390f35b6102776004803603602081101561026757600080fd5b50356001600160a01b03166109b9565b604080519115158252519081900360200190f35b61014b600480360360208110156102a157600080fd5b50356001600160a01b03166109ce565b6100ec610aef565b7f000000000000000000000000000000000000000000000000000000000000000081565b600381815481106102ed57600080fd5b6000918252602090912001546001600160a01b0316905081565b61030f610afe565b6001600160a01b0316610320610780565b6001600160a01b03161461037b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6103e88160038054806020026020016040519081016040528092919081815260200182805480156103d557602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116103b7575b5050505050610b0290919063ffffffff16565b80516103fc91600391602090910190611469565b50604080516001600160a01b038316815290517fdf980d21d8c7bb34800e668dbe003299093bac8e693614151d3c57f73f98a93d9181900360200190a150565b60005b6003548110156104ec576003818154811061045657fe5b6000918252602082200154604080517fc640752d0000000000000000000000000000000000000000000000000000000081526001600160a01b03878116600483015286811660248301529151919092169263c640752d926044808201939182900301818387803b1580156104c957600080fd5b505af11580156104dd573d6000803e3d6000fd5b5050505060018101905061043f565b505050565b6104f9610afe565b6001600160a01b031661050a610780565b6001600160a01b031614610565576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6105d28160038054806020026020016040519081016040528092919081815260200182805480156105bf57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116105a1575b5050505050610b7f90919063ffffffff16565b15610624576040805162461bcd60e51b815260206004820152601660248201527f4164617074657220616c72656164792065786973747300000000000000000000604482015290519081900360640190fd5b600380546001810182556000919091527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff19909116811790915560408051918252517fcf9c2c7f9adbb156bd76affb04df84595f8f5e69cab2e61221b05b05a902fa269181900360200190a150565b6106bd610afe565b6001600160a01b03166106ce610780565b6001600160a01b031614610729576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000546001600160a01b031690565b600154604080517f13bc6d4b00000000000000000000000000000000000000000000000000000000815233600482015290516000926001600160a01b0316916313bc6d4b916024808301926020929190829003018186803b1580156107f357600080fd5b505afa158015610807573d6000803e3d6000fd5b505050506040513d602081101561081d57600080fd5b505180610842575061082d610780565b6001600160a01b0316336001600160a01b0316145b610893576040805162461bcd60e51b815260206004820152601e60248201527f43616c6c6572206d7573742062652073797374656d20636f6e74726163740000604482015290519081900360640190fd5b816001600160a01b0316836001600160a01b031614156108bc5750670de0b6b3a7640000610939565b6000806108c98585610b95565b9092509050816108e3576108dd85856110c9565b90925090505b81610935576040805162461bcd60e51b815260206004820152600f60248201527f5072696365206e6f7420666f756e640000000000000000000000000000000000604482015290519081900360640190fd5b9150505b92915050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b606060038054806020026020016040519081016040528092919081815260200182805480156109af57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610991575b5050505050905090565b60026020526000908152604090205460ff1681565b6109d6610afe565b6001600160a01b03166109e7610780565b6001600160a01b031614610a42576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610a875760405162461bcd60e51b81526004018080602001828103825260268152602001806114f16026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6001546001600160a01b031681565b3390565b6060600080610b1185856111bd565b9150915080610b67576040805162461bcd60e51b815260206004820152601560248201527f41646472657373206e6f7420696e2061727261792e0000000000000000000000604482015290519081900360640190fd5b6000610b738684611220565b50935061093992505050565b600080610b8c84846111bd565b95945050505050565b6001600160a01b038216600090815260026020526040812054819060ff168015610bd757506001600160a01b03831660009081526002602052604090205460ff165b156110bb577f000000000000000000000000000000000000000000000000000000000000000060006001600160a01b03861673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc214610d4e57856001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015610c5c57600080fd5b505afa158015610c70573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610c9957600080fd5b8101908080516040519392919084640100000000821115610cb957600080fd5b908301906020820185811115610cce57600080fd5b8251640100000000811182820188101715610ce857600080fd5b82525081516020918201929091019080838360005b83811015610d15578181015183820152602001610cfd565b50505050905090810190601f168015610d425780820380516001836020036101000a031916815260200191505b50604052505050610d6b565b6040518060400160405280600381526020016208aa8960eb1b8152505b905060006001600160a01b03861673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc214610ebe57856001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015610dcc57600080fd5b505afa158015610de0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610e0957600080fd5b8101908080516040519392919084640100000000821115610e2957600080fd5b908301906020820185811115610e3e57600080fd5b8251640100000000811182820188101715610e5857600080fd5b82525081516020918201929091019080838360005b83811015610e85578181015183820152602001610e6d565b50505050905090810190601f168015610eb25780820380516001836020036101000a031916815260200191505b50604052505050610edb565b6040518060400160405280600381526020016208aa8960eb1b8152505b604051631fc58c3360e31b81526020600482018181528551602484015285519394506000936001600160a01b0388169363fe2c6198938893928392604401918501908083838b5b83811015610f3a578181015183820152602001610f22565b50505050905090810190601f168015610f675780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b158015610f8457600080fd5b505afa158015610f98573d6000803e3d6000fd5b505050506040513d6020811015610fae57600080fd5b5051604051631fc58c3360e31b81526020600482018181528551602484015285519394506000936001600160a01b0389169363fe2c6198938893928392604401918501908083838b5b8381101561100f578181015183820152602001610ff7565b50505050905090810190601f16801561103c5780820380516001836020036101000a031916815260200191505b509250505060206040518083038186803b15801561105957600080fd5b505afa15801561106d573d6000803e3d6000fd5b505050506040513d602081101561108357600080fd5b5051905081158015906110965750600081115b156110b55760016110a78383611384565b9650965050505050506110c2565b50505050505b5060009050805b9250929050565b60008060005b6003548110156111b057600080600383815481106110e957fe5b600091825260209091200154604080517fac41865a0000000000000000000000000000000000000000000000000000000081526001600160a01b038a811660048301528981166024830152825193169263ac41865a92604480840193919291829003018186803b15801561115c57600080fd5b505afa158015611170573d6000803e3d6000fd5b505050506040513d604081101561118657600080fd5b508051602090910151909250905081156111a65790935091506110c29050565b50506001016110cf565b5060009485945092505050565b81516000908190815b8181101561121057846001600160a01b03168682815181106111e457fe5b60200260200101516001600160a01b03161415611208579250600191506110c29050565b6001016111c6565b5060001995600095509350505050565b815160609060009080841061127c576040805162461bcd60e51b815260206004820152601860248201527f496e646578206d757374206265203c2041206c656e6774680000000000000000604482015290519081900360640190fd5b60006001820367ffffffffffffffff8111801561129857600080fd5b506040519080825280602002602001820160405280156112c2578160200160208202803683370190505b50905060005b85811015611310578681815181106112dc57fe5b60200260200101518282815181106112f057fe5b6001600160a01b03909216602092830291909101909101526001016112c8565b50600185015b828110156113615786818151811061132a57fe5b602002602001015182600183038151811061134157fe5b6001600160a01b0390921660209283029190910190910152600101611316565b508086868151811061136f57fe5b60200260200101519350935050509250929050565b60006113a28261139c85670de0b6b3a76400006113a9565b90611402565b9392505050565b6000826113b857506000610939565b828202828482816113c557fe5b04146113a25760405162461bcd60e51b81526004018080602001828103825260218152602001806115176021913960400191505060405180910390fd5b6000808211611458576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161146157fe5b049392505050565b8280548282559060005260206000209081019282156114cb579160200282015b828111156114cb578251825473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909116178255602090920191600190910190611489565b506114d79291506114db565b5090565b5b808211156114d757600081556001016114dc56fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a26469706673582212209aac1abd18a8afc1963d80947e3b52a2f9c5dd358a4671cc9cd3f38e71ba1def64736f6c63430007060033", "devdoc": { "author": "Babylon Finance Contract that returns the price for any given asset pair. Price is retrieved either directly from an oracle, calculated using common asset pairs, or uses external data to calculate price. Note: Prices are returned in preciseUnits (i.e. 18 decimals of precision)", "kind": "dev", @@ -358,7 +377,7 @@ "storageLayout": { "storage": [ { - "astId": 3848, + "astId": 1456, "contract": "contracts/PriceOracle.sol:PriceOracle", "label": "_owner", "offset": 0, @@ -366,19 +385,27 @@ "type": "t_address" }, { - "astId": 13208, + "astId": 12197, "contract": "contracts/PriceOracle.sol:PriceOracle", "label": "controller", "offset": 0, "slot": "1", - "type": "t_contract(IBabController)23675" + "type": "t_contract(IBabController)22767" }, { - "astId": 13216, + "astId": 12204, "contract": "contracts/PriceOracle.sol:PriceOracle", - "label": "adapters", + "label": "uniswapAssets", "offset": 0, "slot": "2", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 12209, + "contract": "contracts/PriceOracle.sol:PriceOracle", + "label": "adapters", + "offset": 0, + "slot": "3", "type": "t_array(t_address)dyn_storage" } ], @@ -394,10 +421,22 @@ "label": "address[]", "numberOfBytes": "32" }, - "t_contract(IBabController)23675": { + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IBabController)22767": { "encoding": "inplace", "label": "contract IBabController", "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" } } } diff --git a/deployments/artifacts/mainnet/ProxyAdmin.json b/deployments/artifacts/mainnet/ProxyAdmin.json index abae3d544..f3c4bc65f 100644 --- a/deployments/artifacts/mainnet/ProxyAdmin.json +++ b/deployments/artifacts/mainnet/ProxyAdmin.json @@ -1,5 +1,5 @@ { - "address": "0x631e196B2E2a8C24966394234356d80b00dc5A64", + "address": "0x0c085fd8bbfd78db0107bf17047e8fa906d871dc", "abi": [ { "anonymous": false, @@ -151,36 +151,36 @@ "type": "function" } ], - "transactionHash": "0xff9cee63fc25cea02a2e9c805b32f9631ae0504f11143225520a2c138ddc9294", + "transactionHash": "0x386c0ed432cf087e1d270ef78d20339dd3b4cbaad1cfbc8666164c755d3336f8", "receipt": { "to": null, - "from": "0x311FEE0d859FA936FaEd456758dCD8047C4fFEd7", - "contractAddress": "0x9Ab55868AF0e7c4d4EC30c6CaF8a18299D3D266B", - "transactionIndex": 6, - "gasUsed": "542157", - "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000004000000000000000000020000000000000000000800000000000000000000000800000000400000040000000000000000000000000000000000001002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000004000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x480823325d6bf7a75ac80305fa2e0539b4e26a3c6d00544d000d30fb4a688ab3", - "transactionHash": "0xff9cee63fc25cea02a2e9c805b32f9631ae0504f11143225520a2c138ddc9294", + "from": "0x040cc3af8455f3c34d1df1d2a305e047a062bebf", + "contractAddress": "0x0c085fd8bbfd78db0107bf17047e8fa906d871dc", + "transactionIndex": "0x9d", + "gasUsed": "0x845cd", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000008000000000000000000000000000008000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000010000000000000000000000000000000000000000000000000000000000000008000000000000004000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xe1409c32daa69a21299533b422df201e63b15b5f9198e22eab0c84d5dd6e0fa6", + "transactionHash": "0x386c0ed432cf087e1d270ef78d20339dd3b4cbaad1cfbc8666164c755d3336f8", "logs": [ { - "transactionIndex": 6, - "blockNumber": 8516135, - "transactionHash": "0xff9cee63fc25cea02a2e9c805b32f9631ae0504f11143225520a2c138ddc9294", - "address": "0x9Ab55868AF0e7c4d4EC30c6CaF8a18299D3D266B", + "address": "0x0c085fd8bbfd78db0107bf17047e8fa906d871dc", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000311fee0d859fa936faed456758dcd8047c4ffed7" + "0x000000000000000000000000040cc3af8455f3c34d1df1d2a305e047a062bebf" ], "data": "0x", - "logIndex": 11, - "blockHash": "0x480823325d6bf7a75ac80305fa2e0539b4e26a3c6d00544d000d30fb4a688ab3" + "blockNumber": "0xbdfd2d", + "transactionHash": "0x386c0ed432cf087e1d270ef78d20339dd3b4cbaad1cfbc8666164c755d3336f8", + "transactionIndex": "0x9d", + "blockHash": "0xe1409c32daa69a21299533b422df201e63b15b5f9198e22eab0c84d5dd6e0fa6", + "logIndex": "0xf0", + "removed": false } ], - "blockNumber": 8516135, - "cumulativeGasUsed": "1496837", - "status": 1, - "byzantium": true + "blockNumber": "0xbdfd2d", + "cumulativeGasUsed": "0xb28543", + "status": "0x1" }, "args": [], "bytecode": "0x608060405234801561001057600080fd5b5060006100246001600160e01b0361007316565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350610077565b3390565b610864806100866000396000f3fe60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461013657806399a88ec4146101f5578063f2fde38b14610230578063f3b7dead146102635761007b565b8063204e1c7a14610080578063715018a6146100cf5780637eff275e146100e65780638da5cb5b14610121575b600080fd5b34801561008c57600080fd5b506100b3600480360360208110156100a357600080fd5b50356001600160a01b0316610296565b604080516001600160a01b039092168252519081900360200190f35b3480156100db57600080fd5b506100e4610328565b005b3480156100f257600080fd5b506100e46004803603604081101561010957600080fd5b506001600160a01b03813581169160200135166103ca565b34801561012d57600080fd5b506100b3610496565b6100e46004803603606081101561014c57600080fd5b6001600160a01b03823581169260208101359091169181019060608101604082013564010000000081111561018057600080fd5b82018360208201111561019257600080fd5b803590602001918460018302840111640100000000831117156101b457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506104a5945050505050565b34801561020157600080fd5b506100e46004803603604081101561021857600080fd5b506001600160a01b03813581169160200135166105dd565b34801561023c57600080fd5b506100e46004803603602081101561025357600080fd5b50356001600160a01b031661068d565b34801561026f57600080fd5b506100b36004803603602081101561028657600080fd5b50356001600160a01b0316610785565b6000806060836001600160a01b03166040518080635c60da1b60e01b8152506004019050600060405180830381855afa9150503d80600081146102f5576040519150601f19603f3d011682016040523d82523d6000602084013e6102fa565b606091505b50915091508161030957600080fd5b80806020019051602081101561031e57600080fd5b5051949350505050565b6103306107e4565b6000546001600160a01b03908116911614610380576040805162461bcd60e51b8152602060048201819052602482015260008051602061080f833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6103d26107e4565b6000546001600160a01b03908116911614610422576040805162461bcd60e51b8152602060048201819052602482015260008051602061080f833981519152604482015290519081900360640190fd5b816001600160a01b0316638f283970826040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b15801561047a57600080fd5b505af115801561048e573d6000803e3d6000fd5b505050505050565b6000546001600160a01b031690565b6104ad6107e4565b6000546001600160a01b039081169116146104fd576040805162461bcd60e51b8152602060048201819052602482015260008051602061080f833981519152604482015290519081900360640190fd5b826001600160a01b0316634f1ef2863484846040518463ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561057357818101518382015260200161055b565b50505050905090810190601f1680156105a05780820380516001836020036101000a031916815260200191505b5093505050506000604051808303818588803b1580156105bf57600080fd5b505af11580156105d3573d6000803e3d6000fd5b5050505050505050565b6105e56107e4565b6000546001600160a01b03908116911614610635576040805162461bcd60e51b8152602060048201819052602482015260008051602061080f833981519152604482015290519081900360640190fd5b816001600160a01b0316633659cfe6826040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050600060405180830381600087803b15801561047a57600080fd5b6106956107e4565b6000546001600160a01b039081169116146106e5576040805162461bcd60e51b8152602060048201819052602482015260008051602061080f833981519152604482015290519081900360640190fd5b6001600160a01b03811661072a5760405162461bcd60e51b81526004018080602001828103825260268152602001806107e96026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000806060836001600160a01b031660405180806303e1469160e61b8152506004019050600060405180830381855afa9150503d80600081146102f5576040519150601f19603f3d011682016040523d82523d6000602084013e6102fa565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a26469706673582212201d968ac32bef5562c6b4f1bd5d2f2a74c14d07ce008ca6fdc5a3bd0f5fc265f564736f6c63430006080033", diff --git a/deployments/artifacts/mainnet/RewardsDistributor.json b/deployments/artifacts/mainnet/RewardsDistributor.json index fb962c0c7..969124361 100644 --- a/deployments/artifacts/mainnet/RewardsDistributor.json +++ b/deployments/artifacts/mainnet/RewardsDistributor.json @@ -1,5 +1,5 @@ { - "address": "0x44EBBAE44b051B960006cE9Da93C6179F547A388", + "address": "0xe6cb25d130aDf7BC3Ffd9cf7EAfffFb33aB36f06", "abi": [ { "inputs": [ @@ -374,7 +374,7 @@ "outputs": [ { "internalType": "uint256", - "name": "principal", + "name": "supply", "type": "uint256" }, { @@ -758,7 +758,7 @@ "inputs": [ { "internalType": "uint256", - "name": "quarter", + "name": "_quarter", "type": "uint256" } ], @@ -805,47 +805,47 @@ "type": "function" } ], - "transactionHash": "0xac7276e30e844898143680fc3dc2510bc2d0c020ef3deec19a6536ad7a5fad21", + "transactionHash": "0x9d1bef3152278e1899203e102ac099d2b08330a5545dd2fd9a181b82e7b3b114", "receipt": { "to": null, - "from": "0x311FEE0d859FA936FaEd456758dCD8047C4fFEd7", - "contractAddress": "0xdB499C23E3b88014248991052F37a5BB496DDDb9", - "transactionIndex": 3, - "gasUsed": "4975546", - "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000800000000400000000000000000000000000000000000000000000002000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000004000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xefaada27d8925a7e26138271c9311759f09bfaf37288b289ab1b8179b8460398", - "transactionHash": "0xac7276e30e844898143680fc3dc2510bc2d0c020ef3deec19a6536ad7a5fad21", + "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", + "contractAddress": "0xe6cb25d130aDf7BC3Ffd9cf7EAfffFb33aB36f06", + "transactionIndex": 328, + "gasUsed": "5191209", + "logsBloom": "0x00000000000000000000000000000000000000000040000000800000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000001000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000004000000000000000000000000004000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x5136e60560e5b9ed35700159c61f489a6baf0fed0bdc7d223ae5afceb223845a", + "transactionHash": "0x9d1bef3152278e1899203e102ac099d2b08330a5545dd2fd9a181b82e7b3b114", "logs": [ { - "transactionIndex": 3, - "blockNumber": 8516141, - "transactionHash": "0xac7276e30e844898143680fc3dc2510bc2d0c020ef3deec19a6536ad7a5fad21", - "address": "0xdB499C23E3b88014248991052F37a5BB496DDDb9", + "transactionIndex": 328, + "blockNumber": 12451161, + "transactionHash": "0x9d1bef3152278e1899203e102ac099d2b08330a5545dd2fd9a181b82e7b3b114", + "address": "0xe6cb25d130aDf7BC3Ffd9cf7EAfffFb33aB36f06", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000311fee0d859fa936faed456758dcd8047c4ffed7" + "0x000000000000000000000000040cc3af8455f3c34d1df1d2a305e047a062bebf" ], "data": "0x", - "logIndex": 2, - "blockHash": "0xefaada27d8925a7e26138271c9311759f09bfaf37288b289ab1b8179b8460398" + "logIndex": 20, + "blockHash": "0x5136e60560e5b9ed35700159c61f489a6baf0fed0bdc7d223ae5afceb223845a" } ], - "blockNumber": 8516141, - "cumulativeGasUsed": "5160357", + "blockNumber": 12451161, + "cumulativeGasUsed": "12430857", "status": 1, "byzantium": true }, "args": [ - "0x8b7C579dFF83Adb1eC6E5DAF5f84b9425C4Bf0E4", - "0x26E44AD5b46C6A8C167815B7D180F6a5eD91D7bc" + "0x927761829796FdE7fb3581Ee4FdDe35f371a1926", + "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F" ], - "solcInputHash": "1cde26e1be086ba932a8865ced5ceef3", - "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract TimeLockedToken\",\"name\":\"_bablToken\",\"type\":\"address\"},{\"internalType\":\"contract IBabController\",\"name\":\"_controller\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BABL_LP_SHARE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BABL_STEWARD_SHARE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BABL_STRATEGIST_SHARE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"CREATOR_BONUS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DECAY_RATE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EPOCH_DURATION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PROFIT_LP_SHARE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PROFIT_PROTOCOL_FEE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PROFIT_STEWARD_SHARE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PROFIT_STRATEGIST_SHARE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"Q1_REWARDS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"START_TIME\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_capital\",\"type\":\"uint256\"}],\"name\":\"addProtocolPrincipal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"babltoken\",\"outputs\":[{\"internalType\":\"contract TimeLockedToken\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_time\",\"type\":\"uint256\"}],\"name\":\"checkProtocol\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quarterBelonging\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeListPointer\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"power\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_num\",\"type\":\"uint256\"}],\"name\":\"checkQuarter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"quarterPrincipal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quarterNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quarterPower\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"supplyPerQuarter\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"contributorPerGarden\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"lastDepositAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"initialDepositAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"contract IBabController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"gardenPid\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"gardenPowerByTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"power\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"gardenTimelist\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_from\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_to\",\"type\":\"uint256\"}],\"name\":\"getContributorPower\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"_finalizedStrategies\",\"type\":\"address[]\"}],\"name\":\"getRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"}],\"name\":\"getStrategyRewards\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"isProtocolPerQuarter\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pid\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"protocolPerQuarter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"quarterPrincipal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quarterNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quarterPower\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"supplyPerQuarter\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"protocolPerTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quarterBelonging\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeListPointer\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"power\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"protocolPrincipal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"rewardsPowerOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_amount\",\"type\":\"uint96\"}],\"name\":\"sendTokensToContributor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_previousBalance\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_depositOrWithdraw\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"}],\"name\":\"setContributorTimestampParams\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startBABLRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_capital\",\"type\":\"uint256\"}],\"name\":\"substractProtocolPrincipal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"timeList\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"quarter\",\"type\":\"uint256\"}],\"name\":\"tokenSupplyPerQuarter\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"}],\"name\":\"updateGardenPower\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Rewards Distributor contract is a smart contract used to calculate and distribute all the BABL rewards of the BABL Mining Program along the time reserved for executed strategies. It implements a supply curve to distribute 500K BABL along the time. The supply curve is designed to optimize the long-term sustainability of the protocol. The rewards are front-loaded but they last for more than 10 years, slowly decreasing quarter by quarter. For that, it houses the state of the protocol power along the time as each strategy power is compared to the whole protocol usage. Rewards Distributor also is responsible for the calculation and delivery of other rewards as bonuses to specific profiles which are actively contributing to the protocol growth and their communities (Garden creators, Strategists and Stewards).\",\"kind\":\"dev\",\"methods\":{\"addProtocolPrincipal(uint256)\":{\"params\":{\"_capital\":\"Amount of capital in WETH\"}},\"getContributorPower(address,address,uint256,uint256)\":{\"params\":{\"_contributor\":\"Address if the contributor\",\"_from\":\"Initial timestamp\",\"_garden\":\"Address of the garden where the contributor belongs to\",\"_to\":\"End timestamp\"},\"returns\":{\"_0\":\"uint256 Contributor power during that period\"}},\"getRewards(address,address,address[])\":{\"params\":{\"_contributor\":\"Address of the contributor to check\",\"_finalizedStrategies\":\"List of addresses of the finalized strategies to check\",\"_garden\":\"Garden to which the strategies and the user must belong to\"}},\"getStrategyRewards(address)\":{\"params\":{\"_strategy\":\"Strategy to check\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"sendTokensToContributor(address,uint96)\":{\"params\":{\"_amount\":\"Amount of tokens to send the address to\",\"_to\":\"Address to send the tokens to\"}},\"substractProtocolPrincipal(uint256)\":{\"params\":{\"_capital\":\"Amount of capital in WETH\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"title\":\"Rewards Distributor implementing the BABL Mining Program and other Rewards to Strategists and Stewards\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addProtocolPrincipal(uint256)\":{\"notice\":\"Function that adds the capital received to the total principal of the protocol per timestamp\"},\"getContributorPower(address,address,uint256,uint256)\":{\"notice\":\"Gets the contributor power from one timestamp to the other\"},\"getRewards(address,address,address[])\":{\"notice\":\"Calculates the profits and BABL that a contributor should receive from a series of finalized strategies\"},\"getStrategyRewards(address)\":{\"notice\":\"Gets the total amount of rewards for a given strategy\"},\"sendTokensToContributor(address,uint96)\":{\"notice\":\"Sends BABL tokens rewards to a contributor after a claim is requested to the protocol.\"},\"startBABLRewards()\":{\"notice\":\"Starts BABL Rewards Mining Program from the controller.\"},\"substractProtocolPrincipal(uint256)\":{\"notice\":\"Function that removes the capital received to the total principal of the protocol per timestamp\"},\"updateGardenPower(address,uint256)\":{\"notice\":\"function getContributor(address _garden, address _contributor) external view returns ( uint256, uint256, uint256[] memory, uint256 );\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/token/RewardsDistributor.sol\":\"RewardsDistributor\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () internal {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.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 using SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n // solhint-disable-next-line max-line-length\\n require((value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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 * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 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. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\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 { size := extcodesize(account) }\\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, \\\"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, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityMinimum(uint256 _minRiskyPairLiquidityEth) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minRiskyPairLiquidityEth() external view returns (uint256);\\n\\n function getUniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0x57cf4ece98219f805a416e8c24728d30d9b37c4126d66785d2617b97e35ffae6\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function nftAddress() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategy(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function reenableEthForStrategies() external;\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x5e460136e0b45024ea1c1f32cde607f3ce75dd5b14cee34007d6bbd08beabc82\",\"license\":\"Apache License\"},\"contracts/interfaces/IRewardsDistributor.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IRewardsDistributor\\n * @author Babylon Finance\\n *\\n * Interface for the distribute rewards of the BABL Mining Program.\\n */\\n\\ninterface IRewardsDistributor {\\n // Structs\\n struct PrincipalPerTimestamp {\\n uint256 principal;\\n uint256 time;\\n uint256 timeListPointer;\\n }\\n\\n function protocolPrincipal() external view returns (uint256);\\n\\n function pid() external view returns (uint256);\\n\\n // solhint-disable-next-line\\n function EPOCH_DURATION() external pure returns (uint256);\\n\\n // solhint-disable-next-line\\n function START_TIME() external view returns (uint256);\\n\\n // solhint-disable-next-line\\n function Q1_REWARDS() external pure returns (uint256);\\n\\n // solhint-disable-next-line\\n function DECAY_RATE() external pure returns (uint256);\\n\\n function addProtocolPrincipal(uint256 _capital) external;\\n\\n function substractProtocolPrincipal(uint256 _capital) external;\\n\\n function getStrategyRewards(address _strategy) external returns (uint96);\\n\\n function sendTokensToContributor(address _to, uint96 _amount) external;\\n\\n function getRewards(\\n address _garden,\\n address _contributor,\\n address[] calldata _finalizedStrategies\\n ) external view returns (uint256, uint96);\\n\\n function getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) external view returns (uint256);\\n\\n /**\\n function getContributor(address _garden, address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256[] memory,\\n uint256\\n );\\n */\\n function updateGardenPower(address _garden, uint256 _pid) external;\\n\\n function setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw,\\n uint256 _pid\\n ) external;\\n\\n function tokenSupplyPerQuarter(uint256 quarter) external view returns (uint96);\\n\\n function checkProtocol(uint256 _time)\\n external\\n view\\n returns (\\n uint256 principal,\\n uint256 time,\\n uint256 quarterBelonging,\\n uint256 timeListPointer,\\n uint256 power\\n );\\n\\n function checkQuarter(uint256 _num)\\n external\\n view\\n returns (\\n uint256 quarterPrincipal,\\n uint256 quarterNumber,\\n uint256 quarterPower,\\n uint96 supplyPerQuarter\\n );\\n}\\n\",\"keccak256\":\"0xc68eb7826b0174d4f6dff50320abb2cd958a978d4537c57867dd828dc2798662\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital,\\n address _strategyNft\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function strategyNft() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x4396906e436eb68c96715e0a53ae1656ac5d7934ebdaeb58ec3c33953465bc39\",\"license\":\"Apache License\"},\"contracts/interfaces/IVoteToken.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface IVoteToken {\\n function delegate(address delegatee) external;\\n\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n function getCurrentVotes(address account) external view returns (uint96);\\n\\n function getPriorVotes(address account, uint256 blockNumber) external view returns (uint96);\\n\\n function getMyDelegatee() external view returns (address);\\n\\n function getDelegatee(address account) external view returns (address);\\n\\n function getCheckpoints(address account, uint32 id) external view returns (uint32 fromBlock, uint96 votes);\\n\\n function getNumberOfCheckpoints(address account) external view returns (uint32);\\n}\\n\\ninterface IVoteTokenWithERC20 is IVoteToken, IERC20 {}\\n\",\"keccak256\":\"0xd3d6174f81ce2c1678a536b2a486179f9a5a694849b334556aeb155b9b13f777\",\"license\":\"Apache License\"},\"contracts/lib/BabylonErrors.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n// solhint-disable\\n\\n/**\\n * @notice Forked from https://github.com/balancer-labs/balancer-core-v2/blob/master/contracts/lib/helpers/BalancerErrors.sol\\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 // 'BAB#{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 \\\"BAB#\\\" part is a known constant\\n // (0x42414223): 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(0x42414223000000, 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 // Max deposit limit needs to be under the limit\\n uint256 internal constant MAX_DEPOSIT_LIMIT = 0;\\n // Creator needs to deposit\\n uint256 internal constant MIN_CONTRIBUTION = 1;\\n // Min Garden token supply >= 0\\n uint256 internal constant MIN_TOKEN_SUPPLY = 2;\\n // Deposit hardlock needs to be at least 1 block\\n uint256 internal constant DEPOSIT_HARDLOCK = 3;\\n // Needs to be at least the minimum\\n uint256 internal constant MIN_LIQUIDITY = 4;\\n // _reserveAssetQuantity is not equal to msg.value\\n uint256 internal constant MSG_VALUE_DO_NOT_MATCH = 5;\\n // Withdrawal amount has to be equal or less than msg.sender balance\\n uint256 internal constant MSG_SENDER_TOKENS_DO_NOT_MATCH = 6;\\n // Tokens are staked\\n uint256 internal constant TOKENS_STAKED = 7;\\n // Balance too low\\n uint256 internal constant BALANCE_TOO_LOW = 8;\\n // msg.sender doesn't have enough tokens\\n uint256 internal constant MSG_SENDER_TOKENS_TOO_LOW = 9;\\n // There is an open redemption window already\\n uint256 internal constant REDEMPTION_OPENED_ALREADY = 10;\\n // Cannot request twice in the same window\\n uint256 internal constant ALREADY_REQUESTED = 11;\\n // Rewards and profits already claimed\\n uint256 internal constant ALREADY_CLAIMED = 12;\\n // Value have to be greater than zero\\n uint256 internal constant GREATER_THAN_ZERO = 13;\\n // Must be reserve asset\\n uint256 internal constant MUST_BE_RESERVE_ASSET = 14;\\n // Only contributors allowed\\n uint256 internal constant ONLY_CONTRIBUTOR = 15;\\n // Only controller allowed\\n uint256 internal constant ONLY_CONTROLLER = 16;\\n // Only creator allowed\\n uint256 internal constant ONLY_CREATOR = 17;\\n // Only keeper allowed\\n uint256 internal constant ONLY_KEEPER = 18;\\n // Fee is too high\\n uint256 internal constant FEE_TOO_HIGH = 19;\\n // Only strategy allowed\\n uint256 internal constant ONLY_STRATEGY = 20;\\n // Only active allowed\\n uint256 internal constant ONLY_ACTIVE = 21;\\n // Only inactive allowed\\n uint256 internal constant ONLY_INACTIVE = 22;\\n // Address should be not zero address\\n uint256 internal constant ADDRESS_IS_ZERO = 23;\\n // Not within range\\n uint256 internal constant NOT_IN_RANGE = 24;\\n // Value is too low\\n uint256 internal constant VALUE_TOO_LOW = 25;\\n // Value is too high\\n uint256 internal constant VALUE_TOO_HIGH = 26;\\n // Only strategy or protocol allowed\\n uint256 internal constant ONLY_STRATEGY_OR_CONTROLLER = 27;\\n // Normal withdraw possible\\n uint256 internal constant NORMAL_WITHDRAWAL_POSSIBLE = 28;\\n // User does not have permissions to join garden\\n uint256 internal constant USER_CANNOT_JOIN = 29;\\n // User does not have permissions to add strategies in garden\\n uint256 internal constant USER_CANNOT_ADD_STRATEGIES = 30;\\n // Only Protocol or garden\\n uint256 internal constant ONLY_PROTOCOL_OR_GARDEN = 31;\\n // Only Strategist\\n uint256 internal constant ONLY_STRATEGIST = 32;\\n // Only Integration\\n uint256 internal constant ONLY_INTEGRATION = 33;\\n // Only garden and data not set\\n uint256 internal constant ONLY_GARDEN_AND_DATA_NOT_SET = 34;\\n // Only active garden\\n uint256 internal constant ONLY_ACTIVE_GARDEN = 35;\\n // Contract is not a garden\\n uint256 internal constant NOT_A_GARDEN = 36;\\n // Not enough tokens\\n uint256 internal constant STRATEGIST_TOKENS_TOO_LOW = 37;\\n // Stake is too low\\n uint256 internal constant STAKE_HAS_TO_AT_LEAST_ONE = 38;\\n // Duration must be in range\\n uint256 internal constant DURATION_MUST_BE_IN_RANGE = 39;\\n // Max Capital Requested\\n uint256 internal constant MAX_CAPITAL_REQUESTED = 41;\\n // Votes are already resolved\\n uint256 internal constant VOTES_ALREADY_RESOLVED = 42;\\n // Voting window is closed\\n uint256 internal constant VOTING_WINDOW_IS_OVER = 43;\\n // Strategy needs to be active\\n uint256 internal constant STRATEGY_NEEDS_TO_BE_ACTIVE = 44;\\n // Max capital reached\\n uint256 internal constant MAX_CAPITAL_REACHED = 45;\\n // Capital is less then rebalance\\n uint256 internal constant CAPITAL_IS_LESS_THAN_REBALANCE = 46;\\n // Strategy is in cooldown period\\n uint256 internal constant STRATEGY_IN_COOLDOWN = 47;\\n // Strategy is not executed\\n uint256 internal constant STRATEGY_IS_NOT_EXECUTED = 48;\\n // Strategy is not over yet\\n uint256 internal constant STRATEGY_IS_NOT_OVER_YET = 49;\\n // Strategy is already finalized\\n uint256 internal constant STRATEGY_IS_ALREADY_FINALIZED = 50;\\n // No capital to unwind\\n uint256 internal constant STRATEGY_NO_CAPITAL_TO_UNWIND = 51;\\n // Strategy needs to be inactive\\n uint256 internal constant STRATEGY_NEEDS_TO_BE_INACTIVE = 52;\\n // Duration needs to be less\\n uint256 internal constant DURATION_NEEDS_TO_BE_LESS = 53;\\n // Can't sweep reserve asset\\n uint256 internal constant CANNOT_SWEEP_RESERVE_ASSET = 54;\\n // Voting window is opened\\n uint256 internal constant VOTING_WINDOW_IS_OPENED = 55;\\n // Strategy is executed\\n uint256 internal constant STRATEGY_IS_EXECUTED = 56;\\n // Min Rebalance Capital\\n uint256 internal constant MIN_REBALANCE_CAPITAL = 57;\\n // Not a valid strategy NFT\\n uint256 internal constant NOT_STRATEGY_NFT = 58;\\n // Garden Transfers Disabled\\n uint256 internal constant GARDEN_TRANSFERS_DISABLED = 59;\\n // Tokens are hardlocked\\n uint256 internal constant TOKENS_HARDLOCKED = 60;\\n // Max contributors reached\\n uint256 internal constant MAX_CONTRIBUTORS = 61;\\n // BABL Transfers Disabled\\n uint256 internal constant BABL_TRANSFERS_DISABLED = 62;\\n // Strategy duration range error\\n uint256 internal constant DURATION_RANGE = 63;\\n // Checks the min amount of voters\\n uint256 internal constant MIN_VOTERS_CHECK = 64;\\n // Ge contributor power error\\n uint256 internal constant GET_CONTRIBUTOR_POWER = 65;\\n // Not enough ETH set aside\\n uint256 internal constant NOT_ENOUGH_ETH = 66;\\n // Garden is already public\\n uint256 internal constant GARDEN_ALREADY_PUBLIC = 67;\\n // Withdrawal with penalty\\n uint256 internal constant WITHDRAWAL_WITH_PENALTY = 68;\\n // Withdrawal with penalty\\n uint256 internal constant ONLY_MINING_ACTIVE = 69;\\n // Overflow in supply\\n uint256 internal constant OVERFLOW_IN_SUPPLY = 70;\\n // Overflow in power\\n uint256 internal constant OVERFLOW_IN_POWER = 71;\\n // Not a system contract\\n uint256 internal constant NOT_A_SYSTEM_CONTRACT = 72;\\n // Strategy vs Garden mismatch\\n uint256 internal constant STRATEGY_GARDEN_MISMATCH = 73;\\n // Minimum quarters is 1\\n uint256 internal constant QUARTERS_MIN_1 = 74;\\n // Too many strategy operations\\n uint256 internal constant TOO_MANY_OPS = 75;\\n // Only operations\\n uint256 internal constant ONLY_OPERATION = 76;\\n // Strat params wrong length\\n uint256 internal constant STRAT_PARAMS_LENGTH = 77;\\n // Garden params wrong length\\n uint256 internal constant GARDEN_PARAMS_LENGTH = 78;\\n}\\n\",\"keccak256\":\"0xdbb485a596718830e08a89b785cddc69d0dc7f3f43a1a8a19268336f8d925067\",\"license\":\"Apache License\"},\"contracts/lib/Math.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n// Libraries\\nimport './SafeDecimalMath.sol';\\n\\n// https://docs.synthetix.io/contracts/source/libraries/math\\nlibrary Math {\\n using SafeMath for uint256;\\n using SafeDecimalMath for uint256;\\n\\n /**\\n * @dev Uses \\\"exponentiation by squaring\\\" algorithm where cost is 0(logN)\\n * vs 0(N) for naive repeated multiplication.\\n * Calculates x^n with x as fixed-point and n as regular unsigned int.\\n * Calculates to 18 digits of precision with SafeDecimalMath.unit()\\n */\\n function powDecimal(uint256 x, uint256 n) internal pure returns (uint256) {\\n // https://mpark.github.io/programming/2014/08/18/exponentiation-by-squaring/\\n\\n uint256 result = SafeDecimalMath.unit();\\n while (n > 0) {\\n if (n % 2 != 0) {\\n result = result.multiplyDecimal(x);\\n }\\n x = x.multiplyDecimal(x);\\n n /= 2;\\n }\\n return result;\\n }\\n\\n function abs(int256 x) internal pure returns (int256) {\\n return x >= 0 ? x : -x;\\n }\\n}\\n\",\"keccak256\":\"0xc2ff8055f98dd7253df98838d870391067d9c622a68f263c942616ca8122bd93\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"contracts/lib/Safe3296.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nlibrary Safe3296 {\\n using SafeMath for uint256;\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint32\\n *\\n * @dev internal function to convert from uint256 to uint32\\n */\\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\\n require(n < 2**32, errorMessage);\\n return uint32(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint96\\n *\\n * @dev internal function to convert from uint256 to uint96\\n */\\n function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) {\\n require(n < 2**96, errorMessage);\\n return uint96(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to add two uint96 numbers\\n *\\n * @dev internal safe math function to add two uint96 numbers\\n */\\n function add96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n uint96 c = a + b;\\n require(c >= a, errorMessage);\\n return c;\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to subtract two uint96 numbers\\n *\\n * @dev internal safe math function to subtract two uint96 numbers\\n */\\n function sub96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n}\\n\",\"keccak256\":\"0x9ebf0856ab07500c9a8250d1be4b578a3e0ff454da7de67e3ab5632a7e6903c3\",\"license\":\"Apache License\"},\"contracts/lib/SafeDecimalMath.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nlibrary SafeDecimalMath {\\n using SafeMath for uint256;\\n\\n /* Number of decimal places in the representations. */\\n uint8 public constant decimals = 18;\\n uint8 public constant highPrecisionDecimals = 27;\\n\\n /* The number representing 1.0. */\\n uint256 public constant UNIT = 10**uint256(decimals);\\n\\n /* The number representing 1.0 for higher fidelity numbers. */\\n uint256 public constant PRECISE_UNIT = 10**uint256(highPrecisionDecimals);\\n uint256 private constant UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR = 10**uint256(highPrecisionDecimals - decimals);\\n\\n /**\\n * @return Provides an interface to UNIT.\\n */\\n function unit() external pure returns (uint256) {\\n return UNIT;\\n }\\n\\n /**\\n * @return Provides an interface to PRECISE_UNIT.\\n */\\n function preciseUnit() external pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @return The result of multiplying x and y, interpreting the operands as fixed-point\\n * decimals.\\n *\\n * @dev A unit factor is divided out after the product of x and y is evaluated,\\n * so that product must be less than 2**256. As this is an integer division,\\n * the internal division always rounds down. This helps save on gas. Rounding\\n * is more expensive on gas.\\n */\\n function multiplyDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\\n /* Divide by UNIT to remove the extra factor introduced by the product. */\\n return x.mul(y) / UNIT;\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of the specified precision unit.\\n *\\n * @dev The operands should be in the form of a the specified unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function _multiplyDecimalRound(\\n uint256 x,\\n uint256 y,\\n uint256 precisionUnit\\n ) private pure returns (uint256) {\\n /* Divide by UNIT to remove the extra factor introduced by the product. */\\n uint256 quotientTimesTen = x.mul(y) / (precisionUnit / 10);\\n\\n if (quotientTimesTen % 10 >= 5) {\\n quotientTimesTen += 10;\\n }\\n\\n return quotientTimesTen / 10;\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of a precise unit.\\n *\\n * @dev The operands should be in the precise unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function multiplyDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _multiplyDecimalRound(x, y, PRECISE_UNIT);\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of a standard unit.\\n *\\n * @dev The operands should be in the standard unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function multiplyDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _multiplyDecimalRound(x, y, UNIT);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is a high\\n * precision decimal.\\n *\\n * @dev y is divided after the product of x and the standard precision unit\\n * is evaluated, so the product of x and UNIT must be less than 2**256. As\\n * this is an integer division, the result is always rounded down.\\n * This helps save on gas. Rounding is more expensive on gas.\\n */\\n function divideDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\\n /* Reintroduce the UNIT factor that will be divided out by y. */\\n return x.mul(UNIT).div(y);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * decimal in the precision unit specified in the parameter.\\n *\\n * @dev y is divided after the product of x and the specified precision unit\\n * is evaluated, so the product of x and the specified precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function _divideDecimalRound(\\n uint256 x,\\n uint256 y,\\n uint256 precisionUnit\\n ) private pure returns (uint256) {\\n uint256 resultTimesTen = x.mul(precisionUnit * 10).div(y);\\n\\n if (resultTimesTen % 10 >= 5) {\\n resultTimesTen += 10;\\n }\\n\\n return resultTimesTen / 10;\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * standard precision decimal.\\n *\\n * @dev y is divided after the product of x and the standard precision unit\\n * is evaluated, so the product of x and the standard precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function divideDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _divideDecimalRound(x, y, UNIT);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * high precision decimal.\\n *\\n * @dev y is divided after the product of x and the high precision unit\\n * is evaluated, so the product of x and the high precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function divideDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _divideDecimalRound(x, y, PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Convert a standard decimal representation to a high precision one.\\n */\\n function decimalToPreciseDecimal(uint256 i) internal pure returns (uint256) {\\n return i.mul(UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR);\\n }\\n\\n /**\\n * @dev Convert a high precision decimal to a standard decimal representation.\\n */\\n function preciseDecimalToDecimal(uint256 i) internal pure returns (uint256) {\\n uint256 quotientTimesTen = i / (UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR / 10);\\n\\n if (quotientTimesTen % 10 >= 5) {\\n quotientTimesTen += 10;\\n }\\n\\n return quotientTimesTen / 10;\\n }\\n}\\n\",\"keccak256\":\"0x1372be4fa0c5813417396f128f5aa45da1cd7679e2d247a8e17d1ba5f0141253\",\"license\":\"Apache License\"},\"contracts/token/RewardsDistributor.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {TimeLockedToken} from './TimeLockedToken.sol';\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\nimport {SafeDecimalMath} from '../lib/SafeDecimalMath.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\nimport {Math} from '../lib/Math.sol';\\nimport {Safe3296} from '../lib/Safe3296.sol';\\nimport {Errors, _require} from '../lib/BabylonErrors.sol';\\n\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {TimeLockedToken} from './TimeLockedToken.sol';\\nimport {IRewardsDistributor} from '../interfaces/IRewardsDistributor.sol';\\n\\n/**\\n * @title Rewards Distributor implementing the BABL Mining Program and other Rewards to Strategists and Stewards\\n * @author Babylon Finance\\n * Rewards Distributor contract is a smart contract used to calculate and distribute all the BABL rewards of the BABL Mining Program\\n * along the time reserved for executed strategies. It implements a supply curve to distribute 500K BABL along the time.\\n * The supply curve is designed to optimize the long-term sustainability of the protocol.\\n * The rewards are front-loaded but they last for more than 10 years, slowly decreasing quarter by quarter.\\n * For that, it houses the state of the protocol power along the time as each strategy power is compared to the whole protocol usage.\\n * Rewards Distributor also is responsible for the calculation and delivery of other rewards as bonuses to specific profiles\\n * which are actively contributing to the protocol growth and their communities (Garden creators, Strategists and Stewards).\\n */\\ncontract RewardsDistributor is Ownable, IRewardsDistributor {\\n using SafeMath for uint256;\\n using SafeMath for int256;\\n using PreciseUnitMath for uint256;\\n using PreciseUnitMath for int256;\\n using SafeDecimalMath for uint256;\\n using SafeDecimalMath for int256;\\n using Math for uint256;\\n using Math for int256;\\n using Safe3296 for uint256;\\n using Safe3296 for int256;\\n using Safe3296 for uint96;\\n using Safe3296 for uint32;\\n\\n /* ========== Events ========== */\\n\\n /* ============ Modifiers ============ */\\n /**\\n * Throws if the call is not from a valid strategy\\n */\\n modifier onlyStrategy {\\n _require(controller.isSystemContract(address(IStrategy(msg.sender).garden())), Errors.ONLY_STRATEGY);\\n _;\\n }\\n /**\\n * Throws if the call is not from a valid active garden\\n */\\n modifier onlyActiveGarden(address _garden, uint256 _pid) {\\n if (_pid != 0 || gardenPid[address(_garden)] > 1) {\\n // Enable deploying flow with security restrictions\\n _require(IBabController(controller).isSystemContract(address(_garden)), Errors.NOT_A_SYSTEM_CONTRACT);\\n _require(IBabController(controller).isGarden(address(_garden)), Errors.ONLY_ACTIVE_GARDEN);\\n }\\n _require(msg.sender == address(_garden), Errors.ONLY_ACTIVE_GARDEN);\\n _require(IGarden(_garden).active(), Errors.ONLY_ACTIVE_GARDEN);\\n _;\\n }\\n\\n /**\\n * Throws if the BABL Rewards mining program is not active\\n */\\n modifier onlyMiningActive() {\\n _require(IBabController(controller).bablMiningProgramEnabled(), Errors.ONLY_MINING_ACTIVE);\\n _;\\n }\\n /**\\n * Throws if the sender is not the controller\\n */\\n modifier onlyController() {\\n _require(IBabController(controller).isSystemContract(msg.sender), Errors.NOT_A_SYSTEM_CONTRACT);\\n _require(address(controller) == msg.sender, Errors.ONLY_CONTROLLER);\\n _;\\n }\\n\\n /* ============ Constants ============ */\\n // 500K BABL allocated to this BABL Mining Program, the first quarter is Q1_REWARDS\\n // and the following quarters will follow the supply curve using a decay rate\\n uint256 public constant override Q1_REWARDS = 53_571_428_571_428_600e6; // First quarter (epoch) BABL rewards\\n // 12% quarterly decay rate (each 90 days)\\n // (Rewards on Q1 = 1,12 * Rewards on Q2) being Q1= Quarter 1, Q2 = Quarter 2\\n uint256 public constant override DECAY_RATE = 12e16;\\n // Duration of its EPOCH in days // BABL & profits split from the protocol\\n uint256 public constant override EPOCH_DURATION = 90 days;\\n\\n // solhint-disable-next-line\\n uint256 public override START_TIME; // Starting time of the rewards distribution\\n\\n // solhint-disable-next-line\\n uint256 public immutable BABL_STRATEGIST_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable BABL_STEWARD_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable BABL_LP_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_STRATEGIST_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_STEWARD_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_LP_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_PROTOCOL_FEE;\\n // solhint-disable-next-line\\n uint256 public immutable CREATOR_BONUS;\\n\\n /* ============ Structs ============ */\\n\\n struct ProtocolPerTimestamp {\\n // Protocol allocation checkpoints per timestamp along the time\\n uint256 principal; // Protocol principal allocation\\n uint256 time; // Time of the checkpoint\\n uint256 quarterBelonging; // # Quarter checkpoint belonging since START_TIME\\n uint256 timeListPointer; // Pointer to the array of timestamps to enable the possibility of struct iteration\\n uint256 power; // Protocol power checkpoint (power is proportional to = principal * duration)\\n }\\n\\n struct ProtocolPerQuarter {\\n // Protocol allocation checkpoints per timestamp per each quarter along the time\\n uint256 quarterPrincipal; // Checkpoint to keep track on accumulated protocol principal per quarter\\n uint256 quarterNumber; // # Quarter since START_TIME\\n uint256 quarterPower; // Accumulated Protocol power for each quarter\\n uint96 supplyPerQuarter; // Supply per quarter\\n }\\n\\n struct GardenPowerByTimestamp {\\n // Garden allocation checkpoints per timestamp per each garden\\n uint256 principal; // Checkpoint to keep track on garden allocation\\n uint256 timestamp; // Checkpoint timestamps\\n uint256 power; // Garden power checkpoint (power is proportional to = principal * duration)\\n }\\n struct ContributorPerGarden {\\n // Checkpoints to keep track on the evolution of each contributor vs. each garden\\n uint256 lastDepositAt; // Last deposit timestamp of each contributor in each garden\\n uint256 initialDepositAt; // Checkpoint of the initial deposit\\n uint256[] timeListPointer; // Array of timestamps for each user in each garden\\n uint256 pid; // Garden contributor checkpoints counter to enable iteration\\n mapping(uint256 => TimestampContribution) tsContributions; // Sub-mapping all the contributor checkpoints\\n }\\n\\n struct TimestampContribution {\\n // Sub-mapping with all checkpoints for deposits and withdrawals of garden users\\n uint256 principal; // Principal of user in each garden\\n uint256 timestamp; // Checkpoint time\\n uint256 timePointer; // Pointer\\n uint256 power; // Contributor power per checkpoint\\n }\\n struct Checkpoints {\\n // Checkpoints for contributor power calculations where a certain window (from -> to) is queried\\n uint256 fromDepositAt; // First contributor checkpoint within the provided window\\n uint256 lastDepositAt; // Last contributor checkpoint within the provided window\\n uint256 gardenFromDepositAt; // First contributor checkpoint within the provided window\\n uint256 gardenLastDepositAt; // Last garden checkpoint within the provided window\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Instance of the Controller contract\\n IBabController public controller;\\n\\n // BABL Token contract\\n TimeLockedToken public babltoken;\\n\\n // Protocol total allocation points. Must be the sum of all allocation points (strategyPrincipal) in all strategy pools.\\n uint256 public override protocolPrincipal;\\n mapping(uint256 => ProtocolPerTimestamp) public protocolPerTimestamp; // Mapping of all protocol checkpoints\\n uint256[] public timeList; // Array of all protocol checkpoints\\n uint256 public override pid; // Initialization of the ID assigning timeListPointer to the checkpoint number\\n\\n mapping(uint256 => ProtocolPerQuarter) public protocolPerQuarter; // Mapping of the accumulated protocol per each active quarter\\n mapping(uint256 => bool) public isProtocolPerQuarter; // Check if the protocol per quarter data has been initialized\\n\\n // Strategy overhead control. Only used if each strategy has power overhead due to changes overtime\\n mapping(address => mapping(uint256 => uint256)) public rewardsPowerOverhead; // Overhead control to enable high level accuracy calculations for strategy rewards\\n // Contributor power control\\n mapping(address => mapping(address => ContributorPerGarden)) public contributorPerGarden; // Enable high level accuracy calculations\\n mapping(address => mapping(address => Checkpoints)) private checkpoints;\\n // Garden power control\\n mapping(address => mapping(uint256 => GardenPowerByTimestamp)) public gardenPowerByTimestamp;\\n mapping(address => uint256[]) public gardenTimelist;\\n mapping(address => uint256) public gardenPid;\\n\\n /* ============ Constructor ============ */\\n\\n constructor(TimeLockedToken _bablToken, IBabController _controller) {\\n require(address(_bablToken) != address(0), 'Token needs to exist');\\n require(address(_controller) != address(0), 'Controller needs to exist');\\n babltoken = _bablToken;\\n controller = _controller;\\n\\n (BABL_STRATEGIST_SHARE, BABL_STEWARD_SHARE, BABL_LP_SHARE, CREATOR_BONUS) = controller.getBABLSharing();\\n (PROFIT_STRATEGIST_SHARE, PROFIT_STEWARD_SHARE, PROFIT_LP_SHARE) = controller.getProfitSharing();\\n PROFIT_PROTOCOL_FEE = controller.protocolPerformanceFee();\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Function that adds the capital received to the total principal of the protocol per timestamp\\n * @param _capital Amount of capital in WETH\\n */\\n function addProtocolPrincipal(uint256 _capital) external override onlyStrategy onlyMiningActive {\\n IStrategy strategy = IStrategy(msg.sender);\\n if (strategy.enteredAt() >= START_TIME) {\\n // onlyMiningActive control, it does not create a checkpoint if the strategy is not part of the Mining Program\\n _updateProtocolPrincipal(address(strategy), _capital, true);\\n }\\n }\\n\\n /**\\n * Function that removes the capital received to the total principal of the protocol per timestamp\\n * @param _capital Amount of capital in WETH\\n */\\n function substractProtocolPrincipal(uint256 _capital) external override onlyStrategy onlyMiningActive {\\n IStrategy strategy = IStrategy(msg.sender);\\n if (strategy.enteredAt() >= START_TIME) {\\n // onlyMiningActive control, it does not create a checkpoint if the strategy is not part of the Mining Program\\n _updateProtocolPrincipal(address(strategy), _capital, false);\\n }\\n }\\n\\n /**\\n * Gets the total amount of rewards for a given strategy\\n * @param _strategy Strategy to check\\n */\\n function getStrategyRewards(address _strategy) external view override returns (uint96) {\\n IStrategy strategy = IStrategy(_strategy);\\n _require(strategy.exitedAt() != 0, Errors.STRATEGY_IS_NOT_OVER_YET);\\n if ((strategy.enteredAt() >= START_TIME) && (START_TIME != 0)) {\\n // We avoid gas consuming once a strategy got its BABL rewards during its finalization\\n uint256 rewards = strategy.strategyRewards();\\n if (rewards != 0) {\\n return Safe3296.safe96(rewards, 'overflow 96 bits');\\n }\\n // If the calculation was not done earlier we go for it\\n (uint256 numQuarters, uint256 startingQuarter) =\\n _getRewardsWindow(strategy.executedAt(), strategy.exitedAt());\\n uint256 bablRewards = 0;\\n if (numQuarters <= 1) {\\n bablRewards = _getStrategyRewardsOneQuarter(_strategy, startingQuarter); // Proportional supply till that moment within the same epoch\\n _require(\\n bablRewards <= protocolPerQuarter[startingQuarter].supplyPerQuarter,\\n Errors.OVERFLOW_IN_SUPPLY\\n );\\n _require(\\n strategy.capitalAllocated().mul(strategy.exitedAt().sub(strategy.executedAt())).sub(\\n strategy.rewardsTotalOverhead()\\n ) <= protocolPerQuarter[startingQuarter].quarterPower,\\n Errors.OVERFLOW_IN_POWER\\n );\\n } else {\\n // The strategy takes longer than one quarter / epoch\\n // We need to calculate the strategy vs. protocol power ratio per each quarter\\n uint256[] memory strategyPower = new uint256[](numQuarters); // Strategy power in each Epoch\\n uint256[] memory protocolPower = new uint256[](numQuarters); // Protocol power in each Epoch\\n for (uint256 i = 0; i <= numQuarters.sub(1); i++) {\\n uint256 slotEnding = START_TIME.add(startingQuarter.add(i).mul(EPOCH_DURATION)); // Initialization timestamp at the end of the first slot where the strategy starts its execution\\n\\n // We iterate all the quarters where the strategy was active\\n uint256 percentage = 1e18;\\n if (strategy.executedAt().add(EPOCH_DURATION) > slotEnding) {\\n // We are in the first quarter of the strategy\\n\\n strategyPower[i] = strategy.capitalAllocated().mul(slotEnding.sub(strategy.executedAt())).sub(\\n rewardsPowerOverhead[address(strategy)][_getQuarter(strategy.executedAt())]\\n );\\n } else if (\\n strategy.executedAt() < slotEnding.sub(EPOCH_DURATION) && slotEnding < strategy.exitedAt()\\n ) {\\n // We are in an intermediate quarter different from starting or ending quarters\\n strategyPower[i] = strategy\\n .capitalAllocated()\\n .mul(slotEnding.sub(slotEnding.sub(EPOCH_DURATION)))\\n .sub(rewardsPowerOverhead[address(strategy)][_getQuarter(slotEnding.sub(45 days))]);\\n } else {\\n // We are in the last quarter of the strategy\\n percentage = block.timestamp.sub(slotEnding.sub(EPOCH_DURATION)).preciseDiv(\\n slotEnding.sub(slotEnding.sub(EPOCH_DURATION))\\n );\\n\\n strategyPower[i] = strategy\\n .capitalAllocated()\\n .mul(strategy.exitedAt().sub(slotEnding.sub(EPOCH_DURATION)))\\n .sub(rewardsPowerOverhead[address(strategy)][_getQuarter(strategy.exitedAt())]);\\n }\\n protocolPower[i] = protocolPerQuarter[startingQuarter.add(i)].quarterPower;\\n\\n _require(strategyPower[i] <= protocolPower[i], Errors.OVERFLOW_IN_POWER);\\n\\n bablRewards = bablRewards.add(\\n strategyPower[i]\\n .preciseDiv(protocolPower[i])\\n .preciseMul(uint256(protocolPerQuarter[startingQuarter.add(i)].supplyPerQuarter))\\n .preciseMul(percentage)\\n );\\n }\\n }\\n\\n // Babl rewards will be proportional to the total return (profit) with a max cap of x2\\n uint256 percentageMul = strategy.capitalReturned().preciseDiv(strategy.capitalAllocated());\\n if (percentageMul > 2e18) percentageMul = 2e18;\\n bablRewards = bablRewards.preciseMul(percentageMul);\\n return Safe3296.safe96(bablRewards, 'overflow 96 bits');\\n } else {\\n return 0;\\n }\\n }\\n\\n /**\\n * Sends BABL tokens rewards to a contributor after a claim is requested to the protocol.\\n * @param _to Address to send the tokens to\\n * @param _amount Amount of tokens to send the address to\\n */\\n function sendTokensToContributor(address _to, uint96 _amount) external override onlyMiningActive {\\n _require(controller.isSystemContract(msg.sender), Errors.NOT_A_SYSTEM_CONTRACT);\\n _safeBABLTransfer(_to, _amount);\\n }\\n\\n /**\\n * Starts BABL Rewards Mining Program from the controller.\\n */\\n function startBABLRewards() external onlyController {\\n if (START_TIME == 0) {\\n // It can only be activated once to avoid overriding START_TIME\\n START_TIME = block.timestamp;\\n }\\n }\\n\\n /**\\n * Calculates the profits and BABL that a contributor should receive from a series of finalized strategies\\n * @param _garden Garden to which the strategies and the user must belong to\\n * @param _contributor Address of the contributor to check\\n * @param _finalizedStrategies List of addresses of the finalized strategies to check\\n */\\n function getRewards(\\n address _garden,\\n address _contributor,\\n address[] calldata _finalizedStrategies\\n ) external view override returns (uint256, uint96) {\\n uint256 contributorTotalProfits = 0;\\n uint256 bablTotalRewards = 0;\\n for (uint256 i = 0; i < _finalizedStrategies.length; i++) {\\n (uint256 strategyProfits, uint256 strategyBABL) =\\n _getStrategyProfitsAndBABL(_garden, _finalizedStrategies[i], _contributor);\\n contributorTotalProfits = contributorTotalProfits.add(strategyProfits);\\n bablTotalRewards = bablTotalRewards.add(strategyBABL);\\n }\\n\\n return (contributorTotalProfits, Safe3296.safe96(bablTotalRewards, 'R28'));\\n }\\n\\n /* ========== View functions ========== */\\n\\n /**\\n * Gets the contributor power from one timestamp to the other\\n * @param _garden Address of the garden where the contributor belongs to\\n * @param _contributor Address if the contributor\\n * @param _from Initial timestamp\\n * @param _to End timestamp\\n * @return uint256 Contributor power during that period\\n */\\n function getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) external view override returns (uint256) {\\n return _getContributorPower(_garden, _contributor, _from, _to);\\n }\\n\\n function updateGardenPower(address _garden, uint256 _pid) external override onlyActiveGarden(_garden, _pid) {\\n _updateGardenPower(_garden);\\n }\\n\\n function setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw,\\n uint256 _pid\\n ) external override onlyActiveGarden(_garden, _pid) {\\n _setContributorTimestampParams(_garden, _contributor, _previousBalance, _depositOrWithdraw);\\n }\\n\\n function tokenSupplyPerQuarter(uint256 quarter) external pure override returns (uint96) {\\n return _tokenSupplyPerQuarter(quarter);\\n }\\n\\n function checkProtocol(uint256 _time)\\n external\\n view\\n override\\n returns (\\n uint256 principal,\\n uint256 time,\\n uint256 quarterBelonging,\\n uint256 timeListPointer,\\n uint256 power\\n )\\n {\\n return (\\n protocolPerTimestamp[_time].principal,\\n protocolPerTimestamp[_time].time,\\n protocolPerTimestamp[_time].quarterBelonging,\\n protocolPerTimestamp[_time].timeListPointer,\\n protocolPerTimestamp[_time].power\\n );\\n }\\n\\n function checkQuarter(uint256 _num)\\n external\\n view\\n override\\n returns (\\n uint256 quarterPrincipal,\\n uint256 quarterNumber,\\n uint256 quarterPower,\\n uint96 supplyPerQuarter\\n )\\n {\\n return (\\n protocolPerQuarter[_num].quarterPrincipal,\\n protocolPerQuarter[_num].quarterNumber,\\n protocolPerQuarter[_num].quarterPower,\\n protocolPerQuarter[_num].supplyPerQuarter\\n );\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n function _updateProtocolPrincipal(\\n address _strategy,\\n uint256 _capital,\\n bool _addOrSubstract\\n ) internal {\\n IStrategy strategy = IStrategy(_strategy);\\n ProtocolPerTimestamp storage protocolCheckpoint = protocolPerTimestamp[block.timestamp];\\n if (_addOrSubstract == false) {\\n // Substract\\n protocolPrincipal = protocolPrincipal.sub(_capital);\\n } else {\\n protocolPrincipal = protocolPrincipal.add(_capital);\\n }\\n protocolCheckpoint.principal = protocolPrincipal;\\n protocolCheckpoint.time = block.timestamp;\\n protocolCheckpoint.quarterBelonging = _getQuarter(block.timestamp);\\n protocolCheckpoint.timeListPointer = pid;\\n if (pid == 0) {\\n // The very first strategy of all strategies in the mining program\\n protocolCheckpoint.power = 0;\\n } else {\\n // Any other strategy different from the very first one (will have an antecesor)\\n protocolCheckpoint.power = protocolPerTimestamp[timeList[pid.sub(1)]].power.add(\\n protocolCheckpoint.time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time).mul(\\n protocolPerTimestamp[timeList[pid.sub(1)]].principal\\n )\\n );\\n }\\n timeList.push(block.timestamp); // Register of added strategies timestamps in the array for iteration\\n // Here we control the accumulated protocol power per each quarter\\n // Create the quarter checkpoint in case the checkpoint is the first in the epoch\\n _addProtocolPerQuarter(block.timestamp);\\n // We update the rewards overhead if any\\n _updatePowerOverhead(strategy, _capital);\\n pid++;\\n }\\n\\n function _getStrategyProfitsAndBABL(\\n address _garden,\\n address _strategy,\\n address _contributor\\n ) private view returns (uint256, uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n _require(address(strategy.garden()) == _garden, Errors.STRATEGY_GARDEN_MISMATCH);\\n uint256 contributorProfits = 0;\\n uint256 contributorBABL = 0;\\n // We get the state of the strategy in terms of profit and distance from expected to accurately calculate profits and rewards\\n (bool profit, uint256 profitValue, bool distance, uint256 distanceValue) =\\n _getStrategyRewardsContext(address(strategy));\\n\\n (, uint256 initialDepositAt, uint256 claimedAt, , , ) = IGarden(_garden).getContributor(_contributor);\\n // Positive strategies not yet claimed\\n if (\\n strategy.exitedAt() > claimedAt &&\\n strategy.executedAt() >= initialDepositAt &&\\n address(strategy.garden()) == _garden\\n ) {\\n uint256 contributorPower =\\n _getContributorPower(address(_garden), _contributor, strategy.executedAt(), strategy.exitedAt());\\n // If strategy returned money we give out the profits\\n if (profit == true) {\\n // We reserve 5% of profits for performance fees\\n profitValue = profitValue.sub(profitValue.multiplyDecimal(PROFIT_PROTOCOL_FEE));\\n }\\n // Get strategist rewards in case the contributor is also the strategist of the strategy\\n contributorBABL = contributorBABL.add(\\n _getStrategyStrategistBabl(\\n address(strategy),\\n _contributor,\\n profit,\\n profitValue,\\n distance,\\n distanceValue\\n )\\n );\\n\\n contributorProfits = contributorProfits.add(\\n _getStrategyStrategistProfits(address(strategy), _contributor, profit, profitValue)\\n );\\n\\n // Get steward rewards\\n contributorBABL = contributorBABL.add(\\n _getStrategyStewardBabl(address(strategy), _contributor, profit, profitValue, distance, distanceValue)\\n );\\n\\n contributorProfits = contributorProfits.add(\\n _getStrategyStewardProfits(\\n address(strategy),\\n _contributor,\\n profit,\\n profitValue,\\n distance,\\n distanceValue\\n )\\n );\\n\\n // Get LP rewards\\n\\n contributorBABL = contributorBABL.add(\\n uint256(strategy.strategyRewards()).multiplyDecimal(BABL_LP_SHARE).preciseMul(\\n contributorPower.preciseDiv(strategy.capitalAllocated())\\n )\\n );\\n\\n // Get a multiplier bonus in case the contributor is the garden creator\\n if (_contributor == IGarden(_garden).creator()) {\\n contributorBABL = contributorBABL.add(contributorBABL.multiplyDecimal(CREATOR_BONUS));\\n }\\n }\\n return (contributorProfits, contributorBABL);\\n }\\n\\n function _getStrategyRewardsContext(address _strategy)\\n private\\n view\\n returns (\\n bool,\\n uint256,\\n bool,\\n uint256\\n )\\n {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 returned = strategy.capitalReturned();\\n uint256 expected =\\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\\n uint256 allocated = strategy.capitalAllocated();\\n bool profit;\\n bool distance;\\n uint256 profitValue;\\n uint256 distanceValue;\\n if (returned > allocated && returned >= expected) {\\n // The strategy went equal or above expectations\\n profit = true; // positive\\n distance = true; // positive\\n profitValue = returned.sub(allocated);\\n distanceValue = returned.sub(expected);\\n } else if (returned >= allocated && returned < expected) {\\n // The strategy went worse than expected but with some profits\\n profit = true; // positive or zero profits\\n distance = false; // negative vs expected return (got less than expected)\\n profitValue = returned.sub(allocated);\\n distanceValue = expected.sub(returned);\\n } else if (returned < allocated && returned < expected) {\\n // Negative profits - bad investments has penalties\\n profit = false; // negative - loosing capital\\n distance = false; // negative vs expected return (got less than expected)\\n profitValue = allocated.sub(returned); // Negative number, there were no profits at all\\n distanceValue = expected.sub(returned);\\n }\\n\\n return (profit, profitValue, distance, distanceValue);\\n }\\n\\n function _getStrategyStewardBabl(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256, /* _profitValue */\\n bool _distance,\\n uint256 _distanceValue\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 strategyRewards = strategy.strategyRewards();\\n int256 userVotes = strategy.getUserVotes(_contributor);\\n uint256 bablCap;\\n uint256 expected =\\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\\n\\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\\n uint256 babl = 0;\\n if (userVotes > 0 && _profit == true && _distance == true) {\\n // Voting in favor of the execution of the strategy with profits and positive distance\\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\\n uint256(userVotes).preciseDiv(strategy.totalPositiveVotes())\\n );\\n } else if (userVotes > 0 && _profit == true && _distance == false) {\\n // Voting in favor positive profits but below expected return\\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\\n uint256(userVotes).preciseDiv(strategy.totalPositiveVotes())\\n );\\n babl = babl.sub(babl.preciseMul(_distanceValue.preciseDiv(expected))); // We discount the error of expected return vs real returns\\n } else if (userVotes > 0 && _profit == false) {\\n // Voting in favor of a non profitable strategy get nothing\\n babl = 0;\\n } else if (userVotes < 0 && _distance == false) {\\n // Voting against a strategy that got results below expected return provides rewards to the voter (helping the protocol to only have good strategies)\\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\\n uint256(Math.abs(userVotes)).preciseDiv(strategy.totalNegativeVotes())\\n );\\n\\n bablCap = babl.mul(2); // Max cap\\n babl = babl.add(babl.preciseMul(_distanceValue.preciseDiv(expected))); // We add a bonus inverse to the error of expected return vs real returns\\n\\n if (babl > bablCap) babl = bablCap; // We limit 2x by a Cap\\n } else if (userVotes < 0 && _distance == true) {\\n babl = 0;\\n }\\n return babl;\\n }\\n\\n function _getStrategyStewardProfits(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256 _profitValue,\\n bool _distance,\\n uint256 /* _distanceValue */\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\\n uint256 profits = 0;\\n int256 userVotes = strategy.getUserVotes(_contributor);\\n if (_profit == true) {\\n if (userVotes > 0) {\\n profits = _profitValue.multiplyDecimal(PROFIT_STEWARD_SHARE).preciseMul(uint256(userVotes)).preciseDiv(\\n strategy.totalPositiveVotes()\\n );\\n } else if ((userVotes < 0) && _distance == false) {\\n profits = _profitValue\\n .multiplyDecimal(PROFIT_STEWARD_SHARE)\\n .preciseMul(uint256(Math.abs(userVotes)))\\n .preciseDiv(strategy.totalNegativeVotes());\\n } else if ((userVotes < 0) && _distance == true) {\\n // Voted against a very profit strategy above expected returns, get no profit at all\\n profits = 0;\\n }\\n } else profits = 0; // No profits at all\\n\\n return profits;\\n }\\n\\n function _getStrategyStrategistBabl(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256, /* _profitValue */\\n bool _distance,\\n uint256 /* _distanceValue */\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 strategyRewards = strategy.strategyRewards();\\n uint256 babl;\\n uint256 bablCap;\\n uint256 expected =\\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\\n if (strategy.strategist() == _contributor) {\\n babl = strategyRewards.multiplyDecimal(BABL_STRATEGIST_SHARE); // Standard calculation to be ponderated\\n if (_profit == true && _distance == true) {\\n // Strategy with equal or higher profits than expected\\n bablCap = babl.mul(2); // Max cap\\n // The more the results are close to the expected the more bonus will get (limited by a x2 cap)\\n babl = babl.add(babl.preciseMul(expected.preciseDiv(strategy.capitalReturned())));\\n if (babl > bablCap) babl = bablCap; // We limit 2x by a Cap\\n } else if (_profit == true && _distance == false) {\\n //under expectations\\n // The more the results are close to the expected the less penalization it might have\\n babl = babl.sub(babl.sub(babl.preciseMul(strategy.capitalReturned().preciseDiv(expected))));\\n } else {\\n // No positive profit\\n return 0;\\n }\\n } else {\\n return 0;\\n }\\n\\n return babl;\\n }\\n\\n function _getStrategyStrategistProfits(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256 _profitValue\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\\n uint256 profits;\\n if (_profit == true) {\\n if (strategy.strategist() == _contributor) {\\n // If the contributor was the strategist of the strategy\\n profits = _profitValue.multiplyDecimal(PROFIT_STRATEGIST_SHARE);\\n }\\n } else profits = 0; // No profits at all\\n\\n return profits;\\n }\\n\\n function _addProtocolPerQuarter(uint256 _time) private onlyMiningActive {\\n ProtocolPerQuarter storage protocolCheckpoint = protocolPerQuarter[_getQuarter(_time)];\\n\\n if (!isProtocolPerQuarter[_getQuarter(_time).sub(1)]) {\\n // The quarter is not yet initialized then we create it\\n protocolCheckpoint.quarterNumber = _getQuarter(_time);\\n if (pid == 0) {\\n // The first strategy added in the first epoch\\n protocolCheckpoint.quarterPower = 0;\\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\\n } else {\\n // Each time a new epoch starts with either a new strategy execution or finalization\\n // We just take the proportional power for this quarter from previous checkpoint\\n uint256 powerToSplit =\\n protocolPerTimestamp[_time].power.sub(protocolPerTimestamp[timeList[pid.sub(1)]].power);\\n if (protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging == _getQuarter(_time).sub(1)) {\\n // There were no intermediate epochs without checkpoints\\n // We re-initialize the protocol power counting for this new quarter\\n protocolCheckpoint.quarterPower = powerToSplit\\n .mul(_time.sub(START_TIME.add(_getQuarter(_time).mul(EPOCH_DURATION).sub(EPOCH_DURATION))))\\n .div(_time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time));\\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\\n\\n protocolPerQuarter[_getQuarter(_time).sub(1)].quarterPower = protocolPerQuarter[\\n _getQuarter(_time).sub(1)\\n ]\\n .quarterPower\\n .add(powerToSplit.sub(protocolCheckpoint.quarterPower));\\n } else {\\n // There were intermediate epochs without checkpoints - we need to create their protocolPerQuarter's and update the last one\\n // We have to update all the quarters including where the previous checkpoint is and the one were we are now\\n for (\\n uint256 i = 0;\\n i <= _getQuarter(_time).sub(protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging);\\n i++\\n ) {\\n ProtocolPerQuarter storage newCheckpoint =\\n protocolPerQuarter[protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i)];\\n uint256 slotEnding =\\n START_TIME.add(\\n protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i).mul(EPOCH_DURATION)\\n );\\n if (i == 0) {\\n // We are in the first quarter to update, we add the corresponding part\\n\\n newCheckpoint.quarterPower = newCheckpoint.quarterPower.add(\\n powerToSplit.mul(slotEnding.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)).div(\\n _time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)\\n )\\n );\\n newCheckpoint.quarterPrincipal = protocolPerTimestamp[timeList[pid.sub(1)]].principal;\\n } else if (\\n i < _getQuarter(_time).sub(protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging)\\n ) {\\n // We are in an intermediate quarter\\n newCheckpoint.quarterPower = powerToSplit.mul(EPOCH_DURATION).div(\\n _time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)\\n );\\n newCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(\\n protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i)\\n );\\n newCheckpoint.quarterNumber = protocolPerTimestamp[timeList[pid.sub(1)]]\\n .quarterBelonging\\n .add(i);\\n newCheckpoint.quarterPrincipal = protocolPerTimestamp[timeList[pid.sub(1)]].principal;\\n } else {\\n // We are in the last quarter of the strategy\\n protocolCheckpoint.quarterPower = powerToSplit\\n .mul(\\n _time.sub(START_TIME.add(_getQuarter(_time).mul(EPOCH_DURATION).sub(EPOCH_DURATION)))\\n )\\n .div(_time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time));\\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\\n protocolCheckpoint.quarterNumber = _getQuarter(_time);\\n protocolCheckpoint.quarterPrincipal = protocolPrincipal;\\n }\\n }\\n }\\n }\\n isProtocolPerQuarter[_getQuarter(_time).sub(1)] = true;\\n } else {\\n // Quarter checkpoint already created, it must have been filled with general info\\n // We update the power of the quarter by adding the new difference between last quarter checkpoint and this checkpoint\\n protocolCheckpoint.quarterPower = protocolCheckpoint.quarterPower.add(\\n protocolPerTimestamp[_time].power.sub(protocolPerTimestamp[timeList[pid.sub(1)]].power)\\n );\\n }\\n protocolCheckpoint.quarterPrincipal = protocolPrincipal;\\n }\\n\\n function _updatePowerOverhead(IStrategy _strategy, uint256 _capital) private onlyMiningActive {\\n if (_strategy.updatedAt() != 0) {\\n // There will be overhead after the first execution not before\\n if (_getQuarter(block.timestamp) == _getQuarter(_strategy.updatedAt())) {\\n // The overhead will remain within the same epoch\\n rewardsPowerOverhead[address(_strategy)][_getQuarter(block.timestamp)] = rewardsPowerOverhead[\\n address(_strategy)\\n ][_getQuarter(block.timestamp)]\\n .add(_capital.mul(block.timestamp.sub(_strategy.updatedAt())));\\n } else {\\n // We need to iterate since last update of the strategy capital\\n (uint256 numQuarters, uint256 startingQuarter) =\\n _getRewardsWindow(_strategy.updatedAt(), block.timestamp);\\n uint256 overheadPerQuarter = _capital.mul(block.timestamp.sub(_strategy.updatedAt())).div(numQuarters);\\n for (uint256 i = 0; i <= numQuarters.sub(1); i++) {\\n rewardsPowerOverhead[address(_strategy)][startingQuarter.add(i)] = rewardsPowerOverhead[\\n address(_strategy)\\n ][startingQuarter.add(i)]\\n .add(overheadPerQuarter);\\n }\\n }\\n }\\n }\\n\\n function _getStrategyRewardsOneQuarter(address _strategy, uint256 _startingQuarter)\\n private\\n view\\n onlyMiningActive\\n returns (uint256)\\n {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 strategyOverTime =\\n strategy.capitalAllocated().mul(strategy.exitedAt().sub(strategy.executedAt())).sub(\\n strategy.rewardsTotalOverhead()\\n );\\n return\\n strategyOverTime\\n .preciseDiv(protocolPerQuarter[_startingQuarter].quarterPower)\\n .preciseMul(uint256(protocolPerQuarter[_startingQuarter].supplyPerQuarter))\\n .mul(strategy.exitedAt().sub(_startingQuarter))\\n .div(block.timestamp.sub(_startingQuarter));\\n }\\n\\n // Safe BABL transfer function, just in case if rounding error causes DistributorRewards to not have enough BABL.\\n function _safeBABLTransfer(address _to, uint96 _amount) private onlyMiningActive {\\n uint256 bablBal = babltoken.balanceOf(address(this));\\n if (_amount > bablBal) {\\n SafeERC20.safeTransfer(babltoken, _to, bablBal);\\n } else {\\n SafeERC20.safeTransfer(babltoken, _to, _amount);\\n }\\n }\\n\\n /**\\n * Gets the contributor power from one timestamp to the other\\n * @param _contributor Address if the contributor\\n * @param _from Initial timestamp\\n * @param _to End timestamp\\n * @return uint256 Contributor power during that period\\n */\\n\\n function _getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) private view returns (uint256) {\\n _require(_to >= IGarden(_garden).gardenInitializedAt() && _to >= _from, Errors.GET_CONTRIBUTOR_POWER);\\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][address(_contributor)];\\n Checkpoints memory powerCheckpoints = checkpoints[address(_garden)][address(_contributor)];\\n\\n if (contributor.initialDepositAt == 0 || contributor.initialDepositAt > _to) {\\n return 0;\\n } else {\\n if (_from <= IGarden(_garden).gardenInitializedAt()) {\\n // Avoid division by zero in case of _from parameter is not passed\\n _from = IGarden(_garden).gardenInitializedAt();\\n }\\n // Find closest point to _from and _to either contributor and garden checkpoints at their left\\n\\n (powerCheckpoints.fromDepositAt, powerCheckpoints.lastDepositAt) = _locateCheckpointsContributor(\\n _garden,\\n _contributor,\\n _from,\\n _to\\n );\\n (powerCheckpoints.gardenFromDepositAt, powerCheckpoints.gardenLastDepositAt) = _locateCheckpointsGarden(\\n _garden,\\n _from,\\n _to\\n );\\n\\n _require(\\n powerCheckpoints.fromDepositAt <= powerCheckpoints.lastDepositAt &&\\n powerCheckpoints.gardenFromDepositAt <= powerCheckpoints.gardenLastDepositAt,\\n Errors.GET_CONTRIBUTOR_POWER\\n );\\n uint256 contributorPower;\\n uint256 gardenPower;\\n\\n // \\\"FROM power calculations\\\" PART\\n // Avoid underflows\\n\\n if (_from < powerCheckpoints.fromDepositAt) {\\n // Contributor still has no power but _from is later than the start of the garden\\n contributorPower = 0;\\n } else if (_from > powerCheckpoints.fromDepositAt) {\\n contributorPower = contributor.tsContributions[powerCheckpoints.fromDepositAt].power.add(\\n (_from.sub(powerCheckpoints.fromDepositAt)).mul(\\n contributor.tsContributions[powerCheckpoints.fromDepositAt].principal\\n )\\n );\\n } else {\\n // _from == fromDepositAt\\n contributorPower = contributor.tsContributions[powerCheckpoints.fromDepositAt].power;\\n }\\n gardenPower = gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenFromDepositAt].power.add(\\n (_from.sub(powerCheckpoints.gardenFromDepositAt)).mul(\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenFromDepositAt].principal\\n )\\n );\\n // \\\"TO power calculations\\\" PART\\n // We go for accurate power calculations avoiding overflows\\n _require(contributorPower <= gardenPower, Errors.GET_CONTRIBUTOR_POWER);\\n if (_from == _to) {\\n // Requested a specific checkpoint calculation (no slot)\\n if (gardenPower == 0) {\\n return 0;\\n } else {\\n return contributorPower.preciseDiv(gardenPower);\\n }\\n // Not a checkpoint anymore but a slot\\n } else if (_to < powerCheckpoints.lastDepositAt) {\\n // contributor has not deposited yet\\n return 0;\\n } else if (\\n _to == powerCheckpoints.lastDepositAt &&\\n powerCheckpoints.fromDepositAt == powerCheckpoints.lastDepositAt\\n ) {\\n // no more contributor checkpoints in the slot\\n gardenPower = (\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].power.add(\\n (_to.sub(powerCheckpoints.gardenLastDepositAt)).mul(\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].principal\\n )\\n )\\n )\\n .sub(gardenPower);\\n _require(contributorPower <= gardenPower, Errors.GET_CONTRIBUTOR_POWER);\\n return contributorPower.preciseDiv(gardenPower);\\n } else {\\n contributorPower = (\\n contributor.tsContributions[powerCheckpoints.lastDepositAt].power.add(\\n (_to.sub(powerCheckpoints.lastDepositAt)).mul(\\n contributor.tsContributions[powerCheckpoints.lastDepositAt].principal\\n )\\n )\\n )\\n .sub(contributorPower);\\n\\n gardenPower = (\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].power.add(\\n (_to.sub(powerCheckpoints.gardenLastDepositAt)).mul(\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].principal\\n )\\n )\\n )\\n .sub(gardenPower);\\n _require(contributorPower <= gardenPower, Errors.GET_CONTRIBUTOR_POWER);\\n\\n return contributorPower.preciseDiv(gardenPower);\\n }\\n }\\n }\\n\\n function _locateCheckpointsContributor(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) private view returns (uint256, uint256) {\\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][address(_contributor)];\\n\\n uint256 lastDepositAt = contributor.timeListPointer[contributor.timeListPointer.length.sub(1)]; // Initialized with lastDeposit\\n uint256 fromDepositAt = contributor.timeListPointer[0]; // Initialized with initialDeposit\\n\\n if (lastDepositAt > _to || fromDepositAt < _from) {\\n // We go to find the closest deposits of the contributor to _from and _to\\n for (uint256 i = 0; i <= contributor.timeListPointer.length.sub(1); i++) {\\n if (contributor.timeListPointer[i] <= _to) {\\n lastDepositAt = contributor.timeListPointer[i];\\n }\\n if (contributor.timeListPointer[i] <= _from) {\\n fromDepositAt = contributor.timeListPointer[i];\\n }\\n }\\n }\\n return (fromDepositAt, lastDepositAt);\\n }\\n\\n function _locateCheckpointsGarden(\\n address _garden,\\n uint256 _from,\\n uint256 _to\\n ) private view returns (uint256, uint256) {\\n uint256 gardenLastCheckpoint = gardenTimelist[address(_garden)].length.sub(1);\\n uint256 gardenLastDepositAt = gardenTimelist[address(_garden)][gardenLastCheckpoint]; // Initialized to the last garden checkpoint\\n uint256 gardenFromDepositAt = gardenTimelist[address(_garden)][0]; // Initialized to the first garden checkpoint\\n\\n if (gardenLastDepositAt > _to || gardenFromDepositAt < _from) {\\n // We go for the closest timestamp of garden to _to and _from\\n for (uint256 i = 0; i <= gardenLastCheckpoint; i++) {\\n uint256 gardenTime = gardenTimelist[address(_garden)][i];\\n if (gardenTime <= _to) {\\n gardenLastDepositAt = gardenTime;\\n }\\n if (gardenTime <= _from) {\\n gardenFromDepositAt = gardenTime;\\n }\\n }\\n }\\n return (gardenFromDepositAt, gardenLastDepositAt);\\n }\\n\\n /**\\n * Function that keeps checkpoints of the garden power (deposits and withdrawals) per timestamp\\n */\\n function _updateGardenPower(address _garden) private {\\n IGarden garden = IGarden(_garden);\\n GardenPowerByTimestamp storage gardenTimestamp = gardenPowerByTimestamp[address(garden)][block.timestamp];\\n gardenTimestamp.principal = IERC20(address(IGarden(_garden))).totalSupply();\\n\\n gardenTimestamp.timestamp = block.timestamp;\\n\\n if (gardenPid[address(_garden)] == 0) {\\n // The very first deposit of all contributors in the mining program\\n gardenTimestamp.power = 0;\\n } else {\\n // Any other deposit different from the very first one (will have an antecesor)\\n gardenTimestamp.power = gardenPowerByTimestamp[address(garden)][\\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\\n ]\\n .power\\n .add(\\n gardenTimestamp\\n .timestamp\\n .sub(\\n gardenPowerByTimestamp[address(garden)][\\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\\n ]\\n .timestamp\\n )\\n .mul(\\n gardenPowerByTimestamp[address(garden)][\\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\\n ]\\n .principal\\n )\\n );\\n }\\n\\n gardenTimelist[address(garden)].push(block.timestamp); // Register of deposit timestamps in the array for iteration\\n gardenPid[address(garden)]++;\\n }\\n\\n /**\\n * Updates contributor timestamps params\\n */\\n function _setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw\\n ) private {\\n // We make checkpoints around contributor deposits to avoid fast loans and give the right rewards afterwards\\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][_contributor];\\n\\n contributor.tsContributions[block.timestamp].principal = IERC20(address(IGarden(_garden))).balanceOf(\\n address(_contributor)\\n );\\n\\n contributor.tsContributions[block.timestamp].timestamp = block.timestamp;\\n\\n contributor.tsContributions[block.timestamp].timePointer = contributor.pid;\\n\\n if (contributor.pid == 0) {\\n // The very first deposit\\n contributor.tsContributions[block.timestamp].power = 0;\\n } else {\\n // Any other deposits or withdrawals different from the very first one (will have an antecesor)\\n contributor.tsContributions[block.timestamp].power = contributor.tsContributions[contributor.lastDepositAt]\\n .power\\n .add(\\n (block.timestamp.sub(contributor.lastDepositAt)).mul(\\n contributor.tsContributions[contributor.lastDepositAt].principal\\n )\\n );\\n }\\n if (_depositOrWithdraw == true) {\\n // Deposit\\n if (_previousBalance == 0 || contributor.initialDepositAt == 0) {\\n contributor.initialDepositAt = block.timestamp;\\n }\\n contributor.lastDepositAt = block.timestamp;\\n } else {\\n // Withdrawals\\n if (IERC20(address(IGarden(_garden))).balanceOf(address(_contributor)) == 0) {\\n contributor.lastDepositAt = 0;\\n contributor.initialDepositAt = 0;\\n delete contributor.timeListPointer;\\n }\\n }\\n\\n contributor.timeListPointer.push(block.timestamp);\\n contributor.pid++;\\n }\\n\\n function _tokenSupplyPerQuarter(uint256 quarter) internal pure returns (uint96) {\\n _require(quarter >= 1, Errors.QUARTERS_MIN_1);\\n if (quarter >= 513) {\\n return 0;\\n } else {\\n uint256 firstFactor = (SafeDecimalMath.unit().add(DECAY_RATE)).powDecimal(quarter.sub(1));\\n uint256 supplyForQuarter = Q1_REWARDS.divideDecimal(firstFactor);\\n return Safe3296.safe96(supplyForQuarter, 'overflow 96 bits');\\n }\\n }\\n\\n function _getQuarter(uint256 _now) internal view returns (uint256) {\\n uint256 quarter = (_now.sub(START_TIME).preciseDivCeil(EPOCH_DURATION)).div(1e18);\\n return quarter.add(1);\\n }\\n\\n function _getRewardsWindow(uint256 _from, uint256 _to) internal view returns (uint256, uint256) {\\n uint256 quarters = (_to.sub(_from).preciseDivCeil(EPOCH_DURATION)).div(1e18);\\n uint256 startingQuarter = (_from.sub(START_TIME).preciseDivCeil(EPOCH_DURATION)).div(1e18);\\n return (quarters.add(1), startingQuarter.add(1));\\n }\\n}\\n\",\"keccak256\":\"0xdc467d640df88763a8c4eefbdb54b636673a9f663751902bd9517152f855b001\",\"license\":\"Apache License\"},\"contracts/token/TimeLockRegistry.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\nimport {TimeLockedToken} from './TimeLockedToken.sol';\\n\\n/**\\n * @title TimeLockRegistry\\n * @notice Register Lockups for TimeLocked ERC20 Token BABL (e.g. vesting)\\n * @author Babylon Finance\\n * @dev This contract allows owner to register distributions for a TimeLockedToken\\n *\\n * To register a distribution, register method should be called by the owner.\\n * claim() should be called only by the BABL Token smartcontract (modifier onlyBABLToken)\\n * when any account registered to receive tokens make its own claim\\n * If case of a mistake, owner can cancel registration before the claim is done by the account\\n *\\n * Note this contract address must be setup in the TimeLockedToken's contract pointing\\n * to interact with (e.g. setTimeLockRegistry() function)\\n */\\n\\ncontract TimeLockRegistry is Ownable {\\n using SafeMath for uint256;\\n using Address for address;\\n\\n /* ============ Events ============ */\\n\\n event Register(address receiver, uint256 distribution);\\n event Cancel(address receiver, uint256 distribution);\\n event Claim(address account, uint256 distribution);\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlyBABLToken() {\\n require(msg.sender == address(token), 'only BABL Token');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // time locked token\\n TimeLockedToken public token;\\n\\n /// @notice The profile of each token owner under vesting conditions and its special conditions\\n /**\\n * @param team Indicates whether or not is a Team member (true = team member / advisor, false = private investor)\\n * @param vestingBegin When the vesting begins for such token owner\\n * @param vestingEnd When the vesting ends for such token owner\\n * @param lastClaim When the last claim was done\\n */\\n struct TokenVested {\\n bool team;\\n bool cliff;\\n uint256 vestingBegin;\\n uint256 vestingEnd;\\n uint256 lastClaim;\\n }\\n\\n /// @notice A record of token owners under vesting conditions for each account, by index\\n mapping(address => TokenVested) public tokenVested;\\n\\n // mapping from token owners under vesting conditions to BABL due amount (e.g. SAFT addresses, team members, advisors)\\n mapping(address => uint256) public registeredDistributions;\\n\\n // vesting for Team Members\\n uint256 private teamVesting = 365 days * 4;\\n\\n // vesting for Investors and Advisors\\n uint256 private investorVesting = 365 days * 3;\\n\\n /* ============ Functions ============ */\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * @notice Construct a new Time Lock Registry and gives ownership to sender\\n * @param _token TimeLockedToken contract to use in this registry\\n */\\n constructor(TimeLockedToken _token) {\\n token = _token;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /* =========== Token related Gov Functions ====== */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Register new account under vesting conditions (Team, Advisors, Investors e.g. SAFT purchaser)\\n *\\n * @notice Register new account under vesting conditions (Team, Advisors, Investors e.g. SAFT purchaser)\\n * @param receiver Address belonging vesting conditions\\n * @param distribution Tokens amount that receiver is due to get\\n * @return Whether or not the registration succeeded\\n */\\n function register(\\n address receiver,\\n uint256 distribution,\\n bool investorType,\\n uint256 vestingStartingDate\\n ) external onlyOwner returns (bool) {\\n require(receiver != address(0), 'TimeLockRegistry::register: cannot register the zero address');\\n require(\\n receiver != address(this),\\n 'TimeLockRegistry::register: Time Lock Registry contract cannot be an investor'\\n );\\n require(distribution != 0, 'TimeLockRegistry::register: Distribution = 0');\\n require(\\n registeredDistributions[receiver] == 0,\\n 'TimeLockRegistry::register:Distribution for this address is already registered'\\n );\\n require(block.timestamp >= 1614553200, 'Cannot register earlier than March 2021'); // 1614553200 is UNIX TIME of 2021 March the 1st\\n\\n // register distribution\\n registeredDistributions[receiver] = distribution;\\n\\n // register token vested conditions\\n TokenVested storage newTokenVested = tokenVested[receiver];\\n newTokenVested.team = investorType;\\n newTokenVested.vestingBegin = vestingStartingDate;\\n\\n if (newTokenVested.team == true) {\\n newTokenVested.vestingEnd = vestingStartingDate.add(teamVesting);\\n } else {\\n newTokenVested.vestingEnd = vestingStartingDate.add(investorVesting);\\n }\\n newTokenVested.lastClaim = vestingStartingDate;\\n\\n tokenVested[receiver] = newTokenVested;\\n // TODO CHECK IF ALLOWANCE AS OF TODAY IS THE FINAL MODEL\\n // IN CASE OF A DIRECT MINT TO TIME LOCK REGISTRY ADDRESS THE TOKEN TRANSFER MIGHT BE UPDATED\\n // transfer tokens from owner who might have enough allowance of tokens by BABL Token owner\\n SafeERC20.safeTransferFrom(token, msg.sender, address(this), distribution);\\n\\n // emit register event\\n emit Register(receiver, distribution);\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel distribution registration in case of mistake and before a claim is done\\n *\\n * @notice Cancel distribution registration\\n * @dev A claim has not to be done earlier\\n * @param receiver Address that should have it's distribution removed\\n * @return Whether or not it succeeded\\n */\\n function cancelRegistration(address receiver) external onlyOwner returns (bool) {\\n require(registeredDistributions[receiver] != 0, 'Not registered');\\n\\n // get amount from distributions\\n uint256 amount = registeredDistributions[receiver];\\n\\n // set distribution mapping to 0\\n delete registeredDistributions[receiver];\\n\\n // set tokenVested mapping to 0\\n delete tokenVested[receiver];\\n\\n // TODO CHECK THE PROCESS ADDRESS(THIS) VS. OWNER\\n // transfer tokens back to owner\\n SafeERC20.safeTransfer(token, msg.sender, amount);\\n\\n // emit cancel event\\n emit Cancel(receiver, amount);\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel distribution registration in case of mistake and before a claim is done\\n *\\n * @notice Cancel already delivered tokens. It might only apply when non-completion of vesting period of Team members or Advisors\\n * @dev An automatic override allowance is granted during the claim process\\n * @param account Address that should have it's distribution removed\\n * @return Whether or not it succeeded\\n */\\n function cancelDeliveredTokens(address account) external onlyOwner returns (bool) {\\n uint256 loosingAmount = token.cancelVestedTokens(account);\\n\\n // emit cancel event\\n emit Cancel(account, loosingAmount);\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Recover tokens in Time Lock Registry smartcontract address by the owner\\n *\\n * @notice Send tokens from smartcontract address to the owner.\\n * It might only apply after a cancellation of vested tokens\\n * @param amount Amount to be recovered by the owner of the Time Lock Registry smartcontract from its balance\\n * @return Whether or not it succeeded\\n */\\n function transferToOwner(uint256 amount) external onlyOwner returns (bool) {\\n SafeERC20.safeTransfer(token, msg.sender, amount);\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Claim locked tokens by the registered account\\n *\\n * @notice Claim tokens due amount.\\n * @dev Claim is done by the user in the TimeLocked contract and the contract is the only allowed to call\\n * this function on behalf of the user to make the claim\\n * @return The amount of tokens registered and delivered after the claim\\n */\\n function claim(address _receiver) external onlyBABLToken returns (uint256) {\\n require(registeredDistributions[_receiver] != 0, 'Not registered');\\n\\n // get amount from distributions\\n uint256 amount = registeredDistributions[_receiver];\\n tokenVested[_receiver].lastClaim = block.timestamp;\\n\\n // set distribution mapping to 0\\n delete registeredDistributions[_receiver];\\n\\n // register lockup in TimeLockedToken\\n\\n // this will transfer funds from this contract and lock them for sender\\n token.registerLockup(\\n _receiver,\\n amount,\\n tokenVested[_receiver].team,\\n tokenVested[_receiver].vestingBegin,\\n tokenVested[_receiver].vestingEnd,\\n tokenVested[_receiver].lastClaim\\n );\\n\\n // set tokenVested mapping to 0\\n delete tokenVested[_receiver];\\n\\n // emit claim event\\n emit Claim(_receiver, amount);\\n\\n return amount;\\n }\\n\\n /* ============ Getter Functions ============ */\\n\\n function checkVesting(address address_)\\n external\\n view\\n returns (\\n bool team,\\n uint256 start,\\n uint256 end,\\n uint256 last\\n )\\n {\\n return (\\n tokenVested[address_].team,\\n tokenVested[address_].vestingBegin,\\n tokenVested[address_].vestingEnd,\\n tokenVested[address_].lastClaim\\n );\\n }\\n\\n function checkRegisteredDistribution(address address_) external view returns (uint256 amount) {\\n return registeredDistributions[address_];\\n }\\n}\\n\",\"keccak256\":\"0x97084d9e4d2804b0234c06e6e9e07343477d726ca8af07f2e3d91fba2ccbda76\",\"license\":\"Apache License\"},\"contracts/token/TimeLockedToken.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {TimeLockRegistry} from './TimeLockRegistry.sol';\\nimport {RewardsDistributor} from './RewardsDistributor.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {VoteToken} from './VoteToken.sol';\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {Errors, _require} from '../lib/BabylonErrors.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\n\\n/**\\n * @title TimeLockedToken\\n * @notice Time Locked ERC20 Token\\n * @author Babylon Finance\\n * @dev Contract which gives the ability to time-lock tokens specially for vesting purposes usage\\n *\\n * By overriding the balanceOf() and transfer() functions in ERC20,\\n * an account can show its full, post-distribution balance and use it for voting power\\n * but only transfer or spend up to an allowed amount\\n *\\n * A portion of previously non-spendable tokens are allowed to be transferred\\n * along the time depending on each vesting conditions, and after all epochs have passed, the full\\n * account balance is unlocked. In case on non-completion vesting period, only the Time Lock Registry can cancel\\n * the delivery of the pending tokens and only can cancel the remaining locked ones.\\n */\\n\\nabstract contract TimeLockedToken is VoteToken {\\n using SafeMath for uint256;\\n\\n /* ============ Events ============ */\\n\\n /// @notice An event that emitted when a new lockout ocurr\\n event NewLockout(\\n address account,\\n uint256 tokenslocked,\\n bool isTeamOrAdvisor,\\n uint256 startingVesting,\\n uint256 endingVesting\\n );\\n\\n /// @notice An event that emitted when a new Time Lock is registered\\n event NewTimeLockRegistration(address previousAddress, address newAddress);\\n\\n /// @notice An event that emitted when a new Rewards Distributor is registered\\n event NewRewardsDistributorRegistration(address previousAddress, address newAddress);\\n\\n /// @notice An event that emitted when a cancellation of Lock tokens is registered\\n event Cancel(address account, uint256 amount);\\n\\n /// @notice An event that emitted when a claim of tokens are registered\\n event Claim(address _receiver, uint256 amount);\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlyTimeLockRegistry() {\\n require(\\n msg.sender == address(timeLockRegistry),\\n 'TimeLockedToken:: onlyTimeLockRegistry: can only be executed by TimeLockRegistry'\\n );\\n _;\\n }\\n\\n modifier onlyTimeLockOwner() {\\n if (address(timeLockRegistry) != address(0)) {\\n require(\\n msg.sender == Ownable(timeLockRegistry).owner(),\\n 'TimeLockedToken:: onlyTimeLockOwner: can only be executed by the owner of TimeLockRegistry'\\n );\\n }\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // represents total distribution for locked balances\\n mapping(address => uint256) distribution;\\n\\n /// @notice The profile of each token owner under its particular vesting conditions\\n /**\\n * @param team Indicates whether or not is a Team member or Advisor (true = team member/advisor, false = private investor)\\n * @param vestingBegin When the vesting begins for such token owner\\n * @param vestingEnd When the vesting ends for such token owner\\n * @param lastClaim When the last claim was done\\n */\\n struct VestedToken {\\n bool teamOrAdvisor;\\n uint256 vestingBegin;\\n uint256 vestingEnd;\\n uint256 lastClaim;\\n }\\n\\n /// @notice A record of token owners under vesting conditions for each account, by index\\n mapping(address => VestedToken) public vestedToken;\\n\\n // vesting Cliff for Team Members and Advisors\\n uint256 private vestingCliff = 365 days;\\n\\n // vesting duration for Team Members and Advisors\\n uint256 private teamVesting = 365 days * 4;\\n\\n // vesting duration for Investors\\n uint256 private investorVesting = 365 days * 3;\\n\\n // address of Time Lock Registry contract\\n IBabController public controller;\\n\\n // address of Time Lock Registry contract\\n TimeLockRegistry public timeLockRegistry;\\n\\n // address of Rewards Distriburor contract\\n RewardsDistributor public rewardsDistributor;\\n\\n // Enable Transfer of ERC20 BABL Tokens\\n // Only Minting or transfers from/to TimeLockRegistry and Rewards Distributor can transfer tokens until the protocol is fully decentralized\\n bool private tokenTransfersEnabled;\\n bool private tokenTransfersWereDisabled;\\n\\n /* ============ Functions ============ */\\n\\n /* ============ Constructor ============ */\\n\\n constructor(string memory _name, string memory _symbol) VoteToken(_name, _symbol) {\\n tokenTransfersEnabled = true;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /* =========== Token related Gov Functions ====== */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Disables transfers of ERC20 BABL Tokens\\n */\\n function disableTokensTransfers() external onlyOwner {\\n require(!tokenTransfersWereDisabled, 'BABL must flow');\\n tokenTransfersEnabled = false;\\n tokenTransfersWereDisabled = true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows transfers of ERC20 BABL Tokens\\n * Can only happen after the protocol is fully decentralized.\\n */\\n function enableTokensTransfers() external onlyOwner {\\n tokenTransfersEnabled = true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Set the Time Lock Registry contract to control token vesting conditions\\n *\\n * @notice Set the Time Lock Registry contract to control token vesting conditions\\n * @param newTimeLockRegistry Address of TimeLockRegistry contract\\n */\\n function setTimeLockRegistry(TimeLockRegistry newTimeLockRegistry) external onlyTimeLockOwner returns (bool) {\\n require(address(newTimeLockRegistry) != address(0), 'cannot be zero address');\\n require(address(newTimeLockRegistry) != address(this), 'cannot be this contract');\\n require(address(newTimeLockRegistry) != address(timeLockRegistry), 'must be new TimeLockRegistry');\\n emit NewTimeLockRegistration(address(timeLockRegistry), address(newTimeLockRegistry));\\n\\n timeLockRegistry = newTimeLockRegistry;\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Set the Rewards Distributor contract to control either BABL Mining or profit rewards\\n *\\n * @notice Set the Rewards Distriburor contract to control both types of rewards (profit and BABL Mining program)\\n * @param newRewardsDistributor Address of Rewards Distributor contract\\n */\\n function setRewardsDistributor(RewardsDistributor newRewardsDistributor) external onlyOwner returns (bool) {\\n require(address(newRewardsDistributor) != address(0), 'cannot be zero address');\\n require(address(newRewardsDistributor) != address(this), 'cannot be this contract');\\n require(address(newRewardsDistributor) != address(rewardsDistributor), 'must be new Rewards Distributor');\\n emit NewRewardsDistributorRegistration(address(rewardsDistributor), address(newRewardsDistributor));\\n\\n rewardsDistributor = newRewardsDistributor;\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Register new token lockup conditions for vested tokens defined only by Time Lock Registry\\n *\\n * @notice Tokens are completely delivered during the registration however lockup conditions apply for vested tokens\\n * locking them according to the distribution epoch periods and the type of recipient (Team, Advisor, Investor)\\n * Emits a transfer event showing a transfer to the recipient\\n * Only the registry can call this function\\n * @param _receiver Address to receive the tokens\\n * @param _amount Tokens to be transferred\\n * @param _profile True if is a Team Member or Advisor\\n * @param _vestingBegin Unix Time when the vesting for that particular address\\n * @param _vestingEnd Unix Time when the vesting for that particular address\\n * @param _lastClaim Unix Time when the claim was done from that particular address\\n *\\n */\\n function registerLockup(\\n address _receiver,\\n uint256 _amount,\\n bool _profile,\\n uint256 _vestingBegin,\\n uint256 _vestingEnd,\\n uint256 _lastClaim\\n ) external onlyTimeLockRegistry returns (bool) {\\n require(balanceOf(msg.sender) >= _amount, 'insufficient balance');\\n require(_receiver != address(0), 'cannot be zero address');\\n require(_receiver != address(this), 'cannot be this contract');\\n require(_receiver != address(timeLockRegistry), 'cannot be the TimeLockRegistry contract itself');\\n require(_receiver != msg.sender, 'the owner cannot lockup itself');\\n\\n // update amount of locked distribution\\n distribution[_receiver] = distribution[_receiver].add(_amount);\\n\\n VestedToken storage newVestedToken = vestedToken[_receiver];\\n\\n newVestedToken.teamOrAdvisor = _profile;\\n newVestedToken.vestingBegin = _vestingBegin;\\n newVestedToken.vestingEnd = _vestingEnd;\\n newVestedToken.lastClaim = _lastClaim;\\n\\n // transfer tokens to the recipient\\n _transfer(msg.sender, _receiver, _amount);\\n emit NewLockout(_receiver, _amount, _profile, _vestingBegin, _vestingEnd);\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel and remove locked tokens due to non-completion of vesting period\\n * applied only by Time Lock Registry and specifically to Team or Advisors as it does not apply to investors.\\n *\\n * @dev Cancel distribution registration\\n * @param lockedAccount that should have its still locked distribution removed due to non-completion of its vesting period\\n */\\n function cancelVestedTokens(address lockedAccount) external onlyTimeLockRegistry returns (uint256) {\\n return _cancelVestedTokensFromTimeLock(lockedAccount);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Each token owner can claim its own specific tokens with its own specific vesting conditions from the Time Lock Registry\\n *\\n * @dev Claim msg.sender tokens (if any available in the registry)\\n */\\n function claimMyTokens() external {\\n // claim msg.sender tokens from timeLockRegistry\\n uint256 amount = timeLockRegistry.claim(msg.sender);\\n // After a proper claim, locked tokens of Team and Advisors profiles are under restricted special vesting conditions so they automatic grant\\n // rights to the Time Lock Registry to only retire locked tokens if non-compliance vesting conditions take places along the vesting periods.\\n // It does not apply to Investors under vesting (their locked tokens cannot be removed).\\n if (vestedToken[msg.sender].teamOrAdvisor == true) {\\n approve(address(timeLockRegistry), amount);\\n }\\n // emit claim event\\n emit Claim(msg.sender, amount);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Get unlocked balance for an account\\n *\\n * @notice Get unlocked balance for an account\\n * @param account Account to check\\n * @return Amount that is unlocked and available eg. to transfer\\n */\\n function unlockedBalance(address account) public returns (uint256) {\\n // totalBalance - lockedBalance\\n return balanceOf(account).sub(lockedBalance(account));\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. View the locked balance for an account\\n *\\n * @notice View locked balance for an account\\n * @param account Account to check\\n * @return Amount locked in the time of checking\\n */\\n\\n function viewLockedBalance(address account) public view returns (uint256) {\\n // distribution of locked tokens\\n // get amount from distributions\\n\\n uint256 amount = distribution[account];\\n uint256 lockedAmount = amount;\\n\\n // Team and investors cannot transfer tokens in the first year\\n if (vestedToken[account].vestingBegin.add(365 days) > block.timestamp) {\\n return lockedAmount;\\n }\\n\\n // in case of vesting has passed, all tokens are now available\\n if (block.timestamp >= vestedToken[account].vestingEnd) {\\n lockedAmount = 0;\\n } else {\\n // in case of still under vesting period, locked tokens are recalculated\\n lockedAmount = amount.mul(vestedToken[account].vestingEnd - block.timestamp).div(\\n vestedToken[account].vestingEnd - vestedToken[account].vestingBegin\\n );\\n }\\n return lockedAmount;\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Get locked balance for an account\\n *\\n * @notice Get locked balance for an account\\n * @param account Account to check\\n * @return Amount locked in the time of checking\\n */\\n function lockedBalance(address account) public returns (uint256) {\\n // get amount from distributions locked tokens (if any)\\n\\n uint256 lockedAmount = viewLockedBalance(account);\\n\\n // in case of vesting has passed, all tokens are now available so we set mapping to 0\\n if (block.timestamp >= vestedToken[account].vestingEnd && msg.sender == account && lockedAmount == 0) {\\n delete distribution[account];\\n } else if (msg.sender == account) {\\n vestedToken[msg.sender].lastClaim = block.timestamp;\\n }\\n return lockedAmount;\\n }\\n\\n /**\\n * PUBLIC FUNCTION. Get the address of Time Lock Registry\\n *\\n * @notice Get the address of Time Lock Registry\\n * @return Address of the Time Lock Registry\\n */\\n function getTimeLockRegistry() external view returns (address) {\\n return address(timeLockRegistry);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the Approval of allowances of ERC20 with special conditions for vesting\\n *\\n * @notice Override of \\\"Approve\\\" function to allow the `spender` to transfer up to `amount` from `src`\\n * @dev This will overwrite the approval amount for `spender` except in the case of spender is Time Lock Registry\\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\\n * @param spender The address of the account which may transfer tokens\\n * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\\n * @return Whether or not the approval succeeded\\n */\\n function approve(address spender, uint256 rawAmount) public override nonReentrant returns (bool) {\\n require(spender != address(0), 'TimeLockedToken::approve: spender cannot be zero address');\\n require(spender != msg.sender, 'TimeLockedToken::approve: spender cannot be the msg.sender');\\n\\n uint96 amount;\\n if (rawAmount == uint256(-1)) {\\n amount = uint96(-1);\\n } else {\\n amount = safe96(rawAmount, 'TimeLockedToken::approve: amount exceeds 96 bits');\\n }\\n\\n // There is no option to decreaseAllowance to timeLockRegistry in case of vested tokens\\n if ((spender == address(timeLockRegistry)) && (amount < allowance(msg.sender, address(timeLockRegistry)))) {\\n amount = safe96(\\n allowance(msg.sender, address(timeLockRegistry)),\\n 'TimeLockedToken::approve: cannot decrease allowance to timelockregistry'\\n );\\n }\\n _approve(msg.sender, spender, amount);\\n emit Approval(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the Increase of allowances of ERC20 with special conditions for vesting\\n *\\n * @notice Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * @dev This is an override with respect to the fulfillment of vesting conditions along the way\\n * However an user can increase allowance many times, it will never be able to transfer locked tokens during vesting period\\n * @return Whether or not the increaseAllowance succeeded\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public override nonReentrant returns (bool) {\\n require(\\n unlockedBalance(msg.sender) >= addedValue,\\n 'TimeLockedToken::increaseAllowance:Not enough unlocked tokens'\\n );\\n require(spender != address(0), 'TimeLockedToken::increaseAllowance:Spender cannot be zero address');\\n require(spender != msg.sender, 'TimeLockedToken::increaseAllowance:Spender cannot be the msg.sender');\\n _approve(msg.sender, spender, allowance(msg.sender, spender).add(addedValue));\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the decrease of allowances of ERC20 with special conditions for vesting\\n *\\n * @notice Atomically decrease the allowance granted to `spender` by the caller.\\n *\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n * This is an override with respect to the fulfillment of vesting conditions along the way\\n * An user cannot decrease the allowance to the Time Lock Registry who is in charge of vesting conditions\\n * @return Whether or not the decreaseAllowance succeeded\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public override nonReentrant returns (bool) {\\n require(spender != address(0), 'TimeLockedToken::decreaseAllowance:Spender cannot be zero address');\\n require(spender != msg.sender, 'TimeLockedToken::decreaseAllowance:Spender cannot be the msg.sender');\\n require(\\n allowance(msg.sender, spender) >= subtractedValue,\\n 'TimeLockedToken::decreaseAllowance:Underflow condition'\\n );\\n\\n // There is no option to decreaseAllowance to timeLockRegistry in case of vested tokens\\n require(\\n address(spender) != address(timeLockRegistry),\\n 'TimeLockedToken::decreaseAllowance:cannot decrease allowance to timeLockRegistry'\\n );\\n\\n _approve(\\n msg.sender,\\n spender,\\n allowance(msg.sender, spender).sub(subtractedValue, 'ERC20: decreased allowance below zero')\\n );\\n return true;\\n }\\n\\n /* ============ Internal Only Function ============ */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the _transfer of ERC20 BABL tokens only allowing the transfer of unlocked tokens\\n *\\n * @dev Transfer function which includes only unlocked tokens\\n * Locked tokens can always be transfered back to the returns address\\n * Transferring to owner allows re-issuance of funds through registry\\n *\\n * @param _from The address to send tokens from\\n * @param _to The address that will receive the tokens\\n * @param _value The amount of tokens to be transferred\\n */\\n function _transfer(\\n address _from,\\n address _to,\\n uint256 _value\\n ) internal override {\\n require(_from != address(0), 'TimeLockedToken:: _transfer: cannot transfer from the zero address');\\n require(_to != address(0), 'TimeLockedToken:: _transfer: cannot transfer to the zero address');\\n require(\\n _to != address(this),\\n 'TimeLockedToken:: _transfer: do not transfer tokens to the token contract itself'\\n );\\n\\n require(balanceOf(_from) >= _value, 'TimeLockedToken:: _transfer: insufficient balance');\\n\\n // check if enough unlocked balance to transfer\\n require(unlockedBalance(_from) >= _value, 'TimeLockedToken:: _transfer: attempting to transfer locked funds');\\n super._transfer(_from, _to, _value);\\n // voting power\\n _moveDelegates(\\n delegates[_from],\\n delegates[_to],\\n safe96(_value, 'TimeLockedToken:: _transfer: uint96 overflow')\\n );\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Disable BABL token transfer until certain conditions are met\\n *\\n * @dev Override the _beforeTokenTransfer of ERC20 BABL tokens until certain conditions are met:\\n * Only allowing minting or transfers from Time Lock Registry and Rewards Distributor until transfers are allowed in the controller\\n * Transferring to owner allows re-issuance of funds through registry\\n *\\n * @param _from The address to send tokens from\\n * @param _to The address that will receive the tokens\\n * @param _value The amount of tokens to be transferred\\n */\\n\\n // Disable garden token transfers. Allow minting and burning.\\n function _beforeTokenTransfer(\\n address _from,\\n address _to,\\n uint256 _value\\n ) internal virtual override {\\n super._beforeTokenTransfer(_from, _to, _value);\\n _require(\\n _from == address(0) ||\\n _from == address(timeLockRegistry) ||\\n _from == address(rewardsDistributor) ||\\n _to == address(timeLockRegistry) ||\\n tokenTransfersEnabled,\\n Errors.BABL_TRANSFERS_DISABLED\\n );\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel and remove locked tokens due to non-completion of vesting period\\n * applied only by Time Lock Registry and specifically to Team or Advisors\\n *\\n * @dev Cancel distribution registration\\n * @param lockedAccount that should have its still locked distribution removed due to non-completion of its vesting period\\n */\\n function _cancelVestedTokensFromTimeLock(address lockedAccount) internal onlyTimeLockRegistry returns (uint256) {\\n require(distribution[lockedAccount] != 0, 'TimeLockedToken::cancelTokens:Not registered');\\n\\n // get an update on locked amount from distributions at this precise moment\\n uint256 loosingAmount = lockedBalance(lockedAccount);\\n\\n require(loosingAmount > 0, 'TimeLockedToken::cancelTokens:There are no more locked tokens');\\n require(\\n vestedToken[lockedAccount].teamOrAdvisor == true,\\n 'TimeLockedToken::cancelTokens:cannot cancel locked tokens to Investors'\\n );\\n\\n // set distribution mapping to 0\\n delete distribution[lockedAccount];\\n\\n // set tokenVested mapping to 0\\n delete vestedToken[lockedAccount];\\n\\n // transfer only locked tokens back to TimeLockRegistry Owner (msg.sender)\\n require(\\n transferFrom(lockedAccount, address(timeLockRegistry), loosingAmount),\\n 'TimeLockedToken::cancelTokens:Transfer failed'\\n );\\n\\n // emit cancel event\\n emit Cancel(lockedAccount, loosingAmount);\\n\\n return loosingAmount;\\n }\\n}\\n\",\"keccak256\":\"0x2a828aee1f8f7ef1a0b5e982ecca7c92ea79c09a8073777f8bd1096ed0e14ea3\",\"license\":\"Apache License\"},\"contracts/token/VoteToken.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\n\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {IVoteToken} from '../interfaces/IVoteToken.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Context} from '@openzeppelin/contracts/utils/Context.sol';\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\n\\n/**\\n * @title VoteToken\\n * @notice Custom token which tracks voting power for governance\\n * @dev This is an abstraction of a fork of the Compound governance contract\\n * VoteToken is used by BABL to allow tracking voting power\\n * Checkpoints are created every time state is changed which record voting power\\n * Inherits standard ERC20 behavior\\n */\\n\\nabstract contract VoteToken is Context, ERC20, Ownable, IVoteToken, ReentrancyGuard {\\n using SafeMath for uint256;\\n using Address for address;\\n\\n /* ============ Events ============ */\\n\\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\\n event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);\\n\\n /* ============ Modifiers ============ */\\n\\n /* ============ State Variables ============ */\\n\\n /// @notice The EIP-712 typehash for the contract's domain\\n bytes32 public constant DOMAIN_TYPEHASH =\\n keccak256('EIP712Domain(string name,uint256 chainId,address verifyingContract)');\\n\\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\\n bytes32 public constant DELEGATION_TYPEHASH =\\n keccak256('Delegation(address delegatee,uint256 nonce,uint256 expiry)');\\n\\n /// @dev A record of votes checkpoints for each account, by index\\n mapping(address => address) public delegates;\\n\\n /// @notice A checkpoint for marking number of votes from a given block\\n struct Checkpoint {\\n uint32 fromBlock;\\n uint96 votes;\\n }\\n\\n /// @notice A record of votes checkpoints for each account, by index\\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\\n\\n /// @notice The number of checkpoints for each account\\n mapping(address => uint32) public numCheckpoints;\\n\\n /// @notice A record of states for signing / validating signatures\\n mapping(address => uint256) public nonces;\\n\\n /* ============ Functions ============ */\\n\\n /* ============ Constructor ============ */\\n\\n constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {}\\n\\n /* ============ External Functions ============ */\\n\\n /* =========== Token related Gov Functions ====== */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Delegating votes from msg.sender to delegatee\\n *\\n * @notice Delegate votes from `msg.sender` to `delegatee`\\n * @param delegatee The address to delegate votes to\\n */\\n\\n function delegate(address delegatee) external override {\\n return _delegate(msg.sender, delegatee);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Delegate votes using signature to 'delegatee'\\n *\\n * @notice Delegates votes from signatory to `delegatee`\\n * @param delegatee The address to delegate votes to\\n * @param nonce The contract state required to match the signature\\n * @param expiry The time at which to expire the signature\\n * @param v The recovery byte of the signature\\n * @param r Half of the ECDSA signature pair\\n * @param s Half of the ECDSA signature pair\\n */\\n\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external override {\\n bytes32 domainSeparator =\\n keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name())), getChainId(), address(this)));\\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\\n bytes32 digest = keccak256(abi.encodePacked('\\\\x19\\\\x01', domainSeparator, structHash));\\n address signatory = ecrecover(digest, v, r, s);\\n require(signatory != address(0), 'VoteToken::delegateBySig: invalid signature');\\n require(nonce == nonces[signatory] + 1, 'VoteToken::delegateBySig: invalid nonce');\\n nonces[signatory]++;\\n require(block.timestamp <= expiry, 'VoteToken::delegateBySig: signature expired');\\n return _delegate(signatory, delegatee);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Check Delegate votes using signature to 'delegatee'\\n *\\n * @notice Get current voting power for an account\\n * @param account Account to get voting power for\\n * @return Voting power for an account\\n */\\n function getCurrentVotes(address account) external view virtual override returns (uint96) {\\n uint32 nCheckpoints = numCheckpoints[account];\\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Get voting power at a specific block for an account\\n *\\n * @param account Account to get voting power for\\n * @param blockNumber Block to get voting power at\\n * @return Voting power for an account at specific block\\n */\\n function getPriorVotes(address account, uint256 blockNumber) external view virtual override returns (uint96) {\\n require(blockNumber < block.number, 'BABLToken::getPriorVotes: not yet determined');\\n\\n uint32 nCheckpoints = numCheckpoints[account];\\n if (nCheckpoints == 0) {\\n return 0;\\n }\\n\\n // First check most recent balance\\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\\n return checkpoints[account][nCheckpoints - 1].votes;\\n }\\n\\n // Next check implicit zero balance\\n if (checkpoints[account][0].fromBlock > blockNumber) {\\n return 0;\\n }\\n\\n uint32 lower = 0;\\n uint32 upper = nCheckpoints - 1;\\n while (upper > lower) {\\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\\n Checkpoint memory cp = checkpoints[account][center];\\n if (cp.fromBlock == blockNumber) {\\n return cp.votes;\\n } else if (cp.fromBlock < blockNumber) {\\n lower = center;\\n } else {\\n upper = center - 1;\\n }\\n }\\n return checkpoints[account][lower].votes;\\n }\\n\\n function getMyDelegatee() external view override returns (address) {\\n return delegates[msg.sender];\\n }\\n\\n function getDelegatee(address account) external view override returns (address) {\\n return delegates[account];\\n }\\n\\n function getCheckpoints(address account, uint32 id)\\n external\\n view\\n override\\n returns (uint32 fromBlock, uint96 votes)\\n {\\n Checkpoint storage getCheckpoint = checkpoints[account][id];\\n return (getCheckpoint.fromBlock, getCheckpoint.votes);\\n }\\n\\n function getNumberOfCheckpoints(address account) external view override returns (uint32) {\\n return numCheckpoints[account];\\n }\\n\\n /* ============ Internal Only Function ============ */\\n\\n /**\\n * GOVERNANCE FUNCTION. Make a delegation\\n *\\n * @dev Internal function to delegate voting power to an account\\n * @param delegator The address of the account delegating votes from\\n * @param delegatee The address to delegate votes to\\n */\\n\\n function _delegate(address delegator, address delegatee) internal {\\n address currentDelegate = delegates[delegator];\\n uint96 delegatorBalance = safe96(_balanceOf(delegator), 'VoteToken::_delegate: uint96 overflow');\\n delegates[delegator] = delegatee;\\n\\n emit DelegateChanged(delegator, currentDelegate, delegatee);\\n\\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\\n }\\n\\n function _balanceOf(address account) internal view virtual returns (uint256) {\\n return balanceOf(account);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Move the delegates\\n *\\n * @dev Internal function to move delegates between accounts\\n * @param srcRep The address of the account delegating votes from\\n * @param dstRep The address of the account delegating votes to\\n * @param amount The voting power to move\\n */\\n function _moveDelegates(\\n address srcRep,\\n address dstRep,\\n uint96 amount\\n ) internal {\\n if (srcRep != dstRep && amount > 0) {\\n // It must not revert but do nothing in cases of address(0) being part of the move\\n // Sub voting amount to source in case it is not the zero address (e.g. transfers)\\n if (srcRep != address(0)) {\\n uint32 srcRepNum = numCheckpoints[srcRep];\\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\\n uint96 srcRepNew = sub96(srcRepOld, amount, 'VoteToken::_moveDelegates: vote amount underflows');\\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\\n }\\n if (dstRep != address(0)) {\\n // Add it to destination in case it is not the zero address (e.g. any transfer of tokens or delegations except a first mint to a specific address)\\n uint32 dstRepNum = numCheckpoints[dstRep];\\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\\n uint96 dstRepNew = add96(dstRepOld, amount, 'VoteToken::_moveDelegates: vote amount overflows');\\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\\n }\\n }\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Internal function to write a checkpoint for voting power\\n *\\n * @dev internal function to write a checkpoint for voting power\\n * @param delegatee The address of the account delegating votes to\\n * @param nCheckpoints The num checkpoint\\n * @param oldVotes The previous voting power\\n * @param newVotes The new voting power\\n */\\n function _writeCheckpoint(\\n address delegatee,\\n uint32 nCheckpoints,\\n uint96 oldVotes,\\n uint96 newVotes\\n ) internal {\\n uint32 blockNumber = safe32(block.number, 'VoteToken::_writeCheckpoint: block number exceeds 32 bits');\\n\\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\\n } else {\\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\\n numCheckpoints[delegatee] = nCheckpoints + 1;\\n }\\n\\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint32\\n *\\n * @dev internal function to convert from uint256 to uint32\\n */\\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\\n require(n < 2**32, errorMessage);\\n return uint32(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint96\\n *\\n * @dev internal function to convert from uint256 to uint96\\n */\\n function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) {\\n require(n < 2**96, errorMessage);\\n return uint96(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to add two uint96 numbers\\n *\\n * @dev internal safe math function to add two uint96 numbers\\n */\\n function add96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n uint96 c = a + b;\\n require(c >= a, errorMessage);\\n return c;\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to subtract two uint96 numbers\\n *\\n * @dev internal safe math function to subtract two uint96 numbers\\n */\\n function sub96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to get chain ID\\n *\\n * @dev internal function to get chain ID\\n */\\n function getChainId() internal pure returns (uint256) {\\n uint256 chainId;\\n assembly {\\n chainId := chainid()\\n }\\n return chainId;\\n }\\n}\\n\",\"keccak256\":\"0x594b8ba6deb5c071f512773cdfcc892166d1f701d4fcd8c8b4b3517fe8125089\",\"license\":\"Apache License\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101806040523480156200001257600080fd5b5060405162005ac638038062005ac6833981810160405260408110156200003857600080fd5b50805160209091015160006200004d62000310565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600160a01b038216620000f3576040805162461bcd60e51b815260206004820152601460248201527f546f6b656e206e6565647320746f206578697374000000000000000000000000604482015290519081900360640190fd5b6001600160a01b0381166200014f576040805162461bcd60e51b815260206004820152601960248201527f436f6e74726f6c6c6572206e6565647320746f20657869737400000000000000604482015290519081900360640190fd5b600380546001600160a01b038085166001600160a01b031992831617909255600280548484169216919091179081905560408051633c50b0ef60e21b81529051919092169163f142c3bc916004808301926080929190829003018186803b158015620001ba57600080fd5b505afa158015620001cf573d6000803e3d6000fd5b505050506040513d6080811015620001e657600080fd5b50805160208201516040808401516060948501516101605260c05260a0919091526080919091526002548151632e0519cf60e01b815291516001600160a01b0390911692632e0519cf9260048082019391829003018186803b1580156200024c57600080fd5b505afa15801562000261573d6000803e3d6000fd5b505050506040513d60608110156200027857600080fd5b508051602080830151604093840151610120526101005260e091909152600254825163568c081360e01b815292516001600160a01b039091169263568c0813926004808301939192829003018186803b158015620002d557600080fd5b505afa158015620002ea573d6000803e3d6000fd5b505050506040513d60208110156200030157600080fd5b50516101405250620003149050565b3390565b60805160a05160c05160e0516101005161012051610140516101605161572c6200039a60003980611cb25280612a7f525080610f875280612872525080610c565250806108225280614e905280614f48525080610fba52806149aa5250806120aa5280612972525080610ef05280614bd6525080611c7c52806147d8525061572c6000f3fe608060405234801561001057600080fd5b50600436106102c85760003560e01c8063908589441161017b578063df14e06f116100d8578063f5750d0f1161008c578063f77c479111610071578063f77c4791146107b5578063fa51a34b146107bd578063fd9ff86c146107c5576102c8565b8063f5750d0f1461076c578063f6c8d7b514610789576102c8565b8063f1068454116100bd578063f106845414610712578063f1ed38611461071a578063f2fde38b14610746576102c8565b8063df14e06f146106de578063e5cab4fa1461070a576102c8565b8063d60913ce1161012f578063db4b3af511610114578063db4b3af5146106a8578063dc178712146106ce578063ddaa26ad146106d6576102c8565b8063d60913ce14610654578063da17a6ca146106a0576102c8565b8063a675004711610160578063a675004714610612578063a70b9f0c1461062f578063cf14938714610637576102c8565b806390858944146105e45780639de9a052146105ec576102c8565b80636bf15bbd1161022957806378769678116101dd57806379fc904f116101c257806379fc904f146105cc5780638cb8c855146105d45780638da5cb5b146105dc576102c8565b8063787696781461059357806379102629146105c4576102c8565b8063715018a61161020e578063715018a61461051657806373a9fd9f1461051e5780637602bdde14610557576102c8565b80636bf15bbd146104d95780636e570b591461050e576102c8565b80632db4b3a711610280578063551bf81611610265578063551bf8161461040357806356773b791461040b57806369795e931461042f576102c8565b80632db4b3a7146103a25780633c0deba4146103e6576102c8565b80630fa454cf116102b15780630fa454cf1461032f5780631de40e491461034e5780632544dc1814610356576102c8565b806308c6850f146102cd5780630bb6d20814610315575b600080fd5b6102ea600480360360208110156102e357600080fd5b50356107f1565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b61031d610820565b60408051918252519081900360200190f35b61034c6004803603602081101561034557600080fd5b5035610844565b005b61031d610a49565b6103736004803603602081101561036c57600080fd5b5035610a55565b604080519485526020850193909352838301919091526001600160601b03166060830152519081900360800190f35b61034c600480360360a08110156103b857600080fd5b506001600160a01b038135811691602081013590911690604081013590606081013515159060800135610a86565b610373600480360360208110156103fc57600080fd5b5035610c24565b61031d610c54565b610413610c78565b604080516001600160a01b039092168252519081900360200190f35b6104b86004803603606081101561044557600080fd5b6001600160a01b03823581169260208101359091169181019060608101604082013564010000000081111561047957600080fd5b82018360208201111561048b57600080fd5b803590602001918460208302840111640100000000831117156104ad57600080fd5b509092509050610c87565b604080519283526001600160601b0390911660208301528051918290030190f35b61034c600480360360408110156104ef57600080fd5b5080356001600160a01b031690602001356001600160601b0316610d38565b61031d610dd4565b61034c610de2565b61053b6004803603602081101561053457600080fd5b5035610ead565b604080516001600160601b039092168252519081900360200190f35b61031d6004803603608081101561056d57600080fd5b506001600160a01b03813581169160208101359091169060408101359060600135610ec0565b6105b0600480360360208110156105a957600080fd5b5035610ed9565b604080519115158252519081900360200190f35b61031d610eee565b61034c610f12565b61031d610f85565b610413610fa9565b61031d610fb8565b61053b6004803603602081101561060257600080fd5b50356001600160a01b0316610fdc565b61031d6004803603602081101561062857600080fd5b5035611bf7565b61031d611c18565b6102ea6004803603602081101561064d57600080fd5b5035611c1f565b6106826004803603604081101561066a57600080fd5b506001600160a01b0381358116916020013516611c4e565b60408051938452602084019290925282820152519081900360600190f35b61031d611c7a565b61031d600480360360208110156106be57600080fd5b50356001600160a01b0316611c9e565b61031d611cb0565b61031d611cd4565b61034c600480360360408110156106f457600080fd5b506001600160a01b038135169060200135611cda565b61031d611e0c565b61031d611e12565b61031d6004803603604081101561073057600080fd5b506001600160a01b038135169060200135611e18565b61034c6004803603602081101561075c57600080fd5b50356001600160a01b0316611e49565b61034c6004803603602081101561078257600080fd5b5035611f6a565b61031d6004803603604081101561079f57600080fd5b506001600160a01b03813516906020013561207c565b610413612099565b61031d6120a8565b610682600480360360408110156107db57600080fd5b506001600160a01b0381351690602001356120cc565b600560205260009081526040902080546001820154600283015460038401546004909401549293919290919085565b7f000000000000000000000000000000000000000000000000000000000000000081565b60025460408051630ad7511760e31b8152905161094e926001600160a01b0316916313bc6d4b9133916356ba88b8916004808301926020929190829003018186803b15801561089257600080fd5b505afa1580156108a6573d6000803e3d6000fd5b505050506040513d60208110156108bc57600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b039092166004830152516024808301926020929190829003018186803b15801561091b57600080fd5b505afa15801561092f573d6000803e3d6000fd5b505050506040513d602081101561094557600080fd5b505160146120f8565b6002546040805163184a263160e11b815290516109c7926001600160a01b0316916330944c62916004808301926020929190829003018186803b15801561099457600080fd5b505afa1580156109a8573d6000803e3d6000fd5b505050506040513d60208110156109be57600080fd5b505160456120f8565b6000339050600154816001600160a01b0316636db9cc996040518163ffffffff1660e01b815260040160206040518083038186803b158015610a0857600080fd5b505afa158015610a1c573d6000803e3d6000fd5b505050506040513d6020811015610a3257600080fd5b505110610a4557610a4581836001612106565b5050565b6701aa535d3d0c000081565b600090815260086020526040902080546001820154600283015460039093015491939092916001600160601b031690565b848180151580610aae57506001600160a01b0382166000908152600f60205260409020546001105b15610bbd57600254604080516313bc6d4b60e01b81526001600160a01b0385811660048301529151610b389392909216916313bc6d4b91602480820192602092909190829003018186803b158015610b0557600080fd5b505afa158015610b19573d6000803e3d6000fd5b505050506040513d6020811015610b2f57600080fd5b505160486120f8565b6002546040805163364d118160e01b81526001600160a01b0385811660048301529151610bbd93929092169163364d118191602480820192602092909190829003018186803b158015610b8a57600080fd5b505afa158015610b9e573d6000803e3d6000fd5b505050506040513d6020811015610bb457600080fd5b505160236120f8565b610bd3336001600160a01b0384161460236120f8565b610c0f826001600160a01b03166302fb0c5e6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b8a57600080fd5b610c1b878787876122cb565b50505050505050565b6008602052600090815260409020805460018201546002830154600390930154919290916001600160601b031684565b7f000000000000000000000000000000000000000000000000000000000000000081565b6003546001600160a01b031681565b60008060008060005b85811015610ce857600080610cc18b8a8a86818110610cab57fe5b905060200201356001600160a01b03168c6124e8565b9092509050610cd08583612abc565b9450610cdc8482612abc565b93505050600101610c90565b5081610d29826040518060400160405280600381526020017f5232380000000000000000000000000000000000000000000000000000000000815250612b1f565b93509350505094509492505050565b6002546040805163184a263160e11b81529051610d7e926001600160a01b0316916330944c62916004808301926020929190829003018186803b15801561099457600080fd5b600254604080516313bc6d4b60e01b81523360048201529051610dca926001600160a01b0316916313bc6d4b916024808301926020929190829003018186803b158015610b0557600080fd5b610a458282612bc2565b690b581ceb141f05c1ae0081565b610dea612cd3565b6001600160a01b0316610dfb610fa9565b6001600160a01b031614610e56576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000610eb882612cd7565b90505b919050565b6000610ece85858585612dbf565b90505b949350505050565b60096020526000908152604090205460ff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b600254604080516313bc6d4b60e01b81523360048201529051610f5e926001600160a01b0316916313bc6d4b916024808301926020929190829003018186803b158015610b0557600080fd5b600254610f77906001600160a01b0316331460106120f8565b600154610f8357426001555b565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b031690565b7f000000000000000000000000000000000000000000000000000000000000000081565b600080829050611053816001600160a01b031663d0f9953e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561101e57600080fd5b505afa158015611032573d6000803e3d6000fd5b505050506040513d602081101561104857600080fd5b5051151560316120f8565b600154816001600160a01b0316636db9cc996040518163ffffffff1660e01b815260040160206040518083038186803b15801561108f57600080fd5b505afa1580156110a3573d6000803e3d6000fd5b505050506040513d60208110156110b957600080fd5b5051108015906110ca575060015415155b15611bed576000816001600160a01b0316636db40dc26040518163ffffffff1660e01b815260040160206040518083038186803b15801561110a57600080fd5b505afa15801561111e573d6000803e3d6000fd5b505050506040513d602081101561113457600080fd5b50519050801561117957611170816040518060400160405280601081526020016f6f766572666c6f77203936206269747360801b815250612b1f565b92505050610ebb565b600080611255846001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111b857600080fd5b505afa1580156111cc573d6000803e3d6000fd5b505050506040513d60208110156111e257600080fd5b50516040805163687cca9f60e11b815290516001600160a01b0388169163d0f9953e916004808301926020929190829003018186803b15801561122457600080fd5b505afa158015611238573d6000803e3d6000fd5b505050506040513d602081101561124e57600080fd5b5051613281565b915091506000600183116114805761126d87836132ff565b600083815260086020526040902060030154909150611299906001600160601b031682111560466120f8565b61147b6008600084815260200190815260200160002060020154611472876001600160a01b031663dbabf4f36040518163ffffffff1660e01b815260040160206040518083038186803b1580156112ef57600080fd5b505afa158015611303573d6000803e3d6000fd5b505050506040513d602081101561131957600080fd5b50516040805163412ef7ff60e11b8152905161146c91611401916001600160a01b038d169163825deffe916004808301926020929190829003018186803b15801561136357600080fd5b505afa158015611377573d6000803e3d6000fd5b505050506040513d602081101561138d57600080fd5b50516040805163687cca9f60e11b815290516001600160a01b038e169163d0f9953e916004808301926020929190829003018186803b1580156113cf57600080fd5b505afa1580156113e3573d6000803e3d6000fd5b505050506040513d60208110156113f957600080fd5b505190613538565b8a6001600160a01b03166303cddb2c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561143a57600080fd5b505afa15801561144e573d6000803e3d6000fd5b505050506040513d602081101561146457600080fd5b505190613595565b90613538565b111560476120f8565b611a90565b60008367ffffffffffffffff8111801561149957600080fd5b506040519080825280602002602001820160405280156114c3578160200160208202803683370190505b50905060008467ffffffffffffffff811180156114df57600080fd5b50604051908082528060200260200182016040528015611509578160200160208202803683370190505b50905060005b61151a866001613538565b8111611a8c57600061154561153c6276a7006115368986612abc565b90613595565b60015490612abc565b90506000670de0b6b3a76400009050816115c76276a7008c6001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561159557600080fd5b505afa1580156115a9573d6000803e3d6000fd5b505050506040513d60208110156115bf57600080fd5b505190612abc565b111561173b5761171e600a60008c6001600160a01b03166001600160a01b0316815260200190815260200160002060006116648d6001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561163357600080fd5b505afa158015611647573d6000803e3d6000fd5b505050506040513d602081101561165d57600080fd5b50516135ee565b81526020019081526020016000205461146c6116e58d6001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116b257600080fd5b505afa1580156116c6573d6000803e3d6000fd5b505050506040513d60208110156116dc57600080fd5b50518690613538565b8d6001600160a01b03166303cddb2c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561143a57600080fd5b85848151811061172a57fe5b602002602001018181525050611993565b611748826276a700613538565b8a6001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561178157600080fd5b505afa158015611795573d6000803e3d6000fd5b505050506040513d60208110156117ab57600080fd5b505110801561181d5750896001600160a01b031663d0f9953e6040518163ffffffff1660e01b815260040160206040518083038186803b1580156117ee57600080fd5b505afa158015611802573d6000803e3d6000fd5b505050506040513d602081101561181857600080fd5b505182105b1561187e576001600160a01b038a166000908152600a6020526040812061171e9161185361184e86623b5380613538565b6135ee565b815260208101919091526040016000205461146c6116e5611877866276a700613538565b8690613538565b6118b5611898611891846276a700613538565b8490613538565b6118af6118a8856276a700613538565b4290613538565b9061362d565b905061197a600a60008c6001600160a01b03166001600160a01b03168152602001908152602001600020600061191d8d6001600160a01b031663d0f9953e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561163357600080fd5b815260208101919091526040016000205461146c6116e5611941866276a700613538565b8e6001600160a01b031663d0f9953e6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113cf57600080fd5b85848151811061198657fe5b6020026020010181815250505b600860006119a18986612abc565b8152602001908152602001600020600201548484815181106119bf57fe5b6020026020010181815250506119ff8484815181106119da57fe5b60200260200101518685815181106119ee57fe5b6020026020010151111560476120f8565b611a80611a7982611a7360086000611a178d8a612abc565b815260208101919091526040016000206003015488516001600160601b0390911690611a73908a908a908110611a4957fe5b60200260200101518b8a81518110611a5d57fe5b602002602001015161362d90919063ffffffff16565b90613645565b8790612abc565b9550505060010161150f565b5050505b6000611b85866001600160a01b03166303cddb2c6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ace57600080fd5b505afa158015611ae2573d6000803e3d6000fd5b505050506040513d6020811015611af857600080fd5b5051604080517f03976e3800000000000000000000000000000000000000000000000000000000815290516001600160a01b038a16916303976e38916004808301926020929190829003018186803b158015611b5357600080fd5b505afa158015611b67573d6000803e3d6000fd5b505050506040513d6020811015611b7d57600080fd5b50519061362d565b9050671bc16d674ec80000811115611ba25750671bc16d674ec800005b611bac8282613645565b9150611be0826040518060400160405280601081526020016f6f766572666c6f77203936206269747360801b815250612b1f565b9650505050505050610ebb565b6000915050610ebb565b60068181548110611c0757600080fd5b600091825260209091200154905081565b6276a70081565b600090815260056020526040902080546001820154600283015460038401546004909401549294919390929091565b600b60209081526000928352604080842090915290825290208054600182015460039092015490919083565b7f000000000000000000000000000000000000000000000000000000000000000081565b600f6020526000908152604090205481565b7f000000000000000000000000000000000000000000000000000000000000000081565b60015481565b818180151580611d0257506001600160a01b0382166000908152600f60205260409020546001105b15611dab57600254604080516313bc6d4b60e01b81526001600160a01b0385811660048301529151611d599392909216916313bc6d4b91602480820192602092909190829003018186803b158015610b0557600080fd5b6002546040805163364d118160e01b81526001600160a01b0385811660048301529151611dab93929092169163364d118191602480820192602092909190829003018186803b158015610b8a57600080fd5b611dc1336001600160a01b0384161460236120f8565b611dfd826001600160a01b03166302fb0c5e6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b8a57600080fd5b611e068461365d565b50505050565b60045481565b60075481565b600e6020528160005260406000208181548110611e3457600080fd5b90600052602060002001600091509150505481565b611e51612cd3565b6001600160a01b0316611e62610fa9565b6001600160a01b031614611ebd576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116611f025760405162461bcd60e51b81526004018080602001828103825260268152602001806156866026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60025460408051630ad7511760e31b81529051611fb8926001600160a01b0316916313bc6d4b9133916356ba88b8916004808301926020929190829003018186803b15801561089257600080fd5b6002546040805163184a263160e11b81529051611ffe926001600160a01b0316916330944c62916004808301926020929190829003018186803b15801561099457600080fd5b6000339050600154816001600160a01b0316636db9cc996040518163ffffffff1660e01b815260040160206040518083038186803b15801561203f57600080fd5b505afa158015612053573d6000803e3d6000fd5b505050506040513d602081101561206957600080fd5b505110610a4557610a4581836000612106565b600a60209081526000928352604080842090915290825290205481565b6002546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b600d60209081526000928352604080842090915290825290208054600182015460029092015490919083565b81610a4557610a4581613882565b426000908152600560205260409020839082612131576004546121299085613538565b600455612142565b60045461213e9085612abc565b6004555b60045481554260018201819055612158906135ee565b6002820155600754600382018190556121775760006004820155612270565b61226a612219600560006006612199600160075461353890919063ffffffff16565b815481106121a357fe5b90600052602060002001548152602001908152602001600020600001546115366005600060066121df600160075461353890919063ffffffff16565b815481106121e957fe5b9060005260206000200154815260200190815260200160002060010154856001015461353890919063ffffffff16565b600560006006612235600160075461353890919063ffffffff16565b8154811061223f57fe5b9060005260206000200154815260200190815260200160002060040154612abc90919063ffffffff16565b60048201555b60068054600181018255600091909152427ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f9091018190556122b1906138d5565b6122bb8285613fe9565b5050600780546001019055505050565b6001600160a01b038085166000818152600b602090815260408083209488168084529482529182902082516370a0823160e01b81526004810195909552915191936370a082319260248083019392829003018186803b15801561232d57600080fd5b505afa158015612341573d6000803e3d6000fd5b505050506040513d602081101561235757600080fd5b5051426000818152600484016020526040902091825560018201556003820154600290910181905561239d574260009081526004820160205260408120600301556123f6565b805460008181526004830160205260409020546123e0916123c49190611536904290613538565b8254600090815260048401602052604090206003015490612abc565b4260009081526004830160205260409020600301555b600182151514156124245782158061241057506001810154155b1561241c574260018201555b4281556124bb565b846001600160a01b03166370a08231856040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561247157600080fd5b505afa158015612485573d6000803e3d6000fd5b505050506040513d602081101561249b57600080fd5b50516124bb576000808255600182018190556124bb90600283019061564f565b60028101805460018181018355600092835260209092204291015560039091018054909101905550505050565b6000806000849050612573866001600160a01b0316826001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b15801561253657600080fd5b505afa15801561254a573d6000803e3d6000fd5b505050506040513d602081101561256057600080fd5b50516001600160a01b03161460496120f8565b60008060008060008061258587614314565b93509350935093506000808d6001600160a01b0316633d8270f58d6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060c06040518083038186803b1580156125dd57600080fd5b505afa1580156125f1573d6000803e3d6000fd5b505050506040513d60c081101561260757600080fd5b50602080820151604092830151835163687cca9f60e11b81529351919550935083926001600160a01b038d169263d0f9953e92600480840193829003018186803b15801561265457600080fd5b505afa158015612668573d6000803e3d6000fd5b505050506040513d602081101561267e57600080fd5b50511180156126f1575081896001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b1580156126c257600080fd5b505afa1580156126d6573d6000803e3d6000fd5b505050506040513d60208110156126ec57600080fd5b505110155b801561277257508d6001600160a01b0316896001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b15801561273b57600080fd5b505afa15801561274f573d6000803e3d6000fd5b505050506040513d602081101561276557600080fd5b50516001600160a01b0316145b15612aa857600061285c8f8e8c6001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b1580156127b757600080fd5b505afa1580156127cb573d6000803e3d6000fd5b505050506040513d60208110156127e157600080fd5b81019080805190602001909291905050508d6001600160a01b031663d0f9953e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561282b57600080fd5b505afa15801561283f573d6000803e3d6000fd5b505050506040513d602081101561285557600080fd5b5051612dbf565b9050600187151514156128a05761289d612896877f00000000000000000000000000000000000000000000000000000000000000006145cb565b8790613538565b95505b6128b86128b18b8f8a8a8a8a6145ef565b8990612abc565b97506128d06128c98b8f8a8a614917565b8a90612abc565b98506128e36128b18b8f8a8a8a8a6149e3565b97506128f66128c98b8f8a8a8a8a614d86565b98506129fc6128b161296d8c6001600160a01b03166303cddb2c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561293a57600080fd5b505afa15801561294e573d6000803e3d6000fd5b505050506040513d602081101561296457600080fd5b5051849061362d565b611a737f00000000000000000000000000000000000000000000000000000000000000008e6001600160a01b0316636db40dc26040518163ffffffff1660e01b815260040160206040518083038186803b1580156129ca57600080fd5b505afa1580156129de573d6000803e3d6000fd5b505050506040513d60208110156129f457600080fd5b5051906145cb565b97508e6001600160a01b03166302d05d3f6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a3757600080fd5b505afa158015612a4b573d6000803e3d6000fd5b505050506040513d6020811015612a6157600080fd5b50516001600160a01b038e811691161415612aa657612aa36128b1897f00000000000000000000000000000000000000000000000000000000000000006145cb565b97505b505b50959c949b50939950505050505050505050565b600082820183811015612b16576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b6000816c010000000000000000000000008410612bba5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612b7f578181015183820152602001612b67565b50505050905090810190601f168015612bac5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b509192915050565b6002546040805163184a263160e11b81529051612c08926001600160a01b0316916330944c62916004808301926020929190829003018186803b15801561099457600080fd5b600354604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015612c5357600080fd5b505afa158015612c67573d6000803e3d6000fd5b505050506040513d6020811015612c7d57600080fd5b505190506001600160601b038216811015612cae57600354612ca9906001600160a01b03168483614f9f565b612cce565b600354612cce906001600160a01b0316846001600160601b038516614f9f565b505050565b3390565b6000612ce86001831015604a6120f8565b6102018210612cf957506000610ebb565b6000612d73612d09846001613538565b612d6d6701aa535d3d0c00007349120d18951D4bA76Fc113A75bF5959a3261e68363907af6c06040518163ffffffff1660e01b815260040160206040518083038186803b158015612d5957600080fd5b505af41580156115a9573d6000803e3d6000fd5b9061501f565b90506000612d8b690b581ceb141f05c1ae008361362d565b9050611170816040518060400160405280601081526020016f6f766572666c6f77203936206269747360801b815250612b1f565b6000612e3f856001600160a01b031663cb12233b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612dfd57600080fd5b505afa158015612e11573d6000803e3d6000fd5b505050506040513d6020811015612e2757600080fd5b50518310801590612e385750838310155b60416120f8565b6001600160a01b038086166000818152600b60209081526040808320948916808452948252808320938352600c825280832094835293815290839020835160808101855281548152600180830154938201939093526002820154948101949094526003015460608401528101549091901580612ebe5750838260010154115b15612ece57600092505050610ed1565b866001600160a01b031663cb12233b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612f0757600080fd5b505afa158015612f1b573d6000803e3d6000fd5b505050506040513d6020811015612f3157600080fd5b50518511612fa157866001600160a01b031663cb12233b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612f7257600080fd5b505afa158015612f86573d6000803e3d6000fd5b505050506040513d6020811015612f9c57600080fd5b505194505b612fad878787876150c8565b60208301528152612fbf8786866151f7565b6060830152604082015260208101518151612ff09110801590612e38575081606001518260400151111560416120f8565b60008082600001518710156130085760009150613075565b825187111561305c578251600090815260048501602052604090205483516130559161303991611536908b90613538565b8451600090815260048701602052604090206003015490612abc565b9150613075565b8251600090815260048501602052604090206003015491505b6001600160a01b0389166000908152600d602090815260408083208682018051855292529091205490516130e2916130b291611536908b90613538565b6001600160a01b038b166000908152600d6020908152604080832088820151845290915290206002015490612abc565b90506130f28183111560416120f8565b85871415613121578061310c576000945050505050610ed1565b613116828261362d565b945050505050610ed1565b826020015186101561313a576000945050505050610ed1565b826020015186148015613151575060208301518351145b156131db576001600160a01b0389166000908152600d60209081526040808320606087018051855292529091205490516131cb91839161146c9161319a91611536908c90613538565b6001600160a01b038d166000908152600d6020908152604080832060608b0151845290915290206002015490612abc565b905061310c8183111560416120f8565b6132398261146c613219876004016000886020015181526020019081526020016000206000015461153688602001518c61353890919063ffffffff16565b602080880151600090815260048a01909152604090206003015490612abc565b6001600160a01b038a166000908152600d60209081526040808320606088018051855292529091205490519193506131cb91839161146c9161319a9190611536908c90613538565b600080806132ae670de0b6b3a76400006132a86276a7006132a2888a613538565b9061530f565b90615397565b905060006132da670de0b6b3a76400006132a86276a7006132a26001548b61353890919063ffffffff16565b90506132e7826001612abc565b6132f2826001612abc565b9350935050509250929050565b6000613352600260009054906101000a90046001600160a01b03166001600160a01b03166330944c626040518163ffffffff1660e01b815260040160206040518083038186803b15801561099457600080fd5b600083905060006134ae826001600160a01b031663dbabf4f36040518163ffffffff1660e01b815260040160206040518083038186803b15801561339557600080fd5b505afa1580156133a9573d6000803e3d6000fd5b505050506040513d60208110156133bf57600080fd5b50516040805163412ef7ff60e11b8152905161146c91613475916001600160a01b0388169163825deffe916004808301926020929190829003018186803b15801561340957600080fd5b505afa15801561341d573d6000803e3d6000fd5b505050506040513d602081101561343357600080fd5b50516040805163687cca9f60e11b815290516001600160a01b0389169163d0f9953e916004808301926020929190829003018186803b1580156113cf57600080fd5b856001600160a01b03166303cddb2c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561143a57600080fd5b905061352f6134bd4286613538565b6132a86134fd87866001600160a01b031663d0f9953e6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113cf57600080fd5b60008881526008602052604090206003810154600290910154611536916001600160601b031690611a7390889061362d565b95945050505050565b60008282111561358f576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000826135a457506000612b19565b828202828482816135b157fe5b0414612b165760405162461bcd60e51b81526004018080602001828103825260218152602001806156ac6021913960400191505060405180910390fd5b600080613619670de0b6b3a76400006132a86276a7006132a26001548861353890919063ffffffff16565b9050613626816001612abc565b9392505050565b6000612b16826132a885670de0b6b3a7640000613595565b6000612b16670de0b6b3a76400006132a88585613595565b6001600160a01b0381166000818152600d6020908152604080832042845282529182902082517f18160ddd00000000000000000000000000000000000000000000000000000000815292518594919391926318160ddd9260048082019391829003018186803b1580156136cf57600080fd5b505afa1580156136e3573d6000803e3d6000fd5b505050506040513d60208110156136f957600080fd5b505181554260018201556001600160a01b0383166000908152600f602052604090205461372c5760006002820155613840565b6001600160a01b0382166000908152600d60209081526040808320600e8352818420600f9093529083205461383a936137cb93909161376c906001613538565b8154811061377657fe5b600091825260208083209091015483528281019390935260409182018120546001600160a01b0388168252600d8452828220600e8552838320600f9095529282205490936115369392916121df906001613538565b6001600160a01b0384166000908152600d60209081526040808320600e8352818420600f9093529083205490929190613805906001613538565b8154811061380f57fe5b9060005260206000200154815260200190815260200160002060020154612abc90919063ffffffff16565b60028201555b506001600160a01b03166000818152600e6020908152604080832080546001818101835591855283852042910155938352600f90915290208054909101905550565b62461bcd60e51b6000908152602060045260076024526642414223000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b6002546040805163184a263160e11b8152905161391b926001600160a01b0316916330944c62916004808301926020929190829003018186803b15801561099457600080fd5b60006008600061392a846135ee565b815260200190815260200160002090506009600061394c600161146c866135ee565b815260208101919091526040016000205460ff16613fae5761396d826135ee565b60018201556007546139bd576000600282015561399161398c836135ee565b612cd7565b6003820180546bffffffffffffffffffffffff19166001600160601b0392909216919091179055613f76565b6000613a2a6005600060066139de600160075461353890919063ffffffff16565b815481106139e857fe5b9060005260206000200154815260200190815260200160002060040154600560008681526020019081526020016000206004015461353890919063ffffffff16565b9050613a3a600161146c856135ee565b600560006006613a56600160075461353890919063ffffffff16565b81548110613a6057fe5b90600052602060002001548152602001908152602001600020600201541415613bab57613b02613adb600560006006613aa5600160075461353890919063ffffffff16565b81548110613aaf57fe5b90600052602060002001548152602001908152602001600020600101548561353890919063ffffffff16565b6132a8613afb61289661153c6276a70061146c6276a7006115368c6135ee565b8490613595565b6002830155613b1361398c846135ee565b6003830180546bffffffffffffffffffffffff19166001600160601b03929092169190911790556002820154613b8090613b4e908390613538565b60086000613b60600161146c896135ee565b815260200190815260200160002060020154612abc90919063ffffffff16565b60086000613b92600161146c886135ee565b8152602081019190915260400160002060020155613f74565b60005b613bfd600560006006613bcd600160075461353890919063ffffffff16565b81548110613bd757fe5b906000526020600020015481526020019081526020016000206002015461146c866135ee565b8111613f7257600060086000613c2984600560006006613805600160075461353890919063ffffffff16565b815260200190815260200160002090506000613c6561153c6276a70061153686600560006006613805600160075461353890919063ffffffff16565b905082613d7a57613d31613d26613cc7600560006006613c91600160075461353890919063ffffffff16565b81548110613c9b57fe5b90600052602060002001548152602001908152602001600020600101548961353890919063ffffffff16565b6132a8613d1f600560006006613ce9600160075461353890919063ffffffff16565b81548110613cf357fe5b90600052602060002001548152602001908152602001600020600101548661353890919063ffffffff16565b8890613595565b600284015490612abc565b6002830155600754600590600090600690613d4d906001613538565b81548110613d5757fe5b600091825260208083209091015483528201929092526040019020548255613f68565b613dc9600560006006613d99600160075461353890919063ffffffff16565b81548110613da357fe5b906000526020600020015481526020019081526020016000206002015461146c886135ee565b831015613ecc57613e35613e28600560006006613df2600160075461353890919063ffffffff16565b81548110613dfc57fe5b90600052602060002001548152602001908152602001600020600101548861353890919063ffffffff16565b6132a8866276a700613595565b8260020181905550613e6061398c84600560006006613805600160075461353890919063ffffffff16565b8260030160006101000a8154816001600160601b0302191690836001600160601b03160217905550613ea883600560006006613805600160075461353890919063ffffffff16565b8260010181905550600560006006613d4d600160075461353890919063ffffffff16565b613f1c613eee600560006006613df2600160075461353890919063ffffffff16565b6132a8613f15613f0e61153c6276a70061146c6276a7006115368f6135ee565b8a90613538565b8790613595565b6002860155613f2d61398c876135ee565b6003860180546bffffffffffffffffffffffff19166001600160601b0392909216919091179055613f5d866135ee565b600186015560045485555b5050600101613bae565b505b505b600160096000613f8a600161146c876135ee565b81526020810191909152604001600020805460ff1916911515919091179055613fe1565b613fdb613fd06005600060066139de600160075461353890919063ffffffff16565b600283015490612abc565b60028201555b600454905550565b6002546040805163184a263160e11b8152905161402f926001600160a01b0316916330944c62916004808301926020929190829003018186803b15801561099457600080fd5b816001600160a01b0316637519ab506040518163ffffffff1660e01b815260040160206040518083038186803b15801561406857600080fd5b505afa15801561407c573d6000803e3d6000fd5b505050506040513d602081101561409257600080fd5b505115610a45576140d5826001600160a01b0316637519ab506040518163ffffffff1660e01b815260040160206040518083038186803b15801561163357600080fd5b6140de426135ee565b14156141d75761419f614160614159846001600160a01b0316637519ab506040518163ffffffff1660e01b815260040160206040518083038186803b15801561412657600080fd5b505afa15801561413a573d6000803e3d6000fd5b505050506040513d602081101561415057600080fd5b50514290613538565b8390613595565b6001600160a01b0384166000908152600a6020526040812090614182426135ee565b815260200190815260200160002054612abc90919063ffffffff16565b6001600160a01b0383166000908152600a60205260408120906141c1426135ee565b8152602081019190915260400160002055610a45565b600080614248846001600160a01b0316637519ab506040518163ffffffff1660e01b815260040160206040518083038186803b15801561421657600080fd5b505afa15801561422a573d6000803e3d6000fd5b505050506040513d602081101561424057600080fd5b505142613281565b915091506000614291836132a8613f15886001600160a01b0316637519ab506040518163ffffffff1660e01b815260040160206040518083038186803b15801561412657600080fd5b905060005b6142a1846001613538565b811161430c576001600160a01b0386166000908152600a602052604081206142d0918491906141828786612abc565b6001600160a01b0387166000908152600a60205260408120906142f38685612abc565b8152602081019190915260400160002055600101614296565b505050505050565b60008060008060008590506000816001600160a01b03166303976e386040518163ffffffff1660e01b815260040160206040518083038186803b15801561435a57600080fd5b505afa15801561436e573d6000803e3d6000fd5b505050506040513d602081101561438457600080fd5b50516040805163d3406abd60e01b815290519192506000916144aa91614471916001600160a01b0387169163d3406abd916004808301926020929190829003018186803b1580156143d457600080fd5b505afa1580156143e8573d6000803e3d6000fd5b505050506040513d60208110156143fe57600080fd5b50516040805162f376cb60e21b815290516001600160a01b038816916303cddb2c916004808301926020929190829003018186803b15801561443f57600080fd5b505afa158015614453573d6000803e3d6000fd5b505050506040513d602081101561446957600080fd5b505190613645565b846001600160a01b03166303cddb2c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561159557600080fd5b90506000836001600160a01b03166303cddb2c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156144e757600080fd5b505afa1580156144fb573d6000803e3d6000fd5b505050506040513d602081101561451157600080fd5b50519050600080808084871180156145295750858710155b15614552576001935083925061453f8786613538565b915061454b8787613538565b90506145b7565b84871015801561456157508587105b156145845760019350600092506145788786613538565b915061454b8688613538565b848710801561459257508587105b156145b757600093508392506145a88588613538565b91506145b48688613538565b90505b929a50985096509450505050509193509193565b6000670de0b6b3a76400006145e08484613595565b816145e757fe5b049392505050565b6000808790506000816001600160a01b0316636db40dc26040518163ffffffff1660e01b815260040160206040518083038186803b15801561463057600080fd5b505afa158015614644573d6000803e3d6000fd5b505050506040513d602081101561465a57600080fd5b50516040805163d3406abd60e01b815290519192506000918291829161475291614719916001600160a01b0389169163d3406abd916004808301926020929190829003018186803b1580156146ae57600080fd5b505afa1580156146c2573d6000803e3d6000fd5b505050506040513d60208110156146d857600080fd5b50516040805162f376cb60e21b815290516001600160a01b038a16916303cddb2c916004808301926020929190829003018186803b15801561443f57600080fd5b866001600160a01b03166303cddb2c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561159557600080fd5b90508a6001600160a01b0316856001600160a01b0316631fe4a6866040518163ffffffff1660e01b815260040160206040518083038186803b15801561479757600080fd5b505afa1580156147ab573d6000803e3d6000fd5b505050506040513d60208110156147c157600080fd5b50516001600160a01b031614156148f7576147fc847f00000000000000000000000000000000000000000000000000000000000000006145cb565b925060018a151514801561481257506001881515145b1561488757614822836002613595565b915061487461486d614866876001600160a01b03166303976e386040518163ffffffff1660e01b815260040160206040518083038186803b15801561293a57600080fd5b8590613645565b8490612abc565b925081831115614882578192505b614905565b60018a1515148015614897575087155b156148f7576148f06118916148e96148e284896001600160a01b03166303976e386040518163ffffffff1660e01b815260040160206040518083038186803b158015611b5357600080fd5b8690613645565b8590613538565b9250614905565b60009550505050505061490d565b509093505050505b9695505050505050565b60008481600185151514156149d657856001600160a01b0316826001600160a01b0316631fe4a6866040518163ffffffff1660e01b815260040160206040518083038186803b15801561496957600080fd5b505afa15801561497d573d6000803e3d6000fd5b505050506040513d602081101561499357600080fd5b50516001600160a01b031614156149d1576149ce847f00000000000000000000000000000000000000000000000000000000000000006145cb565b90505b61490d565b5060009695505050505050565b6000808790506000816001600160a01b0316636db40dc26040518163ffffffff1660e01b815260040160206040518083038186803b158015614a2457600080fd5b505afa158015614a38573d6000803e3d6000fd5b505050506040513d6020811015614a4e57600080fd5b5051604080517f950c78220000000000000000000000000000000000000000000000000000000081526001600160a01b038b8116600483015291519293506000929185169163950c782291602480820192602092909190829003018186803b158015614ab957600080fd5b505afa158015614acd573d6000803e3d6000fd5b505050506040513d6020811015614ae357600080fd5b50516040805163d3406abd60e01b815290519192506000918291614b3691614719916001600160a01b0389169163d3406abd91600480820192602092909190829003018186803b1580156146ae57600080fd5b905060008084138015614b4b575060018b1515145b8015614b5957506001891515145b15614c0157614bfa614bd0876001600160a01b031663d40244cb6040518163ffffffff1660e01b815260040160206040518083038186803b158015614b9d57600080fd5b505afa158015614bb1573d6000803e3d6000fd5b505050506040513d6020811015614bc757600080fd5b5051869061362d565b611a73877f00000000000000000000000000000000000000000000000000000000000000006145cb565b9050614d76565b600084138015614c13575060018b1515145b8015614c1d575088155b15614c8157614c61614bd0876001600160a01b031663d40244cb6040518163ffffffff1660e01b815260040160206040518083038186803b158015614b9d57600080fd5b9050614bfa614c7a614c738a8561362d565b8390613645565b8290613538565b600084138015614c8f57508a155b15614c9c57506000614d76565b600084128015614caa575088155b15614d5b57614d23614bd0876001600160a01b031663449b98266040518163ffffffff1660e01b815260040160206040518083038186803b158015614cee57600080fd5b505afa158015614d02573d6000803e3d6000fd5b505050506040513d6020811015614d1857600080fd5b50516118af876153f6565b9050614d30816002613595565b9250614d49614d42614c738a8561362d565b8290612abc565b905082811115614d565750815b614d76565b600084128015614d6d57506001891515145b15614d76575060005b9c9b505050505050505050505050565b600080879050600080826001600160a01b031663950c78228a6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015614ddc57600080fd5b505afa158015614df0573d6000803e3d6000fd5b505050506040513d6020811015614e0657600080fd5b5051905060018815151415614f8d576000811315614ebb57614eb4836001600160a01b031663d40244cb6040518163ffffffff1660e01b815260040160206040518083038186803b158015614e5a57600080fd5b505afa158015614e6e573d6000803e3d6000fd5b505050506040513d6020811015614e8457600080fd5b50516118af83611a738b7f00000000000000000000000000000000000000000000000000000000000000006145cb565b9150614f88565b600081128015614ec9575085155b15614f6c57614eb4836001600160a01b031663449b98266040518163ffffffff1660e01b815260040160206040518083038186803b158015614f0a57600080fd5b505afa158015614f1e573d6000803e3d6000fd5b505050506040513d6020811015614f3457600080fd5b50516118af614f42846153f6565b611a738b7f00000000000000000000000000000000000000000000000000000000000000006145cb565b600081128015614f7e57506001861515145b15614f8857600091505b614f92565b600091505b5098975050505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612cce90849061540d565b6000807349120d18951D4bA76Fc113A75bF5959a3261e68363907af6c06040518163ffffffff1660e01b815260040160206040518083038186803b15801561506657600080fd5b505af415801561507a573d6000803e3d6000fd5b505050506040513d602081101561509057600080fd5b505190505b8215612b165760028306156150b1576150ae81856145cb565b90505b6150bb84806145cb565b9350600283049250615095565b6001600160a01b038085166000908152600b6020908152604080832093871683529290529081206002810180548392918391615105906001613538565b8154811061510f57fe5b9060005260206000200154905060008260020160008154811061512e57fe5b906000526020600020015490508582118061514857508681105b156151ea5760005b6002840154615160906001613538565b81116151e8578684600201828154811061517657fe5b9060005260206000200154116151a35783600201818154811061519557fe5b906000526020600020015492505b878460020182815481106151b357fe5b9060005260206000200154116151e0578360020181815481106151d257fe5b906000526020600020015491505b600101615150565b505b9890975095505050505050565b6001600160a01b0383166000908152600e60205260408120548190819061521f906001613538565b6001600160a01b0387166000908152600e60205260408120805492935090918390811061524857fe5b906000526020600020015490506000600e6000896001600160a01b03166001600160a01b0316815260200190815260200160002060008154811061528857fe5b90600052602060002001549050858211806152a257508681105b156153035760005b838111615301576001600160a01b0389166000908152600e602052604081208054839081106152d557fe5b906000526020600020015490508781116152ed578093505b8881116152f8578092505b506001016152aa565b505b97909650945050505050565b600081615363576040805162461bcd60e51b815260206004820152601060248201527f43616e7420646976696465206279203000000000000000000000000000000000604482015290519081900360640190fd5b60008311615372576000612b16565b612b166001615391846132a88361146c89670de0b6b3a7640000613595565b90612abc565b60008082116153ed576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816145e757fe5b6000808212156154095781600003610eb8565b5090565b6000615462826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166154be9092919063ffffffff16565b805190915015612cce5780806020019051602081101561548157600080fd5b5051612cce5760405162461bcd60e51b815260040180806020018281038252602a8152602001806156cd602a913960400191505060405180910390fd5b6060610ed18484600085856154d2856155e3565b615523576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106155615780518252601f199092019160209182019101615542565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146155c3576040519150601f19603f3d011682016040523d82523d6000602084013e6155c8565b606091505b50915091506155d88282866155e9565b979650505050505050565b3b151590565b606083156155f8575081613626565b8251156156085782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315612b7f578181015183820152602001612b67565b508054600082559060005260206000209081019061566d9190615670565b50565b5b80821115615409576000815560010161567156fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220fa1536fac863caf770ca9d03a3e48a36c4e3b6371eff3f7d616b6ffe30361d3a64736f6c63430007060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102c85760003560e01c8063908589441161017b578063df14e06f116100d8578063f5750d0f1161008c578063f77c479111610071578063f77c4791146107b5578063fa51a34b146107bd578063fd9ff86c146107c5576102c8565b8063f5750d0f1461076c578063f6c8d7b514610789576102c8565b8063f1068454116100bd578063f106845414610712578063f1ed38611461071a578063f2fde38b14610746576102c8565b8063df14e06f146106de578063e5cab4fa1461070a576102c8565b8063d60913ce1161012f578063db4b3af511610114578063db4b3af5146106a8578063dc178712146106ce578063ddaa26ad146106d6576102c8565b8063d60913ce14610654578063da17a6ca146106a0576102c8565b8063a675004711610160578063a675004714610612578063a70b9f0c1461062f578063cf14938714610637576102c8565b806390858944146105e45780639de9a052146105ec576102c8565b80636bf15bbd1161022957806378769678116101dd57806379fc904f116101c257806379fc904f146105cc5780638cb8c855146105d45780638da5cb5b146105dc576102c8565b8063787696781461059357806379102629146105c4576102c8565b8063715018a61161020e578063715018a61461051657806373a9fd9f1461051e5780637602bdde14610557576102c8565b80636bf15bbd146104d95780636e570b591461050e576102c8565b80632db4b3a711610280578063551bf81611610265578063551bf8161461040357806356773b791461040b57806369795e931461042f576102c8565b80632db4b3a7146103a25780633c0deba4146103e6576102c8565b80630fa454cf116102b15780630fa454cf1461032f5780631de40e491461034e5780632544dc1814610356576102c8565b806308c6850f146102cd5780630bb6d20814610315575b600080fd5b6102ea600480360360208110156102e357600080fd5b50356107f1565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b61031d610820565b60408051918252519081900360200190f35b61034c6004803603602081101561034557600080fd5b5035610844565b005b61031d610a49565b6103736004803603602081101561036c57600080fd5b5035610a55565b604080519485526020850193909352838301919091526001600160601b03166060830152519081900360800190f35b61034c600480360360a08110156103b857600080fd5b506001600160a01b038135811691602081013590911690604081013590606081013515159060800135610a86565b610373600480360360208110156103fc57600080fd5b5035610c24565b61031d610c54565b610413610c78565b604080516001600160a01b039092168252519081900360200190f35b6104b86004803603606081101561044557600080fd5b6001600160a01b03823581169260208101359091169181019060608101604082013564010000000081111561047957600080fd5b82018360208201111561048b57600080fd5b803590602001918460208302840111640100000000831117156104ad57600080fd5b509092509050610c87565b604080519283526001600160601b0390911660208301528051918290030190f35b61034c600480360360408110156104ef57600080fd5b5080356001600160a01b031690602001356001600160601b0316610d38565b61031d610dd4565b61034c610de2565b61053b6004803603602081101561053457600080fd5b5035610ead565b604080516001600160601b039092168252519081900360200190f35b61031d6004803603608081101561056d57600080fd5b506001600160a01b03813581169160208101359091169060408101359060600135610ec0565b6105b0600480360360208110156105a957600080fd5b5035610ed9565b604080519115158252519081900360200190f35b61031d610eee565b61034c610f12565b61031d610f85565b610413610fa9565b61031d610fb8565b61053b6004803603602081101561060257600080fd5b50356001600160a01b0316610fdc565b61031d6004803603602081101561062857600080fd5b5035611bf7565b61031d611c18565b6102ea6004803603602081101561064d57600080fd5b5035611c1f565b6106826004803603604081101561066a57600080fd5b506001600160a01b0381358116916020013516611c4e565b60408051938452602084019290925282820152519081900360600190f35b61031d611c7a565b61031d600480360360208110156106be57600080fd5b50356001600160a01b0316611c9e565b61031d611cb0565b61031d611cd4565b61034c600480360360408110156106f457600080fd5b506001600160a01b038135169060200135611cda565b61031d611e0c565b61031d611e12565b61031d6004803603604081101561073057600080fd5b506001600160a01b038135169060200135611e18565b61034c6004803603602081101561075c57600080fd5b50356001600160a01b0316611e49565b61034c6004803603602081101561078257600080fd5b5035611f6a565b61031d6004803603604081101561079f57600080fd5b506001600160a01b03813516906020013561207c565b610413612099565b61031d6120a8565b610682600480360360408110156107db57600080fd5b506001600160a01b0381351690602001356120cc565b600560205260009081526040902080546001820154600283015460038401546004909401549293919290919085565b7f000000000000000000000000000000000000000000000000000000000000000081565b60025460408051630ad7511760e31b8152905161094e926001600160a01b0316916313bc6d4b9133916356ba88b8916004808301926020929190829003018186803b15801561089257600080fd5b505afa1580156108a6573d6000803e3d6000fd5b505050506040513d60208110156108bc57600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b039092166004830152516024808301926020929190829003018186803b15801561091b57600080fd5b505afa15801561092f573d6000803e3d6000fd5b505050506040513d602081101561094557600080fd5b505160146120f8565b6002546040805163184a263160e11b815290516109c7926001600160a01b0316916330944c62916004808301926020929190829003018186803b15801561099457600080fd5b505afa1580156109a8573d6000803e3d6000fd5b505050506040513d60208110156109be57600080fd5b505160456120f8565b6000339050600154816001600160a01b0316636db9cc996040518163ffffffff1660e01b815260040160206040518083038186803b158015610a0857600080fd5b505afa158015610a1c573d6000803e3d6000fd5b505050506040513d6020811015610a3257600080fd5b505110610a4557610a4581836001612106565b5050565b6701aa535d3d0c000081565b600090815260086020526040902080546001820154600283015460039093015491939092916001600160601b031690565b848180151580610aae57506001600160a01b0382166000908152600f60205260409020546001105b15610bbd57600254604080516313bc6d4b60e01b81526001600160a01b0385811660048301529151610b389392909216916313bc6d4b91602480820192602092909190829003018186803b158015610b0557600080fd5b505afa158015610b19573d6000803e3d6000fd5b505050506040513d6020811015610b2f57600080fd5b505160486120f8565b6002546040805163364d118160e01b81526001600160a01b0385811660048301529151610bbd93929092169163364d118191602480820192602092909190829003018186803b158015610b8a57600080fd5b505afa158015610b9e573d6000803e3d6000fd5b505050506040513d6020811015610bb457600080fd5b505160236120f8565b610bd3336001600160a01b0384161460236120f8565b610c0f826001600160a01b03166302fb0c5e6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b8a57600080fd5b610c1b878787876122cb565b50505050505050565b6008602052600090815260409020805460018201546002830154600390930154919290916001600160601b031684565b7f000000000000000000000000000000000000000000000000000000000000000081565b6003546001600160a01b031681565b60008060008060005b85811015610ce857600080610cc18b8a8a86818110610cab57fe5b905060200201356001600160a01b03168c6124e8565b9092509050610cd08583612abc565b9450610cdc8482612abc565b93505050600101610c90565b5081610d29826040518060400160405280600381526020017f5232380000000000000000000000000000000000000000000000000000000000815250612b1f565b93509350505094509492505050565b6002546040805163184a263160e11b81529051610d7e926001600160a01b0316916330944c62916004808301926020929190829003018186803b15801561099457600080fd5b600254604080516313bc6d4b60e01b81523360048201529051610dca926001600160a01b0316916313bc6d4b916024808301926020929190829003018186803b158015610b0557600080fd5b610a458282612bc2565b690b581ceb141f05c1ae0081565b610dea612cd3565b6001600160a01b0316610dfb610fa9565b6001600160a01b031614610e56576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000610eb882612cd7565b90505b919050565b6000610ece85858585612dbf565b90505b949350505050565b60096020526000908152604090205460ff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b600254604080516313bc6d4b60e01b81523360048201529051610f5e926001600160a01b0316916313bc6d4b916024808301926020929190829003018186803b158015610b0557600080fd5b600254610f77906001600160a01b0316331460106120f8565b600154610f8357426001555b565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b031690565b7f000000000000000000000000000000000000000000000000000000000000000081565b600080829050611053816001600160a01b031663d0f9953e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561101e57600080fd5b505afa158015611032573d6000803e3d6000fd5b505050506040513d602081101561104857600080fd5b5051151560316120f8565b600154816001600160a01b0316636db9cc996040518163ffffffff1660e01b815260040160206040518083038186803b15801561108f57600080fd5b505afa1580156110a3573d6000803e3d6000fd5b505050506040513d60208110156110b957600080fd5b5051108015906110ca575060015415155b15611bed576000816001600160a01b0316636db40dc26040518163ffffffff1660e01b815260040160206040518083038186803b15801561110a57600080fd5b505afa15801561111e573d6000803e3d6000fd5b505050506040513d602081101561113457600080fd5b50519050801561117957611170816040518060400160405280601081526020016f6f766572666c6f77203936206269747360801b815250612b1f565b92505050610ebb565b600080611255846001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111b857600080fd5b505afa1580156111cc573d6000803e3d6000fd5b505050506040513d60208110156111e257600080fd5b50516040805163687cca9f60e11b815290516001600160a01b0388169163d0f9953e916004808301926020929190829003018186803b15801561122457600080fd5b505afa158015611238573d6000803e3d6000fd5b505050506040513d602081101561124e57600080fd5b5051613281565b915091506000600183116114805761126d87836132ff565b600083815260086020526040902060030154909150611299906001600160601b031682111560466120f8565b61147b6008600084815260200190815260200160002060020154611472876001600160a01b031663dbabf4f36040518163ffffffff1660e01b815260040160206040518083038186803b1580156112ef57600080fd5b505afa158015611303573d6000803e3d6000fd5b505050506040513d602081101561131957600080fd5b50516040805163412ef7ff60e11b8152905161146c91611401916001600160a01b038d169163825deffe916004808301926020929190829003018186803b15801561136357600080fd5b505afa158015611377573d6000803e3d6000fd5b505050506040513d602081101561138d57600080fd5b50516040805163687cca9f60e11b815290516001600160a01b038e169163d0f9953e916004808301926020929190829003018186803b1580156113cf57600080fd5b505afa1580156113e3573d6000803e3d6000fd5b505050506040513d60208110156113f957600080fd5b505190613538565b8a6001600160a01b03166303cddb2c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561143a57600080fd5b505afa15801561144e573d6000803e3d6000fd5b505050506040513d602081101561146457600080fd5b505190613595565b90613538565b111560476120f8565b611a90565b60008367ffffffffffffffff8111801561149957600080fd5b506040519080825280602002602001820160405280156114c3578160200160208202803683370190505b50905060008467ffffffffffffffff811180156114df57600080fd5b50604051908082528060200260200182016040528015611509578160200160208202803683370190505b50905060005b61151a866001613538565b8111611a8c57600061154561153c6276a7006115368986612abc565b90613595565b60015490612abc565b90506000670de0b6b3a76400009050816115c76276a7008c6001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561159557600080fd5b505afa1580156115a9573d6000803e3d6000fd5b505050506040513d60208110156115bf57600080fd5b505190612abc565b111561173b5761171e600a60008c6001600160a01b03166001600160a01b0316815260200190815260200160002060006116648d6001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561163357600080fd5b505afa158015611647573d6000803e3d6000fd5b505050506040513d602081101561165d57600080fd5b50516135ee565b81526020019081526020016000205461146c6116e58d6001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116b257600080fd5b505afa1580156116c6573d6000803e3d6000fd5b505050506040513d60208110156116dc57600080fd5b50518690613538565b8d6001600160a01b03166303cddb2c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561143a57600080fd5b85848151811061172a57fe5b602002602001018181525050611993565b611748826276a700613538565b8a6001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561178157600080fd5b505afa158015611795573d6000803e3d6000fd5b505050506040513d60208110156117ab57600080fd5b505110801561181d5750896001600160a01b031663d0f9953e6040518163ffffffff1660e01b815260040160206040518083038186803b1580156117ee57600080fd5b505afa158015611802573d6000803e3d6000fd5b505050506040513d602081101561181857600080fd5b505182105b1561187e576001600160a01b038a166000908152600a6020526040812061171e9161185361184e86623b5380613538565b6135ee565b815260208101919091526040016000205461146c6116e5611877866276a700613538565b8690613538565b6118b5611898611891846276a700613538565b8490613538565b6118af6118a8856276a700613538565b4290613538565b9061362d565b905061197a600a60008c6001600160a01b03166001600160a01b03168152602001908152602001600020600061191d8d6001600160a01b031663d0f9953e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561163357600080fd5b815260208101919091526040016000205461146c6116e5611941866276a700613538565b8e6001600160a01b031663d0f9953e6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113cf57600080fd5b85848151811061198657fe5b6020026020010181815250505b600860006119a18986612abc565b8152602001908152602001600020600201548484815181106119bf57fe5b6020026020010181815250506119ff8484815181106119da57fe5b60200260200101518685815181106119ee57fe5b6020026020010151111560476120f8565b611a80611a7982611a7360086000611a178d8a612abc565b815260208101919091526040016000206003015488516001600160601b0390911690611a73908a908a908110611a4957fe5b60200260200101518b8a81518110611a5d57fe5b602002602001015161362d90919063ffffffff16565b90613645565b8790612abc565b9550505060010161150f565b5050505b6000611b85866001600160a01b03166303cddb2c6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ace57600080fd5b505afa158015611ae2573d6000803e3d6000fd5b505050506040513d6020811015611af857600080fd5b5051604080517f03976e3800000000000000000000000000000000000000000000000000000000815290516001600160a01b038a16916303976e38916004808301926020929190829003018186803b158015611b5357600080fd5b505afa158015611b67573d6000803e3d6000fd5b505050506040513d6020811015611b7d57600080fd5b50519061362d565b9050671bc16d674ec80000811115611ba25750671bc16d674ec800005b611bac8282613645565b9150611be0826040518060400160405280601081526020016f6f766572666c6f77203936206269747360801b815250612b1f565b9650505050505050610ebb565b6000915050610ebb565b60068181548110611c0757600080fd5b600091825260209091200154905081565b6276a70081565b600090815260056020526040902080546001820154600283015460038401546004909401549294919390929091565b600b60209081526000928352604080842090915290825290208054600182015460039092015490919083565b7f000000000000000000000000000000000000000000000000000000000000000081565b600f6020526000908152604090205481565b7f000000000000000000000000000000000000000000000000000000000000000081565b60015481565b818180151580611d0257506001600160a01b0382166000908152600f60205260409020546001105b15611dab57600254604080516313bc6d4b60e01b81526001600160a01b0385811660048301529151611d599392909216916313bc6d4b91602480820192602092909190829003018186803b158015610b0557600080fd5b6002546040805163364d118160e01b81526001600160a01b0385811660048301529151611dab93929092169163364d118191602480820192602092909190829003018186803b158015610b8a57600080fd5b611dc1336001600160a01b0384161460236120f8565b611dfd826001600160a01b03166302fb0c5e6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b8a57600080fd5b611e068461365d565b50505050565b60045481565b60075481565b600e6020528160005260406000208181548110611e3457600080fd5b90600052602060002001600091509150505481565b611e51612cd3565b6001600160a01b0316611e62610fa9565b6001600160a01b031614611ebd576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116611f025760405162461bcd60e51b81526004018080602001828103825260268152602001806156866026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60025460408051630ad7511760e31b81529051611fb8926001600160a01b0316916313bc6d4b9133916356ba88b8916004808301926020929190829003018186803b15801561089257600080fd5b6002546040805163184a263160e11b81529051611ffe926001600160a01b0316916330944c62916004808301926020929190829003018186803b15801561099457600080fd5b6000339050600154816001600160a01b0316636db9cc996040518163ffffffff1660e01b815260040160206040518083038186803b15801561203f57600080fd5b505afa158015612053573d6000803e3d6000fd5b505050506040513d602081101561206957600080fd5b505110610a4557610a4581836000612106565b600a60209081526000928352604080842090915290825290205481565b6002546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b600d60209081526000928352604080842090915290825290208054600182015460029092015490919083565b81610a4557610a4581613882565b426000908152600560205260409020839082612131576004546121299085613538565b600455612142565b60045461213e9085612abc565b6004555b60045481554260018201819055612158906135ee565b6002820155600754600382018190556121775760006004820155612270565b61226a612219600560006006612199600160075461353890919063ffffffff16565b815481106121a357fe5b90600052602060002001548152602001908152602001600020600001546115366005600060066121df600160075461353890919063ffffffff16565b815481106121e957fe5b9060005260206000200154815260200190815260200160002060010154856001015461353890919063ffffffff16565b600560006006612235600160075461353890919063ffffffff16565b8154811061223f57fe5b9060005260206000200154815260200190815260200160002060040154612abc90919063ffffffff16565b60048201555b60068054600181018255600091909152427ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f9091018190556122b1906138d5565b6122bb8285613fe9565b5050600780546001019055505050565b6001600160a01b038085166000818152600b602090815260408083209488168084529482529182902082516370a0823160e01b81526004810195909552915191936370a082319260248083019392829003018186803b15801561232d57600080fd5b505afa158015612341573d6000803e3d6000fd5b505050506040513d602081101561235757600080fd5b5051426000818152600484016020526040902091825560018201556003820154600290910181905561239d574260009081526004820160205260408120600301556123f6565b805460008181526004830160205260409020546123e0916123c49190611536904290613538565b8254600090815260048401602052604090206003015490612abc565b4260009081526004830160205260409020600301555b600182151514156124245782158061241057506001810154155b1561241c574260018201555b4281556124bb565b846001600160a01b03166370a08231856040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561247157600080fd5b505afa158015612485573d6000803e3d6000fd5b505050506040513d602081101561249b57600080fd5b50516124bb576000808255600182018190556124bb90600283019061564f565b60028101805460018181018355600092835260209092204291015560039091018054909101905550505050565b6000806000849050612573866001600160a01b0316826001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b15801561253657600080fd5b505afa15801561254a573d6000803e3d6000fd5b505050506040513d602081101561256057600080fd5b50516001600160a01b03161460496120f8565b60008060008060008061258587614314565b93509350935093506000808d6001600160a01b0316633d8270f58d6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060c06040518083038186803b1580156125dd57600080fd5b505afa1580156125f1573d6000803e3d6000fd5b505050506040513d60c081101561260757600080fd5b50602080820151604092830151835163687cca9f60e11b81529351919550935083926001600160a01b038d169263d0f9953e92600480840193829003018186803b15801561265457600080fd5b505afa158015612668573d6000803e3d6000fd5b505050506040513d602081101561267e57600080fd5b50511180156126f1575081896001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b1580156126c257600080fd5b505afa1580156126d6573d6000803e3d6000fd5b505050506040513d60208110156126ec57600080fd5b505110155b801561277257508d6001600160a01b0316896001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b15801561273b57600080fd5b505afa15801561274f573d6000803e3d6000fd5b505050506040513d602081101561276557600080fd5b50516001600160a01b0316145b15612aa857600061285c8f8e8c6001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b1580156127b757600080fd5b505afa1580156127cb573d6000803e3d6000fd5b505050506040513d60208110156127e157600080fd5b81019080805190602001909291905050508d6001600160a01b031663d0f9953e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561282b57600080fd5b505afa15801561283f573d6000803e3d6000fd5b505050506040513d602081101561285557600080fd5b5051612dbf565b9050600187151514156128a05761289d612896877f00000000000000000000000000000000000000000000000000000000000000006145cb565b8790613538565b95505b6128b86128b18b8f8a8a8a8a6145ef565b8990612abc565b97506128d06128c98b8f8a8a614917565b8a90612abc565b98506128e36128b18b8f8a8a8a8a6149e3565b97506128f66128c98b8f8a8a8a8a614d86565b98506129fc6128b161296d8c6001600160a01b03166303cddb2c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561293a57600080fd5b505afa15801561294e573d6000803e3d6000fd5b505050506040513d602081101561296457600080fd5b5051849061362d565b611a737f00000000000000000000000000000000000000000000000000000000000000008e6001600160a01b0316636db40dc26040518163ffffffff1660e01b815260040160206040518083038186803b1580156129ca57600080fd5b505afa1580156129de573d6000803e3d6000fd5b505050506040513d60208110156129f457600080fd5b5051906145cb565b97508e6001600160a01b03166302d05d3f6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a3757600080fd5b505afa158015612a4b573d6000803e3d6000fd5b505050506040513d6020811015612a6157600080fd5b50516001600160a01b038e811691161415612aa657612aa36128b1897f00000000000000000000000000000000000000000000000000000000000000006145cb565b97505b505b50959c949b50939950505050505050505050565b600082820183811015612b16576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b6000816c010000000000000000000000008410612bba5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612b7f578181015183820152602001612b67565b50505050905090810190601f168015612bac5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b509192915050565b6002546040805163184a263160e11b81529051612c08926001600160a01b0316916330944c62916004808301926020929190829003018186803b15801561099457600080fd5b600354604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015612c5357600080fd5b505afa158015612c67573d6000803e3d6000fd5b505050506040513d6020811015612c7d57600080fd5b505190506001600160601b038216811015612cae57600354612ca9906001600160a01b03168483614f9f565b612cce565b600354612cce906001600160a01b0316846001600160601b038516614f9f565b505050565b3390565b6000612ce86001831015604a6120f8565b6102018210612cf957506000610ebb565b6000612d73612d09846001613538565b612d6d6701aa535d3d0c000073__$cd00f7bc85cfd34feb4171d2d22c665f63$__63907af6c06040518163ffffffff1660e01b815260040160206040518083038186803b158015612d5957600080fd5b505af41580156115a9573d6000803e3d6000fd5b9061501f565b90506000612d8b690b581ceb141f05c1ae008361362d565b9050611170816040518060400160405280601081526020016f6f766572666c6f77203936206269747360801b815250612b1f565b6000612e3f856001600160a01b031663cb12233b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612dfd57600080fd5b505afa158015612e11573d6000803e3d6000fd5b505050506040513d6020811015612e2757600080fd5b50518310801590612e385750838310155b60416120f8565b6001600160a01b038086166000818152600b60209081526040808320948916808452948252808320938352600c825280832094835293815290839020835160808101855281548152600180830154938201939093526002820154948101949094526003015460608401528101549091901580612ebe5750838260010154115b15612ece57600092505050610ed1565b866001600160a01b031663cb12233b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612f0757600080fd5b505afa158015612f1b573d6000803e3d6000fd5b505050506040513d6020811015612f3157600080fd5b50518511612fa157866001600160a01b031663cb12233b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612f7257600080fd5b505afa158015612f86573d6000803e3d6000fd5b505050506040513d6020811015612f9c57600080fd5b505194505b612fad878787876150c8565b60208301528152612fbf8786866151f7565b6060830152604082015260208101518151612ff09110801590612e38575081606001518260400151111560416120f8565b60008082600001518710156130085760009150613075565b825187111561305c578251600090815260048501602052604090205483516130559161303991611536908b90613538565b8451600090815260048701602052604090206003015490612abc565b9150613075565b8251600090815260048501602052604090206003015491505b6001600160a01b0389166000908152600d602090815260408083208682018051855292529091205490516130e2916130b291611536908b90613538565b6001600160a01b038b166000908152600d6020908152604080832088820151845290915290206002015490612abc565b90506130f28183111560416120f8565b85871415613121578061310c576000945050505050610ed1565b613116828261362d565b945050505050610ed1565b826020015186101561313a576000945050505050610ed1565b826020015186148015613151575060208301518351145b156131db576001600160a01b0389166000908152600d60209081526040808320606087018051855292529091205490516131cb91839161146c9161319a91611536908c90613538565b6001600160a01b038d166000908152600d6020908152604080832060608b0151845290915290206002015490612abc565b905061310c8183111560416120f8565b6132398261146c613219876004016000886020015181526020019081526020016000206000015461153688602001518c61353890919063ffffffff16565b602080880151600090815260048a01909152604090206003015490612abc565b6001600160a01b038a166000908152600d60209081526040808320606088018051855292529091205490519193506131cb91839161146c9161319a9190611536908c90613538565b600080806132ae670de0b6b3a76400006132a86276a7006132a2888a613538565b9061530f565b90615397565b905060006132da670de0b6b3a76400006132a86276a7006132a26001548b61353890919063ffffffff16565b90506132e7826001612abc565b6132f2826001612abc565b9350935050509250929050565b6000613352600260009054906101000a90046001600160a01b03166001600160a01b03166330944c626040518163ffffffff1660e01b815260040160206040518083038186803b15801561099457600080fd5b600083905060006134ae826001600160a01b031663dbabf4f36040518163ffffffff1660e01b815260040160206040518083038186803b15801561339557600080fd5b505afa1580156133a9573d6000803e3d6000fd5b505050506040513d60208110156133bf57600080fd5b50516040805163412ef7ff60e11b8152905161146c91613475916001600160a01b0388169163825deffe916004808301926020929190829003018186803b15801561340957600080fd5b505afa15801561341d573d6000803e3d6000fd5b505050506040513d602081101561343357600080fd5b50516040805163687cca9f60e11b815290516001600160a01b0389169163d0f9953e916004808301926020929190829003018186803b1580156113cf57600080fd5b856001600160a01b03166303cddb2c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561143a57600080fd5b905061352f6134bd4286613538565b6132a86134fd87866001600160a01b031663d0f9953e6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113cf57600080fd5b60008881526008602052604090206003810154600290910154611536916001600160601b031690611a7390889061362d565b95945050505050565b60008282111561358f576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000826135a457506000612b19565b828202828482816135b157fe5b0414612b165760405162461bcd60e51b81526004018080602001828103825260218152602001806156ac6021913960400191505060405180910390fd5b600080613619670de0b6b3a76400006132a86276a7006132a26001548861353890919063ffffffff16565b9050613626816001612abc565b9392505050565b6000612b16826132a885670de0b6b3a7640000613595565b6000612b16670de0b6b3a76400006132a88585613595565b6001600160a01b0381166000818152600d6020908152604080832042845282529182902082517f18160ddd00000000000000000000000000000000000000000000000000000000815292518594919391926318160ddd9260048082019391829003018186803b1580156136cf57600080fd5b505afa1580156136e3573d6000803e3d6000fd5b505050506040513d60208110156136f957600080fd5b505181554260018201556001600160a01b0383166000908152600f602052604090205461372c5760006002820155613840565b6001600160a01b0382166000908152600d60209081526040808320600e8352818420600f9093529083205461383a936137cb93909161376c906001613538565b8154811061377657fe5b600091825260208083209091015483528281019390935260409182018120546001600160a01b0388168252600d8452828220600e8552838320600f9095529282205490936115369392916121df906001613538565b6001600160a01b0384166000908152600d60209081526040808320600e8352818420600f9093529083205490929190613805906001613538565b8154811061380f57fe5b9060005260206000200154815260200190815260200160002060020154612abc90919063ffffffff16565b60028201555b506001600160a01b03166000818152600e6020908152604080832080546001818101835591855283852042910155938352600f90915290208054909101905550565b62461bcd60e51b6000908152602060045260076024526642414223000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b6002546040805163184a263160e11b8152905161391b926001600160a01b0316916330944c62916004808301926020929190829003018186803b15801561099457600080fd5b60006008600061392a846135ee565b815260200190815260200160002090506009600061394c600161146c866135ee565b815260208101919091526040016000205460ff16613fae5761396d826135ee565b60018201556007546139bd576000600282015561399161398c836135ee565b612cd7565b6003820180546bffffffffffffffffffffffff19166001600160601b0392909216919091179055613f76565b6000613a2a6005600060066139de600160075461353890919063ffffffff16565b815481106139e857fe5b9060005260206000200154815260200190815260200160002060040154600560008681526020019081526020016000206004015461353890919063ffffffff16565b9050613a3a600161146c856135ee565b600560006006613a56600160075461353890919063ffffffff16565b81548110613a6057fe5b90600052602060002001548152602001908152602001600020600201541415613bab57613b02613adb600560006006613aa5600160075461353890919063ffffffff16565b81548110613aaf57fe5b90600052602060002001548152602001908152602001600020600101548561353890919063ffffffff16565b6132a8613afb61289661153c6276a70061146c6276a7006115368c6135ee565b8490613595565b6002830155613b1361398c846135ee565b6003830180546bffffffffffffffffffffffff19166001600160601b03929092169190911790556002820154613b8090613b4e908390613538565b60086000613b60600161146c896135ee565b815260200190815260200160002060020154612abc90919063ffffffff16565b60086000613b92600161146c886135ee565b8152602081019190915260400160002060020155613f74565b60005b613bfd600560006006613bcd600160075461353890919063ffffffff16565b81548110613bd757fe5b906000526020600020015481526020019081526020016000206002015461146c866135ee565b8111613f7257600060086000613c2984600560006006613805600160075461353890919063ffffffff16565b815260200190815260200160002090506000613c6561153c6276a70061153686600560006006613805600160075461353890919063ffffffff16565b905082613d7a57613d31613d26613cc7600560006006613c91600160075461353890919063ffffffff16565b81548110613c9b57fe5b90600052602060002001548152602001908152602001600020600101548961353890919063ffffffff16565b6132a8613d1f600560006006613ce9600160075461353890919063ffffffff16565b81548110613cf357fe5b90600052602060002001548152602001908152602001600020600101548661353890919063ffffffff16565b8890613595565b600284015490612abc565b6002830155600754600590600090600690613d4d906001613538565b81548110613d5757fe5b600091825260208083209091015483528201929092526040019020548255613f68565b613dc9600560006006613d99600160075461353890919063ffffffff16565b81548110613da357fe5b906000526020600020015481526020019081526020016000206002015461146c886135ee565b831015613ecc57613e35613e28600560006006613df2600160075461353890919063ffffffff16565b81548110613dfc57fe5b90600052602060002001548152602001908152602001600020600101548861353890919063ffffffff16565b6132a8866276a700613595565b8260020181905550613e6061398c84600560006006613805600160075461353890919063ffffffff16565b8260030160006101000a8154816001600160601b0302191690836001600160601b03160217905550613ea883600560006006613805600160075461353890919063ffffffff16565b8260010181905550600560006006613d4d600160075461353890919063ffffffff16565b613f1c613eee600560006006613df2600160075461353890919063ffffffff16565b6132a8613f15613f0e61153c6276a70061146c6276a7006115368f6135ee565b8a90613538565b8790613595565b6002860155613f2d61398c876135ee565b6003860180546bffffffffffffffffffffffff19166001600160601b0392909216919091179055613f5d866135ee565b600186015560045485555b5050600101613bae565b505b505b600160096000613f8a600161146c876135ee565b81526020810191909152604001600020805460ff1916911515919091179055613fe1565b613fdb613fd06005600060066139de600160075461353890919063ffffffff16565b600283015490612abc565b60028201555b600454905550565b6002546040805163184a263160e11b8152905161402f926001600160a01b0316916330944c62916004808301926020929190829003018186803b15801561099457600080fd5b816001600160a01b0316637519ab506040518163ffffffff1660e01b815260040160206040518083038186803b15801561406857600080fd5b505afa15801561407c573d6000803e3d6000fd5b505050506040513d602081101561409257600080fd5b505115610a45576140d5826001600160a01b0316637519ab506040518163ffffffff1660e01b815260040160206040518083038186803b15801561163357600080fd5b6140de426135ee565b14156141d75761419f614160614159846001600160a01b0316637519ab506040518163ffffffff1660e01b815260040160206040518083038186803b15801561412657600080fd5b505afa15801561413a573d6000803e3d6000fd5b505050506040513d602081101561415057600080fd5b50514290613538565b8390613595565b6001600160a01b0384166000908152600a6020526040812090614182426135ee565b815260200190815260200160002054612abc90919063ffffffff16565b6001600160a01b0383166000908152600a60205260408120906141c1426135ee565b8152602081019190915260400160002055610a45565b600080614248846001600160a01b0316637519ab506040518163ffffffff1660e01b815260040160206040518083038186803b15801561421657600080fd5b505afa15801561422a573d6000803e3d6000fd5b505050506040513d602081101561424057600080fd5b505142613281565b915091506000614291836132a8613f15886001600160a01b0316637519ab506040518163ffffffff1660e01b815260040160206040518083038186803b15801561412657600080fd5b905060005b6142a1846001613538565b811161430c576001600160a01b0386166000908152600a602052604081206142d0918491906141828786612abc565b6001600160a01b0387166000908152600a60205260408120906142f38685612abc565b8152602081019190915260400160002055600101614296565b505050505050565b60008060008060008590506000816001600160a01b03166303976e386040518163ffffffff1660e01b815260040160206040518083038186803b15801561435a57600080fd5b505afa15801561436e573d6000803e3d6000fd5b505050506040513d602081101561438457600080fd5b50516040805163d3406abd60e01b815290519192506000916144aa91614471916001600160a01b0387169163d3406abd916004808301926020929190829003018186803b1580156143d457600080fd5b505afa1580156143e8573d6000803e3d6000fd5b505050506040513d60208110156143fe57600080fd5b50516040805162f376cb60e21b815290516001600160a01b038816916303cddb2c916004808301926020929190829003018186803b15801561443f57600080fd5b505afa158015614453573d6000803e3d6000fd5b505050506040513d602081101561446957600080fd5b505190613645565b846001600160a01b03166303cddb2c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561159557600080fd5b90506000836001600160a01b03166303cddb2c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156144e757600080fd5b505afa1580156144fb573d6000803e3d6000fd5b505050506040513d602081101561451157600080fd5b50519050600080808084871180156145295750858710155b15614552576001935083925061453f8786613538565b915061454b8787613538565b90506145b7565b84871015801561456157508587105b156145845760019350600092506145788786613538565b915061454b8688613538565b848710801561459257508587105b156145b757600093508392506145a88588613538565b91506145b48688613538565b90505b929a50985096509450505050509193509193565b6000670de0b6b3a76400006145e08484613595565b816145e757fe5b049392505050565b6000808790506000816001600160a01b0316636db40dc26040518163ffffffff1660e01b815260040160206040518083038186803b15801561463057600080fd5b505afa158015614644573d6000803e3d6000fd5b505050506040513d602081101561465a57600080fd5b50516040805163d3406abd60e01b815290519192506000918291829161475291614719916001600160a01b0389169163d3406abd916004808301926020929190829003018186803b1580156146ae57600080fd5b505afa1580156146c2573d6000803e3d6000fd5b505050506040513d60208110156146d857600080fd5b50516040805162f376cb60e21b815290516001600160a01b038a16916303cddb2c916004808301926020929190829003018186803b15801561443f57600080fd5b866001600160a01b03166303cddb2c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561159557600080fd5b90508a6001600160a01b0316856001600160a01b0316631fe4a6866040518163ffffffff1660e01b815260040160206040518083038186803b15801561479757600080fd5b505afa1580156147ab573d6000803e3d6000fd5b505050506040513d60208110156147c157600080fd5b50516001600160a01b031614156148f7576147fc847f00000000000000000000000000000000000000000000000000000000000000006145cb565b925060018a151514801561481257506001881515145b1561488757614822836002613595565b915061487461486d614866876001600160a01b03166303976e386040518163ffffffff1660e01b815260040160206040518083038186803b15801561293a57600080fd5b8590613645565b8490612abc565b925081831115614882578192505b614905565b60018a1515148015614897575087155b156148f7576148f06118916148e96148e284896001600160a01b03166303976e386040518163ffffffff1660e01b815260040160206040518083038186803b158015611b5357600080fd5b8690613645565b8590613538565b9250614905565b60009550505050505061490d565b509093505050505b9695505050505050565b60008481600185151514156149d657856001600160a01b0316826001600160a01b0316631fe4a6866040518163ffffffff1660e01b815260040160206040518083038186803b15801561496957600080fd5b505afa15801561497d573d6000803e3d6000fd5b505050506040513d602081101561499357600080fd5b50516001600160a01b031614156149d1576149ce847f00000000000000000000000000000000000000000000000000000000000000006145cb565b90505b61490d565b5060009695505050505050565b6000808790506000816001600160a01b0316636db40dc26040518163ffffffff1660e01b815260040160206040518083038186803b158015614a2457600080fd5b505afa158015614a38573d6000803e3d6000fd5b505050506040513d6020811015614a4e57600080fd5b5051604080517f950c78220000000000000000000000000000000000000000000000000000000081526001600160a01b038b8116600483015291519293506000929185169163950c782291602480820192602092909190829003018186803b158015614ab957600080fd5b505afa158015614acd573d6000803e3d6000fd5b505050506040513d6020811015614ae357600080fd5b50516040805163d3406abd60e01b815290519192506000918291614b3691614719916001600160a01b0389169163d3406abd91600480820192602092909190829003018186803b1580156146ae57600080fd5b905060008084138015614b4b575060018b1515145b8015614b5957506001891515145b15614c0157614bfa614bd0876001600160a01b031663d40244cb6040518163ffffffff1660e01b815260040160206040518083038186803b158015614b9d57600080fd5b505afa158015614bb1573d6000803e3d6000fd5b505050506040513d6020811015614bc757600080fd5b5051869061362d565b611a73877f00000000000000000000000000000000000000000000000000000000000000006145cb565b9050614d76565b600084138015614c13575060018b1515145b8015614c1d575088155b15614c8157614c61614bd0876001600160a01b031663d40244cb6040518163ffffffff1660e01b815260040160206040518083038186803b158015614b9d57600080fd5b9050614bfa614c7a614c738a8561362d565b8390613645565b8290613538565b600084138015614c8f57508a155b15614c9c57506000614d76565b600084128015614caa575088155b15614d5b57614d23614bd0876001600160a01b031663449b98266040518163ffffffff1660e01b815260040160206040518083038186803b158015614cee57600080fd5b505afa158015614d02573d6000803e3d6000fd5b505050506040513d6020811015614d1857600080fd5b50516118af876153f6565b9050614d30816002613595565b9250614d49614d42614c738a8561362d565b8290612abc565b905082811115614d565750815b614d76565b600084128015614d6d57506001891515145b15614d76575060005b9c9b505050505050505050505050565b600080879050600080826001600160a01b031663950c78228a6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015614ddc57600080fd5b505afa158015614df0573d6000803e3d6000fd5b505050506040513d6020811015614e0657600080fd5b5051905060018815151415614f8d576000811315614ebb57614eb4836001600160a01b031663d40244cb6040518163ffffffff1660e01b815260040160206040518083038186803b158015614e5a57600080fd5b505afa158015614e6e573d6000803e3d6000fd5b505050506040513d6020811015614e8457600080fd5b50516118af83611a738b7f00000000000000000000000000000000000000000000000000000000000000006145cb565b9150614f88565b600081128015614ec9575085155b15614f6c57614eb4836001600160a01b031663449b98266040518163ffffffff1660e01b815260040160206040518083038186803b158015614f0a57600080fd5b505afa158015614f1e573d6000803e3d6000fd5b505050506040513d6020811015614f3457600080fd5b50516118af614f42846153f6565b611a738b7f00000000000000000000000000000000000000000000000000000000000000006145cb565b600081128015614f7e57506001861515145b15614f8857600091505b614f92565b600091505b5098975050505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612cce90849061540d565b60008073__$cd00f7bc85cfd34feb4171d2d22c665f63$__63907af6c06040518163ffffffff1660e01b815260040160206040518083038186803b15801561506657600080fd5b505af415801561507a573d6000803e3d6000fd5b505050506040513d602081101561509057600080fd5b505190505b8215612b165760028306156150b1576150ae81856145cb565b90505b6150bb84806145cb565b9350600283049250615095565b6001600160a01b038085166000908152600b6020908152604080832093871683529290529081206002810180548392918391615105906001613538565b8154811061510f57fe5b9060005260206000200154905060008260020160008154811061512e57fe5b906000526020600020015490508582118061514857508681105b156151ea5760005b6002840154615160906001613538565b81116151e8578684600201828154811061517657fe5b9060005260206000200154116151a35783600201818154811061519557fe5b906000526020600020015492505b878460020182815481106151b357fe5b9060005260206000200154116151e0578360020181815481106151d257fe5b906000526020600020015491505b600101615150565b505b9890975095505050505050565b6001600160a01b0383166000908152600e60205260408120548190819061521f906001613538565b6001600160a01b0387166000908152600e60205260408120805492935090918390811061524857fe5b906000526020600020015490506000600e6000896001600160a01b03166001600160a01b0316815260200190815260200160002060008154811061528857fe5b90600052602060002001549050858211806152a257508681105b156153035760005b838111615301576001600160a01b0389166000908152600e602052604081208054839081106152d557fe5b906000526020600020015490508781116152ed578093505b8881116152f8578092505b506001016152aa565b505b97909650945050505050565b600081615363576040805162461bcd60e51b815260206004820152601060248201527f43616e7420646976696465206279203000000000000000000000000000000000604482015290519081900360640190fd5b60008311615372576000612b16565b612b166001615391846132a88361146c89670de0b6b3a7640000613595565b90612abc565b60008082116153ed576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816145e757fe5b6000808212156154095781600003610eb8565b5090565b6000615462826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166154be9092919063ffffffff16565b805190915015612cce5780806020019051602081101561548157600080fd5b5051612cce5760405162461bcd60e51b815260040180806020018281038252602a8152602001806156cd602a913960400191505060405180910390fd5b6060610ed18484600085856154d2856155e3565b615523576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106155615780518252601f199092019160209182019101615542565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146155c3576040519150601f19603f3d011682016040523d82523d6000602084013e6155c8565b606091505b50915091506155d88282866155e9565b979650505050505050565b3b151590565b606083156155f8575081613626565b8251156156085782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315612b7f578181015183820152602001612b67565b508054600082559060005260206000209081019061566d9190615670565b50565b5b80821115615409576000815560010161567156fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220fa1536fac863caf770ca9d03a3e48a36c4e3b6371eff3f7d616b6ffe30361d3a64736f6c63430007060033", + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract TimeLockedToken\",\"name\":\"_bablToken\",\"type\":\"address\"},{\"internalType\":\"contract IBabController\",\"name\":\"_controller\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BABL_LP_SHARE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BABL_STEWARD_SHARE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BABL_STRATEGIST_SHARE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"CREATOR_BONUS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DECAY_RATE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EPOCH_DURATION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PROFIT_LP_SHARE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PROFIT_PROTOCOL_FEE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PROFIT_STEWARD_SHARE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PROFIT_STRATEGIST_SHARE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"Q1_REWARDS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"START_TIME\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_capital\",\"type\":\"uint256\"}],\"name\":\"addProtocolPrincipal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"babltoken\",\"outputs\":[{\"internalType\":\"contract TimeLockedToken\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_time\",\"type\":\"uint256\"}],\"name\":\"checkProtocol\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quarterBelonging\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeListPointer\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"power\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_num\",\"type\":\"uint256\"}],\"name\":\"checkQuarter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"quarterPrincipal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quarterNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quarterPower\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"supplyPerQuarter\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"contributorPerGarden\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"lastDepositAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"initialDepositAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"contract IBabController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"gardenPid\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"gardenPowerByTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"power\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"gardenTimelist\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_from\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_to\",\"type\":\"uint256\"}],\"name\":\"getContributorPower\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"_finalizedStrategies\",\"type\":\"address[]\"}],\"name\":\"getRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"}],\"name\":\"getStrategyRewards\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"isProtocolPerQuarter\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pid\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"protocolPerQuarter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"quarterPrincipal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quarterNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quarterPower\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"supplyPerQuarter\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"protocolPerTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"quarterBelonging\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeListPointer\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"power\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"protocolPrincipal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"rewardsPowerOverhead\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_amount\",\"type\":\"uint96\"}],\"name\":\"sendTokensToContributor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_contributor\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_previousBalance\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_depositOrWithdraw\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"}],\"name\":\"setContributorTimestampParams\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startBABLRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_capital\",\"type\":\"uint256\"}],\"name\":\"substractProtocolPrincipal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"timeList\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_quarter\",\"type\":\"uint256\"}],\"name\":\"tokenSupplyPerQuarter\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"}],\"name\":\"updateGardenPower\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Rewards Distributor contract is a smart contract used to calculate and distribute all the BABL rewards of the BABL Mining Program along the time reserved for executed strategies. It implements a supply curve to distribute 500K BABL along the time. The supply curve is designed to optimize the long-term sustainability of the protocol. The rewards are front-loaded but they last for more than 10 years, slowly decreasing quarter by quarter. For that, it houses the state of the protocol power along the time as each strategy power is compared to the whole protocol usage. Rewards Distributor also is responsible for the calculation and delivery of other rewards as bonuses to specific profiles which are actively contributing to the protocol growth and their communities (Garden creators, Strategists and Stewards).\",\"kind\":\"dev\",\"methods\":{\"addProtocolPrincipal(uint256)\":{\"params\":{\"_capital\":\"Amount of capital in any type of asset to be normalized into DAI\"}},\"checkProtocol(uint256)\":{\"params\":{\"time\":\"Timestamp\"}},\"checkQuarter(uint256)\":{\"params\":{\"_num\":\"Number of quarter\"}},\"getContributorPower(address,address,uint256,uint256)\":{\"params\":{\"_contributor\":\"Address if the contributor\",\"_from\":\"Initial timestamp\",\"_garden\":\"Address of the garden where the contributor belongs to\",\"_to\":\"End timestamp\"},\"returns\":{\"_0\":\"uint256 Contributor power during that period\"}},\"getRewards(address,address,address[])\":{\"params\":{\"_contributor\":\"Address of the contributor to check\",\"_finalizedStrategies\":\"List of addresses of the finalized strategies to check\",\"_garden\":\"Garden to which the strategies and the user must belong to\"}},\"getStrategyRewards(address)\":{\"params\":{\"_strategy\":\"Strategy to check\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"sendTokensToContributor(address,uint96)\":{\"params\":{\"_amount\":\"Amount of tokens to send the address to\",\"_to\":\"Address to send the tokens to\"}},\"setContributorTimestampParams(address,address,uint256,bool,uint256)\":{\"params\":{\"_contributor\":\"Address of the contributor\",\"_depositOrWithdraw\":\"If the timestamp is a deposit (true) or a withdraw (false)\",\"_garden\":\"Address of the garden the contributor belongs to\",\"_pid\":\"The pid # of the Garden timestamps\",\"_previousBalance\":\"Previous balance of the contributor\"}},\"substractProtocolPrincipal(uint256)\":{\"params\":{\"_capital\":\"Amount of capital in any type of asset to be normalized into DAI\"}},\"tokenSupplyPerQuarter(uint256)\":{\"params\":{\"_quarter\":\"Number of the epoch (quarter)\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateGardenPower(address,uint256)\":{\"params\":{\"_garden\":\"Address of the garden\",\"_pid\":\"The pid # of the Garden timestamp\"}}},\"title\":\"Rewards Distributor implementing the BABL Mining Program and other Rewards to Strategists and Stewards\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addProtocolPrincipal(uint256)\":{\"notice\":\"Function that adds the capital received to the total principal of the protocol per timestamp\"},\"checkProtocol(uint256)\":{\"notice\":\"Check the protocol state in a certain timestamp\"},\"checkQuarter(uint256)\":{\"notice\":\"Check the quarter state for a specific quarter\"},\"getContributorPower(address,address,uint256,uint256)\":{\"notice\":\"Gets the contributor power from one timestamp to the other\"},\"getRewards(address,address,address[])\":{\"notice\":\"Calculates the profits and BABL that a contributor should receive from a series of finalized strategies\"},\"getStrategyRewards(address)\":{\"notice\":\"Gets the total amount of rewards for a given strategy\"},\"sendTokensToContributor(address,uint96)\":{\"notice\":\"Sends BABL tokens rewards to a contributor after a claim is requested to the protocol.\"},\"setContributorTimestampParams(address,address,uint256,bool,uint256)\":{\"notice\":\"Function that set each contributor timestamp per garden\"},\"startBABLRewards()\":{\"notice\":\"Starts BABL Rewards Mining Program from the controller.\"},\"substractProtocolPrincipal(uint256)\":{\"notice\":\"Function that removes the capital received to the total principal of the protocol per timestamp\"},\"tokenSupplyPerQuarter(uint256)\":{\"notice\":\"Calculates the BABL rewards supply for each quarter\"},\"updateGardenPower(address,uint256)\":{\"notice\":\"Function that set each garden timestamp\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/token/RewardsDistributor.sol\":\"RewardsDistributor\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () internal {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.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 using SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n // solhint-disable-next-line max-line-length\\n require((value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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 * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 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. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\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 { size := extcodesize(account) }\\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, \\\"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, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editGardenNFT(address _newGardenNFT) external;\\n\\n function editStrategyNFT(address _newStrategyNFT) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function editUniswapFactory(address _newUniswapFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\\n\\n function maxContributorsPerGarden() external view returns (uint256);\\n\\n function gardenCreationIsOpen() external view returns (bool);\\n\\n function openPublicGardenCreation() external;\\n\\n function setMaxContributorsPerGarden(uint256 _newMax) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function gardenNFT() external view returns (address);\\n\\n function strategyNFT() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\\n\\n function uniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0xdee5a27301c24f507d312f32249487fa9b0a756062a7e479405a1d1ee9ee7bb8\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function isGardenStrategy(address _strategy) external view returns (bool);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategyActiveInGarden(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to,\\n bool _withPenalty\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x88f1786ffee23e386aaa1735177912e1b5a7cdd440dafe52fb139fe50fd621b4\",\"license\":\"Apache License\"},\"contracts/interfaces/IPriceOracle.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol IPriceOracle)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPriceOracle\\n * @author Babylon Finance\\n *\\n * Interface for interacting with PriceOracle\\n */\\ninterface IPriceOracle {\\n /* ============ Functions ============ */\\n\\n function getPrice(address _assetOne, address _assetTwo) external view returns (uint256);\\n\\n function updateAdapters(address _assetOne, address _assetTwo) external;\\n}\\n\",\"keccak256\":\"0xa22e0e5e166f6f6714553b736ee921b916c37bc5b557042bf6042cc010d2a041\",\"license\":\"Apache License\"},\"contracts/interfaces/IRewardsDistributor.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IRewardsDistributor\\n * @author Babylon Finance\\n *\\n * Interface for the distribute rewards of the BABL Mining Program.\\n */\\n\\ninterface IRewardsDistributor {\\n // Structs\\n struct PrincipalPerTimestamp {\\n uint256 principal;\\n uint256 time;\\n uint256 timeListPointer;\\n }\\n\\n function protocolPrincipal() external view returns (uint256);\\n\\n function pid() external view returns (uint256);\\n\\n // solhint-disable-next-line\\n function EPOCH_DURATION() external pure returns (uint256);\\n\\n // solhint-disable-next-line\\n function START_TIME() external view returns (uint256);\\n\\n // solhint-disable-next-line\\n function Q1_REWARDS() external pure returns (uint256);\\n\\n // solhint-disable-next-line\\n function DECAY_RATE() external pure returns (uint256);\\n\\n function addProtocolPrincipal(uint256 _capital) external;\\n\\n function substractProtocolPrincipal(uint256 _capital) external;\\n\\n function getStrategyRewards(address _strategy) external returns (uint96);\\n\\n function sendTokensToContributor(address _to, uint96 _amount) external;\\n\\n function getRewards(\\n address _garden,\\n address _contributor,\\n address[] calldata _finalizedStrategies\\n ) external view returns (uint256, uint96);\\n\\n function getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) external view returns (uint256);\\n\\n /**\\n function getContributor(address _garden, address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256[] memory,\\n uint256\\n );\\n */\\n function updateGardenPower(address _garden, uint256 _pid) external;\\n\\n function setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw,\\n uint256 _pid\\n ) external;\\n\\n function tokenSupplyPerQuarter(uint256 quarter) external view returns (uint96);\\n\\n function checkProtocol(uint256 _time)\\n external\\n view\\n returns (\\n uint256 principal,\\n uint256 time,\\n uint256 quarterBelonging,\\n uint256 timeListPointer,\\n uint256 power\\n );\\n\\n function checkQuarter(uint256 _num)\\n external\\n view\\n returns (\\n uint256 quarterPrincipal,\\n uint256 quarterNumber,\\n uint256 quarterPower,\\n uint96 supplyPerQuarter\\n );\\n}\\n\",\"keccak256\":\"0xc68eb7826b0174d4f6dff50320abb2cd958a978d4537c57867dd828dc2798662\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n address,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x850597ec9a68eb86f31f13b6b77d3b31350b4ed3d0019dedfbd3550ad1a1d9e2\",\"license\":\"Apache License\"},\"contracts/interfaces/IVoteToken.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface IVoteToken {\\n function delegate(address delegatee) external;\\n\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n function getCurrentVotes(address account) external view returns (uint96);\\n\\n function getPriorVotes(address account, uint256 blockNumber) external view returns (uint96);\\n\\n function getMyDelegatee() external view returns (address);\\n\\n function getDelegatee(address account) external view returns (address);\\n\\n function getCheckpoints(address account, uint32 id) external view returns (uint32 fromBlock, uint96 votes);\\n\\n function getNumberOfCheckpoints(address account) external view returns (uint32);\\n}\\n\\ninterface IVoteTokenWithERC20 is IVoteToken, IERC20 {}\\n\",\"keccak256\":\"0xd3d6174f81ce2c1678a536b2a486179f9a5a694849b334556aeb155b9b13f777\",\"license\":\"Apache License\"},\"contracts/lib/AddressArrayUtils.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n/**\\n * @title AddressArrayUtils\\n * @author Set Protocol\\n *\\n * Utility functions to handle Address Arrays\\n */\\nlibrary AddressArrayUtils {\\n /**\\n * Finds the index of the first occurrence of the given element.\\n * @param A The input array to search\\n * @param a The value to find\\n * @return Returns (index and isIn) for the first occurrence starting from index 0\\n */\\n function indexOf(address[] memory A, address a) internal pure returns (uint256, bool) {\\n uint256 length = A.length;\\n for (uint256 i = 0; i < length; i++) {\\n if (A[i] == a) {\\n return (i, true);\\n }\\n }\\n return (uint256(-1), false);\\n }\\n\\n /**\\n * Returns true if the value is present in the list. Uses indexOf internally.\\n * @param A The input array to search\\n * @param a The value to find\\n * @return Returns isIn for the first occurrence starting from index 0\\n */\\n function contains(address[] memory A, address a) internal pure returns (bool) {\\n (, bool isIn) = indexOf(A, a);\\n return isIn;\\n }\\n\\n /**\\n * Returns true if there are 2 elements that are the same in an array\\n * @param A The input array to search\\n * @return Returns boolean for the first occurrence of a duplicate\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n require(A.length > 0, 'A is empty');\\n\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n address current = A[i];\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (current == A[j]) {\\n return true;\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @param A The input array to search\\n * @param a The address to remove\\n * @return Returns the array with the object removed.\\n */\\n function remove(address[] memory A, address a) internal pure returns (address[] memory) {\\n (uint256 index, bool isIn) = indexOf(A, a);\\n if (!isIn) {\\n revert('Address not in array.');\\n } else {\\n (address[] memory _A, ) = pop(A, index);\\n return _A;\\n }\\n }\\n\\n /**\\n * Removes specified index from array\\n * @param A The input array to search\\n * @param index The index to remove\\n * @return Returns the new array and the removed entry\\n */\\n function pop(address[] memory A, uint256 index) internal pure returns (address[] memory, address) {\\n uint256 length = A.length;\\n require(index < A.length, 'Index must be < A length');\\n address[] memory newAddresses = new address[](length - 1);\\n for (uint256 i = 0; i < index; i++) {\\n newAddresses[i] = A[i];\\n }\\n for (uint256 j = index + 1; j < length; j++) {\\n newAddresses[j - 1] = A[j];\\n }\\n return (newAddresses, A[index]);\\n }\\n\\n /**\\n * Returns the combination of the two arrays\\n * @param A The first array\\n * @param B The second array\\n * @return Returns A extended by B\\n */\\n function extend(address[] memory A, address[] memory B) internal pure returns (address[] memory) {\\n uint256 aLength = A.length;\\n uint256 bLength = B.length;\\n address[] memory newAddresses = new address[](aLength + bLength);\\n for (uint256 i = 0; i < aLength; i++) {\\n newAddresses[i] = A[i];\\n }\\n for (uint256 j = 0; j < bLength; j++) {\\n newAddresses[aLength + j] = B[j];\\n }\\n return newAddresses;\\n }\\n}\\n\",\"keccak256\":\"0x409127cd8cadb573e5de48fd992efbd8b0f1e243d235abc3c5f2fa873195c16a\",\"license\":\"Apache License\"},\"contracts/lib/BabylonErrors.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n// solhint-disable\\n\\n/**\\n * @notice Forked from https://github.com/balancer-labs/balancer-core-v2/blob/master/contracts/lib/helpers/BalancerErrors.sol\\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 // 'BAB#{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 \\\"BAB#\\\" part is a known constant\\n // (0x42414223): 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(0x42414223000000, 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 // Max deposit limit needs to be under the limit\\n uint256 internal constant MAX_DEPOSIT_LIMIT = 0;\\n // Creator needs to deposit\\n uint256 internal constant MIN_CONTRIBUTION = 1;\\n // Min Garden token supply >= 0\\n uint256 internal constant MIN_TOKEN_SUPPLY = 2;\\n // Deposit hardlock needs to be at least 1 block\\n uint256 internal constant DEPOSIT_HARDLOCK = 3;\\n // Needs to be at least the minimum\\n uint256 internal constant MIN_LIQUIDITY = 4;\\n // _reserveAssetQuantity is not equal to msg.value\\n uint256 internal constant MSG_VALUE_DO_NOT_MATCH = 5;\\n // Withdrawal amount has to be equal or less than msg.sender balance\\n uint256 internal constant MSG_SENDER_TOKENS_DO_NOT_MATCH = 6;\\n // Tokens are staked\\n uint256 internal constant TOKENS_STAKED = 7;\\n // Balance too low\\n uint256 internal constant BALANCE_TOO_LOW = 8;\\n // msg.sender doesn't have enough tokens\\n uint256 internal constant MSG_SENDER_TOKENS_TOO_LOW = 9;\\n // There is an open redemption window already\\n uint256 internal constant REDEMPTION_OPENED_ALREADY = 10;\\n // Cannot request twice in the same window\\n uint256 internal constant ALREADY_REQUESTED = 11;\\n // Rewards and profits already claimed\\n uint256 internal constant ALREADY_CLAIMED = 12;\\n // Value have to be greater than zero\\n uint256 internal constant GREATER_THAN_ZERO = 13;\\n // Must be reserve asset\\n uint256 internal constant MUST_BE_RESERVE_ASSET = 14;\\n // Only contributors allowed\\n uint256 internal constant ONLY_CONTRIBUTOR = 15;\\n // Only controller allowed\\n uint256 internal constant ONLY_CONTROLLER = 16;\\n // Only creator allowed\\n uint256 internal constant ONLY_CREATOR = 17;\\n // Only keeper allowed\\n uint256 internal constant ONLY_KEEPER = 18;\\n // Fee is too high\\n uint256 internal constant FEE_TOO_HIGH = 19;\\n // Only strategy allowed\\n uint256 internal constant ONLY_STRATEGY = 20;\\n // Only active allowed\\n uint256 internal constant ONLY_ACTIVE = 21;\\n // Only inactive allowed\\n uint256 internal constant ONLY_INACTIVE = 22;\\n // Address should be not zero address\\n uint256 internal constant ADDRESS_IS_ZERO = 23;\\n // Not within range\\n uint256 internal constant NOT_IN_RANGE = 24;\\n // Value is too low\\n uint256 internal constant VALUE_TOO_LOW = 25;\\n // Value is too high\\n uint256 internal constant VALUE_TOO_HIGH = 26;\\n // Only strategy or protocol allowed\\n uint256 internal constant ONLY_STRATEGY_OR_CONTROLLER = 27;\\n // Normal withdraw possible\\n uint256 internal constant NORMAL_WITHDRAWAL_POSSIBLE = 28;\\n // User does not have permissions to join garden\\n uint256 internal constant USER_CANNOT_JOIN = 29;\\n // User does not have permissions to add strategies in garden\\n uint256 internal constant USER_CANNOT_ADD_STRATEGIES = 30;\\n // Only Protocol or garden\\n uint256 internal constant ONLY_PROTOCOL_OR_GARDEN = 31;\\n // Only Strategist\\n uint256 internal constant ONLY_STRATEGIST = 32;\\n // Only Integration\\n uint256 internal constant ONLY_INTEGRATION = 33;\\n // Only garden and data not set\\n uint256 internal constant ONLY_GARDEN_AND_DATA_NOT_SET = 34;\\n // Only active garden\\n uint256 internal constant ONLY_ACTIVE_GARDEN = 35;\\n // Contract is not a garden\\n uint256 internal constant NOT_A_GARDEN = 36;\\n // Not enough tokens\\n uint256 internal constant STRATEGIST_TOKENS_TOO_LOW = 37;\\n // Stake is too low\\n uint256 internal constant STAKE_HAS_TO_AT_LEAST_ONE = 38;\\n // Duration must be in range\\n uint256 internal constant DURATION_MUST_BE_IN_RANGE = 39;\\n // Max Capital Requested\\n uint256 internal constant MAX_CAPITAL_REQUESTED = 41;\\n // Votes are already resolved\\n uint256 internal constant VOTES_ALREADY_RESOLVED = 42;\\n // Voting window is closed\\n uint256 internal constant VOTING_WINDOW_IS_OVER = 43;\\n // Strategy needs to be active\\n uint256 internal constant STRATEGY_NEEDS_TO_BE_ACTIVE = 44;\\n // Max capital reached\\n uint256 internal constant MAX_CAPITAL_REACHED = 45;\\n // Capital is less then rebalance\\n uint256 internal constant CAPITAL_IS_LESS_THAN_REBALANCE = 46;\\n // Strategy is in cooldown period\\n uint256 internal constant STRATEGY_IN_COOLDOWN = 47;\\n // Strategy is not executed\\n uint256 internal constant STRATEGY_IS_NOT_EXECUTED = 48;\\n // Strategy is not over yet\\n uint256 internal constant STRATEGY_IS_NOT_OVER_YET = 49;\\n // Strategy is already finalized\\n uint256 internal constant STRATEGY_IS_ALREADY_FINALIZED = 50;\\n // No capital to unwind\\n uint256 internal constant STRATEGY_NO_CAPITAL_TO_UNWIND = 51;\\n // Strategy needs to be inactive\\n uint256 internal constant STRATEGY_NEEDS_TO_BE_INACTIVE = 52;\\n // Duration needs to be less\\n uint256 internal constant DURATION_NEEDS_TO_BE_LESS = 53;\\n // Can't sweep reserve asset\\n uint256 internal constant CANNOT_SWEEP_RESERVE_ASSET = 54;\\n // Voting window is opened\\n uint256 internal constant VOTING_WINDOW_IS_OPENED = 55;\\n // Strategy is executed\\n uint256 internal constant STRATEGY_IS_EXECUTED = 56;\\n // Min Rebalance Capital\\n uint256 internal constant MIN_REBALANCE_CAPITAL = 57;\\n // Not a valid strategy NFT\\n uint256 internal constant NOT_STRATEGY_NFT = 58;\\n // Garden Transfers Disabled\\n uint256 internal constant GARDEN_TRANSFERS_DISABLED = 59;\\n // Tokens are hardlocked\\n uint256 internal constant TOKENS_HARDLOCKED = 60;\\n // Max contributors reached\\n uint256 internal constant MAX_CONTRIBUTORS = 61;\\n // BABL Transfers Disabled\\n uint256 internal constant BABL_TRANSFERS_DISABLED = 62;\\n // Strategy duration range error\\n uint256 internal constant DURATION_RANGE = 63;\\n // Checks the min amount of voters\\n uint256 internal constant MIN_VOTERS_CHECK = 64;\\n // Ge contributor power error\\n uint256 internal constant CONTRIBUTOR_POWER_CHECK_WINDOW = 65;\\n // Not enough reserve set aside\\n uint256 internal constant NOT_ENOUGH_RESERVE = 66;\\n // Garden is already public\\n uint256 internal constant GARDEN_ALREADY_PUBLIC = 67;\\n // Withdrawal with penalty\\n uint256 internal constant WITHDRAWAL_WITH_PENALTY = 68;\\n // Withdrawal with penalty\\n uint256 internal constant ONLY_MINING_ACTIVE = 69;\\n // Overflow in supply\\n uint256 internal constant OVERFLOW_IN_SUPPLY = 70;\\n // Overflow in power\\n uint256 internal constant OVERFLOW_IN_POWER = 71;\\n // Not a system contract\\n uint256 internal constant NOT_A_SYSTEM_CONTRACT = 72;\\n // Strategy vs Garden mismatch\\n uint256 internal constant STRATEGY_GARDEN_MISMATCH = 73;\\n // Minimum quarters is 1\\n uint256 internal constant QUARTERS_MIN_1 = 74;\\n // Too many strategy operations\\n uint256 internal constant TOO_MANY_OPS = 75;\\n // Only operations\\n uint256 internal constant ONLY_OPERATION = 76;\\n // Strat params wrong length\\n uint256 internal constant STRAT_PARAMS_LENGTH = 77;\\n // Garden params wrong length\\n uint256 internal constant GARDEN_PARAMS_LENGTH = 78;\\n // Token names too long\\n uint256 internal constant NAME_TOO_LONG = 79;\\n // Contributor power overflows over garden power\\n uint256 internal constant CONTRIBUTOR_POWER_OVERFLOW = 80;\\n // Contributor power window out of bounds\\n uint256 internal constant CONTRIBUTOR_POWER_CHECK_DEPOSITS = 81;\\n}\\n\",\"keccak256\":\"0x9c9c2ea9026fe9033762f7221e2d5a91ed6b5f64cc14558b89fbd975cfb2d7b7\",\"license\":\"Apache License\"},\"contracts/lib/Math.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n// Libraries\\nimport './SafeDecimalMath.sol';\\n\\n// https://docs.synthetix.io/contracts/source/libraries/math\\nlibrary Math {\\n using SafeMath for uint256;\\n using SafeDecimalMath for uint256;\\n\\n /**\\n * @dev Uses \\\"exponentiation by squaring\\\" algorithm where cost is 0(logN)\\n * vs 0(N) for naive repeated multiplication.\\n * Calculates x^n with x as fixed-point and n as regular unsigned int.\\n * Calculates to 18 digits of precision with SafeDecimalMath.unit()\\n */\\n function powDecimal(uint256 x, uint256 n) internal pure returns (uint256) {\\n // https://mpark.github.io/programming/2014/08/18/exponentiation-by-squaring/\\n\\n uint256 result = SafeDecimalMath.unit();\\n while (n > 0) {\\n if (n % 2 != 0) {\\n result = result.multiplyDecimal(x);\\n }\\n x = x.multiplyDecimal(x);\\n n /= 2;\\n }\\n return result;\\n }\\n\\n function abs(int256 x) internal pure returns (int256) {\\n return x >= 0 ? x : -x;\\n }\\n}\\n\",\"keccak256\":\"0xc2ff8055f98dd7253df98838d870391067d9c622a68f263c942616ca8122bd93\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"contracts/lib/Safe3296.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nlibrary Safe3296 {\\n using SafeMath for uint256;\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint32\\n *\\n * @dev internal function to convert from uint256 to uint32\\n */\\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\\n require(n < 2**32, errorMessage);\\n return uint32(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint96\\n *\\n * @dev internal function to convert from uint256 to uint96\\n */\\n function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) {\\n require(n < 2**96, errorMessage);\\n return uint96(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to add two uint96 numbers\\n *\\n * @dev internal safe math function to add two uint96 numbers\\n */\\n function add96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n uint96 c = a + b;\\n require(c >= a, errorMessage);\\n return c;\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to subtract two uint96 numbers\\n *\\n * @dev internal safe math function to subtract two uint96 numbers\\n */\\n function sub96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n}\\n\",\"keccak256\":\"0x9ebf0856ab07500c9a8250d1be4b578a3e0ff454da7de67e3ab5632a7e6903c3\",\"license\":\"Apache License\"},\"contracts/lib/SafeDecimalMath.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nlibrary SafeDecimalMath {\\n using SafeMath for uint256;\\n\\n /* Number of decimal places in the representations. */\\n uint8 public constant decimals = 18;\\n uint8 public constant highPrecisionDecimals = 27;\\n\\n /* The number representing 1.0. */\\n uint256 public constant UNIT = 10**uint256(decimals);\\n\\n /* The number representing 1.0 for higher fidelity numbers. */\\n uint256 public constant PRECISE_UNIT = 10**uint256(highPrecisionDecimals);\\n uint256 private constant UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR = 10**uint256(highPrecisionDecimals - decimals);\\n\\n /**\\n * @return Provides an interface to UNIT.\\n */\\n function unit() external pure returns (uint256) {\\n return UNIT;\\n }\\n\\n /**\\n * @return Provides an interface to PRECISE_UNIT.\\n */\\n function preciseUnit() external pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @return The result of multiplying x and y, interpreting the operands as fixed-point\\n * decimals.\\n *\\n * @dev A unit factor is divided out after the product of x and y is evaluated,\\n * so that product must be less than 2**256. As this is an integer division,\\n * the internal division always rounds down. This helps save on gas. Rounding\\n * is more expensive on gas.\\n */\\n function multiplyDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\\n /* Divide by UNIT to remove the extra factor introduced by the product. */\\n return x.mul(y) / UNIT;\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of the specified precision unit.\\n *\\n * @dev The operands should be in the form of a the specified unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function _multiplyDecimalRound(\\n uint256 x,\\n uint256 y,\\n uint256 precisionUnit\\n ) private pure returns (uint256) {\\n /* Divide by UNIT to remove the extra factor introduced by the product. */\\n uint256 quotientTimesTen = x.mul(y) / (precisionUnit / 10);\\n\\n if (quotientTimesTen % 10 >= 5) {\\n quotientTimesTen += 10;\\n }\\n\\n return quotientTimesTen / 10;\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of a precise unit.\\n *\\n * @dev The operands should be in the precise unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function multiplyDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _multiplyDecimalRound(x, y, PRECISE_UNIT);\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of a standard unit.\\n *\\n * @dev The operands should be in the standard unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function multiplyDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _multiplyDecimalRound(x, y, UNIT);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is a high\\n * precision decimal.\\n *\\n * @dev y is divided after the product of x and the standard precision unit\\n * is evaluated, so the product of x and UNIT must be less than 2**256. As\\n * this is an integer division, the result is always rounded down.\\n * This helps save on gas. Rounding is more expensive on gas.\\n */\\n function divideDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\\n /* Reintroduce the UNIT factor that will be divided out by y. */\\n return x.mul(UNIT).div(y);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * decimal in the precision unit specified in the parameter.\\n *\\n * @dev y is divided after the product of x and the specified precision unit\\n * is evaluated, so the product of x and the specified precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function _divideDecimalRound(\\n uint256 x,\\n uint256 y,\\n uint256 precisionUnit\\n ) private pure returns (uint256) {\\n uint256 resultTimesTen = x.mul(precisionUnit * 10).div(y);\\n\\n if (resultTimesTen % 10 >= 5) {\\n resultTimesTen += 10;\\n }\\n\\n return resultTimesTen / 10;\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * standard precision decimal.\\n *\\n * @dev y is divided after the product of x and the standard precision unit\\n * is evaluated, so the product of x and the standard precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function divideDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _divideDecimalRound(x, y, UNIT);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * high precision decimal.\\n *\\n * @dev y is divided after the product of x and the high precision unit\\n * is evaluated, so the product of x and the high precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function divideDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _divideDecimalRound(x, y, PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Convert a standard decimal representation to a high precision one.\\n */\\n function decimalToPreciseDecimal(uint256 i) internal pure returns (uint256) {\\n return i.mul(UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR);\\n }\\n\\n /**\\n * @dev Convert a high precision decimal to a standard decimal representation.\\n */\\n function preciseDecimalToDecimal(uint256 i) internal pure returns (uint256) {\\n uint256 quotientTimesTen = i / (UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR / 10);\\n\\n if (quotientTimesTen % 10 >= 5) {\\n quotientTimesTen += 10;\\n }\\n\\n return quotientTimesTen / 10;\\n }\\n}\\n\",\"keccak256\":\"0x1372be4fa0c5813417396f128f5aa45da1cd7679e2d247a8e17d1ba5f0141253\",\"license\":\"Apache License\"},\"contracts/token/RewardsDistributor.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {TimeLockedToken} from './TimeLockedToken.sol';\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\nimport {SafeDecimalMath} from '../lib/SafeDecimalMath.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\nimport {Math} from '../lib/Math.sol';\\nimport {Safe3296} from '../lib/Safe3296.sol';\\nimport {Errors, _require} from '../lib/BabylonErrors.sol';\\n\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {TimeLockedToken} from './TimeLockedToken.sol';\\nimport {IRewardsDistributor} from '../interfaces/IRewardsDistributor.sol';\\nimport {IPriceOracle} from '../interfaces/IPriceOracle.sol';\\n\\n/**\\n * @title Rewards Distributor implementing the BABL Mining Program and other Rewards to Strategists and Stewards\\n * @author Babylon Finance\\n * Rewards Distributor contract is a smart contract used to calculate and distribute all the BABL rewards of the BABL Mining Program\\n * along the time reserved for executed strategies. It implements a supply curve to distribute 500K BABL along the time.\\n * The supply curve is designed to optimize the long-term sustainability of the protocol.\\n * The rewards are front-loaded but they last for more than 10 years, slowly decreasing quarter by quarter.\\n * For that, it houses the state of the protocol power along the time as each strategy power is compared to the whole protocol usage.\\n * Rewards Distributor also is responsible for the calculation and delivery of other rewards as bonuses to specific profiles\\n * which are actively contributing to the protocol growth and their communities (Garden creators, Strategists and Stewards).\\n */\\ncontract RewardsDistributor is Ownable, IRewardsDistributor {\\n using SafeMath for uint256;\\n using SafeMath for int256;\\n using PreciseUnitMath for uint256;\\n using PreciseUnitMath for int256;\\n using SafeDecimalMath for uint256;\\n using SafeDecimalMath for int256;\\n using Math for uint256;\\n using Math for int256;\\n using Safe3296 for uint256;\\n using Safe3296 for int256;\\n using Safe3296 for uint96;\\n using Safe3296 for uint32;\\n\\n /* ========== Events ========== */\\n\\n /* ============ Modifiers ============ */\\n /**\\n * Throws if the call is not from a valid strategy\\n */\\n modifier onlyStrategy {\\n _require(controller.isSystemContract(address(IStrategy(msg.sender).garden())), Errors.ONLY_STRATEGY);\\n _;\\n }\\n /**\\n * Throws if the call is not from a valid active garden\\n */\\n modifier onlyActiveGarden(address _garden, uint256 _pid) {\\n if (_pid != 0 || gardenPid[address(_garden)] > 1) {\\n // Enable deploying flow with security restrictions\\n _require(IBabController(controller).isSystemContract(address(_garden)), Errors.NOT_A_SYSTEM_CONTRACT);\\n _require(IBabController(controller).isGarden(address(_garden)), Errors.ONLY_ACTIVE_GARDEN);\\n }\\n _require(msg.sender == address(_garden), Errors.ONLY_ACTIVE_GARDEN);\\n _require(IGarden(_garden).active(), Errors.ONLY_ACTIVE_GARDEN);\\n _;\\n }\\n\\n /**\\n * Throws if the BABL Rewards mining program is not active\\n */\\n modifier onlyMiningActive() {\\n _require(IBabController(controller).bablMiningProgramEnabled(), Errors.ONLY_MINING_ACTIVE);\\n _;\\n }\\n /**\\n * Throws if the sender is not the controller\\n */\\n modifier onlyController() {\\n _require(IBabController(controller).isSystemContract(msg.sender), Errors.NOT_A_SYSTEM_CONTRACT);\\n _require(address(controller) == msg.sender, Errors.ONLY_CONTROLLER);\\n _;\\n }\\n\\n /* ============ Constants ============ */\\n // 500K BABL allocated to this BABL Mining Program, the first quarter is Q1_REWARDS\\n // and the following quarters will follow the supply curve using a decay rate\\n uint256 public constant override Q1_REWARDS = 53_571_428_571_428_600e6; // First quarter (epoch) BABL rewards\\n // 12% quarterly decay rate (each 90 days)\\n // (Rewards on Q1 = 1,12 * Rewards on Q2) being Q1= Quarter 1, Q2 = Quarter 2\\n uint256 public constant override DECAY_RATE = 12e16;\\n // Duration of its EPOCH in days // BABL & profits split from the protocol\\n uint256 public constant override EPOCH_DURATION = 90 days;\\n\\n // solhint-disable-next-line\\n uint256 public override START_TIME; // Starting time of the rewards distribution\\n\\n // solhint-disable-next-line\\n uint256 public immutable BABL_STRATEGIST_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable BABL_STEWARD_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable BABL_LP_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_STRATEGIST_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_STEWARD_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_LP_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_PROTOCOL_FEE;\\n // solhint-disable-next-line\\n uint256 public immutable CREATOR_BONUS;\\n\\n // DAI normalize asset\\n address private constant DAI = 0x6B175474E89094C44Da98b954EedeAC495271d0F;\\n\\n /* ============ Structs ============ */\\n\\n struct ProtocolPerTimestamp {\\n // Protocol allocation checkpoints per timestamp along the time\\n uint256 principal; // Protocol principal allocation in normalized asset (DAI)\\n uint256 time; // Time of the checkpoint\\n uint256 quarterBelonging; // # Quarter checkpoint belonging since START_TIME\\n uint256 timeListPointer; // Pointer to the array of timestamps to enable the possibility of struct iteration\\n uint256 power; // Protocol power checkpoint (power is proportional to = principal * duration)\\n }\\n\\n struct ProtocolPerQuarter {\\n // Protocol allocation checkpoints per timestamp per each quarter along the time\\n uint256 quarterPrincipal; // Checkpoint to keep track on accumulated protocol principal per quarter in normalized asset (DAI)\\n uint256 quarterNumber; // # Quarter since START_TIME\\n uint256 quarterPower; // Accumulated Protocol power for each quarter\\n uint96 supplyPerQuarter; // Supply per quarter\\n }\\n\\n struct GardenPowerByTimestamp {\\n // Garden allocation checkpoints per timestamp per each garden\\n uint256 supply; // Checkpoint to keep track on garden supply\\n uint256 timestamp; // Checkpoint timestamps\\n uint256 power; // Garden power checkpoint (power is proportional to = principal * duration)\\n }\\n struct ContributorPerGarden {\\n // Checkpoints to keep track on the evolution of each contributor vs. each garden\\n uint256 lastDepositAt; // Last deposit timestamp of each contributor in each garden\\n uint256 initialDepositAt; // Checkpoint of the initial deposit\\n uint256[] timeListPointer; // Array of timestamps for each user in each garden\\n uint256 pid; // Garden contributor checkpoints counter to enable iteration\\n mapping(uint256 => TimestampContribution) tsContributions; // Sub-mapping all the contributor checkpoints\\n }\\n\\n struct TimestampContribution {\\n // Sub-mapping with all checkpoints for deposits and withdrawals of garden users\\n uint256 supply; // Garden token balance of user in each garden along the time\\n uint256 timestamp; // Checkpoint time\\n uint256 timePointer; // Pointer\\n uint256 power; // Contributor power per checkpoint\\n }\\n struct Checkpoints {\\n // Checkpoints for contributor power calculations where a certain window (from -> to) is queried\\n uint256 fromDepositAt; // First contributor checkpoint within the provided window\\n uint256 lastDepositAt; // Last contributor checkpoint within the provided window\\n uint256 gardenFromDepositAt; // First contributor checkpoint within the provided window\\n uint256 gardenLastDepositAt; // Last garden checkpoint within the provided window\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Instance of the Controller contract\\n IBabController public controller;\\n\\n // BABL Token contract\\n TimeLockedToken public babltoken;\\n\\n // Protocol total allocation points. Must be the sum of all allocation points (strategyPrincipal) in all strategy pools.\\n uint256 public override protocolPrincipal;\\n mapping(uint256 => ProtocolPerTimestamp) public protocolPerTimestamp; // Mapping of all protocol checkpoints\\n uint256[] public timeList; // Array of all protocol checkpoints\\n uint256 public override pid; // Initialization of the ID assigning timeListPointer to the checkpoint number\\n\\n mapping(uint256 => ProtocolPerQuarter) public protocolPerQuarter; // Mapping of the accumulated protocol per each active quarter\\n mapping(uint256 => bool) public isProtocolPerQuarter; // Check if the protocol per quarter data has been initialized\\n\\n // Strategy overhead control. Only used if each strategy has power overhead due to changes overtime\\n mapping(address => mapping(uint256 => uint256)) public rewardsPowerOverhead; // Overhead control to enable high level accuracy calculations for strategy rewards\\n // Contributor power control\\n mapping(address => mapping(address => ContributorPerGarden)) public contributorPerGarden; // Enable high level accuracy calculations\\n mapping(address => mapping(address => Checkpoints)) private checkpoints;\\n // Garden power control\\n mapping(address => mapping(uint256 => GardenPowerByTimestamp)) public gardenPowerByTimestamp;\\n mapping(address => uint256[]) public gardenTimelist;\\n mapping(address => uint256) public gardenPid;\\n\\n /* ============ Constructor ============ */\\n\\n constructor(TimeLockedToken _bablToken, IBabController _controller) {\\n require(address(_bablToken) != address(0), 'Token needs to exist');\\n require(address(_controller) != address(0), 'Controller needs to exist');\\n babltoken = _bablToken;\\n controller = _controller;\\n\\n (BABL_STRATEGIST_SHARE, BABL_STEWARD_SHARE, BABL_LP_SHARE, CREATOR_BONUS) = controller.getBABLSharing();\\n (PROFIT_STRATEGIST_SHARE, PROFIT_STEWARD_SHARE, PROFIT_LP_SHARE) = controller.getProfitSharing();\\n PROFIT_PROTOCOL_FEE = controller.protocolPerformanceFee();\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Function that adds the capital received to the total principal of the protocol per timestamp\\n * @param _capital Amount of capital in any type of asset to be normalized into DAI\\n */\\n function addProtocolPrincipal(uint256 _capital) external override onlyStrategy onlyMiningActive {\\n IStrategy strategy = IStrategy(msg.sender);\\n if (strategy.enteredAt() >= START_TIME) {\\n // onlyMiningActive control, it does not create a checkpoint if the strategy is not part of the Mining Program\\n _updateProtocolPrincipal(address(strategy), _capital, true);\\n }\\n }\\n\\n /**\\n * Function that removes the capital received to the total principal of the protocol per timestamp\\n * @param _capital Amount of capital in any type of asset to be normalized into DAI\\n */\\n function substractProtocolPrincipal(uint256 _capital) external override onlyStrategy onlyMiningActive {\\n IStrategy strategy = IStrategy(msg.sender);\\n if (strategy.enteredAt() >= START_TIME) {\\n // onlyMiningActive control, it does not create a checkpoint if the strategy is not part of the Mining Program\\n _updateProtocolPrincipal(address(strategy), _capital, false);\\n }\\n }\\n\\n /**\\n * Gets the total amount of rewards for a given strategy\\n * @param _strategy Strategy to check\\n */\\n function getStrategyRewards(address _strategy) external view override returns (uint96) {\\n IStrategy strategy = IStrategy(_strategy);\\n _require(strategy.exitedAt() != 0, Errors.STRATEGY_IS_NOT_OVER_YET);\\n IPriceOracle oracle = IPriceOracle(IBabController(controller).priceOracle());\\n uint256 pricePerTokenUnit = oracle.getPrice(IGarden(strategy.garden()).reserveAsset(), DAI);\\n uint256 allocated = strategy.capitalAllocated().preciseMul(pricePerTokenUnit);\\n uint256 returned = strategy.capitalReturned().preciseMul(pricePerTokenUnit);\\n if ((strategy.enteredAt() >= START_TIME) && (START_TIME != 0)) {\\n // We avoid gas consuming once a strategy got its BABL rewards during its finalization\\n uint256 rewards = strategy.strategyRewards();\\n if (rewards != 0) {\\n return Safe3296.safe96(rewards, 'overflow 96 bits');\\n }\\n // If the calculation was not done earlier we go for it\\n (uint256 numQuarters, uint256 startingQuarter) =\\n _getRewardsWindow(strategy.executedAt(), strategy.exitedAt());\\n uint256 bablRewards = 0;\\n if (numQuarters <= 1) {\\n bablRewards = _getStrategyRewardsOneQuarter(_strategy, allocated, startingQuarter); // Proportional supply till that moment within the same epoch\\n _require(\\n bablRewards <= protocolPerQuarter[startingQuarter].supplyPerQuarter,\\n Errors.OVERFLOW_IN_SUPPLY\\n );\\n _require(\\n allocated.mul(strategy.exitedAt().sub(strategy.executedAt())).sub(\\n strategy.rewardsTotalOverhead()\\n ) <= protocolPerQuarter[startingQuarter].quarterPower,\\n Errors.OVERFLOW_IN_POWER\\n );\\n } else {\\n bablRewards = _getStrategyRewardsSomeQuarters(_strategy, allocated, startingQuarter, numQuarters);\\n }\\n\\n // Babl rewards will be proportional to the total return (profit) with a max cap of x2\\n uint256 percentageMul = returned.preciseDiv(allocated);\\n if (percentageMul > 2e18) percentageMul = 2e18;\\n bablRewards = bablRewards.preciseMul(percentageMul);\\n return Safe3296.safe96(bablRewards, 'overflow 96 bits');\\n } else {\\n return 0;\\n }\\n }\\n\\n /**\\n * Sends BABL tokens rewards to a contributor after a claim is requested to the protocol.\\n * @param _to Address to send the tokens to\\n * @param _amount Amount of tokens to send the address to\\n */\\n function sendTokensToContributor(address _to, uint96 _amount) external override onlyMiningActive {\\n _require(controller.isSystemContract(msg.sender), Errors.NOT_A_SYSTEM_CONTRACT);\\n _safeBABLTransfer(_to, _amount);\\n }\\n\\n /**\\n * Starts BABL Rewards Mining Program from the controller.\\n */\\n function startBABLRewards() external onlyController {\\n if (START_TIME == 0) {\\n // It can only be activated once to avoid overriding START_TIME\\n START_TIME = block.timestamp;\\n }\\n }\\n\\n /**\\n * Function that set each contributor timestamp per garden\\n * @param _garden Address of the garden the contributor belongs to\\n * @param _contributor Address of the contributor\\n * @param _previousBalance Previous balance of the contributor\\n * @param _depositOrWithdraw If the timestamp is a deposit (true) or a withdraw (false)\\n * @param _pid The pid # of the Garden timestamps\\n */\\n function setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw,\\n uint256 _pid\\n ) external override onlyActiveGarden(_garden, _pid) {\\n _setContributorTimestampParams(_garden, _contributor, _previousBalance, _depositOrWithdraw);\\n }\\n\\n /**\\n * Function that set each garden timestamp\\n * @param _garden Address of the garden\\n * @param _pid The pid # of the Garden timestamp\\n */\\n function updateGardenPower(address _garden, uint256 _pid) external override onlyActiveGarden(_garden, _pid) {\\n _updateGardenPower(_garden);\\n }\\n\\n /* ========== View functions ========== */\\n\\n /**\\n * Calculates the profits and BABL that a contributor should receive from a series of finalized strategies\\n * @param _garden Garden to which the strategies and the user must belong to\\n * @param _contributor Address of the contributor to check\\n * @param _finalizedStrategies List of addresses of the finalized strategies to check\\n */\\n function getRewards(\\n address _garden,\\n address _contributor,\\n address[] calldata _finalizedStrategies\\n ) external view override returns (uint256, uint96) {\\n uint256 contributorTotalProfits = 0;\\n uint256 bablTotalRewards = 0;\\n _require(IBabController(controller).isGarden(address(_garden)), Errors.ONLY_ACTIVE_GARDEN);\\n for (uint256 i = 0; i < _finalizedStrategies.length; i++) {\\n (uint256 strategyProfits, uint256 strategyBABL) =\\n _getStrategyProfitsAndBABL(_garden, _finalizedStrategies[i], _contributor);\\n contributorTotalProfits = contributorTotalProfits.add(strategyProfits);\\n bablTotalRewards = bablTotalRewards.add(strategyBABL);\\n }\\n\\n return (contributorTotalProfits, Safe3296.safe96(bablTotalRewards, 'R28'));\\n }\\n\\n /**\\n * Gets the contributor power from one timestamp to the other\\n * @param _garden Address of the garden where the contributor belongs to\\n * @param _contributor Address if the contributor\\n * @param _from Initial timestamp\\n * @param _to End timestamp\\n * @return uint256 Contributor power during that period\\n */\\n function getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) external view override returns (uint256) {\\n return _getContributorPower(_garden, _contributor, _from, _to);\\n }\\n\\n /**\\n * Calculates the BABL rewards supply for each quarter\\n * @param _quarter Number of the epoch (quarter)\\n */\\n function tokenSupplyPerQuarter(uint256 _quarter) external pure override returns (uint96) {\\n return _tokenSupplyPerQuarter(_quarter);\\n }\\n\\n /**\\n * Check the protocol state in a certain timestamp\\n * @param time Timestamp\\n */\\n function checkProtocol(uint256 _time)\\n external\\n view\\n override\\n returns (\\n uint256 principal,\\n uint256 time,\\n uint256 quarterBelonging,\\n uint256 timeListPointer,\\n uint256 power\\n )\\n {\\n return (\\n protocolPerTimestamp[_time].principal,\\n protocolPerTimestamp[_time].time,\\n protocolPerTimestamp[_time].quarterBelonging,\\n protocolPerTimestamp[_time].timeListPointer,\\n protocolPerTimestamp[_time].power\\n );\\n }\\n\\n /**\\n * Check the quarter state for a specific quarter\\n * @param _num Number of quarter\\n */\\n function checkQuarter(uint256 _num)\\n external\\n view\\n override\\n returns (\\n uint256 quarterPrincipal,\\n uint256 quarterNumber,\\n uint256 quarterPower,\\n uint96 supplyPerQuarter\\n )\\n {\\n return (\\n protocolPerQuarter[_num].quarterPrincipal,\\n protocolPerQuarter[_num].quarterNumber,\\n protocolPerQuarter[_num].quarterPower,\\n protocolPerQuarter[_num].supplyPerQuarter\\n );\\n }\\n\\n /* ============ Internal Functions ============ */\\n /**\\n * Update the protocol principal checkpoints\\n * @param _strategy Strategy which is adding/removing principal\\n * @param _capital Capital to update\\n * @param _addOrSubstract Adding (true) or removing (false)\\n */\\n\\n function _updateProtocolPrincipal(\\n address _strategy,\\n uint256 _capital,\\n bool _addOrSubstract\\n ) internal {\\n IStrategy strategy = IStrategy(_strategy);\\n // Normalizing into DAI\\n IPriceOracle oracle = IPriceOracle(IBabController(controller).priceOracle());\\n uint256 pricePerTokenUnit = oracle.getPrice(IGarden(strategy.garden()).reserveAsset(), DAI);\\n _capital = _capital.preciseMul(pricePerTokenUnit);\\n ProtocolPerTimestamp storage protocolCheckpoint = protocolPerTimestamp[block.timestamp];\\n if (_addOrSubstract == false) {\\n // Substract\\n protocolPrincipal = protocolPrincipal.sub(_capital);\\n } else {\\n protocolPrincipal = protocolPrincipal.add(_capital);\\n }\\n protocolCheckpoint.principal = protocolPrincipal;\\n protocolCheckpoint.time = block.timestamp;\\n protocolCheckpoint.quarterBelonging = _getQuarter(block.timestamp);\\n protocolCheckpoint.timeListPointer = pid;\\n if (pid == 0) {\\n // The very first strategy of all strategies in the mining program\\n protocolCheckpoint.power = 0;\\n } else {\\n // Any other strategy different from the very first one (will have an antecesor)\\n protocolCheckpoint.power = protocolPerTimestamp[timeList[pid.sub(1)]].power.add(\\n protocolCheckpoint.time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time).mul(\\n protocolPerTimestamp[timeList[pid.sub(1)]].principal\\n )\\n );\\n }\\n timeList.push(block.timestamp); // Register of added strategies timestamps in the array for iteration\\n // Here we control the accumulated protocol power per each quarter\\n // Create the quarter checkpoint in case the checkpoint is the first in the epoch\\n _addProtocolPerQuarter(block.timestamp);\\n // We update the rewards overhead if any in normalized DAI\\n _updatePowerOverhead(strategy, _capital);\\n pid++;\\n }\\n\\n /**\\n * Get the rewards for a specific contributor activately contributing in strategies of a specific garden\\n * @param _garden Garden address responsible of the strategies to calculate rewards\\n * @param _strategy Strategy address\\n * @param _contributor Contributor address\\n */\\n function _getStrategyProfitsAndBABL(\\n address _garden,\\n address _strategy,\\n address _contributor\\n ) private view returns (uint256, uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n _require(address(strategy.garden()) == _garden, Errors.STRATEGY_GARDEN_MISMATCH);\\n _require(IGarden(_garden).isGardenStrategy(_strategy), Errors.STRATEGY_GARDEN_MISMATCH);\\n uint256 contributorProfits = 0;\\n uint256 contributorBABL = 0;\\n // We get the state of the strategy in terms of profit and distance from expected to accurately calculate profits and rewards\\n (bool profit, uint256 profitValue, bool distance, uint256 distanceValue) =\\n _getStrategyRewardsContext(address(strategy));\\n\\n (, uint256 initialDepositAt, uint256 claimedAt, , , ) = IGarden(_garden).getContributor(_contributor);\\n // Positive strategies not yet claimed\\n if (\\n strategy.exitedAt() > claimedAt &&\\n strategy.executedAt() >= initialDepositAt &&\\n address(strategy.garden()) == _garden\\n ) {\\n uint256 contributorPower =\\n _getContributorPower(address(_garden), _contributor, strategy.executedAt(), strategy.exitedAt());\\n // If strategy returned money we give out the profits\\n if (profit == true) {\\n // We reserve 5% of profits for performance fees\\n profitValue = profitValue.sub(profitValue.multiplyDecimal(PROFIT_PROTOCOL_FEE));\\n }\\n // Get strategist rewards in case the contributor is also the strategist of the strategy\\n contributorBABL = contributorBABL.add(\\n _getStrategyStrategistBabl(\\n address(strategy),\\n _contributor,\\n profit,\\n profitValue,\\n distance,\\n distanceValue\\n )\\n );\\n\\n contributorProfits = contributorProfits.add(\\n _getStrategyStrategistProfits(address(strategy), _contributor, profit, profitValue)\\n );\\n\\n // Get steward rewards\\n contributorBABL = contributorBABL.add(\\n _getStrategyStewardBabl(address(strategy), _contributor, profit, profitValue, distance, distanceValue)\\n );\\n\\n contributorProfits = contributorProfits.add(\\n _getStrategyStewardProfits(\\n address(strategy),\\n _contributor,\\n profit,\\n profitValue,\\n distance,\\n distanceValue\\n )\\n );\\n\\n // Get LP rewards\\n\\n contributorBABL = contributorBABL.add(\\n uint256(strategy.strategyRewards()).multiplyDecimal(BABL_LP_SHARE).preciseMul(\\n contributorPower.preciseDiv(strategy.capitalAllocated())\\n )\\n );\\n\\n // Get a multiplier bonus in case the contributor is the garden creator\\n if (_contributor == IGarden(_garden).creator()) {\\n contributorBABL = contributorBABL.add(contributorBABL.multiplyDecimal(CREATOR_BONUS));\\n }\\n }\\n return (contributorProfits, contributorBABL);\\n }\\n\\n /**\\n * Get the context of a specific address depending on their expected returns, capital allocated and capital returned\\n * @param _strategy Strategy address\\n */\\n function _getStrategyRewardsContext(address _strategy)\\n private\\n view\\n returns (\\n bool,\\n uint256,\\n bool,\\n uint256\\n )\\n {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 returned = strategy.capitalReturned();\\n uint256 expected =\\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\\n uint256 allocated = strategy.capitalAllocated();\\n bool profit;\\n bool distance;\\n uint256 profitValue;\\n uint256 distanceValue;\\n if (returned > allocated && returned >= expected) {\\n // The strategy went equal or above expectations\\n profit = true; // positive\\n distance = true; // positive\\n profitValue = returned.sub(allocated);\\n distanceValue = returned.sub(expected);\\n } else if (returned >= allocated && returned < expected) {\\n // The strategy went worse than expected but with some profits\\n profit = true; // positive or zero profits\\n distance = false; // negative vs expected return (got less than expected)\\n profitValue = returned.sub(allocated);\\n distanceValue = expected.sub(returned);\\n } else if (returned < allocated && returned < expected) {\\n // Negative profits - bad investments has penalties\\n profit = false; // negative - loosing capital\\n distance = false; // negative vs expected return (got less than expected)\\n profitValue = allocated.sub(returned); // Negative number, there were no profits at all\\n distanceValue = expected.sub(returned);\\n }\\n\\n return (profit, profitValue, distance, distanceValue);\\n }\\n\\n /**\\n * Get the BABL rewards (Mining program) for a Steward profile\\n * @param _strategy Strategy address\\n * @param _contributor Contributor address\\n * @param _profit Whether or not the strategy had profits\\n * @param _distance If true the results were above expected returns, false means opposite\\n * @param _distanceValue The distance from/to expected returns for capital returned\\n */\\n function _getStrategyStewardBabl(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256, /* _profitValue */\\n bool _distance,\\n uint256 _distanceValue\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 strategyRewards = strategy.strategyRewards();\\n int256 userVotes = strategy.getUserVotes(_contributor);\\n uint256 bablCap;\\n uint256 expected =\\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\\n\\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\\n uint256 babl = 0;\\n if (userVotes > 0 && _profit == true && _distance == true) {\\n // Voting in favor of the execution of the strategy with profits and positive distance\\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\\n uint256(userVotes).preciseDiv(strategy.totalPositiveVotes())\\n );\\n } else if (userVotes > 0 && _profit == true && _distance == false) {\\n // Voting in favor positive profits but below expected return\\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\\n uint256(userVotes).preciseDiv(strategy.totalPositiveVotes())\\n );\\n babl = babl.sub(babl.preciseMul(_distanceValue.preciseDiv(expected))); // We discount the error of expected return vs real returns\\n } else if (userVotes > 0 && _profit == false) {\\n // Voting in favor of a non profitable strategy get nothing\\n babl = 0;\\n } else if (userVotes < 0 && _distance == false) {\\n // Voting against a strategy that got results below expected return provides rewards to the voter (helping the protocol to only have good strategies)\\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\\n uint256(Math.abs(userVotes)).preciseDiv(strategy.totalNegativeVotes())\\n );\\n\\n bablCap = babl.mul(2); // Max cap\\n babl = babl.add(babl.preciseMul(_distanceValue.preciseDiv(expected))); // We add a bonus inverse to the error of expected return vs real returns\\n\\n if (babl > bablCap) babl = bablCap; // We limit 2x by a Cap\\n } else if (userVotes < 0 && _distance == true) {\\n babl = 0;\\n }\\n return babl;\\n }\\n\\n /**\\n * Get the rewards for a Steward profile\\n * @param _strategy Strategy address\\n * @param _contributor Contributor address\\n * @param _profit Whether or not the strategy had profits\\n * @param _profitValue The value of profits\\n * @param _distance If true the results were above expected returns, false means opposite\\n */\\n function _getStrategyStewardProfits(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256 _profitValue,\\n bool _distance,\\n uint256 /* _distanceValue */\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\\n uint256 profits = 0;\\n int256 userVotes = strategy.getUserVotes(_contributor);\\n if (_profit == true) {\\n if (userVotes > 0) {\\n profits = _profitValue.multiplyDecimal(PROFIT_STEWARD_SHARE).preciseMul(uint256(userVotes)).preciseDiv(\\n strategy.totalPositiveVotes()\\n );\\n } else if ((userVotes < 0) && _distance == false) {\\n profits = _profitValue\\n .multiplyDecimal(PROFIT_STEWARD_SHARE)\\n .preciseMul(uint256(Math.abs(userVotes)))\\n .preciseDiv(strategy.totalNegativeVotes());\\n } else if ((userVotes < 0) && _distance == true) {\\n // Voted against a very profit strategy above expected returns, get no profit at all\\n profits = 0;\\n }\\n } else profits = 0; // No profits at all\\n\\n return profits;\\n }\\n\\n /**\\n * Get the BABL rewards (Mining program) for a Strategist profile\\n * @param _strategy Strategy address\\n * @param _contributor Contributor address\\n * @param _profit Whether or not the strategy had profits\\n * @param _distance If true the results were above expected returns, false means opposite\\n */\\n function _getStrategyStrategistBabl(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256, /* _profitValue */\\n bool _distance,\\n uint256 /* _distanceValue */\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 strategyRewards = strategy.strategyRewards();\\n uint256 babl;\\n uint256 bablCap;\\n uint256 expected =\\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\\n if (strategy.strategist() == _contributor) {\\n babl = strategyRewards.multiplyDecimal(BABL_STRATEGIST_SHARE); // Standard calculation to be ponderated\\n if (_profit == true && _distance == true) {\\n // Strategy with equal or higher profits than expected\\n bablCap = babl.mul(2); // Max cap\\n // The more the results are close to the expected the more bonus will get (limited by a x2 cap)\\n babl = babl.add(babl.preciseMul(expected.preciseDiv(strategy.capitalReturned())));\\n if (babl > bablCap) babl = bablCap; // We limit 2x by a Cap\\n } else if (_profit == true && _distance == false) {\\n //under expectations\\n // The more the results are close to the expected the less penalization it might have\\n babl = babl.sub(babl.sub(babl.preciseMul(strategy.capitalReturned().preciseDiv(expected))));\\n } else {\\n // No positive profit\\n return 0;\\n }\\n } else {\\n return 0;\\n }\\n return babl;\\n }\\n\\n /**\\n * Get the rewards for a Strategist profile\\n * @param _strategy Strategy address\\n * @param _contributor Contributor address\\n * @param _profit Whether or not the strategy had profits\\n * @param _profitValue The value of profits\\n */\\n function _getStrategyStrategistProfits(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256 _profitValue\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\\n uint256 profits;\\n if (_profit == true) {\\n if (strategy.strategist() == _contributor) {\\n // If the contributor was the strategist of the strategy\\n profits = _profitValue.multiplyDecimal(PROFIT_STRATEGIST_SHARE);\\n }\\n } else profits = 0; // No profits at all\\n\\n return profits;\\n }\\n\\n /**\\n * Add protocol power timestamps for each quarter\\n * @param _time Timestamp\\n */\\n function _addProtocolPerQuarter(uint256 _time) private onlyMiningActive {\\n ProtocolPerQuarter storage protocolCheckpoint = protocolPerQuarter[_getQuarter(_time)];\\n\\n if (!isProtocolPerQuarter[_getQuarter(_time).sub(1)]) {\\n // The quarter is not yet initialized then we create it\\n protocolCheckpoint.quarterNumber = _getQuarter(_time);\\n if (pid == 0) {\\n // The first strategy added in the first epoch\\n protocolCheckpoint.quarterPower = 0;\\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\\n } else {\\n // Each time a new epoch starts with either a new strategy execution or finalization\\n // We just take the proportional power for this quarter from previous checkpoint\\n uint256 powerToSplit =\\n protocolPerTimestamp[_time].power.sub(protocolPerTimestamp[timeList[pid.sub(1)]].power);\\n if (protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging == _getQuarter(_time).sub(1)) {\\n // There were no intermediate epochs without checkpoints\\n // We re-initialize the protocol power counting for this new quarter\\n protocolCheckpoint.quarterPower = powerToSplit\\n .mul(_time.sub(START_TIME.add(_getQuarter(_time).mul(EPOCH_DURATION).sub(EPOCH_DURATION))))\\n .div(_time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time));\\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\\n\\n protocolPerQuarter[_getQuarter(_time).sub(1)].quarterPower = protocolPerQuarter[\\n _getQuarter(_time).sub(1)\\n ]\\n .quarterPower\\n .add(powerToSplit.sub(protocolCheckpoint.quarterPower));\\n } else {\\n // There were intermediate epochs without checkpoints - we need to create their protocolPerQuarter's and update the last one\\n // We have to update all the quarters including where the previous checkpoint is and the one were we are now\\n for (\\n uint256 i = 0;\\n i <= _getQuarter(_time).sub(protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging);\\n i++\\n ) {\\n ProtocolPerQuarter storage newCheckpoint =\\n protocolPerQuarter[protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i)];\\n uint256 slotEnding =\\n START_TIME.add(\\n protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i).mul(EPOCH_DURATION)\\n );\\n if (i == 0) {\\n // We are in the first quarter to update, we add the corresponding part\\n\\n newCheckpoint.quarterPower = newCheckpoint.quarterPower.add(\\n powerToSplit.mul(slotEnding.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)).div(\\n _time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)\\n )\\n );\\n newCheckpoint.quarterPrincipal = protocolPerTimestamp[timeList[pid.sub(1)]].principal;\\n } else if (\\n i < _getQuarter(_time).sub(protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging)\\n ) {\\n // We are in an intermediate quarter\\n newCheckpoint.quarterPower = powerToSplit.mul(EPOCH_DURATION).div(\\n _time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)\\n );\\n newCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(\\n protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i)\\n );\\n newCheckpoint.quarterNumber = protocolPerTimestamp[timeList[pid.sub(1)]]\\n .quarterBelonging\\n .add(i);\\n newCheckpoint.quarterPrincipal = protocolPerTimestamp[timeList[pid.sub(1)]].principal;\\n } else {\\n // We are in the last quarter of the strategy\\n protocolCheckpoint.quarterPower = powerToSplit\\n .mul(\\n _time.sub(START_TIME.add(_getQuarter(_time).mul(EPOCH_DURATION).sub(EPOCH_DURATION)))\\n )\\n .div(_time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time));\\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\\n protocolCheckpoint.quarterNumber = _getQuarter(_time);\\n protocolCheckpoint.quarterPrincipal = protocolPrincipal;\\n }\\n }\\n }\\n }\\n isProtocolPerQuarter[_getQuarter(_time).sub(1)] = true;\\n } else {\\n // Quarter checkpoint already created, it must have been filled with general info\\n // We update the power of the quarter by adding the new difference between last quarter checkpoint and this checkpoint\\n protocolCheckpoint.quarterPower = protocolCheckpoint.quarterPower.add(\\n protocolPerTimestamp[_time].power.sub(protocolPerTimestamp[timeList[pid.sub(1)]].power)\\n );\\n }\\n protocolCheckpoint.quarterPrincipal = protocolPrincipal;\\n }\\n\\n /**\\n * Updates the strategy power overhead for rewards calculations of each strategy out of the whole protocol\\n * @param _strategy Strategy\\n * @param _capital New capital normalized in DAI\\n */\\n function _updatePowerOverhead(IStrategy _strategy, uint256 _capital) private onlyMiningActive {\\n if (_strategy.updatedAt() != 0) {\\n // There will be overhead after the first execution not before\\n if (_getQuarter(block.timestamp) == _getQuarter(_strategy.updatedAt())) {\\n // The overhead will remain within the same epoch\\n rewardsPowerOverhead[address(_strategy)][_getQuarter(block.timestamp)] = rewardsPowerOverhead[\\n address(_strategy)\\n ][_getQuarter(block.timestamp)]\\n .add(_capital.mul(block.timestamp.sub(_strategy.updatedAt())));\\n } else {\\n // We need to iterate since last update of the strategy capital\\n (uint256 numQuarters, uint256 startingQuarter) =\\n _getRewardsWindow(_strategy.updatedAt(), block.timestamp);\\n uint256 overheadPerQuarter = _capital.mul(block.timestamp.sub(_strategy.updatedAt())).div(numQuarters);\\n for (uint256 i = 0; i <= numQuarters.sub(1); i++) {\\n rewardsPowerOverhead[address(_strategy)][startingQuarter.add(i)] = rewardsPowerOverhead[\\n address(_strategy)\\n ][startingQuarter.add(i)]\\n .add(overheadPerQuarter);\\n }\\n }\\n }\\n }\\n\\n /**\\n * Check the strategy rewards for strategies starting and ending in the same quarter\\n * @param _strategy Strategy\\n * @param _startingQuarter Starting quarter\\n */\\n function _getStrategyRewardsOneQuarter(\\n address _strategy,\\n uint256 _allocated,\\n uint256 _startingQuarter\\n ) private view onlyMiningActive returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 strategyOverTime =\\n _allocated.mul(strategy.exitedAt().sub(strategy.executedAt())).sub(strategy.rewardsTotalOverhead());\\n return\\n strategyOverTime\\n .preciseDiv(protocolPerQuarter[_startingQuarter].quarterPower)\\n .preciseMul(uint256(protocolPerQuarter[_startingQuarter].supplyPerQuarter))\\n .mul(strategy.exitedAt().sub(_startingQuarter))\\n .div(block.timestamp.sub(_startingQuarter));\\n }\\n\\n /**\\n * Check the strategy rewards for strategies starting and ending in different quarters and/or more quarters\\n * @param _strategy Strategy\\n * @param _allocated Normalized allocated in DAI\\n * @param _startingQuarter Starting quarter\\n * @param _numQuarters Num of Quarters (in epochs)\\n */\\n function _getStrategyRewardsSomeQuarters(\\n address _strategy,\\n uint256 _allocated,\\n uint256 _startingQuarter,\\n uint256 _numQuarters\\n ) private view onlyMiningActive returns (uint256) {\\n // The strategy takes longer than one quarter / epoch\\n uint256 bablRewards;\\n for (uint256 i = 0; i <= _numQuarters.sub(1); i++) {\\n uint256 slotEnding = START_TIME.add(_startingQuarter.add(i).mul(EPOCH_DURATION)); // Initialization timestamp at the end of the first slot where the strategy starts its execution\\n uint256 powerRatioInQuarter =\\n _getStrategyRewardsPerQuarter(_strategy, _allocated, _startingQuarter, i, slotEnding);\\n bablRewards = bablRewards.add(powerRatioInQuarter);\\n }\\n return bablRewards;\\n }\\n\\n /**\\n * Check the strategy rewards for a specific quarter when strategies starting and ending in different quarters and/or more quarters\\n * @param _strategy Strategy\\n * @param _allocated Normalized allocated in DAI\\n * @param _startingQuarter Starting quarter\\n * @param _id Epoch number\\n * @param _slotEnding Ending slot timestamp of current slot (epoch)\\n */\\n function _getStrategyRewardsPerQuarter(\\n address _strategy,\\n uint256 _allocated,\\n uint256 _startingQuarter,\\n uint256 _id,\\n uint256 _slotEnding\\n ) private view onlyMiningActive returns (uint256) {\\n // The strategy takes longer than one quarter / epoch\\n // We need to calculate the strategy vs. protocol power ratio per each quarter\\n uint256 strategyPower; // Strategy power in each Epoch\\n uint256 protocolPower; // Protocol power in each Epoch\\n\\n // We iterate all the quarters where the strategy was active\\n uint256 percentage = 1e18;\\n if (IStrategy(_strategy).executedAt().add(EPOCH_DURATION) > _slotEnding) {\\n // We are in the first quarter of the strategy\\n\\n strategyPower = _allocated.mul(_slotEnding.sub(IStrategy(_strategy).executedAt())).sub(\\n rewardsPowerOverhead[address(_strategy)][_getQuarter(IStrategy(_strategy).executedAt())]\\n );\\n } else if (\\n IStrategy(_strategy).executedAt() < _slotEnding.sub(EPOCH_DURATION) &&\\n _slotEnding < IStrategy(_strategy).exitedAt()\\n ) {\\n // We are in an intermediate quarter different from starting or ending quarters\\n strategyPower = _allocated.mul(_slotEnding.sub(_slotEnding.sub(EPOCH_DURATION))).sub(\\n rewardsPowerOverhead[address(_strategy)][_getQuarter(_slotEnding.sub(45 days))]\\n );\\n } else {\\n // We are in the last quarter of the strategy\\n percentage = block.timestamp.sub(_slotEnding.sub(EPOCH_DURATION)).preciseDiv(\\n _slotEnding.sub(_slotEnding.sub(EPOCH_DURATION))\\n );\\n\\n strategyPower = _allocated.mul(IStrategy(_strategy).exitedAt().sub(_slotEnding.sub(EPOCH_DURATION))).sub(\\n rewardsPowerOverhead[address(_strategy)][_getQuarter(IStrategy(_strategy).exitedAt())]\\n );\\n }\\n protocolPower = protocolPerQuarter[_startingQuarter.add(_id)].quarterPower;\\n\\n _require(strategyPower <= protocolPower, Errors.OVERFLOW_IN_POWER);\\n\\n return\\n strategyPower\\n .preciseDiv(protocolPower)\\n .preciseMul(uint256(protocolPerQuarter[_startingQuarter.add(_id)].supplyPerQuarter))\\n .preciseMul(percentage);\\n }\\n\\n /**\\n * Safe BABL rewards (Mining program) token transfer.\\n * It handle cases when in case of rounding errors, RewardsDistributor might not have enough BABL.\\n * @param _to The receiver address of the contributor to send\\n * @param _amount The amount of BABL tokens to be rewarded during this claim\\n */\\n function _safeBABLTransfer(address _to, uint96 _amount) private onlyMiningActive {\\n uint256 bablBal = babltoken.balanceOf(address(this));\\n if (_amount > bablBal) {\\n SafeERC20.safeTransfer(babltoken, _to, bablBal);\\n } else {\\n SafeERC20.safeTransfer(babltoken, _to, _amount);\\n }\\n }\\n\\n /**\\n * Gets the contributor power from a timestamp to a specific timestamp within a garden\\n * @param _garden Address of the garden\\n * @param _contributor Address if the contributor\\n * @param _from Initial timestamp\\n * @param _to End timestamp\\n * @return uint256 Contributor power during that period\\n */\\n function _getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) private view returns (uint256) {\\n // Out of bounds\\n _require(_to >= IGarden(_garden).gardenInitializedAt() && _to >= _from, Errors.CONTRIBUTOR_POWER_CHECK_WINDOW);\\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][address(_contributor)];\\n Checkpoints memory powerCheckpoints = checkpoints[address(_garden)][address(_contributor)];\\n\\n if (contributor.initialDepositAt == 0 || contributor.initialDepositAt > _to) {\\n return 0;\\n } else {\\n if (_from <= IGarden(_garden).gardenInitializedAt()) {\\n // Avoid division by zero in case of _from parameter is not passed\\n _from = IGarden(_garden).gardenInitializedAt();\\n }\\n // Find closest point to _from and _to either contributor and garden checkpoints at their left\\n (powerCheckpoints.fromDepositAt, powerCheckpoints.lastDepositAt) = _locateCheckpointsContributor(\\n _garden,\\n _contributor,\\n _from,\\n _to\\n );\\n (powerCheckpoints.gardenFromDepositAt, powerCheckpoints.gardenLastDepositAt) = _locateCheckpointsGarden(\\n _garden,\\n _from,\\n _to\\n );\\n\\n // origin must be less than end window\\n _require(\\n powerCheckpoints.fromDepositAt <= powerCheckpoints.lastDepositAt &&\\n powerCheckpoints.gardenFromDepositAt <= powerCheckpoints.gardenLastDepositAt,\\n Errors.CONTRIBUTOR_POWER_CHECK_DEPOSITS\\n );\\n uint256 contributorPower;\\n uint256 gardenPower;\\n\\n // \\\"FROM power calculations\\\" PART\\n // Avoid underflows\\n\\n if (_from < powerCheckpoints.fromDepositAt) {\\n // Contributor still has no power but _from is later than the start of the garden\\n contributorPower = 0;\\n } else if (_from > powerCheckpoints.fromDepositAt) {\\n contributorPower = contributor.tsContributions[powerCheckpoints.fromDepositAt].power.add(\\n (_from.sub(powerCheckpoints.fromDepositAt)).mul(\\n contributor.tsContributions[powerCheckpoints.fromDepositAt].supply\\n )\\n );\\n } else {\\n // _from == fromDepositAt\\n contributorPower = contributor.tsContributions[powerCheckpoints.fromDepositAt].power;\\n }\\n gardenPower = gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenFromDepositAt].power.add(\\n (_from.sub(powerCheckpoints.gardenFromDepositAt)).mul(\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenFromDepositAt].supply\\n )\\n );\\n // \\\"TO power calculations\\\" PART\\n // We go for accurate power calculations avoiding overflows\\n // contributor power overflow\\n _require(contributorPower <= gardenPower, Errors.CONTRIBUTOR_POWER_OVERFLOW);\\n if (_from == _to) {\\n // Requested a specific checkpoint calculation (no slot)\\n if (gardenPower == 0) {\\n return 0;\\n } else {\\n return contributorPower.preciseDiv(gardenPower);\\n }\\n // Not a checkpoint anymore but a slot\\n } else if (_to < powerCheckpoints.lastDepositAt) {\\n // contributor has not deposited yet\\n return 0;\\n } else if (\\n _to == powerCheckpoints.lastDepositAt &&\\n powerCheckpoints.fromDepositAt == powerCheckpoints.lastDepositAt\\n ) {\\n // no more contributor checkpoints in the slot\\n gardenPower = (\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].power.add(\\n (_to.sub(powerCheckpoints.gardenLastDepositAt)).mul(\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].supply\\n )\\n )\\n )\\n .sub(gardenPower);\\n _require(contributorPower <= gardenPower, Errors.CONTRIBUTOR_POWER_OVERFLOW);\\n return contributorPower.preciseDiv(gardenPower);\\n } else {\\n contributorPower = (\\n contributor.tsContributions[powerCheckpoints.lastDepositAt].power.add(\\n (_to.sub(powerCheckpoints.lastDepositAt)).mul(\\n contributor.tsContributions[powerCheckpoints.lastDepositAt].supply\\n )\\n )\\n )\\n .sub(contributorPower);\\n\\n gardenPower = (\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].power.add(\\n (_to.sub(powerCheckpoints.gardenLastDepositAt)).mul(\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].supply\\n )\\n )\\n )\\n .sub(gardenPower);\\n _require(contributorPower <= gardenPower, Errors.CONTRIBUTOR_POWER_OVERFLOW);\\n\\n return contributorPower.preciseDiv(gardenPower);\\n }\\n }\\n }\\n\\n /**\\n * Gets the earlier and closest (deposit/withdrawal) checkpoints of a contributor in a specific range\\n * @param _garden Address of the garden\\n * @param _contributor Address if the contributor\\n * @param _from Initial timestamp\\n * @param _to End timestamp\\n * @return uint256 Contributor power during that period\\n */\\n function _locateCheckpointsContributor(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) private view returns (uint256, uint256) {\\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][address(_contributor)];\\n\\n uint256 lastDepositAt = contributor.timeListPointer[contributor.timeListPointer.length.sub(1)]; // Initialized with lastDeposit\\n uint256 fromDepositAt = contributor.timeListPointer[0]; // Initialized with initialDeposit\\n\\n if (lastDepositAt > _to || fromDepositAt < _from) {\\n // We go to find the closest deposits of the contributor to _from and _to\\n for (uint256 i = 0; i <= contributor.timeListPointer.length.sub(1); i++) {\\n if (contributor.timeListPointer[i] <= _to) {\\n lastDepositAt = contributor.timeListPointer[i];\\n }\\n if (contributor.timeListPointer[i] <= _from) {\\n fromDepositAt = contributor.timeListPointer[i];\\n }\\n }\\n }\\n return (fromDepositAt, lastDepositAt);\\n }\\n\\n /**\\n * Gets the earlier and closest (deposit/withdrawal) checkpoints of a garden in a specific range\\n * @param _garden Address of the garden\\n * @param _from Initial timestamp\\n * @param _to End timestamp\\n * @return uint256 Contributor power during that period\\n */\\n function _locateCheckpointsGarden(\\n address _garden,\\n uint256 _from,\\n uint256 _to\\n ) private view returns (uint256, uint256) {\\n uint256 gardenLastCheckpoint = gardenTimelist[address(_garden)].length.sub(1);\\n uint256 gardenLastDepositAt = gardenTimelist[address(_garden)][gardenLastCheckpoint]; // Initialized to the last garden checkpoint\\n uint256 gardenFromDepositAt = gardenTimelist[address(_garden)][0]; // Initialized to the first garden checkpoint\\n\\n if (gardenLastDepositAt > _to || gardenFromDepositAt < _from) {\\n // We go for the closest timestamp of garden to _to and _from\\n for (uint256 i = 0; i <= gardenLastCheckpoint; i++) {\\n uint256 gardenTime = gardenTimelist[address(_garden)][i];\\n if (gardenTime <= _to) {\\n gardenLastDepositAt = gardenTime;\\n }\\n if (gardenTime <= _from) {\\n gardenFromDepositAt = gardenTime;\\n }\\n }\\n }\\n return (gardenFromDepositAt, gardenLastDepositAt);\\n }\\n\\n /**\\n * Function that keeps checkpoints of the garden power (deposits and withdrawals) per timestamp\\n * @param _garden Garden address\\n */\\n function _updateGardenPower(address _garden) private {\\n IGarden garden = IGarden(_garden);\\n GardenPowerByTimestamp storage gardenTimestamp = gardenPowerByTimestamp[address(garden)][block.timestamp];\\n gardenTimestamp.supply = IERC20(address(IGarden(_garden))).totalSupply();\\n\\n gardenTimestamp.timestamp = block.timestamp;\\n\\n if (gardenPid[address(_garden)] == 0) {\\n // The very first deposit of all contributors in the mining program\\n gardenTimestamp.power = 0;\\n } else {\\n // Any other deposit different from the very first one (will have an antecesor)\\n gardenTimestamp.power = gardenPowerByTimestamp[address(garden)][\\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\\n ]\\n .power\\n .add(\\n gardenTimestamp\\n .timestamp\\n .sub(\\n gardenPowerByTimestamp[address(garden)][\\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\\n ]\\n .timestamp\\n )\\n .mul(\\n gardenPowerByTimestamp[address(garden)][\\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\\n ]\\n .supply\\n )\\n );\\n }\\n\\n gardenTimelist[address(garden)].push(block.timestamp); // Register of deposit timestamps in the array for iteration\\n gardenPid[address(garden)]++;\\n }\\n\\n /**\\n * Updates contributor timestamps params\\n * @param _garden Garden address\\n * @param _contributor Contributor address\\n * @param _previousBalance Previous balance\\n * @param _depositOrWithdraw Whether it is a deposit or a withdraw\\n */\\n function _setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw\\n ) private {\\n // We make checkpoints around contributor deposits to avoid fast loans and give the right rewards afterwards\\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][_contributor];\\n\\n contributor.tsContributions[block.timestamp].supply = IERC20(address(IGarden(_garden))).balanceOf(\\n address(_contributor)\\n );\\n\\n contributor.tsContributions[block.timestamp].timestamp = block.timestamp;\\n\\n contributor.tsContributions[block.timestamp].timePointer = contributor.pid;\\n\\n if (contributor.pid == 0) {\\n // The very first deposit\\n contributor.tsContributions[block.timestamp].power = 0;\\n } else {\\n // Any other deposits or withdrawals different from the very first one (will have an antecesor)\\n contributor.tsContributions[block.timestamp].power = contributor.tsContributions[contributor.lastDepositAt]\\n .power\\n .add(\\n (block.timestamp.sub(contributor.lastDepositAt)).mul(\\n contributor.tsContributions[contributor.lastDepositAt].supply\\n )\\n );\\n }\\n if (_depositOrWithdraw == true) {\\n // Deposit\\n if (_previousBalance == 0 || contributor.initialDepositAt == 0) {\\n contributor.initialDepositAt = block.timestamp;\\n }\\n contributor.lastDepositAt = block.timestamp;\\n } else {\\n // Withdrawals\\n if (IERC20(address(IGarden(_garden))).balanceOf(address(_contributor)) == 0) {\\n contributor.lastDepositAt = 0;\\n contributor.initialDepositAt = 0;\\n delete contributor.timeListPointer;\\n }\\n }\\n\\n contributor.timeListPointer.push(block.timestamp);\\n contributor.pid++;\\n }\\n\\n /**\\n * Calculates the BABL rewards supply for each quarter\\n * @param _quarter Number of the epoch (quarter)\\n */\\n function _tokenSupplyPerQuarter(uint256 _quarter) internal pure returns (uint96) {\\n _require(_quarter >= 1, Errors.QUARTERS_MIN_1);\\n if (_quarter >= 513) {\\n return 0;\\n } else {\\n uint256 firstFactor = (SafeDecimalMath.unit().add(DECAY_RATE)).powDecimal(_quarter.sub(1));\\n uint256 supplyForQuarter = Q1_REWARDS.divideDecimal(firstFactor);\\n return Safe3296.safe96(supplyForQuarter, 'overflow 96 bits');\\n }\\n }\\n\\n /**\\n * Calculates the quarter number for a specific time since START_TIME\\n * @param _now Timestamp to calculate its quarter\\n */\\n function _getQuarter(uint256 _now) internal view returns (uint256) {\\n uint256 quarter = (_now.sub(START_TIME).preciseDivCeil(EPOCH_DURATION)).div(1e18);\\n return quarter.add(1);\\n }\\n\\n /**\\n * Calculates the range (starting quarter and ending quarter since START_TIME)\\n * @param _from Starting timestamp\\n * @param _to Ending timestamp\\n */\\n function _getRewardsWindow(uint256 _from, uint256 _to) internal view returns (uint256, uint256) {\\n uint256 quarters = (_to.sub(_from).preciseDivCeil(EPOCH_DURATION)).div(1e18);\\n uint256 startingQuarter = (_from.sub(START_TIME).preciseDivCeil(EPOCH_DURATION)).div(1e18);\\n return (quarters.add(1), startingQuarter.add(1));\\n }\\n}\\n\",\"keccak256\":\"0xfc441c92c5baa279ff5037f9c7649f501a244641d504b90fd8c64c25aac755b6\",\"license\":\"Apache License\"},\"contracts/token/TimeLockRegistry.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\npragma experimental ABIEncoderV2;\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\nimport {TimeLockedToken} from './TimeLockedToken.sol';\\nimport {AddressArrayUtils} from '../lib/AddressArrayUtils.sol';\\n\\n/**\\n * @title TimeLockRegistry\\n * @notice Register Lockups for TimeLocked ERC20 Token BABL (e.g. vesting)\\n * @author Babylon Finance\\n * @dev This contract allows owner to register distributions for a TimeLockedToken\\n *\\n * To register a distribution, register method should be called by the owner.\\n * claim() should be called only by the BABL Token smartcontract (modifier onlyBABLToken)\\n * when any account registered to receive tokens make its own claim\\n * If case of a mistake, owner can cancel registration before the claim is done by the account\\n *\\n * Note this contract address must be setup in the TimeLockedToken's contract pointing\\n * to interact with (e.g. setTimeLockRegistry() function)\\n */\\n\\ncontract TimeLockRegistry is Ownable {\\n using SafeMath for uint256;\\n using Address for address;\\n using AddressArrayUtils for address[];\\n\\n /* ============ Events ============ */\\n\\n event Register(address receiver, uint256 distribution);\\n event Cancel(address receiver, uint256 distribution);\\n event Claim(address account, uint256 distribution);\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlyBABLToken() {\\n require(msg.sender == address(token), 'only BABL Token');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // time locked token\\n TimeLockedToken public token;\\n\\n /**\\n * @notice The profile of each token owner under vesting conditions and its special conditions\\n * @param receiver Account being registered\\n * @param investorType Indicates whether or not is a Team member (true = team member / advisor, false = private investor)\\n * @param vestingStarting Date When the vesting begins for such token owner\\n * @param distribution Tokens amount that receiver is due to get\\n */\\n struct Registration {\\n address receiver;\\n uint256 distribution;\\n bool investorType;\\n uint256 vestingStartingDate;\\n }\\n\\n /**\\n * @notice The profile of each token owner under vesting conditions and its special conditions\\n * @param team Indicates whether or not is a Team member (true = team member / advisor, false = private investor)\\n * @param vestingBegin When the vesting begins for such token owner\\n * @param vestingEnd When the vesting ends for such token owner\\n * @param lastClaim When the last claim was done\\n */\\n struct TokenVested {\\n bool team;\\n bool cliff;\\n uint256 vestingBegin;\\n uint256 vestingEnd;\\n uint256 lastClaim;\\n }\\n\\n /// @notice A record of token owners under vesting conditions for each account, by index\\n mapping(address => TokenVested) public tokenVested;\\n\\n // mapping from token owners under vesting conditions to BABL due amount (e.g. SAFT addresses, team members, advisors)\\n mapping(address => uint256) public registeredDistributions;\\n\\n // array of all registrations\\n address[] public registrations;\\n\\n // total amount of tokens registered\\n uint256 public totalTokens;\\n\\n // vesting for Team Members\\n uint256 private teamVesting = 365 days * 4;\\n\\n // vesting for Investors and Advisors\\n uint256 private investorVesting = 365 days * 3;\\n\\n /* ============ Functions ============ */\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * @notice Construct a new Time Lock Registry and gives ownership to sender\\n * @param _token TimeLockedToken contract to use in this registry\\n */\\n constructor(TimeLockedToken _token) {\\n token = _token;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /* ============ External Getter Functions ============ */\\n\\n /**\\n * Gets registrations\\n *\\n * @return address[] Returns list of registrations\\n */\\n\\n function getRegistrations() external view returns (address[] memory) {\\n return registrations;\\n }\\n\\n /* =========== Token related Gov Functions ====== */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION\\n *\\n * @notice Register multiple investors/team in a batch\\n * @param _registrations Registrations to process\\n */\\n function registerBatch(Registration[] memory _registrations) external onlyOwner {\\n for (uint256 i = 0; i < _registrations.length; i++) {\\n register(\\n _registrations[i].receiver,\\n _registrations[i].distribution,\\n _registrations[i].investorType,\\n _registrations[i].vestingStartingDate\\n );\\n }\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION\\n *\\n * @notice Register new account under vesting conditions (Team, Advisors, Investors e.g. SAFT purchaser)\\n * @param receiver Address belonging vesting conditions\\n * @param distribution Tokens amount that receiver is due to get\\n */\\n function register(\\n address receiver,\\n uint256 distribution,\\n bool investorType,\\n uint256 vestingStartingDate\\n ) public onlyOwner {\\n require(receiver != address(0), 'TimeLockRegistry::register: cannot register the zero address');\\n require(\\n receiver != address(this),\\n 'TimeLockRegistry::register: Time Lock Registry contract cannot be an investor'\\n );\\n require(distribution != 0, 'TimeLockRegistry::register: Distribution = 0');\\n require(\\n registeredDistributions[receiver] == 0,\\n 'TimeLockRegistry::register:Distribution for this address is already registered'\\n );\\n require(block.timestamp >= 1614553200, 'Cannot register earlier than March 2021'); // 1614553200 is UNIX TIME of 2021 March the 1st\\n require(totalTokens.add(distribution) <= IERC20(token).balanceOf(address(this)), 'Not enough tokens');\\n\\n totalTokens = totalTokens.add(distribution);\\n // register distribution\\n registeredDistributions[receiver] = distribution;\\n registrations.push(receiver);\\n\\n // register token vested conditions\\n TokenVested storage newTokenVested = tokenVested[receiver];\\n newTokenVested.team = investorType;\\n newTokenVested.vestingBegin = vestingStartingDate;\\n\\n if (newTokenVested.team == true) {\\n newTokenVested.vestingEnd = vestingStartingDate.add(teamVesting);\\n } else {\\n newTokenVested.vestingEnd = vestingStartingDate.add(investorVesting);\\n }\\n newTokenVested.lastClaim = vestingStartingDate;\\n\\n tokenVested[receiver] = newTokenVested;\\n\\n // emit register event\\n emit Register(receiver, distribution);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel distribution registration in case of mistake and before a claim is done\\n *\\n * @notice Cancel distribution registration\\n * @dev A claim has not to be done earlier\\n * @param receiver Address that should have it's distribution removed\\n * @return Whether or not it succeeded\\n */\\n function cancelRegistration(address receiver) external onlyOwner returns (bool) {\\n require(registeredDistributions[receiver] != 0, 'Not registered');\\n\\n // get amount from distributions\\n uint256 amount = registeredDistributions[receiver];\\n\\n // set distribution mapping to 0\\n delete registeredDistributions[receiver];\\n\\n // set tokenVested mapping to 0\\n delete tokenVested[receiver];\\n\\n // remove from the list of all registrations\\n registrations.remove(receiver);\\n\\n // decrease total tokens\\n totalTokens = totalTokens.sub(amount);\\n\\n // emit cancel event\\n emit Cancel(receiver, amount);\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel distribution registration in case of mistake and before a claim is done\\n *\\n * @notice Cancel already delivered tokens. It might only apply when non-completion of vesting period of Team members or Advisors\\n * @dev An automatic override allowance is granted during the claim process\\n * @param account Address that should have it's distribution removed\\n * @return Whether or not it succeeded\\n */\\n function cancelDeliveredTokens(address account) external onlyOwner returns (bool) {\\n uint256 loosingAmount = token.cancelVestedTokens(account);\\n\\n // emit cancel event\\n emit Cancel(account, loosingAmount);\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Recover tokens in Time Lock Registry smartcontract address by the owner\\n *\\n * @notice Send tokens from smartcontract address to the owner.\\n * It might only apply after a cancellation of vested tokens\\n * @param amount Amount to be recovered by the owner of the Time Lock Registry smartcontract from its balance\\n * @return Whether or not it succeeded\\n */\\n function transferToOwner(uint256 amount) external onlyOwner returns (bool) {\\n SafeERC20.safeTransfer(token, msg.sender, amount);\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Claim locked tokens by the registered account\\n *\\n * @notice Claim tokens due amount.\\n * @dev Claim is done by the user in the TimeLocked contract and the contract is the only allowed to call\\n * this function on behalf of the user to make the claim\\n * @return The amount of tokens registered and delivered after the claim\\n */\\n function claim(address _receiver) external onlyBABLToken returns (uint256) {\\n require(registeredDistributions[_receiver] != 0, 'Not registered');\\n\\n // get amount from distributions\\n uint256 amount = registeredDistributions[_receiver];\\n tokenVested[_receiver].lastClaim = block.timestamp;\\n\\n // set distribution mapping to 0\\n delete registeredDistributions[_receiver];\\n\\n // decrease total tokens\\n totalTokens = totalTokens.sub(amount);\\n\\n // register lockup in TimeLockedToken\\n // this will transfer funds from this contract and lock them for sender\\n token.registerLockup(\\n _receiver,\\n amount,\\n tokenVested[_receiver].team,\\n tokenVested[_receiver].vestingBegin,\\n tokenVested[_receiver].vestingEnd,\\n tokenVested[_receiver].lastClaim\\n );\\n\\n // set tokenVested mapping to 0\\n delete tokenVested[_receiver];\\n\\n // emit claim event\\n emit Claim(_receiver, amount);\\n\\n return amount;\\n }\\n\\n /* ============ Getter Functions ============ */\\n\\n function checkVesting(address address_)\\n external\\n view\\n returns (\\n bool team,\\n uint256 start,\\n uint256 end,\\n uint256 last\\n )\\n {\\n return (\\n tokenVested[address_].team,\\n tokenVested[address_].vestingBegin,\\n tokenVested[address_].vestingEnd,\\n tokenVested[address_].lastClaim\\n );\\n }\\n\\n function checkRegisteredDistribution(address address_) external view returns (uint256 amount) {\\n return registeredDistributions[address_];\\n }\\n}\\n\",\"keccak256\":\"0x5a2812398ff49dac4f10d03763768340a5de4e0f75fd2d00e18b5922051d094d\",\"license\":\"Apache License\"},\"contracts/token/TimeLockedToken.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {TimeLockRegistry} from './TimeLockRegistry.sol';\\nimport {RewardsDistributor} from './RewardsDistributor.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {VoteToken} from './VoteToken.sol';\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {Errors, _require} from '../lib/BabylonErrors.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\n\\n/**\\n * @title TimeLockedToken\\n * @notice Time Locked ERC20 Token\\n * @author Babylon Finance\\n * @dev Contract which gives the ability to time-lock tokens specially for vesting purposes usage\\n *\\n * By overriding the balanceOf() and transfer() functions in ERC20,\\n * an account can show its full, post-distribution balance and use it for voting power\\n * but only transfer or spend up to an allowed amount\\n *\\n * A portion of previously non-spendable tokens are allowed to be transferred\\n * along the time depending on each vesting conditions, and after all epochs have passed, the full\\n * account balance is unlocked. In case on non-completion vesting period, only the Time Lock Registry can cancel\\n * the delivery of the pending tokens and only can cancel the remaining locked ones.\\n */\\n\\nabstract contract TimeLockedToken is VoteToken {\\n using SafeMath for uint256;\\n\\n /* ============ Events ============ */\\n\\n /// @notice An event that emitted when a new lockout ocurr\\n event NewLockout(\\n address account,\\n uint256 tokenslocked,\\n bool isTeamOrAdvisor,\\n uint256 startingVesting,\\n uint256 endingVesting\\n );\\n\\n /// @notice An event that emitted when a new Time Lock is registered\\n event NewTimeLockRegistration(address previousAddress, address newAddress);\\n\\n /// @notice An event that emitted when a new Rewards Distributor is registered\\n event NewRewardsDistributorRegistration(address previousAddress, address newAddress);\\n\\n /// @notice An event that emitted when a cancellation of Lock tokens is registered\\n event Cancel(address account, uint256 amount);\\n\\n /// @notice An event that emitted when a claim of tokens are registered\\n event Claim(address _receiver, uint256 amount);\\n\\n /// @notice An event that emitted when a lockedBalance query is done\\n event LockedBalance(address _account, uint256 amount);\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlyTimeLockRegistry() {\\n require(\\n msg.sender == address(timeLockRegistry),\\n 'TimeLockedToken:: onlyTimeLockRegistry: can only be executed by TimeLockRegistry'\\n );\\n _;\\n }\\n\\n modifier onlyTimeLockOwner() {\\n if (address(timeLockRegistry) != address(0)) {\\n require(\\n msg.sender == Ownable(timeLockRegistry).owner(),\\n 'TimeLockedToken:: onlyTimeLockOwner: can only be executed by the owner of TimeLockRegistry'\\n );\\n }\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // represents total distribution for locked balances\\n mapping(address => uint256) distribution;\\n\\n /// @notice The profile of each token owner under its particular vesting conditions\\n /**\\n * @param team Indicates whether or not is a Team member or Advisor (true = team member/advisor, false = private investor)\\n * @param vestingBegin When the vesting begins for such token owner\\n * @param vestingEnd When the vesting ends for such token owner\\n * @param lastClaim When the last claim was done\\n */\\n struct VestedToken {\\n bool teamOrAdvisor;\\n uint256 vestingBegin;\\n uint256 vestingEnd;\\n uint256 lastClaim;\\n }\\n\\n /// @notice A record of token owners under vesting conditions for each account, by index\\n mapping(address => VestedToken) public vestedToken;\\n\\n // vesting duration for Team Members and Advisors\\n uint256 private teamVesting = 365 days * 4;\\n\\n // vesting duration for Investors\\n uint256 private investorVesting = 365 days * 3;\\n\\n // address of Time Lock Registry contract\\n IBabController public controller;\\n\\n // address of Time Lock Registry contract\\n TimeLockRegistry public timeLockRegistry;\\n\\n // address of Rewards Distriburor contract\\n RewardsDistributor public rewardsDistributor;\\n\\n // Enable Transfer of ERC20 BABL Tokens\\n // Only Minting or transfers from/to TimeLockRegistry and Rewards Distributor can transfer tokens until the protocol is fully decentralized\\n bool private tokenTransfersEnabled;\\n bool private tokenTransfersWereDisabled;\\n\\n /* ============ Functions ============ */\\n\\n /* ============ Constructor ============ */\\n\\n constructor(string memory _name, string memory _symbol) VoteToken(_name, _symbol) {\\n tokenTransfersEnabled = true;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /* =========== Token related Gov Functions ====== */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Disables transfers of ERC20 BABL Tokens\\n */\\n function disableTokensTransfers() external onlyOwner {\\n require(!tokenTransfersWereDisabled, 'BABL must flow');\\n tokenTransfersEnabled = false;\\n tokenTransfersWereDisabled = true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows transfers of ERC20 BABL Tokens\\n * Can only happen after the protocol is fully decentralized.\\n */\\n function enableTokensTransfers() external onlyOwner {\\n tokenTransfersEnabled = true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Set the Time Lock Registry contract to control token vesting conditions\\n *\\n * @notice Set the Time Lock Registry contract to control token vesting conditions\\n * @param newTimeLockRegistry Address of TimeLockRegistry contract\\n */\\n function setTimeLockRegistry(TimeLockRegistry newTimeLockRegistry) external onlyTimeLockOwner returns (bool) {\\n require(address(newTimeLockRegistry) != address(0), 'cannot be zero address');\\n require(address(newTimeLockRegistry) != address(this), 'cannot be this contract');\\n require(address(newTimeLockRegistry) != address(timeLockRegistry), 'must be new TimeLockRegistry');\\n emit NewTimeLockRegistration(address(timeLockRegistry), address(newTimeLockRegistry));\\n\\n timeLockRegistry = newTimeLockRegistry;\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Set the Rewards Distributor contract to control either BABL Mining or profit rewards\\n *\\n * @notice Set the Rewards Distriburor contract to control both types of rewards (profit and BABL Mining program)\\n * @param newRewardsDistributor Address of Rewards Distributor contract\\n */\\n function setRewardsDistributor(RewardsDistributor newRewardsDistributor) external onlyOwner returns (bool) {\\n require(address(newRewardsDistributor) != address(0), 'cannot be zero address');\\n require(address(newRewardsDistributor) != address(this), 'cannot be this contract');\\n require(address(newRewardsDistributor) != address(rewardsDistributor), 'must be new Rewards Distributor');\\n emit NewRewardsDistributorRegistration(address(rewardsDistributor), address(newRewardsDistributor));\\n\\n rewardsDistributor = newRewardsDistributor;\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Register new token lockup conditions for vested tokens defined only by Time Lock Registry\\n *\\n * @notice Tokens are completely delivered during the registration however lockup conditions apply for vested tokens\\n * locking them according to the distribution epoch periods and the type of recipient (Team, Advisor, Investor)\\n * Emits a transfer event showing a transfer to the recipient\\n * Only the registry can call this function\\n * @param _receiver Address to receive the tokens\\n * @param _amount Tokens to be transferred\\n * @param _profile True if is a Team Member or Advisor\\n * @param _vestingBegin Unix Time when the vesting for that particular address\\n * @param _vestingEnd Unix Time when the vesting for that particular address\\n * @param _lastClaim Unix Time when the claim was done from that particular address\\n *\\n */\\n function registerLockup(\\n address _receiver,\\n uint256 _amount,\\n bool _profile,\\n uint256 _vestingBegin,\\n uint256 _vestingEnd,\\n uint256 _lastClaim\\n ) external onlyTimeLockRegistry returns (bool) {\\n require(balanceOf(msg.sender) >= _amount, 'insufficient balance');\\n require(_receiver != address(0), 'cannot be zero address');\\n require(_receiver != address(this), 'cannot be this contract');\\n require(_receiver != address(timeLockRegistry), 'cannot be the TimeLockRegistry contract itself');\\n require(_receiver != msg.sender, 'the owner cannot lockup itself');\\n\\n // update amount of locked distribution\\n distribution[_receiver] = distribution[_receiver].add(_amount);\\n\\n VestedToken storage newVestedToken = vestedToken[_receiver];\\n\\n newVestedToken.teamOrAdvisor = _profile;\\n newVestedToken.vestingBegin = _vestingBegin;\\n newVestedToken.vestingEnd = _vestingEnd;\\n newVestedToken.lastClaim = _lastClaim;\\n\\n // transfer tokens to the recipient\\n _transfer(msg.sender, _receiver, _amount);\\n emit NewLockout(_receiver, _amount, _profile, _vestingBegin, _vestingEnd);\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel and remove locked tokens due to non-completion of vesting period\\n * applied only by Time Lock Registry and specifically to Team or Advisors as it does not apply to investors.\\n *\\n * @dev Cancel distribution registration\\n * @param lockedAccount that should have its still locked distribution removed due to non-completion of its vesting period\\n */\\n function cancelVestedTokens(address lockedAccount) external onlyTimeLockRegistry returns (uint256) {\\n return _cancelVestedTokensFromTimeLock(lockedAccount);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Each token owner can claim its own specific tokens with its own specific vesting conditions from the Time Lock Registry\\n *\\n * @dev Claim msg.sender tokens (if any available in the registry)\\n */\\n function claimMyTokens() external {\\n // claim msg.sender tokens from timeLockRegistry\\n uint256 amount = timeLockRegistry.claim(msg.sender);\\n // After a proper claim, locked tokens of Team and Advisors profiles are under restricted special vesting conditions so they automatic grant\\n // rights to the Time Lock Registry to only retire locked tokens if non-compliance vesting conditions take places along the vesting periods.\\n // It does not apply to Investors under vesting (their locked tokens cannot be removed).\\n if (vestedToken[msg.sender].teamOrAdvisor == true) {\\n approve(address(timeLockRegistry), amount);\\n }\\n // emit claim event\\n emit Claim(msg.sender, amount);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Get unlocked balance for an account\\n *\\n * @notice Get unlocked balance for an account\\n * @param account Account to check\\n * @return Amount that is unlocked and available eg. to transfer\\n */\\n function unlockedBalance(address account) public returns (uint256) {\\n // totalBalance - lockedBalance\\n return balanceOf(account).sub(lockedBalance(account));\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. View the locked balance for an account\\n *\\n * @notice View locked balance for an account\\n * @param account Account to check\\n * @return Amount locked in the time of checking\\n */\\n\\n function viewLockedBalance(address account) public view returns (uint256) {\\n // distribution of locked tokens\\n // get amount from distributions\\n\\n uint256 amount = distribution[account];\\n uint256 lockedAmount = amount;\\n\\n // Team and investors cannot transfer tokens in the first year\\n if (vestedToken[account].vestingBegin.add(365 days) > block.timestamp && amount != 0) {\\n return lockedAmount;\\n }\\n\\n // in case of vesting has passed, all tokens are now available, if no vesting lock is 0 as well\\n if (block.timestamp >= vestedToken[account].vestingEnd || amount == 0) {\\n lockedAmount = 0;\\n } else if (amount != 0) {\\n // in case of still under vesting period, locked tokens are recalculated\\n lockedAmount = amount.mul(vestedToken[account].vestingEnd.sub(block.timestamp)).div(\\n vestedToken[account].vestingEnd.sub(vestedToken[account].vestingBegin)\\n );\\n }\\n return lockedAmount;\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Get locked balance for an account\\n *\\n * @notice Get locked balance for an account\\n * @param account Account to check\\n * @return Amount locked in the time of checking\\n */\\n function lockedBalance(address account) public returns (uint256) {\\n // get amount from distributions locked tokens (if any)\\n uint256 lockedAmount = viewLockedBalance(account);\\n // in case of vesting has passed, all tokens are now available so we set mapping to 0 only for accounts under vesting\\n if (\\n block.timestamp >= vestedToken[account].vestingEnd &&\\n msg.sender == account &&\\n lockedAmount == 0 &&\\n vestedToken[account].vestingEnd != 0\\n ) {\\n delete distribution[account];\\n }\\n emit LockedBalance(account, lockedAmount);\\n return lockedAmount;\\n }\\n\\n /**\\n * PUBLIC FUNCTION. Get the address of Time Lock Registry\\n *\\n * @notice Get the address of Time Lock Registry\\n * @return Address of the Time Lock Registry\\n */\\n function getTimeLockRegistry() external view returns (address) {\\n return address(timeLockRegistry);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the Approval of allowances of ERC20 with special conditions for vesting\\n *\\n * @notice Override of \\\"Approve\\\" function to allow the `spender` to transfer up to `amount` from `src`\\n * @dev This will overwrite the approval amount for `spender` except in the case of spender is Time Lock Registry\\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\\n * @param spender The address of the account which may transfer tokens\\n * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\\n * @return Whether or not the approval succeeded\\n */\\n function approve(address spender, uint256 rawAmount) public override nonReentrant returns (bool) {\\n require(spender != address(0), 'TimeLockedToken::approve: spender cannot be zero address');\\n require(spender != msg.sender, 'TimeLockedToken::approve: spender cannot be the msg.sender');\\n\\n uint96 amount;\\n if (rawAmount == uint256(-1)) {\\n amount = uint96(-1);\\n } else {\\n amount = safe96(rawAmount, 'TimeLockedToken::approve: amount exceeds 96 bits');\\n }\\n\\n // There is no option to decreaseAllowance to timeLockRegistry in case of vested tokens\\n if ((spender == address(timeLockRegistry)) && (amount < allowance(msg.sender, address(timeLockRegistry)))) {\\n amount = safe96(\\n allowance(msg.sender, address(timeLockRegistry)),\\n 'TimeLockedToken::approve: cannot decrease allowance to timelockregistry'\\n );\\n }\\n _approve(msg.sender, spender, amount);\\n emit Approval(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the Increase of allowances of ERC20 with special conditions for vesting\\n *\\n * @notice Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * @dev This is an override with respect to the fulfillment of vesting conditions along the way\\n * However an user can increase allowance many times, it will never be able to transfer locked tokens during vesting period\\n * @return Whether or not the increaseAllowance succeeded\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public override nonReentrant returns (bool) {\\n require(\\n unlockedBalance(msg.sender) >= allowance(msg.sender, spender).add(addedValue) ||\\n spender == address(timeLockRegistry),\\n 'TimeLockedToken::increaseAllowance:Not enough unlocked tokens'\\n );\\n require(spender != address(0), 'TimeLockedToken::increaseAllowance:Spender cannot be zero address');\\n require(spender != msg.sender, 'TimeLockedToken::increaseAllowance:Spender cannot be the msg.sender');\\n _approve(msg.sender, spender, allowance(msg.sender, spender).add(addedValue));\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the decrease of allowances of ERC20 with special conditions for vesting\\n *\\n * @notice Atomically decrease the allowance granted to `spender` by the caller.\\n *\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n * This is an override with respect to the fulfillment of vesting conditions along the way\\n * An user cannot decrease the allowance to the Time Lock Registry who is in charge of vesting conditions\\n * @return Whether or not the decreaseAllowance succeeded\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public override nonReentrant returns (bool) {\\n require(spender != address(0), 'TimeLockedToken::decreaseAllowance:Spender cannot be zero address');\\n require(spender != msg.sender, 'TimeLockedToken::decreaseAllowance:Spender cannot be the msg.sender');\\n require(\\n allowance(msg.sender, spender) >= subtractedValue,\\n 'TimeLockedToken::decreaseAllowance:Underflow condition'\\n );\\n\\n // There is no option to decreaseAllowance to timeLockRegistry in case of vested tokens\\n require(\\n address(spender) != address(timeLockRegistry),\\n 'TimeLockedToken::decreaseAllowance:cannot decrease allowance to timeLockRegistry'\\n );\\n\\n _approve(\\n msg.sender,\\n spender,\\n allowance(msg.sender, spender).sub(subtractedValue, 'ERC20: decreased allowance below zero')\\n );\\n return true;\\n }\\n\\n /* ============ Internal Only Function ============ */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the _transfer of ERC20 BABL tokens only allowing the transfer of unlocked tokens\\n *\\n * @dev Transfer function which includes only unlocked tokens\\n * Locked tokens can always be transfered back to the returns address\\n * Transferring to owner allows re-issuance of funds through registry\\n *\\n * @param _from The address to send tokens from\\n * @param _to The address that will receive the tokens\\n * @param _value The amount of tokens to be transferred\\n */\\n function _transfer(\\n address _from,\\n address _to,\\n uint256 _value\\n ) internal override {\\n require(_from != address(0), 'TimeLockedToken:: _transfer: cannot transfer from the zero address');\\n require(_to != address(0), 'TimeLockedToken:: _transfer: cannot transfer to the zero address');\\n require(\\n _to != address(this),\\n 'TimeLockedToken:: _transfer: do not transfer tokens to the token contract itself'\\n );\\n\\n require(balanceOf(_from) >= _value, 'TimeLockedToken:: _transfer: insufficient balance');\\n\\n // check if enough unlocked balance to transfer\\n require(unlockedBalance(_from) >= _value, 'TimeLockedToken:: _transfer: attempting to transfer locked funds');\\n super._transfer(_from, _to, _value);\\n // voting power\\n _moveDelegates(\\n delegates[_from],\\n delegates[_to],\\n safe96(_value, 'TimeLockedToken:: _transfer: uint96 overflow')\\n );\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Disable BABL token transfer until certain conditions are met\\n *\\n * @dev Override the _beforeTokenTransfer of ERC20 BABL tokens until certain conditions are met:\\n * Only allowing minting or transfers from Time Lock Registry and Rewards Distributor until transfers are allowed in the controller\\n * Transferring to owner allows re-issuance of funds through registry\\n *\\n * @param _from The address to send tokens from\\n * @param _to The address that will receive the tokens\\n * @param _value The amount of tokens to be transferred\\n */\\n\\n // Disable garden token transfers. Allow minting and burning.\\n function _beforeTokenTransfer(\\n address _from,\\n address _to,\\n uint256 _value\\n ) internal virtual override {\\n super._beforeTokenTransfer(_from, _to, _value);\\n _require(\\n _from == address(0) ||\\n _from == address(timeLockRegistry) ||\\n _from == address(rewardsDistributor) ||\\n _to == address(timeLockRegistry) ||\\n tokenTransfersEnabled,\\n Errors.BABL_TRANSFERS_DISABLED\\n );\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel and remove locked tokens due to non-completion of vesting period\\n * applied only by Time Lock Registry and specifically to Team or Advisors\\n *\\n * @dev Cancel distribution registration\\n * @param lockedAccount that should have its still locked distribution removed due to non-completion of its vesting period\\n */\\n function _cancelVestedTokensFromTimeLock(address lockedAccount) internal onlyTimeLockRegistry returns (uint256) {\\n require(distribution[lockedAccount] != 0, 'TimeLockedToken::cancelTokens:Not registered');\\n\\n // get an update on locked amount from distributions at this precise moment\\n uint256 loosingAmount = lockedBalance(lockedAccount);\\n\\n require(loosingAmount > 0, 'TimeLockedToken::cancelTokens:There are no more locked tokens');\\n require(\\n vestedToken[lockedAccount].teamOrAdvisor == true,\\n 'TimeLockedToken::cancelTokens:cannot cancel locked tokens to Investors'\\n );\\n\\n // set distribution mapping to 0\\n delete distribution[lockedAccount];\\n\\n // set tokenVested mapping to 0\\n delete vestedToken[lockedAccount];\\n\\n // transfer only locked tokens back to TimeLockRegistry Owner (msg.sender)\\n require(\\n transferFrom(lockedAccount, address(timeLockRegistry), loosingAmount),\\n 'TimeLockedToken::cancelTokens:Transfer failed'\\n );\\n\\n // emit cancel event\\n emit Cancel(lockedAccount, loosingAmount);\\n\\n return loosingAmount;\\n }\\n}\\n\",\"keccak256\":\"0xad214a3aa8fcc15e51df9d4f4523c54f2c3149c47765cc8c44b6f4f9510bec4c\",\"license\":\"Apache License\"},\"contracts/token/VoteToken.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {IVoteToken} from '../interfaces/IVoteToken.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Context} from '@openzeppelin/contracts/utils/Context.sol';\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\n\\n/**\\n * @title VoteToken\\n * @notice Custom token which tracks voting power for governance\\n * @dev This is an abstraction of a fork of the Compound governance contract\\n * VoteToken is used by BABL to allow tracking voting power\\n * Checkpoints are created every time state is changed which record voting power\\n * Inherits standard ERC20 behavior\\n */\\n\\nabstract contract VoteToken is Context, ERC20, Ownable, IVoteToken, ReentrancyGuard {\\n using SafeMath for uint256;\\n using Address for address;\\n\\n /* ============ Events ============ */\\n\\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\\n event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);\\n\\n /* ============ Modifiers ============ */\\n\\n /* ============ State Variables ============ */\\n\\n /// @notice The EIP-712 typehash for the contract's domain\\n bytes32 public constant DOMAIN_TYPEHASH =\\n keccak256('EIP712Domain(string name,uint256 chainId,address verifyingContract)');\\n\\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\\n bytes32 public constant DELEGATION_TYPEHASH =\\n keccak256('Delegation(address delegatee,uint256 nonce,uint256 expiry)');\\n\\n /// @dev A record of votes checkpoints for each account, by index\\n mapping(address => address) public delegates;\\n\\n /// @notice A checkpoint for marking number of votes from a given block\\n struct Checkpoint {\\n uint32 fromBlock;\\n uint96 votes;\\n }\\n\\n /// @notice A record of votes checkpoints for each account, by index\\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\\n\\n /// @notice The number of checkpoints for each account\\n mapping(address => uint32) public numCheckpoints;\\n\\n /// @notice A record of states for signing / validating signatures\\n mapping(address => uint256) public nonces;\\n\\n /* ============ Functions ============ */\\n\\n /* ============ Constructor ============ */\\n\\n constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {}\\n\\n /* ============ External Functions ============ */\\n\\n /* =========== Token related Gov Functions ====== */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Delegating votes from msg.sender to delegatee\\n *\\n * @notice Delegate votes from `msg.sender` to `delegatee`\\n * @param delegatee The address to delegate votes to\\n */\\n\\n function delegate(address delegatee) external override {\\n return _delegate(msg.sender, delegatee);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Delegate votes using signature to 'delegatee'\\n *\\n * @notice Delegates votes from signatory to `delegatee`\\n * @param delegatee The address to delegate votes to\\n * @param nonce The contract state required to match the signature\\n * @param expiry The time at which to expire the signature\\n * @param v The recovery byte of the signature\\n * @param r Half of the ECDSA signature pair\\n * @param s Half of the ECDSA signature pair\\n */\\n\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external override {\\n bytes32 domainSeparator =\\n keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name())), getChainId(), address(this)));\\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\\n bytes32 digest = keccak256(abi.encodePacked('\\\\x19\\\\x01', domainSeparator, structHash));\\n address signatory = ecrecover(digest, v, r, s);\\n require(signatory != address(0), 'VoteToken::delegateBySig: invalid signature');\\n require(nonce == nonces[signatory].add(1), 'VoteToken::delegateBySig: invalid nonce');\\n nonces[signatory]++;\\n require(block.timestamp <= expiry, 'VoteToken::delegateBySig: signature expired');\\n return _delegate(signatory, delegatee);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Check Delegate votes using signature to 'delegatee'\\n *\\n * @notice Get current voting power for an account\\n * @param account Account to get voting power for\\n * @return Voting power for an account\\n */\\n function getCurrentVotes(address account) external view virtual override returns (uint96) {\\n uint32 nCheckpoints = numCheckpoints[account];\\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Get voting power at a specific block for an account\\n *\\n * @param account Account to get voting power for\\n * @param blockNumber Block to get voting power at\\n * @return Voting power for an account at specific block\\n */\\n function getPriorVotes(address account, uint256 blockNumber) external view virtual override returns (uint96) {\\n require(blockNumber < block.number, 'BABLToken::getPriorVotes: not yet determined');\\n\\n uint32 nCheckpoints = numCheckpoints[account];\\n if (nCheckpoints == 0) {\\n return 0;\\n }\\n\\n // First check most recent balance\\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\\n return checkpoints[account][nCheckpoints - 1].votes;\\n }\\n\\n // Next check implicit zero balance\\n if (checkpoints[account][0].fromBlock > blockNumber) {\\n return 0;\\n }\\n\\n uint32 lower = 0;\\n uint32 upper = nCheckpoints - 1;\\n while (upper > lower) {\\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\\n Checkpoint memory cp = checkpoints[account][center];\\n if (cp.fromBlock == blockNumber) {\\n return cp.votes;\\n } else if (cp.fromBlock < blockNumber) {\\n lower = center;\\n } else {\\n upper = center - 1;\\n }\\n }\\n return checkpoints[account][lower].votes;\\n }\\n\\n function getMyDelegatee() external view override returns (address) {\\n return delegates[msg.sender];\\n }\\n\\n function getDelegatee(address account) external view override returns (address) {\\n return delegates[account];\\n }\\n\\n function getCheckpoints(address account, uint32 id)\\n external\\n view\\n override\\n returns (uint32 fromBlock, uint96 votes)\\n {\\n Checkpoint storage getCheckpoint = checkpoints[account][id];\\n return (getCheckpoint.fromBlock, getCheckpoint.votes);\\n }\\n\\n function getNumberOfCheckpoints(address account) external view override returns (uint32) {\\n return numCheckpoints[account];\\n }\\n\\n /* ============ Internal Only Function ============ */\\n\\n /**\\n * GOVERNANCE FUNCTION. Make a delegation\\n *\\n * @dev Internal function to delegate voting power to an account\\n * @param delegator The address of the account delegating votes from\\n * @param delegatee The address to delegate votes to\\n */\\n\\n function _delegate(address delegator, address delegatee) internal {\\n address currentDelegate = delegates[delegator];\\n uint96 delegatorBalance = safe96(_balanceOf(delegator), 'VoteToken::_delegate: uint96 overflow');\\n delegates[delegator] = delegatee;\\n\\n emit DelegateChanged(delegator, currentDelegate, delegatee);\\n\\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\\n }\\n\\n function _balanceOf(address account) internal view virtual returns (uint256) {\\n return balanceOf(account);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Move the delegates\\n *\\n * @dev Internal function to move delegates between accounts\\n * @param srcRep The address of the account delegating votes from\\n * @param dstRep The address of the account delegating votes to\\n * @param amount The voting power to move\\n */\\n function _moveDelegates(\\n address srcRep,\\n address dstRep,\\n uint96 amount\\n ) internal {\\n if (srcRep != dstRep && amount > 0) {\\n // It must not revert but do nothing in cases of address(0) being part of the move\\n // Sub voting amount to source in case it is not the zero address (e.g. transfers)\\n if (srcRep != address(0)) {\\n uint32 srcRepNum = numCheckpoints[srcRep];\\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\\n uint96 srcRepNew = sub96(srcRepOld, amount, 'VoteToken::_moveDelegates: vote amount underflows');\\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\\n }\\n if (dstRep != address(0)) {\\n // Add it to destination in case it is not the zero address (e.g. any transfer of tokens or delegations except a first mint to a specific address)\\n uint32 dstRepNum = numCheckpoints[dstRep];\\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\\n uint96 dstRepNew = add96(dstRepOld, amount, 'VoteToken::_moveDelegates: vote amount overflows');\\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\\n }\\n }\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Internal function to write a checkpoint for voting power\\n *\\n * @dev internal function to write a checkpoint for voting power\\n * @param delegatee The address of the account delegating votes to\\n * @param nCheckpoints The num checkpoint\\n * @param oldVotes The previous voting power\\n * @param newVotes The new voting power\\n */\\n function _writeCheckpoint(\\n address delegatee,\\n uint32 nCheckpoints,\\n uint96 oldVotes,\\n uint96 newVotes\\n ) internal {\\n uint32 blockNumber = safe32(block.number, 'VoteToken::_writeCheckpoint: block number exceeds 32 bits');\\n\\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\\n } else {\\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\\n numCheckpoints[delegatee] = nCheckpoints + 1;\\n }\\n\\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint32\\n *\\n * @dev internal function to convert from uint256 to uint32\\n */\\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\\n require(n < 2**32, errorMessage);\\n return uint32(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint96\\n *\\n * @dev internal function to convert from uint256 to uint96\\n */\\n function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) {\\n require(n < 2**96, errorMessage);\\n return uint96(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to add two uint96 numbers\\n *\\n * @dev internal safe math function to add two uint96 numbers\\n */\\n function add96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n uint96 c = a + b;\\n require(c >= a, errorMessage);\\n return c;\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to subtract two uint96 numbers\\n *\\n * @dev internal safe math function to subtract two uint96 numbers\\n */\\n function sub96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to get chain ID\\n *\\n * @dev internal function to get chain ID\\n */\\n function getChainId() internal pure returns (uint256) {\\n uint256 chainId;\\n assembly {\\n chainId := chainid()\\n }\\n return chainId;\\n }\\n}\\n\",\"keccak256\":\"0xca174dc6b9b5f780aaaf9c832961b7f552b8cd0b6b6f36e8691fa7226de49457\",\"license\":\"Apache License\"}},\"version\":1}", + "bytecode": "0x6101806040523480156200001257600080fd5b5060405162005eb138038062005eb1833981810160405260408110156200003857600080fd5b50805160209091015160006200004d62000310565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600160a01b038216620000f3576040805162461bcd60e51b815260206004820152601460248201527f546f6b656e206e6565647320746f206578697374000000000000000000000000604482015290519081900360640190fd5b6001600160a01b0381166200014f576040805162461bcd60e51b815260206004820152601960248201527f436f6e74726f6c6c6572206e6565647320746f20657869737400000000000000604482015290519081900360640190fd5b600380546001600160a01b038085166001600160a01b031992831617909255600280548484169216919091179081905560408051633c50b0ef60e21b81529051919092169163f142c3bc916004808301926080929190829003018186803b158015620001ba57600080fd5b505afa158015620001cf573d6000803e3d6000fd5b505050506040513d6080811015620001e657600080fd5b50805160208201516040808401516060948501516101605260c05260a0919091526080919091526002548151632e0519cf60e01b815291516001600160a01b0390911692632e0519cf9260048082019391829003018186803b1580156200024c57600080fd5b505afa15801562000261573d6000803e3d6000fd5b505050506040513d60608110156200027857600080fd5b508051602080830151604093840151610120526101005260e091909152600254825163568c081360e01b815292516001600160a01b039091169263568c0813926004808301939192829003018186803b158015620002d557600080fd5b505afa158015620002ea573d6000803e3d6000fd5b505050506040513d60208110156200030157600080fd5b50516101405250620003149050565b3390565b60805160a05160c05160e05161010051610120516101405161016051615b176200039a600039806118a45280612914525080610fec5280612701525080610c565250806108225280614e355280614eed52508061101f5280614949525080611c9c5280612801525080610f555280614b7552508061186e528061473e5250615b176000f3fe608060405234801561001057600080fd5b50600436106102c85760003560e01c8063908589441161017b578063df14e06f116100d8578063f5750d0f1161008c578063f77c479111610071578063f77c4791146107b5578063fa51a34b146107bd578063fd9ff86c146107c5576102c8565b8063f5750d0f1461076c578063f6c8d7b514610789576102c8565b8063f1068454116100bd578063f106845414610712578063f1ed38611461071a578063f2fde38b14610746576102c8565b8063df14e06f146106de578063e5cab4fa1461070a576102c8565b8063d60913ce1161012f578063db4b3af511610114578063db4b3af5146106a8578063dc178712146106ce578063ddaa26ad146106d6576102c8565b8063d60913ce14610654578063da17a6ca146106a0576102c8565b8063a675004711610160578063a675004714610612578063a70b9f0c1461062f578063cf14938714610637576102c8565b806390858944146105e45780639de9a052146105ec576102c8565b80636bf15bbd1161022957806378769678116101dd57806379fc904f116101c257806379fc904f146105cc5780638cb8c855146105d45780638da5cb5b146105dc576102c8565b8063787696781461059357806379102629146105c4576102c8565b8063715018a61161020e578063715018a61461051657806373a9fd9f1461051e5780637602bdde14610557576102c8565b80636bf15bbd146104d95780636e570b591461050e576102c8565b80632db4b3a711610280578063551bf81611610265578063551bf8161461040357806356773b791461040b57806369795e931461042f576102c8565b80632db4b3a7146103a25780633c0deba4146103e6576102c8565b80630fa454cf116102b15780630fa454cf1461032f5780631de40e491461034e5780632544dc1814610356576102c8565b806308c6850f146102cd5780630bb6d20814610315575b600080fd5b6102ea600480360360208110156102e357600080fd5b50356107f1565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b61031d610820565b60408051918252519081900360200190f35b61034c6004803603602081101561034557600080fd5b5035610844565b005b61031d610a49565b6103736004803603602081101561036c57600080fd5b5035610a55565b604080519485526020850193909352838301919091526001600160601b03166060830152519081900360800190f35b61034c600480360360a08110156103b857600080fd5b506001600160a01b038135811691602081013590911690604081013590606081013515159060800135610a86565b610373600480360360208110156103fc57600080fd5b5035610c24565b61031d610c54565b610413610c78565b604080516001600160a01b039092168252519081900360200190f35b6104b86004803603606081101561044557600080fd5b6001600160a01b03823581169260208101359091169181019060608101604082013564010000000081111561047957600080fd5b82018360208201111561048b57600080fd5b803590602001918460208302840111640100000000831117156104ad57600080fd5b509092509050610c87565b604080519283526001600160601b0390911660208301528051918290030190f35b61034c600480360360408110156104ef57600080fd5b5080356001600160a01b031690602001356001600160601b0316610d9d565b61031d610e39565b61034c610e47565b61053b6004803603602081101561053457600080fd5b5035610f12565b604080516001600160601b039092168252519081900360200190f35b61031d6004803603608081101561056d57600080fd5b506001600160a01b03813581169160208101359091169060408101359060600135610f25565b6105b0600480360360208110156105a957600080fd5b5035610f3e565b604080519115158252519081900360200190f35b61031d610f53565b61034c610f77565b61031d610fea565b61041361100e565b61031d61101d565b61053b6004803603602081101561060257600080fd5b50356001600160a01b0316611041565b61031d6004803603602081101561062857600080fd5b50356117e9565b61031d61180a565b6102ea6004803603602081101561064d57600080fd5b5035611811565b6106826004803603604081101561066a57600080fd5b506001600160a01b0381358116916020013516611840565b60408051938452602084019290925282820152519081900360600190f35b61031d61186c565b61031d600480360360208110156106be57600080fd5b50356001600160a01b0316611890565b61031d6118a2565b61031d6118c6565b61034c600480360360408110156106f457600080fd5b506001600160a01b0381351690602001356118cc565b61031d6119fe565b61031d611a04565b61031d6004803603604081101561073057600080fd5b506001600160a01b038135169060200135611a0a565b61034c6004803603602081101561075c57600080fd5b50356001600160a01b0316611a3b565b61034c6004803603602081101561078257600080fd5b5035611b5c565b61031d6004803603604081101561079f57600080fd5b506001600160a01b038135169060200135611c6e565b610413611c8b565b61031d611c9a565b610682600480360360408110156107db57600080fd5b506001600160a01b038135169060200135611cbe565b600560205260009081526040902080546001820154600283015460038401546004909401549293919290919085565b7f000000000000000000000000000000000000000000000000000000000000000081565b60025460408051630ad7511760e31b8152905161094e926001600160a01b0316916313bc6d4b9133916356ba88b8916004808301926020929190829003018186803b15801561089257600080fd5b505afa1580156108a6573d6000803e3d6000fd5b505050506040513d60208110156108bc57600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b039092166004830152516024808301926020929190829003018186803b15801561091b57600080fd5b505afa15801561092f573d6000803e3d6000fd5b505050506040513d602081101561094557600080fd5b50516014611cea565b6002546040805163184a263160e11b815290516109c7926001600160a01b0316916330944c62916004808301926020929190829003018186803b15801561099457600080fd5b505afa1580156109a8573d6000803e3d6000fd5b505050506040513d60208110156109be57600080fd5b50516045611cea565b6000339050600154816001600160a01b0316636db9cc996040518163ffffffff1660e01b815260040160206040518083038186803b158015610a0857600080fd5b505afa158015610a1c573d6000803e3d6000fd5b505050506040513d6020811015610a3257600080fd5b505110610a4557610a4581836001611cf8565b5050565b6701aa535d3d0c000081565b600090815260086020526040902080546001820154600283015460039093015491939092916001600160601b031690565b848180151580610aae57506001600160a01b0382166000908152600f60205260409020546001105b15610bbd57600254604080516313bc6d4b60e01b81526001600160a01b0385811660048301529151610b389392909216916313bc6d4b91602480820192602092909190829003018186803b158015610b0557600080fd5b505afa158015610b19573d6000803e3d6000fd5b505050506040513d6020811015610b2f57600080fd5b50516048611cea565b6002546040805163364d118160e01b81526001600160a01b0385811660048301529151610bbd93929092169163364d118191602480820192602092909190829003018186803b158015610b8a57600080fd5b505afa158015610b9e573d6000803e3d6000fd5b505050506040513d6020811015610bb457600080fd5b50516023611cea565b610bd3336001600160a01b038416146023611cea565b610c0f826001600160a01b03166302fb0c5e6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b8a57600080fd5b610c1b878787876120d7565b50505050505050565b6008602052600090815260409020805460018201546002830154600390930154919290916001600160601b031684565b7f000000000000000000000000000000000000000000000000000000000000000081565b6003546001600160a01b031681565b600080600080610cf2600260009054906101000a90046001600160a01b03166001600160a01b031663364d11818a6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610b8a57600080fd5b60005b85811015610d4d57600080610d268b8a8a86818110610d1057fe5b905060200201356001600160a01b03168c6122f4565b9092509050610d358583612951565b9450610d418482612951565b93505050600101610cf5565b5081610d8e826040518060400160405280600381526020017f52323800000000000000000000000000000000000000000000000000000000008152506129b4565b93509350505094509492505050565b6002546040805163184a263160e11b81529051610de3926001600160a01b0316916330944c62916004808301926020929190829003018186803b15801561099457600080fd5b600254604080516313bc6d4b60e01b81523360048201529051610e2f926001600160a01b0316916313bc6d4b916024808301926020929190829003018186803b158015610b0557600080fd5b610a458282612a57565b690b581ceb141f05c1ae0081565b610e4f612b68565b6001600160a01b0316610e6061100e565b6001600160a01b031614610ebb576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000610f1d82612b6c565b90505b919050565b6000610f3385858585612c7b565b90505b949350505050565b60096020526000908152604090205460ff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b600254604080516313bc6d4b60e01b81523360048201529051610fc3926001600160a01b0316916313bc6d4b916024808301926020929190829003018186803b158015610b0557600080fd5b600254610fdc906001600160a01b031633146010611cea565b600154610fe857426001555b565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b031690565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000808290506110b8816001600160a01b031663d0f9953e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561108357600080fd5b505afa158015611097573d6000803e3d6000fd5b505050506040513d60208110156110ad57600080fd5b505115156031611cea565b60025460408051632630c12f60e01b815290516000926001600160a01b031691632630c12f916004808301926020929190829003018186803b1580156110fd57600080fd5b505afa158015611111573d6000803e3d6000fd5b505050506040513d602081101561112757600080fd5b505160408051630ad7511760e31b815290519192506000916001600160a01b038085169263ac41865a92918716916356ba88b891600480820192602092909190829003018186803b15801561117b57600080fd5b505afa15801561118f573d6000803e3d6000fd5b505050506040513d60208110156111a557600080fd5b505160408051631f0b96b960e31b815290516001600160a01b039092169163f85cb5c891600480820192602092909190829003018186803b1580156111e957600080fd5b505afa1580156111fd573d6000803e3d6000fd5b505050506040513d602081101561121357600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b039092166004830152736b175474e89094c44da98b954eedeac495271d0f6024830152516044808301926020929190829003018186803b15801561128c57600080fd5b505afa1580156112a0573d6000803e3d6000fd5b505050506040513d60208110156112b657600080fd5b50516040805162f376cb60e21b815290519192506000916113359184916001600160a01b038816916303cddb2c916004808301926020929190829003018186803b15801561130357600080fd5b505afa158015611317573d6000803e3d6000fd5b505050506040513d602081101561132d57600080fd5b50519061313e565b9050600061137683866001600160a01b03166303976e386040518163ffffffff1660e01b815260040160206040518083038186803b15801561130357600080fd5b9050600154856001600160a01b0316636db9cc996040518163ffffffff1660e01b815260040160206040518083038186803b1580156113b457600080fd5b505afa1580156113c8573d6000803e3d6000fd5b505050506040513d60208110156113de57600080fd5b5051108015906113ef575060015415155b156117db576000856001600160a01b0316636db40dc26040518163ffffffff1660e01b815260040160206040518083038186803b15801561142f57600080fd5b505afa158015611443573d6000803e3d6000fd5b505050506040513d602081101561145957600080fd5b5051905080156114a257611495816040518060400160405280601081526020016f6f766572666c6f77203936206269747360801b8152506129b4565b9650505050505050610f20565b60008061157e886001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114e157600080fd5b505afa1580156114f5573d6000803e3d6000fd5b505050506040513d602081101561150b57600080fd5b50516040805163687cca9f60e11b815290516001600160a01b038c169163d0f9953e916004808301926020929190829003018186803b15801561154d57600080fd5b505afa158015611561573d6000803e3d6000fd5b505050506040513d602081101561157757600080fd5b505161315c565b91509150600060018311611754576115978b87846131d4565b6000838152600860205260409020600301549091506115c3906001600160601b03168211156046611cea565b61174f60086000848152602001908152602001600020600201546117468b6001600160a01b031663dbabf4f36040518163ffffffff1660e01b815260040160206040518083038186803b15801561161957600080fd5b505afa15801561162d573d6000803e3d6000fd5b505050506040513d602081101561164357600080fd5b81019080805190602001909291905050506117406117398e6001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561169357600080fd5b505afa1580156116a7573d6000803e3d6000fd5b505050506040513d60208110156116bd57600080fd5b81019080805190602001909291905050508f6001600160a01b031663d0f9953e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561170757600080fd5b505afa15801561171b573d6000803e3d6000fd5b505050506040513d602081101561173157600080fd5b5051906133f7565b8b90613454565b906133f7565b11156047611cea565b611763565b6117608b8784866134ad565b90505b600061176f8688613567565b9050671bc16d674ec8000081111561178c5750671bc16d674ec800005b611796828261313e565b91506117ca826040518060400160405280601081526020016f6f766572666c6f77203936206269747360801b8152506129b4565b9a5050505050505050505050610f20565b600095505050505050610f20565b600681815481106117f957600080fd5b600091825260209091200154905081565b6276a70081565b600090815260056020526040902080546001820154600283015460038401546004909401549294919390929091565b600b60209081526000928352604080842090915290825290208054600182015460039092015490919083565b7f000000000000000000000000000000000000000000000000000000000000000081565b600f6020526000908152604090205481565b7f000000000000000000000000000000000000000000000000000000000000000081565b60015481565b8181801515806118f457506001600160a01b0382166000908152600f60205260409020546001105b1561199d57600254604080516313bc6d4b60e01b81526001600160a01b038581166004830152915161194b9392909216916313bc6d4b91602480820192602092909190829003018186803b158015610b0557600080fd5b6002546040805163364d118160e01b81526001600160a01b038581166004830152915161199d93929092169163364d118191602480820192602092909190829003018186803b158015610b8a57600080fd5b6119b3336001600160a01b038416146023611cea565b6119ef826001600160a01b03166302fb0c5e6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b8a57600080fd5b6119f88461357f565b50505050565b60045481565b60075481565b600e6020528160005260406000208181548110611a2657600080fd5b90600052602060002001600091509150505481565b611a43612b68565b6001600160a01b0316611a5461100e565b6001600160a01b031614611aaf576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116611af45760405162461bcd60e51b8152600401808060200182810382526026815260200180615a716026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60025460408051630ad7511760e31b81529051611baa926001600160a01b0316916313bc6d4b9133916356ba88b8916004808301926020929190829003018186803b15801561089257600080fd5b6002546040805163184a263160e11b81529051611bf0926001600160a01b0316916330944c62916004808301926020929190829003018186803b15801561099457600080fd5b6000339050600154816001600160a01b0316636db9cc996040518163ffffffff1660e01b815260040160206040518083038186803b158015611c3157600080fd5b505afa158015611c45573d6000803e3d6000fd5b505050506040513d6020811015611c5b57600080fd5b505110610a4557610a4581836000611cf8565b600a60209081526000928352604080842090915290825290205481565b6002546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b600d60209081526000928352604080842090915290825290208054600182015460029092015490919083565b81610a4557610a45816137a4565b60025460408051632630c12f60e01b8152905185926000926001600160a01b0390911691632630c12f91600480820192602092909190829003018186803b158015611d4257600080fd5b505afa158015611d56573d6000803e3d6000fd5b505050506040513d6020811015611d6c57600080fd5b505160408051630ad7511760e31b815290519192506000916001600160a01b038085169263ac41865a92918716916356ba88b891600480820192602092909190829003018186803b158015611dc057600080fd5b505afa158015611dd4573d6000803e3d6000fd5b505050506040513d6020811015611dea57600080fd5b505160408051631f0b96b960e31b815290516001600160a01b039092169163f85cb5c891600480820192602092909190829003018186803b158015611e2e57600080fd5b505afa158015611e42573d6000803e3d6000fd5b505050506040513d6020811015611e5857600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b039092166004830152736b175474e89094c44da98b954eedeac495271d0f6024830152516044808301926020929190829003018186803b158015611ed157600080fd5b505afa158015611ee5573d6000803e3d6000fd5b505050506040513d6020811015611efb57600080fd5b50519050611f09858261313e565b42600090815260056020526040902090955084611f3557600454611f2d90876133f7565b600455611f46565b600454611f429087612951565b6004555b60045481554260018201819055611f5c906137f7565b600282015560075460038201819055611f7b576000600482015561207a565b612074612023600560006006611f9d60016007546133f790919063ffffffff16565b81548110611fa757fe5b906000526020600020015481526020019081526020016000206000015461201d600560006006611fe360016007546133f790919063ffffffff16565b81548110611fed57fe5b906000526020600020015481526020019081526020016000206001015485600101546133f790919063ffffffff16565b90613454565b60056000600661203f60016007546133f790919063ffffffff16565b8154811061204957fe5b906000526020600020015481526020019081526020016000206004015461295190919063ffffffff16565b60048201555b60068054600181018255600091909152427ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f9091018190556120bb9061382f565b6120c58487613f3c565b50506007805460010190555050505050565b6001600160a01b038085166000818152600b602090815260408083209488168084529482529182902082516370a0823160e01b81526004810195909552915191936370a082319260248083019392829003018186803b15801561213957600080fd5b505afa15801561214d573d6000803e3d6000fd5b505050506040513d602081101561216357600080fd5b505142600081815260048401602052604090209182556001820155600382015460029091018190556121a957426000908152600482016020526040812060030155612202565b805460008181526004830160205260409020546121ec916121d0919061201d9042906133f7565b8254600090815260048401602052604090206003015490612951565b4260009081526004830160205260409020600301555b600182151514156122305782158061221c57506001810154155b15612228574260018201555b4281556122c7565b846001600160a01b03166370a08231856040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561227d57600080fd5b505afa158015612291573d6000803e3d6000fd5b505050506040513d60208110156122a757600080fd5b50516122c7576000808255600182018190556122c7906002830190615a3a565b60028101805460018181018355600092835260209092204291015560039091018054909101905550505050565b600080600084905061237f866001600160a01b0316826001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b15801561234257600080fd5b505afa158015612356573d6000803e3d6000fd5b505050506040513d602081101561236c57600080fd5b50516001600160a01b0316146049611cea565b612402866001600160a01b03166306061dfa876040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156123cf57600080fd5b505afa1580156123e3573d6000803e3d6000fd5b505050506040513d60208110156123f957600080fd5b50516049611cea565b60008060008060008061241487614298565b93509350935093506000808d6001600160a01b0316633d8270f58d6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060c06040518083038186803b15801561246c57600080fd5b505afa158015612480573d6000803e3d6000fd5b505050506040513d60c081101561249657600080fd5b50602080820151604092830151835163687cca9f60e11b81529351919550935083926001600160a01b038d169263d0f9953e92600480840193829003018186803b1580156124e357600080fd5b505afa1580156124f7573d6000803e3d6000fd5b505050506040513d602081101561250d57600080fd5b5051118015612580575081896001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561255157600080fd5b505afa158015612565573d6000803e3d6000fd5b505050506040513d602081101561257b57600080fd5b505110155b801561260157508d6001600160a01b0316896001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156125ca57600080fd5b505afa1580156125de573d6000803e3d6000fd5b505050506040513d60208110156125f457600080fd5b50516001600160a01b0316145b1561293d5760006126eb8f8e8c6001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561264657600080fd5b505afa15801561265a573d6000803e3d6000fd5b505050506040513d602081101561267057600080fd5b81019080805190602001909291905050508d6001600160a01b031663d0f9953e6040518163ffffffff1660e01b815260040160206040518083038186803b1580156126ba57600080fd5b505afa1580156126ce573d6000803e3d6000fd5b505050506040513d60208110156126e457600080fd5b5051612c7b565b90506001871515141561272f5761272c612725877f0000000000000000000000000000000000000000000000000000000000000000614531565b87906133f7565b95505b6127476127408b8f8a8a8a8a614555565b8990612951565b975061275f6127588b8f8a8a6148b6565b8a90612951565b98506127726127408b8f8a8a8a8a614982565b97506127856127588b8f8a8a8a8a614d2b565b98506128916127406127fc8c6001600160a01b03166303cddb2c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156127c957600080fd5b505afa1580156127dd573d6000803e3d6000fd5b505050506040513d60208110156127f357600080fd5b50518490613567565b61288b7f00000000000000000000000000000000000000000000000000000000000000008e6001600160a01b0316636db40dc26040518163ffffffff1660e01b815260040160206040518083038186803b15801561285957600080fd5b505afa15801561286d573d6000803e3d6000fd5b505050506040513d602081101561288357600080fd5b505190614531565b9061313e565b97508e6001600160a01b03166302d05d3f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156128cc57600080fd5b505afa1580156128e0573d6000803e3d6000fd5b505050506040513d60208110156128f657600080fd5b50516001600160a01b038e81169116141561293b57612938612740897f0000000000000000000000000000000000000000000000000000000000000000614531565b97505b505b50959c949b50939950505050505050505050565b6000828201838110156129ab576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b6000816c010000000000000000000000008410612a4f5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612a145781810151838201526020016129fc565b50505050905090810190601f168015612a415780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b509192915050565b6002546040805163184a263160e11b81529051612a9d926001600160a01b0316916330944c62916004808301926020929190829003018186803b15801561099457600080fd5b600354604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015612ae857600080fd5b505afa158015612afc573d6000803e3d6000fd5b505050506040513d6020811015612b1257600080fd5b505190506001600160601b038216811015612b4357600354612b3e906001600160a01b03168483614f44565b612b63565b600354612b63906001600160a01b0316846001600160601b038516614f44565b505050565b3390565b6000612b7d6001831015604a611cea565b6102018210612b8e57506000610f20565b6000612c26612b9e8460016133f7565b612c206701aa535d3d0c0000732de341674a99b379DA0fE53c00ae4Cf251adaE8963907af6c06040518163ffffffff1660e01b815260040160206040518083038186803b158015612bee57600080fd5b505af4158015612c02573d6000803e3d6000fd5b505050506040513d6020811015612c1857600080fd5b505190612951565b90614fc4565b90506000612c3e690b581ceb141f05c1ae0083613567565b9050612c72816040518060400160405280601081526020016f6f766572666c6f77203936206269747360801b8152506129b4565b92505050610f20565b6000612cfb856001600160a01b031663cb12233b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612cb957600080fd5b505afa158015612ccd573d6000803e3d6000fd5b505050506040513d6020811015612ce357600080fd5b50518310801590612cf45750838310155b6041611cea565b6001600160a01b038086166000818152600b60209081526040808320948916808452948252808320938352600c825280832094835293815290839020835160808101855281548152600180830154938201939093526002820154948101949094526003015460608401528101549091901580612d7a5750838260010154115b15612d8a57600092505050610f36565b866001600160a01b031663cb12233b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612dc357600080fd5b505afa158015612dd7573d6000803e3d6000fd5b505050506040513d6020811015612ded57600080fd5b50518511612e5d57866001600160a01b031663cb12233b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612e2e57600080fd5b505afa158015612e42573d6000803e3d6000fd5b505050506040513d6020811015612e5857600080fd5b505194505b612e698787878761506d565b60208301528152612e7b87868661519c565b6060830152604082015260208101518151612ead9110801590612ea657508160600151826040015111155b6051611cea565b6000808260000151871015612ec55760009150612f32565b8251871115612f1957825160009081526004850160205260409020548351612f1291612ef69161201d908b906133f7565b8451600090815260048701602052604090206003015490612951565b9150612f32565b8251600090815260048501602052604090206003015491505b6001600160a01b0389166000908152600d60209081526040808320868201805185529252909120549051612f9f91612f6f9161201d908b906133f7565b6001600160a01b038b166000908152600d6020908152604080832088820151845290915290206002015490612951565b9050612faf818311156050611cea565b85871415612fde5780612fc9576000945050505050610f36565b612fd38282613567565b945050505050610f36565b8260200151861015612ff7576000945050505050610f36565b82602001518614801561300e575060208301518351145b15613098576001600160a01b0389166000908152600d6020908152604080832060608701805185529252909120549051613088918391611740916130579161201d908c906133f7565b6001600160a01b038d166000908152600d6020908152604080832060608b0151845290915290206002015490612951565b9050612fc9818311156050611cea565b6130f6826117406130d6876004016000886020015181526020019081526020016000206000015461201d88602001518c6133f790919063ffffffff16565b602080880151600090815260048a01909152604090206003015490612951565b6001600160a01b038a166000908152600d602090815260408083206060880180518552925290912054905191935061308891839161174091613057919061201d908c906133f7565b60006129ab670de0b6b3a76400006131568585613454565b906152b4565b60008080613183670de0b6b3a76400006131566276a70061317d888a6133f7565b90615313565b905060006131af670de0b6b3a76400006131566276a70061317d6001548b6133f790919063ffffffff16565b90506131bc826001612951565b6131c7826001612951565b9350935050509250929050565b6000613227600260009054906101000a90046001600160a01b03166001600160a01b03166330944c626040518163ffffffff1660e01b815260040160206040518083038186803b15801561099457600080fd5b6000849050600061336a826001600160a01b031663dbabf4f36040518163ffffffff1660e01b815260040160206040518083038186803b15801561326a57600080fd5b505afa15801561327e573d6000803e3d6000fd5b505050506040513d602081101561329457600080fd5b5051604080517f825deffe000000000000000000000000000000000000000000000000000000008152905161174091613363916001600160a01b0388169163825deffe916004808301926020929190829003018186803b1580156132f757600080fd5b505afa15801561330b573d6000803e3d6000fd5b505050506040513d602081101561332157600080fd5b50516040805163687cca9f60e11b815290516001600160a01b0389169163d0f9953e916004808301926020929190829003018186803b15801561170757600080fd5b8890613454565b90506133eb61337942866133f7565b6131566133b987866001600160a01b031663d0f9953e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561170757600080fd5b6000888152600860205260409020600381015460029091015461201d916001600160601b03169061288b908890613567565b925050505b9392505050565b60008282111561344e576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082613463575060006129ae565b8282028284828161347057fe5b04146129ab5760405162461bcd60e51b8152600401808060200182810382526021815260200180615a976021913960400191505060405180910390fd5b6000613500600260009054906101000a90046001600160a01b03166001600160a01b03166330944c626040518163ffffffff1660e01b815260040160206040518083038186803b15801561099457600080fd5b6000805b61350f8460016133f7565b811161355d57600061353461352b6276a70061201d8986612951565b60015490612951565b90506000613545898989868661539b565b90506135518482612951565b93505050600101613504565b5095945050505050565b60006129ab8261315685670de0b6b3a7640000613454565b6001600160a01b0381166000818152600d6020908152604080832042845282529182902082517f18160ddd00000000000000000000000000000000000000000000000000000000815292518594919391926318160ddd9260048082019391829003018186803b1580156135f157600080fd5b505afa158015613605573d6000803e3d6000fd5b505050506040513d602081101561361b57600080fd5b505181554260018201556001600160a01b0383166000908152600f602052604090205461364e5760006002820155613762565b6001600160a01b0382166000908152600d60209081526040808320600e8352818420600f9093529083205461375c936136ed93909161368e9060016133f7565b8154811061369857fe5b600091825260208083209091015483528281019390935260409182018120546001600160a01b0388168252600d8452828220600e8552838320600f90955292822054909361201d939291611fe39060016133f7565b6001600160a01b0384166000908152600d60209081526040808320600e8352818420600f90935290832054909291906137279060016133f7565b8154811061373157fe5b906000526020600020015481526020019081526020016000206002015461295190919063ffffffff16565b60028201555b506001600160a01b03166000818152600e6020908152604080832080546001818101835591855283852042910155938352600f90915290208054909101905550565b62461bcd60e51b6000908152602060045260076024526642414223000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b600080613822670de0b6b3a76400006131566276a70061317d600154886133f790919063ffffffff16565b90506133f0816001612951565b6002546040805163184a263160e11b81529051613875926001600160a01b0316916330944c62916004808301926020929190829003018186803b15801561099457600080fd5b600060086000613884846137f7565b81526020019081526020016000209050600960006138a66001611740866137f7565b815260208101919091526040016000205460ff16613f01576138c7826137f7565b600182015560075461391757600060028201556138eb6138e6836137f7565b612b6c565b6003820180546bffffffffffffffffffffffff19166001600160601b0392909216919091179055613ec9565b600061398460056000600661393860016007546133f790919063ffffffff16565b8154811061394257fe5b906000526020600020015481526020019081526020016000206004015460056000868152602001908152602001600020600401546133f790919063ffffffff16565b90506139946001611740856137f7565b6005600060066139b060016007546133f790919063ffffffff16565b815481106139ba57fe5b90600052602060002001548152602001908152602001600020600201541415613b0557613a5c613a356005600060066139ff60016007546133f790919063ffffffff16565b81548110613a0957fe5b9060005260206000200154815260200190815260200160002060010154856133f790919063ffffffff16565b613156613a5561272561352b6276a7006117406276a70061201d8c6137f7565b8490613454565b6002830155613a6d6138e6846137f7565b6003830180546bffffffffffffffffffffffff19166001600160601b03929092169190911790556002820154613ada90613aa89083906133f7565b60086000613aba6001611740896137f7565b81526020019081526020016000206002015461295190919063ffffffff16565b60086000613aec6001611740886137f7565b8152602081019190915260400160002060020155613ec7565b60005b613b57600560006006613b2760016007546133f790919063ffffffff16565b81548110613b3157fe5b9060005260206000200154815260200190815260200160002060020154611740866137f7565b8111613ec557600060086000613b838460056000600661372760016007546133f790919063ffffffff16565b815260200190815260200160002090506000613bbf61352b6276a70061201d8660056000600661372760016007546133f790919063ffffffff16565b905082613ccd57613c84613c79613c21600560006006613beb60016007546133f790919063ffffffff16565b81548110613bf557fe5b9060005260206000200154815260200190815260200160002060010154896133f790919063ffffffff16565b613156613363600560006006613c4360016007546133f790919063ffffffff16565b81548110613c4d57fe5b9060005260206000200154815260200190815260200160002060010154866133f790919063ffffffff16565b600284015490612951565b6002830155600754600590600090600690613ca09060016133f7565b81548110613caa57fe5b600091825260208083209091015483528201929092526040019020548255613ebb565b613d1c600560006006613cec60016007546133f790919063ffffffff16565b81548110613cf657fe5b9060005260206000200154815260200190815260200160002060020154611740886137f7565b831015613e1f57613d88613d7b600560006006613d4560016007546133f790919063ffffffff16565b81548110613d4f57fe5b9060005260206000200154815260200190815260200160002060010154886133f790919063ffffffff16565b613156866276a700613454565b8260020181905550613db36138e68460056000600661372760016007546133f790919063ffffffff16565b8260030160006101000a8154816001600160601b0302191690836001600160601b03160217905550613dfb8360056000600661372760016007546133f790919063ffffffff16565b8260010181905550600560006006613ca060016007546133f790919063ffffffff16565b613e6f613e41600560006006613d4560016007546133f790919063ffffffff16565b613156613e68613e6161352b6276a7006117406276a70061201d8f6137f7565b8a906133f7565b8790613454565b6002860155613e806138e6876137f7565b6003860180546bffffffffffffffffffffffff19166001600160601b0392909216919091179055613eb0866137f7565b600186015560045485555b5050600101613b08565b505b505b600160096000613edd6001611740876137f7565b81526020810191909152604001600020805460ff1916911515919091179055613f34565b613f2e613f2360056000600661393860016007546133f790919063ffffffff16565b600283015490612951565b60028201555b600454905550565b6002546040805163184a263160e11b81529051613f82926001600160a01b0316916330944c62916004808301926020929190829003018186803b15801561099457600080fd5b816001600160a01b0316637519ab506040518163ffffffff1660e01b815260040160206040518083038186803b158015613fbb57600080fd5b505afa158015613fcf573d6000803e3d6000fd5b505050506040513d6020811015613fe557600080fd5b505115610a4557614059826001600160a01b0316637519ab506040518163ffffffff1660e01b815260040160206040518083038186803b15801561402857600080fd5b505afa15801561403c573d6000803e3d6000fd5b505050506040513d602081101561405257600080fd5b50516137f7565b614062426137f7565b141561415b576141236140e46140dd846001600160a01b0316637519ab506040518163ffffffff1660e01b815260040160206040518083038186803b1580156140aa57600080fd5b505afa1580156140be573d6000803e3d6000fd5b505050506040513d60208110156140d457600080fd5b505142906133f7565b8390613454565b6001600160a01b0384166000908152600a6020526040812090614106426137f7565b81526020019081526020016000205461295190919063ffffffff16565b6001600160a01b0383166000908152600a6020526040812090614145426137f7565b8152602081019190915260400160002055610a45565b6000806141cc846001600160a01b0316637519ab506040518163ffffffff1660e01b815260040160206040518083038186803b15801561419a57600080fd5b505afa1580156141ae573d6000803e3d6000fd5b505050506040513d60208110156141c457600080fd5b50514261315c565b91509150600061421583613156613e68886001600160a01b0316637519ab506040518163ffffffff1660e01b815260040160206040518083038186803b1580156140aa57600080fd5b905060005b6142258460016133f7565b8111614290576001600160a01b0386166000908152600a60205260408120614254918491906141068786612951565b6001600160a01b0387166000908152600a60205260408120906142778685612951565b815260208101919091526040016000205560010161421a565b505050505050565b60008060008060008590506000816001600160a01b03166303976e386040518163ffffffff1660e01b815260040160206040518083038186803b1580156142de57600080fd5b505afa1580156142f2573d6000803e3d6000fd5b505050506040513d602081101561430857600080fd5b50516040805163d3406abd60e01b81529051919250600091614410916143c3916001600160a01b0387169163d3406abd916004808301926020929190829003018186803b15801561435857600080fd5b505afa15801561436c573d6000803e3d6000fd5b505050506040513d602081101561438257600080fd5b50516040805162f376cb60e21b815290516001600160a01b038816916303cddb2c916004808301926020929190829003018186803b15801561130357600080fd5b846001600160a01b03166303cddb2c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156143fc57600080fd5b505afa158015612c02573d6000803e3d6000fd5b90506000836001600160a01b03166303cddb2c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561444d57600080fd5b505afa158015614461573d6000803e3d6000fd5b505050506040513d602081101561447757600080fd5b505190506000808080848711801561448f5750858710155b156144b857600193508392506144a587866133f7565b91506144b187876133f7565b905061451d565b8487101580156144c757508587105b156144ea5760019350600092506144de87866133f7565b91506144b186886133f7565b84871080156144f857508587105b1561451d576000935083925061450e85886133f7565b915061451a86886133f7565b90505b929a50985096509450505050509193509193565b6000670de0b6b3a76400006145468484613454565b8161454d57fe5b049392505050565b6000808790506000816001600160a01b0316636db40dc26040518163ffffffff1660e01b815260040160206040518083038186803b15801561459657600080fd5b505afa1580156145aa573d6000803e3d6000fd5b505050506040513d60208110156145c057600080fd5b50516040805163d3406abd60e01b81529051919250600091829182916146b89161467f916001600160a01b0389169163d3406abd916004808301926020929190829003018186803b15801561461457600080fd5b505afa158015614628573d6000803e3d6000fd5b505050506040513d602081101561463e57600080fd5b50516040805162f376cb60e21b815290516001600160a01b038a16916303cddb2c916004808301926020929190829003018186803b15801561130357600080fd5b866001600160a01b03166303cddb2c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156143fc57600080fd5b90508a6001600160a01b0316856001600160a01b0316631fe4a6866040518163ffffffff1660e01b815260040160206040518083038186803b1580156146fd57600080fd5b505afa158015614711573d6000803e3d6000fd5b505050506040513d602081101561472757600080fd5b50516001600160a01b0316141561489657614762847f0000000000000000000000000000000000000000000000000000000000000000614531565b925060018a151514801561477857506001881515145b156147ed57614788836002613454565b91506147da6147d36147cc876001600160a01b03166303976e386040518163ffffffff1660e01b815260040160206040518083038186803b1580156127c957600080fd5b859061313e565b8490612951565b9250818311156147e8578192505b6148a4565b60018a15151480156147fd575087155b156148965761488f61488861488161487a84896001600160a01b03166303976e386040518163ffffffff1660e01b815260040160206040518083038186803b15801561484857600080fd5b505afa15801561485c573d6000803e3d6000fd5b505050506040513d602081101561487257600080fd5b505190613567565b869061313e565b85906133f7565b84906133f7565b92506148a4565b6000955050505050506148ac565b509093505050505b9695505050505050565b600084816001851515141561497557856001600160a01b0316826001600160a01b0316631fe4a6866040518163ffffffff1660e01b815260040160206040518083038186803b15801561490857600080fd5b505afa15801561491c573d6000803e3d6000fd5b505050506040513d602081101561493257600080fd5b50516001600160a01b031614156149705761496d847f0000000000000000000000000000000000000000000000000000000000000000614531565b90505b6148ac565b5060009695505050505050565b6000808790506000816001600160a01b0316636db40dc26040518163ffffffff1660e01b815260040160206040518083038186803b1580156149c357600080fd5b505afa1580156149d7573d6000803e3d6000fd5b505050506040513d60208110156149ed57600080fd5b5051604080517f950c78220000000000000000000000000000000000000000000000000000000081526001600160a01b038b8116600483015291519293506000929185169163950c782291602480820192602092909190829003018186803b158015614a5857600080fd5b505afa158015614a6c573d6000803e3d6000fd5b505050506040513d6020811015614a8257600080fd5b50516040805163d3406abd60e01b815290519192506000918291614ad59161467f916001600160a01b0389169163d3406abd91600480820192602092909190829003018186803b15801561461457600080fd5b905060008084138015614aea575060018b1515145b8015614af857506001891515145b15614ba057614b99614b6f876001600160a01b031663d40244cb6040518163ffffffff1660e01b815260040160206040518083038186803b158015614b3c57600080fd5b505afa158015614b50573d6000803e3d6000fd5b505050506040513d6020811015614b6657600080fd5b50518690613567565b61288b877f0000000000000000000000000000000000000000000000000000000000000000614531565b9050614d1b565b600084138015614bb2575060018b1515145b8015614bbc575088155b15614c2057614c00614b6f876001600160a01b031663d40244cb6040518163ffffffff1660e01b815260040160206040518083038186803b158015614b3c57600080fd5b9050614b99614c19614c128a85613567565b839061313e565b82906133f7565b600084138015614c2e57508a155b15614c3b57506000614d1b565b600084128015614c49575088155b15614d0057614cc8614b6f876001600160a01b031663449b98266040518163ffffffff1660e01b815260040160206040518083038186803b158015614c8d57600080fd5b505afa158015614ca1573d6000803e3d6000fd5b505050506040513d6020811015614cb757600080fd5b5051614cc2876157e1565b90613567565b9050614cd5816002613454565b9250614cee614ce7614c128a85613567565b8290612951565b905082811115614cfb5750815b614d1b565b600084128015614d1257506001891515145b15614d1b575060005b9c9b505050505050505050505050565b600080879050600080826001600160a01b031663950c78228a6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015614d8157600080fd5b505afa158015614d95573d6000803e3d6000fd5b505050506040513d6020811015614dab57600080fd5b5051905060018815151415614f32576000811315614e6057614e59836001600160a01b031663d40244cb6040518163ffffffff1660e01b815260040160206040518083038186803b158015614dff57600080fd5b505afa158015614e13573d6000803e3d6000fd5b505050506040513d6020811015614e2957600080fd5b5051614cc28361288b8b7f0000000000000000000000000000000000000000000000000000000000000000614531565b9150614f2d565b600081128015614e6e575085155b15614f1157614e59836001600160a01b031663449b98266040518163ffffffff1660e01b815260040160206040518083038186803b158015614eaf57600080fd5b505afa158015614ec3573d6000803e3d6000fd5b505050506040513d6020811015614ed957600080fd5b5051614cc2614ee7846157e1565b61288b8b7f0000000000000000000000000000000000000000000000000000000000000000614531565b600081128015614f2357506001861515145b15614f2d57600091505b614f37565b600091505b5098975050505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612b639084906157f8565b600080732de341674a99b379DA0fE53c00ae4Cf251adaE8963907af6c06040518163ffffffff1660e01b815260040160206040518083038186803b15801561500b57600080fd5b505af415801561501f573d6000803e3d6000fd5b505050506040513d602081101561503557600080fd5b505190505b82156129ab576002830615615056576150538185614531565b90505b6150608480614531565b935060028304925061503a565b6001600160a01b038085166000908152600b60209081526040808320938716835292905290812060028101805483929183916150aa9060016133f7565b815481106150b457fe5b906000526020600020015490506000826002016000815481106150d357fe5b90600052602060002001549050858211806150ed57508681105b1561518f5760005b60028401546151059060016133f7565b811161518d578684600201828154811061511b57fe5b9060005260206000200154116151485783600201818154811061513a57fe5b906000526020600020015492505b8784600201828154811061515857fe5b9060005260206000200154116151855783600201818154811061517757fe5b906000526020600020015491505b6001016150f5565b505b9890975095505050505050565b6001600160a01b0383166000908152600e6020526040812054819081906151c49060016133f7565b6001600160a01b0387166000908152600e6020526040812080549293509091839081106151ed57fe5b906000526020600020015490506000600e6000896001600160a01b03166001600160a01b0316815260200190815260200160002060008154811061522d57fe5b906000526020600020015490508582118061524757508681105b156152a85760005b8381116152a6576001600160a01b0389166000908152600e6020526040812080548390811061527a57fe5b90600052602060002001549050878111615292578093505b88811161529d578092505b5060010161524f565b505b97909650945050505050565b600080821161530a576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161454d57fe5b600081615367576040805162461bcd60e51b815260206004820152601060248201527f43616e7420646976696465206279203000000000000000000000000000000000604482015290519081900360640190fd5b600083116153765760006129ab565b6129ab6001615395846131568361174089670de0b6b3a7640000613454565b90612951565b60006153ee600260009054906101000a90046001600160a01b03166001600160a01b03166330944c626040518163ffffffff1660e01b815260040160206040518083038186803b15801561099457600080fd5b6000806000670de0b6b3a764000090508461543f6276a7008b6001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b1580156143fc57600080fd5b11156155335761552c600a60008b6001600160a01b03166001600160a01b0316815260200190815260200160002060006154ab8c6001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561402857600080fd5b8152602001908152602001600020546117406117398c6001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b1580156154f957600080fd5b505afa15801561550d573d6000803e3d6000fd5b505050506040513d602081101561552357600080fd5b505189906133f7565b9250615768565b615540856276a7006133f7565b896001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561557957600080fd5b505afa15801561558d573d6000803e3d6000fd5b505050506040513d60208110156155a357600080fd5b50511080156156155750886001600160a01b031663d0f9953e6040518163ffffffff1660e01b815260040160206040518083038186803b1580156155e657600080fd5b505afa1580156155fa573d6000803e3d6000fd5b505050506040513d602081101561561057600080fd5b505185105b15615676576001600160a01b0389166000908152600a6020526040812061552c9161564b61564689623b53806133f7565b6137f7565b815260208101919091526040016000205461174061173961566f896276a7006133f7565b89906133f7565b6156a0615689612725876276a7006133f7565b614cc2615699886276a7006133f7565b42906133f7565b9050615765600a60008b6001600160a01b03166001600160a01b0316815260200190815260200160002060006157088c6001600160a01b031663d0f9953e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561402857600080fd5b815260208101919091526040016000205461174061173961572c896276a7006133f7565b8d6001600160a01b031663d0f9953e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561170757600080fd5b92505b600860006157768989612951565b8152602001908152602001600020600201549150615798828411156047611cea565b6157d48161288b600860006157ad8c8c612951565b81526020810191909152604001600020600301546001600160601b031661288b8787613567565b9998505050505050505050565b6000808212156157f45781600003610f1d565b5090565b600061584d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166158a99092919063ffffffff16565b805190915015612b635780806020019051602081101561586c57600080fd5b5051612b635760405162461bcd60e51b815260040180806020018281038252602a815260200180615ab8602a913960400191505060405180910390fd5b6060610f368484600085856158bd856159ce565b61590e576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b6020831061594c5780518252601f19909201916020918201910161592d565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146159ae576040519150601f19603f3d011682016040523d82523d6000602084013e6159b3565b606091505b50915091506159c38282866159d4565b979650505050505050565b3b151590565b606083156159e35750816133f0565b8251156159f35782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315612a145781810151838201526020016129fc565b5080546000825590600052602060002090810190615a589190615a5b565b50565b5b808211156157f45760008155600101615a5c56fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212207d76dc61c75912a4aacd4afccc7307b4251bb6bdc2395d98365545646d0d10d664736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102c85760003560e01c8063908589441161017b578063df14e06f116100d8578063f5750d0f1161008c578063f77c479111610071578063f77c4791146107b5578063fa51a34b146107bd578063fd9ff86c146107c5576102c8565b8063f5750d0f1461076c578063f6c8d7b514610789576102c8565b8063f1068454116100bd578063f106845414610712578063f1ed38611461071a578063f2fde38b14610746576102c8565b8063df14e06f146106de578063e5cab4fa1461070a576102c8565b8063d60913ce1161012f578063db4b3af511610114578063db4b3af5146106a8578063dc178712146106ce578063ddaa26ad146106d6576102c8565b8063d60913ce14610654578063da17a6ca146106a0576102c8565b8063a675004711610160578063a675004714610612578063a70b9f0c1461062f578063cf14938714610637576102c8565b806390858944146105e45780639de9a052146105ec576102c8565b80636bf15bbd1161022957806378769678116101dd57806379fc904f116101c257806379fc904f146105cc5780638cb8c855146105d45780638da5cb5b146105dc576102c8565b8063787696781461059357806379102629146105c4576102c8565b8063715018a61161020e578063715018a61461051657806373a9fd9f1461051e5780637602bdde14610557576102c8565b80636bf15bbd146104d95780636e570b591461050e576102c8565b80632db4b3a711610280578063551bf81611610265578063551bf8161461040357806356773b791461040b57806369795e931461042f576102c8565b80632db4b3a7146103a25780633c0deba4146103e6576102c8565b80630fa454cf116102b15780630fa454cf1461032f5780631de40e491461034e5780632544dc1814610356576102c8565b806308c6850f146102cd5780630bb6d20814610315575b600080fd5b6102ea600480360360208110156102e357600080fd5b50356107f1565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b61031d610820565b60408051918252519081900360200190f35b61034c6004803603602081101561034557600080fd5b5035610844565b005b61031d610a49565b6103736004803603602081101561036c57600080fd5b5035610a55565b604080519485526020850193909352838301919091526001600160601b03166060830152519081900360800190f35b61034c600480360360a08110156103b857600080fd5b506001600160a01b038135811691602081013590911690604081013590606081013515159060800135610a86565b610373600480360360208110156103fc57600080fd5b5035610c24565b61031d610c54565b610413610c78565b604080516001600160a01b039092168252519081900360200190f35b6104b86004803603606081101561044557600080fd5b6001600160a01b03823581169260208101359091169181019060608101604082013564010000000081111561047957600080fd5b82018360208201111561048b57600080fd5b803590602001918460208302840111640100000000831117156104ad57600080fd5b509092509050610c87565b604080519283526001600160601b0390911660208301528051918290030190f35b61034c600480360360408110156104ef57600080fd5b5080356001600160a01b031690602001356001600160601b0316610d9d565b61031d610e39565b61034c610e47565b61053b6004803603602081101561053457600080fd5b5035610f12565b604080516001600160601b039092168252519081900360200190f35b61031d6004803603608081101561056d57600080fd5b506001600160a01b03813581169160208101359091169060408101359060600135610f25565b6105b0600480360360208110156105a957600080fd5b5035610f3e565b604080519115158252519081900360200190f35b61031d610f53565b61034c610f77565b61031d610fea565b61041361100e565b61031d61101d565b61053b6004803603602081101561060257600080fd5b50356001600160a01b0316611041565b61031d6004803603602081101561062857600080fd5b50356117e9565b61031d61180a565b6102ea6004803603602081101561064d57600080fd5b5035611811565b6106826004803603604081101561066a57600080fd5b506001600160a01b0381358116916020013516611840565b60408051938452602084019290925282820152519081900360600190f35b61031d61186c565b61031d600480360360208110156106be57600080fd5b50356001600160a01b0316611890565b61031d6118a2565b61031d6118c6565b61034c600480360360408110156106f457600080fd5b506001600160a01b0381351690602001356118cc565b61031d6119fe565b61031d611a04565b61031d6004803603604081101561073057600080fd5b506001600160a01b038135169060200135611a0a565b61034c6004803603602081101561075c57600080fd5b50356001600160a01b0316611a3b565b61034c6004803603602081101561078257600080fd5b5035611b5c565b61031d6004803603604081101561079f57600080fd5b506001600160a01b038135169060200135611c6e565b610413611c8b565b61031d611c9a565b610682600480360360408110156107db57600080fd5b506001600160a01b038135169060200135611cbe565b600560205260009081526040902080546001820154600283015460038401546004909401549293919290919085565b7f000000000000000000000000000000000000000000000000000000000000000081565b60025460408051630ad7511760e31b8152905161094e926001600160a01b0316916313bc6d4b9133916356ba88b8916004808301926020929190829003018186803b15801561089257600080fd5b505afa1580156108a6573d6000803e3d6000fd5b505050506040513d60208110156108bc57600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b039092166004830152516024808301926020929190829003018186803b15801561091b57600080fd5b505afa15801561092f573d6000803e3d6000fd5b505050506040513d602081101561094557600080fd5b50516014611cea565b6002546040805163184a263160e11b815290516109c7926001600160a01b0316916330944c62916004808301926020929190829003018186803b15801561099457600080fd5b505afa1580156109a8573d6000803e3d6000fd5b505050506040513d60208110156109be57600080fd5b50516045611cea565b6000339050600154816001600160a01b0316636db9cc996040518163ffffffff1660e01b815260040160206040518083038186803b158015610a0857600080fd5b505afa158015610a1c573d6000803e3d6000fd5b505050506040513d6020811015610a3257600080fd5b505110610a4557610a4581836001611cf8565b5050565b6701aa535d3d0c000081565b600090815260086020526040902080546001820154600283015460039093015491939092916001600160601b031690565b848180151580610aae57506001600160a01b0382166000908152600f60205260409020546001105b15610bbd57600254604080516313bc6d4b60e01b81526001600160a01b0385811660048301529151610b389392909216916313bc6d4b91602480820192602092909190829003018186803b158015610b0557600080fd5b505afa158015610b19573d6000803e3d6000fd5b505050506040513d6020811015610b2f57600080fd5b50516048611cea565b6002546040805163364d118160e01b81526001600160a01b0385811660048301529151610bbd93929092169163364d118191602480820192602092909190829003018186803b158015610b8a57600080fd5b505afa158015610b9e573d6000803e3d6000fd5b505050506040513d6020811015610bb457600080fd5b50516023611cea565b610bd3336001600160a01b038416146023611cea565b610c0f826001600160a01b03166302fb0c5e6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b8a57600080fd5b610c1b878787876120d7565b50505050505050565b6008602052600090815260409020805460018201546002830154600390930154919290916001600160601b031684565b7f000000000000000000000000000000000000000000000000000000000000000081565b6003546001600160a01b031681565b600080600080610cf2600260009054906101000a90046001600160a01b03166001600160a01b031663364d11818a6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610b8a57600080fd5b60005b85811015610d4d57600080610d268b8a8a86818110610d1057fe5b905060200201356001600160a01b03168c6122f4565b9092509050610d358583612951565b9450610d418482612951565b93505050600101610cf5565b5081610d8e826040518060400160405280600381526020017f52323800000000000000000000000000000000000000000000000000000000008152506129b4565b93509350505094509492505050565b6002546040805163184a263160e11b81529051610de3926001600160a01b0316916330944c62916004808301926020929190829003018186803b15801561099457600080fd5b600254604080516313bc6d4b60e01b81523360048201529051610e2f926001600160a01b0316916313bc6d4b916024808301926020929190829003018186803b158015610b0557600080fd5b610a458282612a57565b690b581ceb141f05c1ae0081565b610e4f612b68565b6001600160a01b0316610e6061100e565b6001600160a01b031614610ebb576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000610f1d82612b6c565b90505b919050565b6000610f3385858585612c7b565b90505b949350505050565b60096020526000908152604090205460ff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b600254604080516313bc6d4b60e01b81523360048201529051610fc3926001600160a01b0316916313bc6d4b916024808301926020929190829003018186803b158015610b0557600080fd5b600254610fdc906001600160a01b031633146010611cea565b600154610fe857426001555b565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b031690565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000808290506110b8816001600160a01b031663d0f9953e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561108357600080fd5b505afa158015611097573d6000803e3d6000fd5b505050506040513d60208110156110ad57600080fd5b505115156031611cea565b60025460408051632630c12f60e01b815290516000926001600160a01b031691632630c12f916004808301926020929190829003018186803b1580156110fd57600080fd5b505afa158015611111573d6000803e3d6000fd5b505050506040513d602081101561112757600080fd5b505160408051630ad7511760e31b815290519192506000916001600160a01b038085169263ac41865a92918716916356ba88b891600480820192602092909190829003018186803b15801561117b57600080fd5b505afa15801561118f573d6000803e3d6000fd5b505050506040513d60208110156111a557600080fd5b505160408051631f0b96b960e31b815290516001600160a01b039092169163f85cb5c891600480820192602092909190829003018186803b1580156111e957600080fd5b505afa1580156111fd573d6000803e3d6000fd5b505050506040513d602081101561121357600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b039092166004830152736b175474e89094c44da98b954eedeac495271d0f6024830152516044808301926020929190829003018186803b15801561128c57600080fd5b505afa1580156112a0573d6000803e3d6000fd5b505050506040513d60208110156112b657600080fd5b50516040805162f376cb60e21b815290519192506000916113359184916001600160a01b038816916303cddb2c916004808301926020929190829003018186803b15801561130357600080fd5b505afa158015611317573d6000803e3d6000fd5b505050506040513d602081101561132d57600080fd5b50519061313e565b9050600061137683866001600160a01b03166303976e386040518163ffffffff1660e01b815260040160206040518083038186803b15801561130357600080fd5b9050600154856001600160a01b0316636db9cc996040518163ffffffff1660e01b815260040160206040518083038186803b1580156113b457600080fd5b505afa1580156113c8573d6000803e3d6000fd5b505050506040513d60208110156113de57600080fd5b5051108015906113ef575060015415155b156117db576000856001600160a01b0316636db40dc26040518163ffffffff1660e01b815260040160206040518083038186803b15801561142f57600080fd5b505afa158015611443573d6000803e3d6000fd5b505050506040513d602081101561145957600080fd5b5051905080156114a257611495816040518060400160405280601081526020016f6f766572666c6f77203936206269747360801b8152506129b4565b9650505050505050610f20565b60008061157e886001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114e157600080fd5b505afa1580156114f5573d6000803e3d6000fd5b505050506040513d602081101561150b57600080fd5b50516040805163687cca9f60e11b815290516001600160a01b038c169163d0f9953e916004808301926020929190829003018186803b15801561154d57600080fd5b505afa158015611561573d6000803e3d6000fd5b505050506040513d602081101561157757600080fd5b505161315c565b91509150600060018311611754576115978b87846131d4565b6000838152600860205260409020600301549091506115c3906001600160601b03168211156046611cea565b61174f60086000848152602001908152602001600020600201546117468b6001600160a01b031663dbabf4f36040518163ffffffff1660e01b815260040160206040518083038186803b15801561161957600080fd5b505afa15801561162d573d6000803e3d6000fd5b505050506040513d602081101561164357600080fd5b81019080805190602001909291905050506117406117398e6001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561169357600080fd5b505afa1580156116a7573d6000803e3d6000fd5b505050506040513d60208110156116bd57600080fd5b81019080805190602001909291905050508f6001600160a01b031663d0f9953e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561170757600080fd5b505afa15801561171b573d6000803e3d6000fd5b505050506040513d602081101561173157600080fd5b5051906133f7565b8b90613454565b906133f7565b11156047611cea565b611763565b6117608b8784866134ad565b90505b600061176f8688613567565b9050671bc16d674ec8000081111561178c5750671bc16d674ec800005b611796828261313e565b91506117ca826040518060400160405280601081526020016f6f766572666c6f77203936206269747360801b8152506129b4565b9a5050505050505050505050610f20565b600095505050505050610f20565b600681815481106117f957600080fd5b600091825260209091200154905081565b6276a70081565b600090815260056020526040902080546001820154600283015460038401546004909401549294919390929091565b600b60209081526000928352604080842090915290825290208054600182015460039092015490919083565b7f000000000000000000000000000000000000000000000000000000000000000081565b600f6020526000908152604090205481565b7f000000000000000000000000000000000000000000000000000000000000000081565b60015481565b8181801515806118f457506001600160a01b0382166000908152600f60205260409020546001105b1561199d57600254604080516313bc6d4b60e01b81526001600160a01b038581166004830152915161194b9392909216916313bc6d4b91602480820192602092909190829003018186803b158015610b0557600080fd5b6002546040805163364d118160e01b81526001600160a01b038581166004830152915161199d93929092169163364d118191602480820192602092909190829003018186803b158015610b8a57600080fd5b6119b3336001600160a01b038416146023611cea565b6119ef826001600160a01b03166302fb0c5e6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b8a57600080fd5b6119f88461357f565b50505050565b60045481565b60075481565b600e6020528160005260406000208181548110611a2657600080fd5b90600052602060002001600091509150505481565b611a43612b68565b6001600160a01b0316611a5461100e565b6001600160a01b031614611aaf576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116611af45760405162461bcd60e51b8152600401808060200182810382526026815260200180615a716026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60025460408051630ad7511760e31b81529051611baa926001600160a01b0316916313bc6d4b9133916356ba88b8916004808301926020929190829003018186803b15801561089257600080fd5b6002546040805163184a263160e11b81529051611bf0926001600160a01b0316916330944c62916004808301926020929190829003018186803b15801561099457600080fd5b6000339050600154816001600160a01b0316636db9cc996040518163ffffffff1660e01b815260040160206040518083038186803b158015611c3157600080fd5b505afa158015611c45573d6000803e3d6000fd5b505050506040513d6020811015611c5b57600080fd5b505110610a4557610a4581836000611cf8565b600a60209081526000928352604080842090915290825290205481565b6002546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b600d60209081526000928352604080842090915290825290208054600182015460029092015490919083565b81610a4557610a45816137a4565b60025460408051632630c12f60e01b8152905185926000926001600160a01b0390911691632630c12f91600480820192602092909190829003018186803b158015611d4257600080fd5b505afa158015611d56573d6000803e3d6000fd5b505050506040513d6020811015611d6c57600080fd5b505160408051630ad7511760e31b815290519192506000916001600160a01b038085169263ac41865a92918716916356ba88b891600480820192602092909190829003018186803b158015611dc057600080fd5b505afa158015611dd4573d6000803e3d6000fd5b505050506040513d6020811015611dea57600080fd5b505160408051631f0b96b960e31b815290516001600160a01b039092169163f85cb5c891600480820192602092909190829003018186803b158015611e2e57600080fd5b505afa158015611e42573d6000803e3d6000fd5b505050506040513d6020811015611e5857600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b039092166004830152736b175474e89094c44da98b954eedeac495271d0f6024830152516044808301926020929190829003018186803b158015611ed157600080fd5b505afa158015611ee5573d6000803e3d6000fd5b505050506040513d6020811015611efb57600080fd5b50519050611f09858261313e565b42600090815260056020526040902090955084611f3557600454611f2d90876133f7565b600455611f46565b600454611f429087612951565b6004555b60045481554260018201819055611f5c906137f7565b600282015560075460038201819055611f7b576000600482015561207a565b612074612023600560006006611f9d60016007546133f790919063ffffffff16565b81548110611fa757fe5b906000526020600020015481526020019081526020016000206000015461201d600560006006611fe360016007546133f790919063ffffffff16565b81548110611fed57fe5b906000526020600020015481526020019081526020016000206001015485600101546133f790919063ffffffff16565b90613454565b60056000600661203f60016007546133f790919063ffffffff16565b8154811061204957fe5b906000526020600020015481526020019081526020016000206004015461295190919063ffffffff16565b60048201555b60068054600181018255600091909152427ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f9091018190556120bb9061382f565b6120c58487613f3c565b50506007805460010190555050505050565b6001600160a01b038085166000818152600b602090815260408083209488168084529482529182902082516370a0823160e01b81526004810195909552915191936370a082319260248083019392829003018186803b15801561213957600080fd5b505afa15801561214d573d6000803e3d6000fd5b505050506040513d602081101561216357600080fd5b505142600081815260048401602052604090209182556001820155600382015460029091018190556121a957426000908152600482016020526040812060030155612202565b805460008181526004830160205260409020546121ec916121d0919061201d9042906133f7565b8254600090815260048401602052604090206003015490612951565b4260009081526004830160205260409020600301555b600182151514156122305782158061221c57506001810154155b15612228574260018201555b4281556122c7565b846001600160a01b03166370a08231856040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561227d57600080fd5b505afa158015612291573d6000803e3d6000fd5b505050506040513d60208110156122a757600080fd5b50516122c7576000808255600182018190556122c7906002830190615a3a565b60028101805460018181018355600092835260209092204291015560039091018054909101905550505050565b600080600084905061237f866001600160a01b0316826001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b15801561234257600080fd5b505afa158015612356573d6000803e3d6000fd5b505050506040513d602081101561236c57600080fd5b50516001600160a01b0316146049611cea565b612402866001600160a01b03166306061dfa876040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156123cf57600080fd5b505afa1580156123e3573d6000803e3d6000fd5b505050506040513d60208110156123f957600080fd5b50516049611cea565b60008060008060008061241487614298565b93509350935093506000808d6001600160a01b0316633d8270f58d6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060c06040518083038186803b15801561246c57600080fd5b505afa158015612480573d6000803e3d6000fd5b505050506040513d60c081101561249657600080fd5b50602080820151604092830151835163687cca9f60e11b81529351919550935083926001600160a01b038d169263d0f9953e92600480840193829003018186803b1580156124e357600080fd5b505afa1580156124f7573d6000803e3d6000fd5b505050506040513d602081101561250d57600080fd5b5051118015612580575081896001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561255157600080fd5b505afa158015612565573d6000803e3d6000fd5b505050506040513d602081101561257b57600080fd5b505110155b801561260157508d6001600160a01b0316896001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b1580156125ca57600080fd5b505afa1580156125de573d6000803e3d6000fd5b505050506040513d60208110156125f457600080fd5b50516001600160a01b0316145b1561293d5760006126eb8f8e8c6001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561264657600080fd5b505afa15801561265a573d6000803e3d6000fd5b505050506040513d602081101561267057600080fd5b81019080805190602001909291905050508d6001600160a01b031663d0f9953e6040518163ffffffff1660e01b815260040160206040518083038186803b1580156126ba57600080fd5b505afa1580156126ce573d6000803e3d6000fd5b505050506040513d60208110156126e457600080fd5b5051612c7b565b90506001871515141561272f5761272c612725877f0000000000000000000000000000000000000000000000000000000000000000614531565b87906133f7565b95505b6127476127408b8f8a8a8a8a614555565b8990612951565b975061275f6127588b8f8a8a6148b6565b8a90612951565b98506127726127408b8f8a8a8a8a614982565b97506127856127588b8f8a8a8a8a614d2b565b98506128916127406127fc8c6001600160a01b03166303cddb2c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156127c957600080fd5b505afa1580156127dd573d6000803e3d6000fd5b505050506040513d60208110156127f357600080fd5b50518490613567565b61288b7f00000000000000000000000000000000000000000000000000000000000000008e6001600160a01b0316636db40dc26040518163ffffffff1660e01b815260040160206040518083038186803b15801561285957600080fd5b505afa15801561286d573d6000803e3d6000fd5b505050506040513d602081101561288357600080fd5b505190614531565b9061313e565b97508e6001600160a01b03166302d05d3f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156128cc57600080fd5b505afa1580156128e0573d6000803e3d6000fd5b505050506040513d60208110156128f657600080fd5b50516001600160a01b038e81169116141561293b57612938612740897f0000000000000000000000000000000000000000000000000000000000000000614531565b97505b505b50959c949b50939950505050505050505050565b6000828201838110156129ab576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b6000816c010000000000000000000000008410612a4f5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612a145781810151838201526020016129fc565b50505050905090810190601f168015612a415780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b509192915050565b6002546040805163184a263160e11b81529051612a9d926001600160a01b0316916330944c62916004808301926020929190829003018186803b15801561099457600080fd5b600354604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015612ae857600080fd5b505afa158015612afc573d6000803e3d6000fd5b505050506040513d6020811015612b1257600080fd5b505190506001600160601b038216811015612b4357600354612b3e906001600160a01b03168483614f44565b612b63565b600354612b63906001600160a01b0316846001600160601b038516614f44565b505050565b3390565b6000612b7d6001831015604a611cea565b6102018210612b8e57506000610f20565b6000612c26612b9e8460016133f7565b612c206701aa535d3d0c000073__$cd00f7bc85cfd34feb4171d2d22c665f63$__63907af6c06040518163ffffffff1660e01b815260040160206040518083038186803b158015612bee57600080fd5b505af4158015612c02573d6000803e3d6000fd5b505050506040513d6020811015612c1857600080fd5b505190612951565b90614fc4565b90506000612c3e690b581ceb141f05c1ae0083613567565b9050612c72816040518060400160405280601081526020016f6f766572666c6f77203936206269747360801b8152506129b4565b92505050610f20565b6000612cfb856001600160a01b031663cb12233b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612cb957600080fd5b505afa158015612ccd573d6000803e3d6000fd5b505050506040513d6020811015612ce357600080fd5b50518310801590612cf45750838310155b6041611cea565b6001600160a01b038086166000818152600b60209081526040808320948916808452948252808320938352600c825280832094835293815290839020835160808101855281548152600180830154938201939093526002820154948101949094526003015460608401528101549091901580612d7a5750838260010154115b15612d8a57600092505050610f36565b866001600160a01b031663cb12233b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612dc357600080fd5b505afa158015612dd7573d6000803e3d6000fd5b505050506040513d6020811015612ded57600080fd5b50518511612e5d57866001600160a01b031663cb12233b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612e2e57600080fd5b505afa158015612e42573d6000803e3d6000fd5b505050506040513d6020811015612e5857600080fd5b505194505b612e698787878761506d565b60208301528152612e7b87868661519c565b6060830152604082015260208101518151612ead9110801590612ea657508160600151826040015111155b6051611cea565b6000808260000151871015612ec55760009150612f32565b8251871115612f1957825160009081526004850160205260409020548351612f1291612ef69161201d908b906133f7565b8451600090815260048701602052604090206003015490612951565b9150612f32565b8251600090815260048501602052604090206003015491505b6001600160a01b0389166000908152600d60209081526040808320868201805185529252909120549051612f9f91612f6f9161201d908b906133f7565b6001600160a01b038b166000908152600d6020908152604080832088820151845290915290206002015490612951565b9050612faf818311156050611cea565b85871415612fde5780612fc9576000945050505050610f36565b612fd38282613567565b945050505050610f36565b8260200151861015612ff7576000945050505050610f36565b82602001518614801561300e575060208301518351145b15613098576001600160a01b0389166000908152600d6020908152604080832060608701805185529252909120549051613088918391611740916130579161201d908c906133f7565b6001600160a01b038d166000908152600d6020908152604080832060608b0151845290915290206002015490612951565b9050612fc9818311156050611cea565b6130f6826117406130d6876004016000886020015181526020019081526020016000206000015461201d88602001518c6133f790919063ffffffff16565b602080880151600090815260048a01909152604090206003015490612951565b6001600160a01b038a166000908152600d602090815260408083206060880180518552925290912054905191935061308891839161174091613057919061201d908c906133f7565b60006129ab670de0b6b3a76400006131568585613454565b906152b4565b60008080613183670de0b6b3a76400006131566276a70061317d888a6133f7565b90615313565b905060006131af670de0b6b3a76400006131566276a70061317d6001548b6133f790919063ffffffff16565b90506131bc826001612951565b6131c7826001612951565b9350935050509250929050565b6000613227600260009054906101000a90046001600160a01b03166001600160a01b03166330944c626040518163ffffffff1660e01b815260040160206040518083038186803b15801561099457600080fd5b6000849050600061336a826001600160a01b031663dbabf4f36040518163ffffffff1660e01b815260040160206040518083038186803b15801561326a57600080fd5b505afa15801561327e573d6000803e3d6000fd5b505050506040513d602081101561329457600080fd5b5051604080517f825deffe000000000000000000000000000000000000000000000000000000008152905161174091613363916001600160a01b0388169163825deffe916004808301926020929190829003018186803b1580156132f757600080fd5b505afa15801561330b573d6000803e3d6000fd5b505050506040513d602081101561332157600080fd5b50516040805163687cca9f60e11b815290516001600160a01b0389169163d0f9953e916004808301926020929190829003018186803b15801561170757600080fd5b8890613454565b90506133eb61337942866133f7565b6131566133b987866001600160a01b031663d0f9953e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561170757600080fd5b6000888152600860205260409020600381015460029091015461201d916001600160601b03169061288b908890613567565b925050505b9392505050565b60008282111561344e576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082613463575060006129ae565b8282028284828161347057fe5b04146129ab5760405162461bcd60e51b8152600401808060200182810382526021815260200180615a976021913960400191505060405180910390fd5b6000613500600260009054906101000a90046001600160a01b03166001600160a01b03166330944c626040518163ffffffff1660e01b815260040160206040518083038186803b15801561099457600080fd5b6000805b61350f8460016133f7565b811161355d57600061353461352b6276a70061201d8986612951565b60015490612951565b90506000613545898989868661539b565b90506135518482612951565b93505050600101613504565b5095945050505050565b60006129ab8261315685670de0b6b3a7640000613454565b6001600160a01b0381166000818152600d6020908152604080832042845282529182902082517f18160ddd00000000000000000000000000000000000000000000000000000000815292518594919391926318160ddd9260048082019391829003018186803b1580156135f157600080fd5b505afa158015613605573d6000803e3d6000fd5b505050506040513d602081101561361b57600080fd5b505181554260018201556001600160a01b0383166000908152600f602052604090205461364e5760006002820155613762565b6001600160a01b0382166000908152600d60209081526040808320600e8352818420600f9093529083205461375c936136ed93909161368e9060016133f7565b8154811061369857fe5b600091825260208083209091015483528281019390935260409182018120546001600160a01b0388168252600d8452828220600e8552838320600f90955292822054909361201d939291611fe39060016133f7565b6001600160a01b0384166000908152600d60209081526040808320600e8352818420600f90935290832054909291906137279060016133f7565b8154811061373157fe5b906000526020600020015481526020019081526020016000206002015461295190919063ffffffff16565b60028201555b506001600160a01b03166000818152600e6020908152604080832080546001818101835591855283852042910155938352600f90915290208054909101905550565b62461bcd60e51b6000908152602060045260076024526642414223000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b600080613822670de0b6b3a76400006131566276a70061317d600154886133f790919063ffffffff16565b90506133f0816001612951565b6002546040805163184a263160e11b81529051613875926001600160a01b0316916330944c62916004808301926020929190829003018186803b15801561099457600080fd5b600060086000613884846137f7565b81526020019081526020016000209050600960006138a66001611740866137f7565b815260208101919091526040016000205460ff16613f01576138c7826137f7565b600182015560075461391757600060028201556138eb6138e6836137f7565b612b6c565b6003820180546bffffffffffffffffffffffff19166001600160601b0392909216919091179055613ec9565b600061398460056000600661393860016007546133f790919063ffffffff16565b8154811061394257fe5b906000526020600020015481526020019081526020016000206004015460056000868152602001908152602001600020600401546133f790919063ffffffff16565b90506139946001611740856137f7565b6005600060066139b060016007546133f790919063ffffffff16565b815481106139ba57fe5b90600052602060002001548152602001908152602001600020600201541415613b0557613a5c613a356005600060066139ff60016007546133f790919063ffffffff16565b81548110613a0957fe5b9060005260206000200154815260200190815260200160002060010154856133f790919063ffffffff16565b613156613a5561272561352b6276a7006117406276a70061201d8c6137f7565b8490613454565b6002830155613a6d6138e6846137f7565b6003830180546bffffffffffffffffffffffff19166001600160601b03929092169190911790556002820154613ada90613aa89083906133f7565b60086000613aba6001611740896137f7565b81526020019081526020016000206002015461295190919063ffffffff16565b60086000613aec6001611740886137f7565b8152602081019190915260400160002060020155613ec7565b60005b613b57600560006006613b2760016007546133f790919063ffffffff16565b81548110613b3157fe5b9060005260206000200154815260200190815260200160002060020154611740866137f7565b8111613ec557600060086000613b838460056000600661372760016007546133f790919063ffffffff16565b815260200190815260200160002090506000613bbf61352b6276a70061201d8660056000600661372760016007546133f790919063ffffffff16565b905082613ccd57613c84613c79613c21600560006006613beb60016007546133f790919063ffffffff16565b81548110613bf557fe5b9060005260206000200154815260200190815260200160002060010154896133f790919063ffffffff16565b613156613363600560006006613c4360016007546133f790919063ffffffff16565b81548110613c4d57fe5b9060005260206000200154815260200190815260200160002060010154866133f790919063ffffffff16565b600284015490612951565b6002830155600754600590600090600690613ca09060016133f7565b81548110613caa57fe5b600091825260208083209091015483528201929092526040019020548255613ebb565b613d1c600560006006613cec60016007546133f790919063ffffffff16565b81548110613cf657fe5b9060005260206000200154815260200190815260200160002060020154611740886137f7565b831015613e1f57613d88613d7b600560006006613d4560016007546133f790919063ffffffff16565b81548110613d4f57fe5b9060005260206000200154815260200190815260200160002060010154886133f790919063ffffffff16565b613156866276a700613454565b8260020181905550613db36138e68460056000600661372760016007546133f790919063ffffffff16565b8260030160006101000a8154816001600160601b0302191690836001600160601b03160217905550613dfb8360056000600661372760016007546133f790919063ffffffff16565b8260010181905550600560006006613ca060016007546133f790919063ffffffff16565b613e6f613e41600560006006613d4560016007546133f790919063ffffffff16565b613156613e68613e6161352b6276a7006117406276a70061201d8f6137f7565b8a906133f7565b8790613454565b6002860155613e806138e6876137f7565b6003860180546bffffffffffffffffffffffff19166001600160601b0392909216919091179055613eb0866137f7565b600186015560045485555b5050600101613b08565b505b505b600160096000613edd6001611740876137f7565b81526020810191909152604001600020805460ff1916911515919091179055613f34565b613f2e613f2360056000600661393860016007546133f790919063ffffffff16565b600283015490612951565b60028201555b600454905550565b6002546040805163184a263160e11b81529051613f82926001600160a01b0316916330944c62916004808301926020929190829003018186803b15801561099457600080fd5b816001600160a01b0316637519ab506040518163ffffffff1660e01b815260040160206040518083038186803b158015613fbb57600080fd5b505afa158015613fcf573d6000803e3d6000fd5b505050506040513d6020811015613fe557600080fd5b505115610a4557614059826001600160a01b0316637519ab506040518163ffffffff1660e01b815260040160206040518083038186803b15801561402857600080fd5b505afa15801561403c573d6000803e3d6000fd5b505050506040513d602081101561405257600080fd5b50516137f7565b614062426137f7565b141561415b576141236140e46140dd846001600160a01b0316637519ab506040518163ffffffff1660e01b815260040160206040518083038186803b1580156140aa57600080fd5b505afa1580156140be573d6000803e3d6000fd5b505050506040513d60208110156140d457600080fd5b505142906133f7565b8390613454565b6001600160a01b0384166000908152600a6020526040812090614106426137f7565b81526020019081526020016000205461295190919063ffffffff16565b6001600160a01b0383166000908152600a6020526040812090614145426137f7565b8152602081019190915260400160002055610a45565b6000806141cc846001600160a01b0316637519ab506040518163ffffffff1660e01b815260040160206040518083038186803b15801561419a57600080fd5b505afa1580156141ae573d6000803e3d6000fd5b505050506040513d60208110156141c457600080fd5b50514261315c565b91509150600061421583613156613e68886001600160a01b0316637519ab506040518163ffffffff1660e01b815260040160206040518083038186803b1580156140aa57600080fd5b905060005b6142258460016133f7565b8111614290576001600160a01b0386166000908152600a60205260408120614254918491906141068786612951565b6001600160a01b0387166000908152600a60205260408120906142778685612951565b815260208101919091526040016000205560010161421a565b505050505050565b60008060008060008590506000816001600160a01b03166303976e386040518163ffffffff1660e01b815260040160206040518083038186803b1580156142de57600080fd5b505afa1580156142f2573d6000803e3d6000fd5b505050506040513d602081101561430857600080fd5b50516040805163d3406abd60e01b81529051919250600091614410916143c3916001600160a01b0387169163d3406abd916004808301926020929190829003018186803b15801561435857600080fd5b505afa15801561436c573d6000803e3d6000fd5b505050506040513d602081101561438257600080fd5b50516040805162f376cb60e21b815290516001600160a01b038816916303cddb2c916004808301926020929190829003018186803b15801561130357600080fd5b846001600160a01b03166303cddb2c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156143fc57600080fd5b505afa158015612c02573d6000803e3d6000fd5b90506000836001600160a01b03166303cddb2c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561444d57600080fd5b505afa158015614461573d6000803e3d6000fd5b505050506040513d602081101561447757600080fd5b505190506000808080848711801561448f5750858710155b156144b857600193508392506144a587866133f7565b91506144b187876133f7565b905061451d565b8487101580156144c757508587105b156144ea5760019350600092506144de87866133f7565b91506144b186886133f7565b84871080156144f857508587105b1561451d576000935083925061450e85886133f7565b915061451a86886133f7565b90505b929a50985096509450505050509193509193565b6000670de0b6b3a76400006145468484613454565b8161454d57fe5b049392505050565b6000808790506000816001600160a01b0316636db40dc26040518163ffffffff1660e01b815260040160206040518083038186803b15801561459657600080fd5b505afa1580156145aa573d6000803e3d6000fd5b505050506040513d60208110156145c057600080fd5b50516040805163d3406abd60e01b81529051919250600091829182916146b89161467f916001600160a01b0389169163d3406abd916004808301926020929190829003018186803b15801561461457600080fd5b505afa158015614628573d6000803e3d6000fd5b505050506040513d602081101561463e57600080fd5b50516040805162f376cb60e21b815290516001600160a01b038a16916303cddb2c916004808301926020929190829003018186803b15801561130357600080fd5b866001600160a01b03166303cddb2c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156143fc57600080fd5b90508a6001600160a01b0316856001600160a01b0316631fe4a6866040518163ffffffff1660e01b815260040160206040518083038186803b1580156146fd57600080fd5b505afa158015614711573d6000803e3d6000fd5b505050506040513d602081101561472757600080fd5b50516001600160a01b0316141561489657614762847f0000000000000000000000000000000000000000000000000000000000000000614531565b925060018a151514801561477857506001881515145b156147ed57614788836002613454565b91506147da6147d36147cc876001600160a01b03166303976e386040518163ffffffff1660e01b815260040160206040518083038186803b1580156127c957600080fd5b859061313e565b8490612951565b9250818311156147e8578192505b6148a4565b60018a15151480156147fd575087155b156148965761488f61488861488161487a84896001600160a01b03166303976e386040518163ffffffff1660e01b815260040160206040518083038186803b15801561484857600080fd5b505afa15801561485c573d6000803e3d6000fd5b505050506040513d602081101561487257600080fd5b505190613567565b869061313e565b85906133f7565b84906133f7565b92506148a4565b6000955050505050506148ac565b509093505050505b9695505050505050565b600084816001851515141561497557856001600160a01b0316826001600160a01b0316631fe4a6866040518163ffffffff1660e01b815260040160206040518083038186803b15801561490857600080fd5b505afa15801561491c573d6000803e3d6000fd5b505050506040513d602081101561493257600080fd5b50516001600160a01b031614156149705761496d847f0000000000000000000000000000000000000000000000000000000000000000614531565b90505b6148ac565b5060009695505050505050565b6000808790506000816001600160a01b0316636db40dc26040518163ffffffff1660e01b815260040160206040518083038186803b1580156149c357600080fd5b505afa1580156149d7573d6000803e3d6000fd5b505050506040513d60208110156149ed57600080fd5b5051604080517f950c78220000000000000000000000000000000000000000000000000000000081526001600160a01b038b8116600483015291519293506000929185169163950c782291602480820192602092909190829003018186803b158015614a5857600080fd5b505afa158015614a6c573d6000803e3d6000fd5b505050506040513d6020811015614a8257600080fd5b50516040805163d3406abd60e01b815290519192506000918291614ad59161467f916001600160a01b0389169163d3406abd91600480820192602092909190829003018186803b15801561461457600080fd5b905060008084138015614aea575060018b1515145b8015614af857506001891515145b15614ba057614b99614b6f876001600160a01b031663d40244cb6040518163ffffffff1660e01b815260040160206040518083038186803b158015614b3c57600080fd5b505afa158015614b50573d6000803e3d6000fd5b505050506040513d6020811015614b6657600080fd5b50518690613567565b61288b877f0000000000000000000000000000000000000000000000000000000000000000614531565b9050614d1b565b600084138015614bb2575060018b1515145b8015614bbc575088155b15614c2057614c00614b6f876001600160a01b031663d40244cb6040518163ffffffff1660e01b815260040160206040518083038186803b158015614b3c57600080fd5b9050614b99614c19614c128a85613567565b839061313e565b82906133f7565b600084138015614c2e57508a155b15614c3b57506000614d1b565b600084128015614c49575088155b15614d0057614cc8614b6f876001600160a01b031663449b98266040518163ffffffff1660e01b815260040160206040518083038186803b158015614c8d57600080fd5b505afa158015614ca1573d6000803e3d6000fd5b505050506040513d6020811015614cb757600080fd5b5051614cc2876157e1565b90613567565b9050614cd5816002613454565b9250614cee614ce7614c128a85613567565b8290612951565b905082811115614cfb5750815b614d1b565b600084128015614d1257506001891515145b15614d1b575060005b9c9b505050505050505050505050565b600080879050600080826001600160a01b031663950c78228a6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015614d8157600080fd5b505afa158015614d95573d6000803e3d6000fd5b505050506040513d6020811015614dab57600080fd5b5051905060018815151415614f32576000811315614e6057614e59836001600160a01b031663d40244cb6040518163ffffffff1660e01b815260040160206040518083038186803b158015614dff57600080fd5b505afa158015614e13573d6000803e3d6000fd5b505050506040513d6020811015614e2957600080fd5b5051614cc28361288b8b7f0000000000000000000000000000000000000000000000000000000000000000614531565b9150614f2d565b600081128015614e6e575085155b15614f1157614e59836001600160a01b031663449b98266040518163ffffffff1660e01b815260040160206040518083038186803b158015614eaf57600080fd5b505afa158015614ec3573d6000803e3d6000fd5b505050506040513d6020811015614ed957600080fd5b5051614cc2614ee7846157e1565b61288b8b7f0000000000000000000000000000000000000000000000000000000000000000614531565b600081128015614f2357506001861515145b15614f2d57600091505b614f37565b600091505b5098975050505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612b639084906157f8565b60008073__$cd00f7bc85cfd34feb4171d2d22c665f63$__63907af6c06040518163ffffffff1660e01b815260040160206040518083038186803b15801561500b57600080fd5b505af415801561501f573d6000803e3d6000fd5b505050506040513d602081101561503557600080fd5b505190505b82156129ab576002830615615056576150538185614531565b90505b6150608480614531565b935060028304925061503a565b6001600160a01b038085166000908152600b60209081526040808320938716835292905290812060028101805483929183916150aa9060016133f7565b815481106150b457fe5b906000526020600020015490506000826002016000815481106150d357fe5b90600052602060002001549050858211806150ed57508681105b1561518f5760005b60028401546151059060016133f7565b811161518d578684600201828154811061511b57fe5b9060005260206000200154116151485783600201818154811061513a57fe5b906000526020600020015492505b8784600201828154811061515857fe5b9060005260206000200154116151855783600201818154811061517757fe5b906000526020600020015491505b6001016150f5565b505b9890975095505050505050565b6001600160a01b0383166000908152600e6020526040812054819081906151c49060016133f7565b6001600160a01b0387166000908152600e6020526040812080549293509091839081106151ed57fe5b906000526020600020015490506000600e6000896001600160a01b03166001600160a01b0316815260200190815260200160002060008154811061522d57fe5b906000526020600020015490508582118061524757508681105b156152a85760005b8381116152a6576001600160a01b0389166000908152600e6020526040812080548390811061527a57fe5b90600052602060002001549050878111615292578093505b88811161529d578092505b5060010161524f565b505b97909650945050505050565b600080821161530a576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161454d57fe5b600081615367576040805162461bcd60e51b815260206004820152601060248201527f43616e7420646976696465206279203000000000000000000000000000000000604482015290519081900360640190fd5b600083116153765760006129ab565b6129ab6001615395846131568361174089670de0b6b3a7640000613454565b90612951565b60006153ee600260009054906101000a90046001600160a01b03166001600160a01b03166330944c626040518163ffffffff1660e01b815260040160206040518083038186803b15801561099457600080fd5b6000806000670de0b6b3a764000090508461543f6276a7008b6001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b1580156143fc57600080fd5b11156155335761552c600a60008b6001600160a01b03166001600160a01b0316815260200190815260200160002060006154ab8c6001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561402857600080fd5b8152602001908152602001600020546117406117398c6001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b1580156154f957600080fd5b505afa15801561550d573d6000803e3d6000fd5b505050506040513d602081101561552357600080fd5b505189906133f7565b9250615768565b615540856276a7006133f7565b896001600160a01b031663825deffe6040518163ffffffff1660e01b815260040160206040518083038186803b15801561557957600080fd5b505afa15801561558d573d6000803e3d6000fd5b505050506040513d60208110156155a357600080fd5b50511080156156155750886001600160a01b031663d0f9953e6040518163ffffffff1660e01b815260040160206040518083038186803b1580156155e657600080fd5b505afa1580156155fa573d6000803e3d6000fd5b505050506040513d602081101561561057600080fd5b505185105b15615676576001600160a01b0389166000908152600a6020526040812061552c9161564b61564689623b53806133f7565b6137f7565b815260208101919091526040016000205461174061173961566f896276a7006133f7565b89906133f7565b6156a0615689612725876276a7006133f7565b614cc2615699886276a7006133f7565b42906133f7565b9050615765600a60008b6001600160a01b03166001600160a01b0316815260200190815260200160002060006157088c6001600160a01b031663d0f9953e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561402857600080fd5b815260208101919091526040016000205461174061173961572c896276a7006133f7565b8d6001600160a01b031663d0f9953e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561170757600080fd5b92505b600860006157768989612951565b8152602001908152602001600020600201549150615798828411156047611cea565b6157d48161288b600860006157ad8c8c612951565b81526020810191909152604001600020600301546001600160601b031661288b8787613567565b9998505050505050505050565b6000808212156157f45781600003610f1d565b5090565b600061584d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166158a99092919063ffffffff16565b805190915015612b635780806020019051602081101561586c57600080fd5b5051612b635760405162461bcd60e51b815260040180806020018281038252602a815260200180615ab8602a913960400191505060405180910390fd5b6060610f368484600085856158bd856159ce565b61590e576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b6020831061594c5780518252601f19909201916020918201910161592d565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146159ae576040519150601f19603f3d011682016040523d82523d6000602084013e6159b3565b606091505b50915091506159c38282866159d4565b979650505050505050565b3b151590565b606083156159e35750816133f0565b8251156159f35782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315612a145781810151838201526020016129fc565b5080546000825590600052602060002090810190615a589190615a5b565b50565b5b808211156157f45760008155600101615a5c56fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212207d76dc61c75912a4aacd4afccc7307b4251bb6bdc2395d98365545646d0d10d664736f6c63430007060033", "libraries": { - "SafeDecimalMath": "0x49120d18951D4bA76Fc113A75bF5959a3261e683" + "SafeDecimalMath": "0x2de341674a99b379DA0fE53c00ae4Cf251adaE89" }, "devdoc": { "author": "Babylon Finance Rewards Distributor contract is a smart contract used to calculate and distribute all the BABL rewards of the BABL Mining Program along the time reserved for executed strategies. It implements a supply curve to distribute 500K BABL along the time. The supply curve is designed to optimize the long-term sustainability of the protocol. The rewards are front-loaded but they last for more than 10 years, slowly decreasing quarter by quarter. For that, it houses the state of the protocol power along the time as each strategy power is compared to the whole protocol usage. Rewards Distributor also is responsible for the calculation and delivery of other rewards as bonuses to specific profiles which are actively contributing to the protocol growth and their communities (Garden creators, Strategists and Stewards).", @@ -853,7 +853,17 @@ "methods": { "addProtocolPrincipal(uint256)": { "params": { - "_capital": "Amount of capital in WETH" + "_capital": "Amount of capital in any type of asset to be normalized into DAI" + } + }, + "checkProtocol(uint256)": { + "params": { + "time": "Timestamp" + } + }, + "checkQuarter(uint256)": { + "params": { + "_num": "Number of quarter" } }, "getContributorPower(address,address,uint256,uint256)": { @@ -891,13 +901,33 @@ "_to": "Address to send the tokens to" } }, + "setContributorTimestampParams(address,address,uint256,bool,uint256)": { + "params": { + "_contributor": "Address of the contributor", + "_depositOrWithdraw": "If the timestamp is a deposit (true) or a withdraw (false)", + "_garden": "Address of the garden the contributor belongs to", + "_pid": "The pid # of the Garden timestamps", + "_previousBalance": "Previous balance of the contributor" + } + }, "substractProtocolPrincipal(uint256)": { "params": { - "_capital": "Amount of capital in WETH" + "_capital": "Amount of capital in any type of asset to be normalized into DAI" + } + }, + "tokenSupplyPerQuarter(uint256)": { + "params": { + "_quarter": "Number of the epoch (quarter)" } }, "transferOwnership(address)": { "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "updateGardenPower(address,uint256)": { + "params": { + "_garden": "Address of the garden", + "_pid": "The pid # of the Garden timestamp" + } } }, "title": "Rewards Distributor implementing the BABL Mining Program and other Rewards to Strategists and Stewards", @@ -909,6 +939,12 @@ "addProtocolPrincipal(uint256)": { "notice": "Function that adds the capital received to the total principal of the protocol per timestamp" }, + "checkProtocol(uint256)": { + "notice": "Check the protocol state in a certain timestamp" + }, + "checkQuarter(uint256)": { + "notice": "Check the quarter state for a specific quarter" + }, "getContributorPower(address,address,uint256,uint256)": { "notice": "Gets the contributor power from one timestamp to the other" }, @@ -921,14 +957,20 @@ "sendTokensToContributor(address,uint96)": { "notice": "Sends BABL tokens rewards to a contributor after a claim is requested to the protocol." }, + "setContributorTimestampParams(address,address,uint256,bool,uint256)": { + "notice": "Function that set each contributor timestamp per garden" + }, "startBABLRewards()": { "notice": "Starts BABL Rewards Mining Program from the controller." }, "substractProtocolPrincipal(uint256)": { "notice": "Function that removes the capital received to the total principal of the protocol per timestamp" }, + "tokenSupplyPerQuarter(uint256)": { + "notice": "Calculates the BABL rewards supply for each quarter" + }, "updateGardenPower(address,uint256)": { - "notice": "function getContributor(address _garden, address _contributor) external view returns ( uint256, uint256, uint256[] memory, uint256 );" + "notice": "Function that set each garden timestamp" } }, "version": 1 @@ -936,7 +978,7 @@ "storageLayout": { "storage": [ { - "astId": 3848, + "astId": 1456, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "_owner", "offset": 0, @@ -944,7 +986,7 @@ "type": "t_address" }, { - "astId": 34223, + "astId": 33816, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "START_TIME", "offset": 0, @@ -952,23 +994,23 @@ "type": "t_uint256" }, { - "astId": 34300, + "astId": 33896, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "controller", "offset": 0, "slot": "2", - "type": "t_contract(IBabController)23675" + "type": "t_contract(IBabController)22767" }, { - "astId": 34302, + "astId": 33898, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "babltoken", "offset": 0, "slot": "3", - "type": "t_contract(TimeLockedToken)39641" + "type": "t_contract(TimeLockedToken)39515" }, { - "astId": 34305, + "astId": 33901, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "protocolPrincipal", "offset": 0, @@ -976,15 +1018,15 @@ "type": "t_uint256" }, { - "astId": 34309, + "astId": 33905, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "protocolPerTimestamp", "offset": 0, "slot": "5", - "type": "t_mapping(t_uint256,t_struct(ProtocolPerTimestamp)34250_storage)" + "type": "t_mapping(t_uint256,t_struct(ProtocolPerTimestamp)33846_storage)" }, { - "astId": 34312, + "astId": 33908, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "timeList", "offset": 0, @@ -992,7 +1034,7 @@ "type": "t_array(t_uint256)dyn_storage" }, { - "astId": 34315, + "astId": 33911, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "pid", "offset": 0, @@ -1000,15 +1042,15 @@ "type": "t_uint256" }, { - "astId": 34319, + "astId": 33915, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "protocolPerQuarter", "offset": 0, "slot": "8", - "type": "t_mapping(t_uint256,t_struct(ProtocolPerQuarter)34259_storage)" + "type": "t_mapping(t_uint256,t_struct(ProtocolPerQuarter)33855_storage)" }, { - "astId": 34323, + "astId": 33919, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "isProtocolPerQuarter", "offset": 0, @@ -1016,7 +1058,7 @@ "type": "t_mapping(t_uint256,t_bool)" }, { - "astId": 34329, + "astId": 33925, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "rewardsPowerOverhead", "offset": 0, @@ -1024,31 +1066,31 @@ "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))" }, { - "astId": 34335, + "astId": 33931, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "contributorPerGarden", "offset": 0, "slot": "11", - "type": "t_mapping(t_address,t_mapping(t_address,t_struct(ContributorPerGarden)34280_storage))" + "type": "t_mapping(t_address,t_mapping(t_address,t_struct(ContributorPerGarden)33876_storage))" }, { - "astId": 34341, + "astId": 33937, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "checkpoints", "offset": 0, "slot": "12", - "type": "t_mapping(t_address,t_mapping(t_address,t_struct(Checkpoints)34298_storage))" + "type": "t_mapping(t_address,t_mapping(t_address,t_struct(Checkpoints)33894_storage))" }, { - "astId": 34347, + "astId": 33943, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "gardenPowerByTimestamp", "offset": 0, "slot": "13", - "type": "t_mapping(t_address,t_mapping(t_uint256,t_struct(GardenPowerByTimestamp)34266_storage))" + "type": "t_mapping(t_address,t_mapping(t_uint256,t_struct(GardenPowerByTimestamp)33862_storage))" }, { - "astId": 34352, + "astId": 33948, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "gardenTimelist", "offset": 0, @@ -1056,7 +1098,7 @@ "type": "t_mapping(t_address,t_array(t_uint256)dyn_storage)" }, { - "astId": 34356, + "astId": 33952, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "gardenPid", "offset": 0, @@ -1081,12 +1123,12 @@ "label": "bool", "numberOfBytes": "1" }, - "t_contract(IBabController)23675": { + "t_contract(IBabController)22767": { "encoding": "inplace", "label": "contract IBabController", "numberOfBytes": "20" }, - "t_contract(TimeLockedToken)39641": { + "t_contract(TimeLockedToken)39515": { "encoding": "inplace", "label": "contract TimeLockedToken", "numberOfBytes": "20" @@ -1098,26 +1140,26 @@ "numberOfBytes": "32", "value": "t_array(t_uint256)dyn_storage" }, - "t_mapping(t_address,t_mapping(t_address,t_struct(Checkpoints)34298_storage))": { + "t_mapping(t_address,t_mapping(t_address,t_struct(Checkpoints)33894_storage))": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => mapping(address => struct RewardsDistributor.Checkpoints))", "numberOfBytes": "32", - "value": "t_mapping(t_address,t_struct(Checkpoints)34298_storage)" + "value": "t_mapping(t_address,t_struct(Checkpoints)33894_storage)" }, - "t_mapping(t_address,t_mapping(t_address,t_struct(ContributorPerGarden)34280_storage))": { + "t_mapping(t_address,t_mapping(t_address,t_struct(ContributorPerGarden)33876_storage))": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => mapping(address => struct RewardsDistributor.ContributorPerGarden))", "numberOfBytes": "32", - "value": "t_mapping(t_address,t_struct(ContributorPerGarden)34280_storage)" + "value": "t_mapping(t_address,t_struct(ContributorPerGarden)33876_storage)" }, - "t_mapping(t_address,t_mapping(t_uint256,t_struct(GardenPowerByTimestamp)34266_storage))": { + "t_mapping(t_address,t_mapping(t_uint256,t_struct(GardenPowerByTimestamp)33862_storage))": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => mapping(uint256 => struct RewardsDistributor.GardenPowerByTimestamp))", "numberOfBytes": "32", - "value": "t_mapping(t_uint256,t_struct(GardenPowerByTimestamp)34266_storage)" + "value": "t_mapping(t_uint256,t_struct(GardenPowerByTimestamp)33862_storage)" }, "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { "encoding": "mapping", @@ -1126,19 +1168,19 @@ "numberOfBytes": "32", "value": "t_mapping(t_uint256,t_uint256)" }, - "t_mapping(t_address,t_struct(Checkpoints)34298_storage)": { + "t_mapping(t_address,t_struct(Checkpoints)33894_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct RewardsDistributor.Checkpoints)", "numberOfBytes": "32", - "value": "t_struct(Checkpoints)34298_storage" + "value": "t_struct(Checkpoints)33894_storage" }, - "t_mapping(t_address,t_struct(ContributorPerGarden)34280_storage)": { + "t_mapping(t_address,t_struct(ContributorPerGarden)33876_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct RewardsDistributor.ContributorPerGarden)", "numberOfBytes": "32", - "value": "t_struct(ContributorPerGarden)34280_storage" + "value": "t_struct(ContributorPerGarden)33876_storage" }, "t_mapping(t_address,t_uint256)": { "encoding": "mapping", @@ -1154,33 +1196,33 @@ "numberOfBytes": "32", "value": "t_bool" }, - "t_mapping(t_uint256,t_struct(GardenPowerByTimestamp)34266_storage)": { + "t_mapping(t_uint256,t_struct(GardenPowerByTimestamp)33862_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct RewardsDistributor.GardenPowerByTimestamp)", "numberOfBytes": "32", - "value": "t_struct(GardenPowerByTimestamp)34266_storage" + "value": "t_struct(GardenPowerByTimestamp)33862_storage" }, - "t_mapping(t_uint256,t_struct(ProtocolPerQuarter)34259_storage)": { + "t_mapping(t_uint256,t_struct(ProtocolPerQuarter)33855_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct RewardsDistributor.ProtocolPerQuarter)", "numberOfBytes": "32", - "value": "t_struct(ProtocolPerQuarter)34259_storage" + "value": "t_struct(ProtocolPerQuarter)33855_storage" }, - "t_mapping(t_uint256,t_struct(ProtocolPerTimestamp)34250_storage)": { + "t_mapping(t_uint256,t_struct(ProtocolPerTimestamp)33846_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct RewardsDistributor.ProtocolPerTimestamp)", "numberOfBytes": "32", - "value": "t_struct(ProtocolPerTimestamp)34250_storage" + "value": "t_struct(ProtocolPerTimestamp)33846_storage" }, - "t_mapping(t_uint256,t_struct(TimestampContribution)34289_storage)": { + "t_mapping(t_uint256,t_struct(TimestampContribution)33885_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct RewardsDistributor.TimestampContribution)", "numberOfBytes": "32", - "value": "t_struct(TimestampContribution)34289_storage" + "value": "t_struct(TimestampContribution)33885_storage" }, "t_mapping(t_uint256,t_uint256)": { "encoding": "mapping", @@ -1189,12 +1231,12 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_struct(Checkpoints)34298_storage": { + "t_struct(Checkpoints)33894_storage": { "encoding": "inplace", "label": "struct RewardsDistributor.Checkpoints", "members": [ { - "astId": 34291, + "astId": 33887, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "fromDepositAt", "offset": 0, @@ -1202,7 +1244,7 @@ "type": "t_uint256" }, { - "astId": 34293, + "astId": 33889, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "lastDepositAt", "offset": 0, @@ -1210,7 +1252,7 @@ "type": "t_uint256" }, { - "astId": 34295, + "astId": 33891, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "gardenFromDepositAt", "offset": 0, @@ -1218,7 +1260,7 @@ "type": "t_uint256" }, { - "astId": 34297, + "astId": 33893, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "gardenLastDepositAt", "offset": 0, @@ -1228,12 +1270,12 @@ ], "numberOfBytes": "128" }, - "t_struct(ContributorPerGarden)34280_storage": { + "t_struct(ContributorPerGarden)33876_storage": { "encoding": "inplace", "label": "struct RewardsDistributor.ContributorPerGarden", "members": [ { - "astId": 34268, + "astId": 33864, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "lastDepositAt", "offset": 0, @@ -1241,7 +1283,7 @@ "type": "t_uint256" }, { - "astId": 34270, + "astId": 33866, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "initialDepositAt", "offset": 0, @@ -1249,7 +1291,7 @@ "type": "t_uint256" }, { - "astId": 34273, + "astId": 33869, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "timeListPointer", "offset": 0, @@ -1257,7 +1299,7 @@ "type": "t_array(t_uint256)dyn_storage" }, { - "astId": 34275, + "astId": 33871, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "pid", "offset": 0, @@ -1265,30 +1307,30 @@ "type": "t_uint256" }, { - "astId": 34279, + "astId": 33875, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "tsContributions", "offset": 0, "slot": "4", - "type": "t_mapping(t_uint256,t_struct(TimestampContribution)34289_storage)" + "type": "t_mapping(t_uint256,t_struct(TimestampContribution)33885_storage)" } ], "numberOfBytes": "160" }, - "t_struct(GardenPowerByTimestamp)34266_storage": { + "t_struct(GardenPowerByTimestamp)33862_storage": { "encoding": "inplace", "label": "struct RewardsDistributor.GardenPowerByTimestamp", "members": [ { - "astId": 34261, + "astId": 33857, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", - "label": "principal", + "label": "supply", "offset": 0, "slot": "0", "type": "t_uint256" }, { - "astId": 34263, + "astId": 33859, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "timestamp", "offset": 0, @@ -1296,7 +1338,7 @@ "type": "t_uint256" }, { - "astId": 34265, + "astId": 33861, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "power", "offset": 0, @@ -1306,12 +1348,12 @@ ], "numberOfBytes": "96" }, - "t_struct(ProtocolPerQuarter)34259_storage": { + "t_struct(ProtocolPerQuarter)33855_storage": { "encoding": "inplace", "label": "struct RewardsDistributor.ProtocolPerQuarter", "members": [ { - "astId": 34252, + "astId": 33848, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "quarterPrincipal", "offset": 0, @@ -1319,7 +1361,7 @@ "type": "t_uint256" }, { - "astId": 34254, + "astId": 33850, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "quarterNumber", "offset": 0, @@ -1327,7 +1369,7 @@ "type": "t_uint256" }, { - "astId": 34256, + "astId": 33852, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "quarterPower", "offset": 0, @@ -1335,7 +1377,7 @@ "type": "t_uint256" }, { - "astId": 34258, + "astId": 33854, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "supplyPerQuarter", "offset": 0, @@ -1345,12 +1387,12 @@ ], "numberOfBytes": "128" }, - "t_struct(ProtocolPerTimestamp)34250_storage": { + "t_struct(ProtocolPerTimestamp)33846_storage": { "encoding": "inplace", "label": "struct RewardsDistributor.ProtocolPerTimestamp", "members": [ { - "astId": 34241, + "astId": 33837, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "principal", "offset": 0, @@ -1358,7 +1400,7 @@ "type": "t_uint256" }, { - "astId": 34243, + "astId": 33839, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "time", "offset": 0, @@ -1366,7 +1408,7 @@ "type": "t_uint256" }, { - "astId": 34245, + "astId": 33841, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "quarterBelonging", "offset": 0, @@ -1374,7 +1416,7 @@ "type": "t_uint256" }, { - "astId": 34247, + "astId": 33843, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "timeListPointer", "offset": 0, @@ -1382,7 +1424,7 @@ "type": "t_uint256" }, { - "astId": 34249, + "astId": 33845, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "power", "offset": 0, @@ -1392,20 +1434,20 @@ ], "numberOfBytes": "160" }, - "t_struct(TimestampContribution)34289_storage": { + "t_struct(TimestampContribution)33885_storage": { "encoding": "inplace", "label": "struct RewardsDistributor.TimestampContribution", "members": [ { - "astId": 34282, + "astId": 33878, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", - "label": "principal", + "label": "supply", "offset": 0, "slot": "0", "type": "t_uint256" }, { - "astId": 34284, + "astId": 33880, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "timestamp", "offset": 0, @@ -1413,7 +1455,7 @@ "type": "t_uint256" }, { - "astId": 34286, + "astId": 33882, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "timePointer", "offset": 0, @@ -1421,7 +1463,7 @@ "type": "t_uint256" }, { - "astId": 34288, + "astId": 33884, "contract": "contracts/token/RewardsDistributor.sol:RewardsDistributor", "label": "power", "offset": 0, diff --git a/deployments/artifacts/mainnet/SafeDecimalMath.json b/deployments/artifacts/mainnet/SafeDecimalMath.json index 9ac4c87d7..f780c5ab8 100644 --- a/deployments/artifacts/mainnet/SafeDecimalMath.json +++ b/deployments/artifacts/mainnet/SafeDecimalMath.json @@ -1,5 +1,5 @@ { - "address": "0x3Da35AAe517f4381c4f5C749A96074f44e95C221", + "address": "0x2de341674a99b379DA0fE53c00ae4Cf251adaE89", "abi": [ { "inputs": [], @@ -80,24 +80,24 @@ "type": "function" } ], - "transactionHash": "0xe6c0583135aac541dc2b499610ab8f859fcc531a22401dc7d5d0e7e26564cde2", + "transactionHash": "0xe486712bbb2e7ed4901c8043c6009929a5bff149a94affc78d8a25c5141d4928", "receipt": { "to": null, - "from": "0x311FEE0d859FA936FaEd456758dCD8047C4fFEd7", - "contractAddress": "0x49120d18951D4bA76Fc113A75bF5959a3261e683", - "transactionIndex": 18, + "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", + "contractAddress": "0x2de341674a99b379DA0fE53c00ae4Cf251adaE89", + "transactionIndex": 63, "gasUsed": "125858", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x04dcfc4bf042c4bce77867d1c47c7f8ffa5490eaa28fc0d31982f915c5a930bf", - "transactionHash": "0xe6c0583135aac541dc2b499610ab8f859fcc531a22401dc7d5d0e7e26564cde2", + "blockHash": "0xef25581503d73b8b04d5dc42458857cd3d571241af782b9d74935f3cc57f7998", + "transactionHash": "0xe486712bbb2e7ed4901c8043c6009929a5bff149a94affc78d8a25c5141d4928", "logs": [], - "blockNumber": 8516140, - "cumulativeGasUsed": "4455101", + "blockNumber": 12451158, + "cumulativeGasUsed": "2905733", "status": 1, "byzantium": true }, "args": [], - "solcInputHash": "1cde26e1be086ba932a8865ced5ceef3", + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"PRECISE_UNIT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UNIT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"highPrecisionDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"preciseUnit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"preciseUnit()\":{\"returns\":{\"_0\":\"Provides an interface to PRECISE_UNIT.\"}},\"unit()\":{\"returns\":{\"_0\":\"Provides an interface to UNIT.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/lib/SafeDecimalMath.sol\":\"SafeDecimalMath\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"contracts/lib/SafeDecimalMath.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nlibrary SafeDecimalMath {\\n using SafeMath for uint256;\\n\\n /* Number of decimal places in the representations. */\\n uint8 public constant decimals = 18;\\n uint8 public constant highPrecisionDecimals = 27;\\n\\n /* The number representing 1.0. */\\n uint256 public constant UNIT = 10**uint256(decimals);\\n\\n /* The number representing 1.0 for higher fidelity numbers. */\\n uint256 public constant PRECISE_UNIT = 10**uint256(highPrecisionDecimals);\\n uint256 private constant UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR = 10**uint256(highPrecisionDecimals - decimals);\\n\\n /**\\n * @return Provides an interface to UNIT.\\n */\\n function unit() external pure returns (uint256) {\\n return UNIT;\\n }\\n\\n /**\\n * @return Provides an interface to PRECISE_UNIT.\\n */\\n function preciseUnit() external pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @return The result of multiplying x and y, interpreting the operands as fixed-point\\n * decimals.\\n *\\n * @dev A unit factor is divided out after the product of x and y is evaluated,\\n * so that product must be less than 2**256. As this is an integer division,\\n * the internal division always rounds down. This helps save on gas. Rounding\\n * is more expensive on gas.\\n */\\n function multiplyDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\\n /* Divide by UNIT to remove the extra factor introduced by the product. */\\n return x.mul(y) / UNIT;\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of the specified precision unit.\\n *\\n * @dev The operands should be in the form of a the specified unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function _multiplyDecimalRound(\\n uint256 x,\\n uint256 y,\\n uint256 precisionUnit\\n ) private pure returns (uint256) {\\n /* Divide by UNIT to remove the extra factor introduced by the product. */\\n uint256 quotientTimesTen = x.mul(y) / (precisionUnit / 10);\\n\\n if (quotientTimesTen % 10 >= 5) {\\n quotientTimesTen += 10;\\n }\\n\\n return quotientTimesTen / 10;\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of a precise unit.\\n *\\n * @dev The operands should be in the precise unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function multiplyDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _multiplyDecimalRound(x, y, PRECISE_UNIT);\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of a standard unit.\\n *\\n * @dev The operands should be in the standard unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function multiplyDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _multiplyDecimalRound(x, y, UNIT);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is a high\\n * precision decimal.\\n *\\n * @dev y is divided after the product of x and the standard precision unit\\n * is evaluated, so the product of x and UNIT must be less than 2**256. As\\n * this is an integer division, the result is always rounded down.\\n * This helps save on gas. Rounding is more expensive on gas.\\n */\\n function divideDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\\n /* Reintroduce the UNIT factor that will be divided out by y. */\\n return x.mul(UNIT).div(y);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * decimal in the precision unit specified in the parameter.\\n *\\n * @dev y is divided after the product of x and the specified precision unit\\n * is evaluated, so the product of x and the specified precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function _divideDecimalRound(\\n uint256 x,\\n uint256 y,\\n uint256 precisionUnit\\n ) private pure returns (uint256) {\\n uint256 resultTimesTen = x.mul(precisionUnit * 10).div(y);\\n\\n if (resultTimesTen % 10 >= 5) {\\n resultTimesTen += 10;\\n }\\n\\n return resultTimesTen / 10;\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * standard precision decimal.\\n *\\n * @dev y is divided after the product of x and the standard precision unit\\n * is evaluated, so the product of x and the standard precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function divideDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _divideDecimalRound(x, y, UNIT);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * high precision decimal.\\n *\\n * @dev y is divided after the product of x and the high precision unit\\n * is evaluated, so the product of x and the high precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function divideDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _divideDecimalRound(x, y, PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Convert a standard decimal representation to a high precision one.\\n */\\n function decimalToPreciseDecimal(uint256 i) internal pure returns (uint256) {\\n return i.mul(UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR);\\n }\\n\\n /**\\n * @dev Convert a high precision decimal to a standard decimal representation.\\n */\\n function preciseDecimalToDecimal(uint256 i) internal pure returns (uint256) {\\n uint256 quotientTimesTen = i / (UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR / 10);\\n\\n if (quotientTimesTen % 10 >= 5) {\\n quotientTimesTen += 10;\\n }\\n\\n return quotientTimesTen / 10;\\n }\\n}\\n\",\"keccak256\":\"0x1372be4fa0c5813417396f128f5aa45da1cd7679e2d247a8e17d1ba5f0141253\",\"license\":\"Apache License\"}},\"version\":1}", "bytecode": "0x610151610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361061007c5760003560e01c80639d8e21771161005a5780639d8e2177146100c1578063d5e5e6e6146100c9578063def4419d146100d15761007c565b8063313ce56714610081578063864029e71461009f578063907af6c0146100b9575b600080fd5b6100896100d9565b6040805160ff9092168252519081900360200190f35b6100a76100de565b60408051918252519081900360200190f35b6100a76100ee565b6100a76100fa565b6100a7610106565b610089610116565b601281565b6b033b2e3c9fd0803ce800000081565b670de0b6b3a764000090565b670de0b6b3a764000081565b6b033b2e3c9fd0803ce800000090565b601b8156fea26469706673582212207e3ba3a07589b49ad82deae36d4288c255ea04146dbe34c6410c3cb26a3f8bce64736f6c63430007060033", "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040526004361061007c5760003560e01c80639d8e21771161005a5780639d8e2177146100c1578063d5e5e6e6146100c9578063def4419d146100d15761007c565b8063313ce56714610081578063864029e71461009f578063907af6c0146100b9575b600080fd5b6100896100d9565b6040805160ff9092168252519081900360200190f35b6100a76100de565b60408051918252519081900360200190f35b6100a76100ee565b6100a76100fa565b6100a7610106565b610089610116565b601281565b6b033b2e3c9fd0803ce800000081565b670de0b6b3a764000090565b670de0b6b3a764000081565b6b033b2e3c9fd0803ce800000090565b601b8156fea26469706673582212207e3ba3a07589b49ad82deae36d4288c255ea04146dbe34c6410c3cb26a3f8bce64736f6c63430007060033", diff --git a/deployments/artifacts/mainnet/StrategyFactory.json b/deployments/artifacts/mainnet/StrategyFactory.json index 98ce38797..cb3aba344 100644 --- a/deployments/artifacts/mainnet/StrategyFactory.json +++ b/deployments/artifacts/mainnet/StrategyFactory.json @@ -1,8 +1,14 @@ { - "address": "0x7d9c2A5d0B14912693b26dDBedAE9d58AAD3BF0f", + "address": "0x3EaA729Bd2A59E9411207F99ac222adC14f9632f", "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "address", + "name": "_controller", + "type": "address" + } + ], "stateMutability": "nonpayable", "type": "constructor" }, @@ -28,11 +34,6 @@ "name": "_garden", "type": "address" }, - { - "internalType": "address", - "name": "_controller", - "type": "address" - }, { "internalType": "uint256[]", "name": "_stratParams", @@ -51,34 +52,35 @@ "type": "function" } ], - "transactionHash": "0xe103ca73860ef64e72e02164738cd239a73fa9fc7f834970fa95a0305a42a24d", + "transactionHash": "0xea8421994e54a6eed95a7a56468eb2e7690650d00beee02b6ddcc24b38195ecc", "receipt": { "to": null, "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", - "contractAddress": "0x7d9c2A5d0B14912693b26dDBedAE9d58AAD3BF0f", - "transactionIndex": 36, - "gasUsed": "7633903", + "contractAddress": "0x3EaA729Bd2A59E9411207F99ac222adC14f9632f", + "transactionIndex": 137, + "gasUsed": "5345544", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x8bfae7d7c069b669564a9eb579d355937919b06eba0a5662a2de283954d3a491", - "transactionHash": "0xe103ca73860ef64e72e02164738cd239a73fa9fc7f834970fa95a0305a42a24d", + "blockHash": "0x3fdf493fac2338523572dc6156a43831fa62dabb2c8be2896b921c710659527c", + "transactionHash": "0xea8421994e54a6eed95a7a56468eb2e7690650d00beee02b6ddcc24b38195ecc", "logs": [], - "blockNumber": 12360909, - "cumulativeGasUsed": "9378777", + "blockNumber": 12451226, + "cumulativeGasUsed": "12352790", "status": 1, "byzantium": true }, - "args": [], - "solcInputHash": "a02a2075cf667a20c416d2d0a5e8f337", - "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_strategist\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_stratParams\",\"type\":\"uint256[]\"}],\"name\":\"createStrategy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Factory to create investment strategy contracts\",\"kind\":\"dev\",\"methods\":{\"createStrategy(string,string,address,address,address,uint256[])\":{\"params\":{\"_controller\":\"Address of the controller\",\"_garden\":\"Address of the garden\",\"_name\":\"Name of the strategy\",\"_stratParams\":\"Strat Params\",\"_strategist\":\"Address of the strategist\",\"_symbol\":\"Symbol of the strategy\"}}},\"title\":\"StrategyFactory\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"createStrategy(string,string,address,address,address,uint256[])\":{\"notice\":\"Creates a new investment strategy using minimal proxies\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/strategies/StrategyFactory.sol\":\"StrategyFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts may inherit from this and call {_registerInterface} to declare\\n * their support of an interface.\\n */\\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\\n /*\\n * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7\\n */\\n bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;\\n\\n /**\\n * @dev Mapping of interface ids to whether or not it's supported.\\n */\\n mapping(bytes4 => bool) private _supportedInterfaces;\\n\\n function __ERC165_init() internal initializer {\\n __ERC165_init_unchained();\\n }\\n\\n function __ERC165_init_unchained() internal initializer {\\n // Derived contracts need only register support for their own interfaces,\\n // we register support for ERC165 itself here\\n _registerInterface(_INTERFACE_ID_ERC165);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n *\\n * Time complexity O(1), guaranteed to always use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return _supportedInterfaces[interfaceId];\\n }\\n\\n /**\\n * @dev Registers the contract as an implementer of the interface defined by\\n * `interfaceId`. Support of the actual ERC165 interface is automatic and\\n * registering its interface id is not required.\\n *\\n * See {IERC165-supportsInterface}.\\n *\\n * Requirements:\\n *\\n * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).\\n */\\n function _registerInterface(bytes4 interfaceId) internal virtual {\\n require(interfaceId != 0xffffffff, \\\"ERC165: invalid interface id\\\");\\n _supportedInterfaces[interfaceId] = true;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xc6dbbc2f50a7c104377798a37b2acd1a41c1242544b0bb7a9a7c863f0520eb50\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165Upgradeable {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x4784c3f8a520a739dd25d76f514833a653990902d0e21601aed45bda44c87524\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 SafeMathUpgradeable {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0x0dd1e9b19801e3e7d900fbf4182d81e1afd23ad7be39504e33df6bbcba91d724\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity >=0.4.24 <0.8.0;\\n\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || _isConstructor() || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /// @dev Returns true if and only if the function is running in the constructor\\n function _isConstructor() private view returns (bool) {\\n return !AddressUpgradeable.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xd8e4eb08dcc1d1860fb347ba5ffd595242b9a1b66d49a47f2b4cb51c3f35017e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"./IERC721Upgradeable.sol\\\";\\nimport \\\"./IERC721MetadataUpgradeable.sol\\\";\\nimport \\\"./IERC721EnumerableUpgradeable.sol\\\";\\nimport \\\"./IERC721ReceiverUpgradeable.sol\\\";\\nimport \\\"../../introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../../math/SafeMathUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../../utils/EnumerableMapUpgradeable.sol\\\";\\nimport \\\"../../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../../proxy/Initializable.sol\\\";\\n\\n/**\\n * @title ERC721 Non-Fungible Token Standard basic implementation\\n * @dev see https://eips.ethereum.org/EIPS/eip-721\\n */\\ncontract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable, IERC721EnumerableUpgradeable {\\n using SafeMathUpgradeable for uint256;\\n using AddressUpgradeable for address;\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.UintSet;\\n using EnumerableMapUpgradeable for EnumerableMapUpgradeable.UintToAddressMap;\\n using StringsUpgradeable for uint256;\\n\\n // Equals to `bytes4(keccak256(\\\"onERC721Received(address,address,uint256,bytes)\\\"))`\\n // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector`\\n bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;\\n\\n // Mapping from holder address to their (enumerable) set of owned tokens\\n mapping (address => EnumerableSetUpgradeable.UintSet) private _holderTokens;\\n\\n // Enumerable mapping from token ids to their owners\\n EnumerableMapUpgradeable.UintToAddressMap private _tokenOwners;\\n\\n // Mapping from token ID to approved address\\n mapping (uint256 => address) private _tokenApprovals;\\n\\n // Mapping from owner to operator approvals\\n mapping (address => mapping (address => bool)) private _operatorApprovals;\\n\\n // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Optional mapping for token URIs\\n mapping (uint256 => string) private _tokenURIs;\\n\\n // Base URI\\n string private _baseURI;\\n\\n /*\\n * bytes4(keccak256('balanceOf(address)')) == 0x70a08231\\n * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e\\n * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3\\n * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc\\n * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465\\n * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5\\n * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd\\n * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e\\n * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde\\n *\\n * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^\\n * 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;\\n\\n /*\\n * bytes4(keccak256('name()')) == 0x06fdde03\\n * bytes4(keccak256('symbol()')) == 0x95d89b41\\n * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd\\n *\\n * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f;\\n\\n /*\\n * bytes4(keccak256('totalSupply()')) == 0x18160ddd\\n * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59\\n * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7\\n *\\n * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;\\n\\n /**\\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\\n */\\n function __ERC721_init(string memory name_, string memory symbol_) internal initializer {\\n __Context_init_unchained();\\n __ERC165_init_unchained();\\n __ERC721_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC721_init_unchained(string memory name_, string memory symbol_) internal initializer {\\n _name = name_;\\n _symbol = symbol_;\\n\\n // register the supported interfaces to conform to ERC721 via ERC165\\n _registerInterface(_INTERFACE_ID_ERC721);\\n _registerInterface(_INTERFACE_ID_ERC721_METADATA);\\n _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE);\\n }\\n\\n /**\\n * @dev See {IERC721-balanceOf}.\\n */\\n function balanceOf(address owner) public view virtual override returns (uint256) {\\n require(owner != address(0), \\\"ERC721: balance query for the zero address\\\");\\n return _holderTokens[owner].length();\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n return _tokenOwners.get(tokenId, \\\"ERC721: owner query for nonexistent token\\\");\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-name}.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-symbol}.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-tokenURI}.\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n require(_exists(tokenId), \\\"ERC721Metadata: URI query for nonexistent token\\\");\\n\\n string memory _tokenURI = _tokenURIs[tokenId];\\n string memory base = baseURI();\\n\\n // If there is no base URI, return the token URI.\\n if (bytes(base).length == 0) {\\n return _tokenURI;\\n }\\n // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).\\n if (bytes(_tokenURI).length > 0) {\\n return string(abi.encodePacked(base, _tokenURI));\\n }\\n // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI.\\n return string(abi.encodePacked(base, tokenId.toString()));\\n }\\n\\n /**\\n * @dev Returns the base URI set via {_setBaseURI}. This will be\\n * automatically added as a prefix in {tokenURI} to each token's URI, or\\n * to the token ID if no specific URI is set for that token ID.\\n */\\n function baseURI() public view virtual returns (string memory) {\\n return _baseURI;\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\\n return _holderTokens[owner].at(index);\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds\\n return _tokenOwners.length();\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenByIndex}.\\n */\\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\\n (uint256 tokenId, ) = _tokenOwners.at(index);\\n return tokenId;\\n }\\n\\n /**\\n * @dev See {IERC721-approve}.\\n */\\n function approve(address to, uint256 tokenId) public virtual override {\\n address owner = ERC721Upgradeable.ownerOf(tokenId);\\n require(to != owner, \\\"ERC721: approval to current owner\\\");\\n\\n require(_msgSender() == owner || ERC721Upgradeable.isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not owner nor approved for all\\\"\\n );\\n\\n _approve(to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-getApproved}.\\n */\\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\\n require(_exists(tokenId), \\\"ERC721: approved query for nonexistent token\\\");\\n\\n return _tokenApprovals[tokenId];\\n }\\n\\n /**\\n * @dev See {IERC721-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n require(operator != _msgSender(), \\\"ERC721: approve to caller\\\");\\n\\n _operatorApprovals[_msgSender()][operator] = approved;\\n emit ApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC721-isApprovedForAll}.\\n */\\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[owner][operator];\\n }\\n\\n /**\\n * @dev See {IERC721-transferFrom}.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) public virtual override {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: transfer caller is not owner nor approved\\\");\\n\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: transfer caller is not owner nor approved\\\");\\n _safeTransfer(from, to, tokenId, _data);\\n }\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * `_data` is additional data, it has no specified format and it is sent in call to `to`.\\n *\\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\\n * implement alternative mechanisms to perform token transfer, such as signature-based.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual {\\n _transfer(from, to, tokenId);\\n require(_checkOnERC721Received(from, to, tokenId, _data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Returns whether `tokenId` exists.\\n *\\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\\n *\\n * Tokens start existing when they are minted (`_mint`),\\n * and stop existing when they are burned (`_burn`).\\n */\\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\\n return _tokenOwners.contains(tokenId);\\n }\\n\\n /**\\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\\n require(_exists(tokenId), \\\"ERC721: operator query for nonexistent token\\\");\\n address owner = ERC721Upgradeable.ownerOf(tokenId);\\n return (spender == owner || getApproved(tokenId) == spender || ERC721Upgradeable.isApprovedForAll(owner, spender));\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n d*\\n * - `tokenId` must not exist.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeMint(address to, uint256 tokenId) internal virtual {\\n _safeMint(to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\\n */\\n function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual {\\n _mint(to, tokenId);\\n require(_checkOnERC721Received(address(0), to, tokenId, _data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Mints `tokenId` and transfers it to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - `to` cannot be the zero address.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _mint(address to, uint256 tokenId) internal virtual {\\n require(to != address(0), \\\"ERC721: mint to the zero address\\\");\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n _beforeTokenTransfer(address(0), to, tokenId);\\n\\n _holderTokens[to].add(tokenId);\\n\\n _tokenOwners.set(tokenId, to);\\n\\n emit Transfer(address(0), to, tokenId);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _burn(uint256 tokenId) internal virtual {\\n address owner = ERC721Upgradeable.ownerOf(tokenId); // internal owner\\n\\n _beforeTokenTransfer(owner, address(0), tokenId);\\n\\n // Clear approvals\\n _approve(address(0), tokenId);\\n\\n // Clear metadata (if any)\\n if (bytes(_tokenURIs[tokenId]).length != 0) {\\n delete _tokenURIs[tokenId];\\n }\\n\\n _holderTokens[owner].remove(tokenId);\\n\\n _tokenOwners.remove(tokenId);\\n\\n emit Transfer(owner, address(0), tokenId);\\n }\\n\\n /**\\n * @dev Transfers `tokenId` from `from` to `to`.\\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _transfer(address from, address to, uint256 tokenId) internal virtual {\\n require(ERC721Upgradeable.ownerOf(tokenId) == from, \\\"ERC721: transfer of token that is not own\\\"); // internal owner\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId);\\n\\n // Clear approvals from the previous owner\\n _approve(address(0), tokenId);\\n\\n _holderTokens[from].remove(tokenId);\\n _holderTokens[to].add(tokenId);\\n\\n _tokenOwners.set(tokenId, to);\\n\\n emit Transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {\\n require(_exists(tokenId), \\\"ERC721Metadata: URI set of nonexistent token\\\");\\n _tokenURIs[tokenId] = _tokenURI;\\n }\\n\\n /**\\n * @dev Internal function to set the base URI for all token IDs. It is\\n * automatically added as a prefix to the value returned in {tokenURI},\\n * or to the token ID if {tokenURI} is empty.\\n */\\n function _setBaseURI(string memory baseURI_) internal virtual {\\n _baseURI = baseURI_;\\n }\\n\\n /**\\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\\n * The call is not executed if the target address is not a contract.\\n *\\n * @param from address representing the previous owner of the given token ID\\n * @param to target address that will receive the tokens\\n * @param tokenId uint256 ID of the token to be transferred\\n * @param _data bytes optional data to send along with the call\\n * @return bool whether the call correctly returned the expected magic value\\n */\\n function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data)\\n private returns (bool)\\n {\\n if (!to.isContract()) {\\n return true;\\n }\\n bytes memory returndata = to.functionCall(abi.encodeWithSelector(\\n IERC721ReceiverUpgradeable(to).onERC721Received.selector,\\n _msgSender(),\\n from,\\n tokenId,\\n _data\\n ), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n bytes4 retval = abi.decode(returndata, (bytes4));\\n return (retval == _ERC721_RECEIVED);\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * Emits an {Approval} event.\\n */\\n function _approve(address to, uint256 tokenId) internal virtual {\\n _tokenApprovals[tokenId] = to;\\n emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId); // internal owner\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\\n * transferred to `to`.\\n * - When `from` is zero, `tokenId` will be minted for `to`.\\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { }\\n uint256[41] private __gap;\\n}\\n\",\"keccak256\":\"0x83d830f0835976a5b7bb9c416edf06c865208127eb35445dd6c49b20481d7282\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721EnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"./IERC721Upgradeable.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721EnumerableUpgradeable is IERC721Upgradeable {\\n\\n /**\\n * @dev Returns the total amount of tokens stored by the contract.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns a token ID owned by `owner` at a given `index` of its token list.\\n * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);\\n\\n /**\\n * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.\\n * Use along with {totalSupply} to enumerate all tokens.\\n */\\n function tokenByIndex(uint256 index) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x529f3ab127aace61d7d47f3df7a6a2c42dc79bbb3a0ca459d6a861f33698aee6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721MetadataUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"./IERC721Upgradeable.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721MetadataUpgradeable is IERC721Upgradeable {\\n\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xa981b1f67f60771c18d39e21bad0a2f0f952e2c3faa90b45b982060fc14ee2bd\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721ReceiverUpgradeable {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.\\n */\\n function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0x53552243cd7de0d57a876cbaee3485d4bdc2b1c7d58ff15447cd623a3ddb5cd0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"../../introspection/IERC165Upgradeable.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721Upgradeable is IERC165Upgradeable {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x3dab19bb4a63bcbda1ee153ca291694f92f9009fad28626126b15a8503b0e5ff\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 { size := extcodesize(account) }\\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, \\\"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, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfc5ea91fa9ceb1961023b2a6c978b902888c52b90847ac7813fe3b79524165f6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\nimport \\\"../proxy/Initializable.sol\\\";\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xbbf8a21b9a66c48d45ff771b8563c6df19ba451d63dfb8380a865c1e1f29d1a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/EnumerableMapUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 *\\n * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are\\n * supported.\\n */\\nlibrary EnumerableMapUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Map type with\\n // bytes32 keys and values.\\n // The Map implementation uses private functions, and user-facing\\n // implementations (such as Uint256ToAddressMap) are just wrappers around\\n // the underlying Map.\\n // This means that we can only create new EnumerableMaps for types that fit\\n // in bytes32.\\n\\n struct MapEntry {\\n bytes32 _key;\\n bytes32 _value;\\n }\\n\\n struct Map {\\n // Storage of map keys and values\\n MapEntry[] _entries;\\n\\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 (bytes32 => 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(Map storage map, bytes32 key, bytes32 value) private 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 if (keyIndex == 0) { // Equivalent to !contains(map, key)\\n map._entries.push(MapEntry({ _key: key, _value: value }));\\n // The entry is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n map._indexes[key] = map._entries.length;\\n return true;\\n } else {\\n map._entries[keyIndex - 1]._value = value;\\n return false;\\n }\\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(Map storage map, bytes32 key) private 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 if (keyIndex != 0) { // Equivalent to contains(map, key)\\n // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one\\n // in the array, and then remove the last entry (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = keyIndex - 1;\\n uint256 lastIndex = map._entries.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 MapEntry 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 map._entries.pop();\\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(Map storage map, bytes32 key) private 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(Map storage map) private view returns (uint256) {\\n return map._entries.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(Map storage map, uint256 index) private view returns (bytes32, bytes32) {\\n require(map._entries.length > index, \\\"EnumerableMap: index out of bounds\\\");\\n\\n MapEntry storage entry = map._entries[index];\\n return (entry._key, entry._value);\\n }\\n\\n /**\\n * @dev Tries to returns the value associated with `key`. O(1).\\n * Does not revert if `key` is not in the map.\\n */\\n function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key)\\n return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based\\n }\\n\\n /**\\n * @dev Returns the value associated with `key`. O(1).\\n *\\n * Requirements:\\n *\\n * - `key` must be in the map.\\n */\\n function _get(Map storage map, bytes32 key) private view returns (bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n require(keyIndex != 0, \\\"EnumerableMap: nonexistent key\\\"); // Equivalent to contains(map, key)\\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\\n }\\n\\n /**\\n * @dev Same as {_get}, with a custom error message when `key` is not in the map.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {_tryGet}.\\n */\\n function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key)\\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\\n }\\n\\n // UintToAddressMap\\n\\n struct UintToAddressMap {\\n Map _inner;\\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(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) {\\n return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the key was removed from the map, that is if it was present.\\n */\\n function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) {\\n return _remove(map._inner, bytes32(key));\\n }\\n\\n /**\\n * @dev Returns true if the key is in the map. O(1).\\n */\\n function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) {\\n return _contains(map._inner, bytes32(key));\\n }\\n\\n /**\\n * @dev Returns the number of elements in the map. O(1).\\n */\\n function length(UintToAddressMap storage map) internal view returns (uint256) {\\n return _length(map._inner);\\n }\\n\\n /**\\n * @dev Returns the element 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 *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) {\\n (bytes32 key, bytes32 value) = _at(map._inner, index);\\n return (uint256(key), address(uint160(uint256(value))));\\n }\\n\\n /**\\n * @dev Tries to returns the value associated with `key`. O(1).\\n * Does not revert if `key` is not in the map.\\n *\\n * _Available since v3.4._\\n */\\n function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) {\\n (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key));\\n return (success, address(uint160(uint256(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.\\n */\\n function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {\\n return address(uint160(uint256(_get(map._inner, bytes32(key)))));\\n }\\n\\n /**\\n * @dev Same as {get}, with a custom error message when `key` is not in the map.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryGet}.\\n */\\n function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) {\\n return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage))));\\n }\\n}\\n\",\"keccak256\":\"0x6a8e34d051fc71ce49a8a47d050c5b7e77909008c6be7d6780ee9ed87d2d3797\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\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 (bytes32 => 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(Set storage set, bytes32 value) private 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(Set storage set, bytes32 value) private 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) { // 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 bytes32 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(Set storage set, bytes32 value) private 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(Set storage set) private 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(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\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(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\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(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\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(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\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 return _add(set._inner, bytes32(uint256(uint160(value))));\\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 return _remove(set._inner, bytes32(uint256(uint160(value))));\\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 _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\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 return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\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(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\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(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\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(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x20714cf126a1a984613579156d3cbc726db8025d8400e1db1d2bb714edaba335\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n uint256 index = digits - 1;\\n temp = value;\\n while (temp != 0) {\\n buffer[index--] = bytes1(uint8(48 + temp % 10));\\n temp /= 10;\\n }\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0x8d1ac29b8a8ed3cfebe5d8774b465441ae8931aaca549f84408e0b29a1191964\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Clones.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for\\n * deploying minimal proxy contracts, also known as \\\"clones\\\".\\n *\\n * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies\\n * > a minimal bytecode implementation that delegates all calls to a known, fixed address.\\n *\\n * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`\\n * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the\\n * deterministic method.\\n *\\n * _Available since v3.4._\\n */\\nlibrary Clones {\\n /**\\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `master`.\\n *\\n * This function uses the create opcode, which should never revert.\\n */\\n function clone(address master) internal returns (address instance) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\\n mstore(add(ptr, 0x14), shl(0x60, master))\\n mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\\n instance := create(0, ptr, 0x37)\\n }\\n require(instance != address(0), \\\"ERC1167: create failed\\\");\\n }\\n\\n /**\\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `master`.\\n *\\n * This function uses the create2 opcode and a `salt` to deterministically deploy\\n * the clone. Using the same `master` and `salt` multiple time will revert, since\\n * the clones cannot be deployed twice at the same address.\\n */\\n function cloneDeterministic(address master, bytes32 salt) internal returns (address instance) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\\n mstore(add(ptr, 0x14), shl(0x60, master))\\n mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\\n instance := create2(0, ptr, 0x37, salt)\\n }\\n require(instance != address(0), \\\"ERC1167: create2 failed\\\");\\n }\\n\\n /**\\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\\n */\\n function predictDeterministicAddress(address master, bytes32 salt, address deployer) internal pure returns (address predicted) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\\n mstore(add(ptr, 0x14), shl(0x60, master))\\n mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000)\\n mstore(add(ptr, 0x38), shl(0x60, deployer))\\n mstore(add(ptr, 0x4c), salt)\\n mstore(add(ptr, 0x6c), keccak256(ptr, 0x37))\\n predicted := keccak256(add(ptr, 0x37), 0x55)\\n }\\n }\\n\\n /**\\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\\n */\\n function predictDeterministicAddress(address master, bytes32 salt) internal view returns (address predicted) {\\n return predictDeterministicAddress(master, salt, address(this));\\n }\\n}\\n\",\"keccak256\":\"0x0d24348f536f928d8b42789737bf34762faee065667ab530ea20969a9d9920d1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.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 using SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n // solhint-disable-next-line max-line-length\\n require((value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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 * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 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. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\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 { size := extcodesize(account) }\\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, \\\"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, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Counters.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../math/SafeMath.sol\\\";\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath}\\n * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never\\n * directly accessed.\\n */\\nlibrary Counters {\\n using SafeMath for uint256;\\n\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n // The {SafeMath} overflow check can be skipped here, see the comment at the top\\n counter._value += 1;\\n }\\n\\n function decrement(Counter storage counter) internal {\\n counter._value = counter._value.sub(1);\\n }\\n}\\n\",\"keccak256\":\"0x21662e4254ce4ac8570b30cc7ab31435966b3cb778a56ba4d09276881cfb2437\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\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 /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\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, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x7b2b8baa20fd60ab4a328c8e34c64a353651b80ba4b5b157cbb61813f6f85d55\",\"license\":\"MIT\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityMinimum(uint256 _minRiskyPairLiquidityEth) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minRiskyPairLiquidityEth() external view returns (uint256);\\n\\n function getUniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0x57cf4ece98219f805a416e8c24728d30d9b37c4126d66785d2617b97e35ffae6\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function nftAddress() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategy(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function reenableEthForStrategies() external;\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x5e460136e0b45024ea1c1f32cde607f3ce75dd5b14cee34007d6bbd08beabc82\",\"license\":\"Apache License\"},\"contracts/interfaces/IIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIntegration\\n * @author Babylon Finance\\n *\\n * Interface for protocol integrations\\n */\\ninterface IIntegration {\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xee03c9274ddf3257e3bfd2bb229fea3412c9105f178e64174f59efeafd53182c\",\"license\":\"Apache License\"},\"contracts/interfaces/IOperation.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from './IGarden.sol';\\nimport {IStrategy} from './IStrategy.sol';\\n\\n/**\\n * @title IOperation\\n * @author Babylon Finance\\n *\\n * Interface for an strategy operation\\n */\\ninterface IOperation {\\n function validateOperation(\\n address _data,\\n IGarden _garden,\\n address _integration,\\n uint256 _index\\n ) external view;\\n\\n function executeOperation(\\n address _asset,\\n uint256 _capital,\\n uint8 _assetStatus,\\n address _data,\\n IGarden _garden,\\n address _integration\\n )\\n external\\n returns (\\n address,\\n uint256,\\n uint8\\n );\\n\\n function exitOperation(\\n uint256 _percentage,\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external;\\n\\n function getNAV(\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external view returns (uint256);\\n\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x856e173e6c8e1fdbe54988df58d0805a23a6a2f8408bd4f90a488a1978e762ed\",\"license\":\"Apache License\"},\"contracts/interfaces/IPriceOracle.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol IPriceOracle)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPriceOracle\\n * @author Babylon Finance\\n *\\n * Interface for interacting with PriceOracle\\n */\\ninterface IPriceOracle {\\n /* ============ Functions ============ */\\n\\n function getPrice(address _assetOne, address _assetTwo) external view returns (uint256);\\n\\n function updateAdapters(address _assetOne, address _assetTwo) external;\\n}\\n\",\"keccak256\":\"0xa22e0e5e166f6f6714553b736ee921b916c37bc5b557042bf6042cc010d2a041\",\"license\":\"Apache License\"},\"contracts/interfaces/IRewardsDistributor.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IRewardsDistributor\\n * @author Babylon Finance\\n *\\n * Interface for the distribute rewards of the BABL Mining Program.\\n */\\n\\ninterface IRewardsDistributor {\\n // Structs\\n struct PrincipalPerTimestamp {\\n uint256 principal;\\n uint256 time;\\n uint256 timeListPointer;\\n }\\n\\n function protocolPrincipal() external view returns (uint256);\\n\\n function pid() external view returns (uint256);\\n\\n // solhint-disable-next-line\\n function EPOCH_DURATION() external pure returns (uint256);\\n\\n // solhint-disable-next-line\\n function START_TIME() external view returns (uint256);\\n\\n // solhint-disable-next-line\\n function Q1_REWARDS() external pure returns (uint256);\\n\\n // solhint-disable-next-line\\n function DECAY_RATE() external pure returns (uint256);\\n\\n function addProtocolPrincipal(uint256 _capital) external;\\n\\n function substractProtocolPrincipal(uint256 _capital) external;\\n\\n function getStrategyRewards(address _strategy) external returns (uint96);\\n\\n function sendTokensToContributor(address _to, uint96 _amount) external;\\n\\n function getRewards(\\n address _garden,\\n address _contributor,\\n address[] calldata _finalizedStrategies\\n ) external view returns (uint256, uint96);\\n\\n function getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) external view returns (uint256);\\n\\n /**\\n function getContributor(address _garden, address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256[] memory,\\n uint256\\n );\\n */\\n function updateGardenPower(address _garden, uint256 _pid) external;\\n\\n function setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw,\\n uint256 _pid\\n ) external;\\n\\n function tokenSupplyPerQuarter(uint256 quarter) external view returns (uint96);\\n\\n function checkProtocol(uint256 _time)\\n external\\n view\\n returns (\\n uint256 principal,\\n uint256 time,\\n uint256 quarterBelonging,\\n uint256 timeListPointer,\\n uint256 power\\n );\\n\\n function checkQuarter(uint256 _num)\\n external\\n view\\n returns (\\n uint256 quarterPrincipal,\\n uint256 quarterNumber,\\n uint256 quarterPower,\\n uint96 supplyPerQuarter\\n );\\n}\\n\",\"keccak256\":\"0xc68eb7826b0174d4f6dff50320abb2cd958a978d4537c57867dd828dc2798662\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital,\\n address _strategyNft\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function strategyNft() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x4396906e436eb68c96715e0a53ae1656ac5d7934ebdaeb58ec3c33953465bc39\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategyFactory.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IIntegration} from './IIntegration.sol';\\n\\n/**\\n * @title IStrategyFactory\\n * @author Babylon Finance\\n *\\n * Interface for the strategy factory\\n */\\ninterface IStrategyFactory {\\n function createStrategy(\\n string memory _name,\\n string memory _symbol,\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256[] calldata _stratParams\\n ) external returns (address);\\n}\\n\",\"keccak256\":\"0x770627bcf3ecf7c51b1ccc6b7c52bb291082e06ac134beccc02a40620273c1d5\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategyNFT.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from './IGarden.sol';\\nimport {IBabController} from './IBabController.sol';\\n\\n/**\\n * @title IStrategyNFT\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Strategy NFT.\\n */\\ninterface IStrategyNFT {\\n function initialize(\\n address _controller,\\n address _strategy,\\n string memory _name,\\n string memory _symbol\\n ) external;\\n\\n function grantStrategyNFT(address _user, string memory _tokenURI) external returns (uint256);\\n\\n function updateStrategyURI(string memory _tokenURI) external;\\n}\\n\",\"keccak256\":\"0x54e3b1517cce759e5cca5215ab8f13f0f302a0b1c865ce1e5bb845542ca22ac1\",\"license\":\"Apache License\"},\"contracts/interfaces/ITradeIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title ITrade\\n * @author Babylon Finance\\n *\\n * Interface for trading protocol integrations\\n */\\ninterface ITradeIntegration {\\n function trade(\\n address _strategy,\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken,\\n uint256 _minReceiveQuantity\\n ) external;\\n\\n function getConversionRates(\\n address _sourceToken,\\n address _destinationToken,\\n uint256 _sourceQuantity\\n ) external returns (uint256, uint256);\\n}\\n\",\"keccak256\":\"0x95df25f2cbfd3d82a9e22c9202f9fc2c497e90fd6e5fcfb00c4162f6447c0cbd\",\"license\":\"Apache License\"},\"contracts/interfaces/external/weth/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface IWETH is IERC20 {\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n}\\n\",\"keccak256\":\"0xacc7980a650b7a753ee51f1bbc0ae4f641e84261bcc02cfdaf87ee8136483684\",\"license\":\"MIT\"},\"contracts/lib/AddressArrayUtils.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n/**\\n * @title AddressArrayUtils\\n * @author Set Protocol\\n *\\n * Utility functions to handle Address Arrays\\n */\\nlibrary AddressArrayUtils {\\n /**\\n * Finds the index of the first occurrence of the given element.\\n * @param A The input array to search\\n * @param a The value to find\\n * @return Returns (index and isIn) for the first occurrence starting from index 0\\n */\\n function indexOf(address[] memory A, address a) internal pure returns (uint256, bool) {\\n uint256 length = A.length;\\n for (uint256 i = 0; i < length; i++) {\\n if (A[i] == a) {\\n return (i, true);\\n }\\n }\\n return (uint256(-1), false);\\n }\\n\\n /**\\n * Returns true if the value is present in the list. Uses indexOf internally.\\n * @param A The input array to search\\n * @param a The value to find\\n * @return Returns isIn for the first occurrence starting from index 0\\n */\\n function contains(address[] memory A, address a) internal pure returns (bool) {\\n (, bool isIn) = indexOf(A, a);\\n return isIn;\\n }\\n\\n /**\\n * Returns true if there are 2 elements that are the same in an array\\n * @param A The input array to search\\n * @return Returns boolean for the first occurrence of a duplicate\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n require(A.length > 0, 'A is empty');\\n\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n address current = A[i];\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (current == A[j]) {\\n return true;\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @param A The input array to search\\n * @param a The address to remove\\n * @return Returns the array with the object removed.\\n */\\n function remove(address[] memory A, address a) internal pure returns (address[] memory) {\\n (uint256 index, bool isIn) = indexOf(A, a);\\n if (!isIn) {\\n revert('Address not in array.');\\n } else {\\n (address[] memory _A, ) = pop(A, index);\\n return _A;\\n }\\n }\\n\\n /**\\n * Removes specified index from array\\n * @param A The input array to search\\n * @param index The index to remove\\n * @return Returns the new array and the removed entry\\n */\\n function pop(address[] memory A, uint256 index) internal pure returns (address[] memory, address) {\\n uint256 length = A.length;\\n require(index < A.length, 'Index must be < A length');\\n address[] memory newAddresses = new address[](length - 1);\\n for (uint256 i = 0; i < index; i++) {\\n newAddresses[i] = A[i];\\n }\\n for (uint256 j = index + 1; j < length; j++) {\\n newAddresses[j - 1] = A[j];\\n }\\n return (newAddresses, A[index]);\\n }\\n\\n /**\\n * Returns the combination of the two arrays\\n * @param A The first array\\n * @param B The second array\\n * @return Returns A extended by B\\n */\\n function extend(address[] memory A, address[] memory B) internal pure returns (address[] memory) {\\n uint256 aLength = A.length;\\n uint256 bLength = B.length;\\n address[] memory newAddresses = new address[](aLength + bLength);\\n for (uint256 i = 0; i < aLength; i++) {\\n newAddresses[i] = A[i];\\n }\\n for (uint256 j = 0; j < bLength; j++) {\\n newAddresses[aLength + j] = B[j];\\n }\\n return newAddresses;\\n }\\n}\\n\",\"keccak256\":\"0x409127cd8cadb573e5de48fd992efbd8b0f1e243d235abc3c5f2fa873195c16a\",\"license\":\"Apache License\"},\"contracts/lib/BabylonErrors.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n// solhint-disable\\n\\n/**\\n * @notice Forked from https://github.com/balancer-labs/balancer-core-v2/blob/master/contracts/lib/helpers/BalancerErrors.sol\\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 // 'BAB#{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 \\\"BAB#\\\" part is a known constant\\n // (0x42414223): 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(0x42414223000000, 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 // Max deposit limit needs to be under the limit\\n uint256 internal constant MAX_DEPOSIT_LIMIT = 0;\\n // Creator needs to deposit\\n uint256 internal constant MIN_CONTRIBUTION = 1;\\n // Min Garden token supply >= 0\\n uint256 internal constant MIN_TOKEN_SUPPLY = 2;\\n // Deposit hardlock needs to be at least 1 block\\n uint256 internal constant DEPOSIT_HARDLOCK = 3;\\n // Needs to be at least the minimum\\n uint256 internal constant MIN_LIQUIDITY = 4;\\n // _reserveAssetQuantity is not equal to msg.value\\n uint256 internal constant MSG_VALUE_DO_NOT_MATCH = 5;\\n // Withdrawal amount has to be equal or less than msg.sender balance\\n uint256 internal constant MSG_SENDER_TOKENS_DO_NOT_MATCH = 6;\\n // Tokens are staked\\n uint256 internal constant TOKENS_STAKED = 7;\\n // Balance too low\\n uint256 internal constant BALANCE_TOO_LOW = 8;\\n // msg.sender doesn't have enough tokens\\n uint256 internal constant MSG_SENDER_TOKENS_TOO_LOW = 9;\\n // There is an open redemption window already\\n uint256 internal constant REDEMPTION_OPENED_ALREADY = 10;\\n // Cannot request twice in the same window\\n uint256 internal constant ALREADY_REQUESTED = 11;\\n // Rewards and profits already claimed\\n uint256 internal constant ALREADY_CLAIMED = 12;\\n // Value have to be greater than zero\\n uint256 internal constant GREATER_THAN_ZERO = 13;\\n // Must be reserve asset\\n uint256 internal constant MUST_BE_RESERVE_ASSET = 14;\\n // Only contributors allowed\\n uint256 internal constant ONLY_CONTRIBUTOR = 15;\\n // Only controller allowed\\n uint256 internal constant ONLY_CONTROLLER = 16;\\n // Only creator allowed\\n uint256 internal constant ONLY_CREATOR = 17;\\n // Only keeper allowed\\n uint256 internal constant ONLY_KEEPER = 18;\\n // Fee is too high\\n uint256 internal constant FEE_TOO_HIGH = 19;\\n // Only strategy allowed\\n uint256 internal constant ONLY_STRATEGY = 20;\\n // Only active allowed\\n uint256 internal constant ONLY_ACTIVE = 21;\\n // Only inactive allowed\\n uint256 internal constant ONLY_INACTIVE = 22;\\n // Address should be not zero address\\n uint256 internal constant ADDRESS_IS_ZERO = 23;\\n // Not within range\\n uint256 internal constant NOT_IN_RANGE = 24;\\n // Value is too low\\n uint256 internal constant VALUE_TOO_LOW = 25;\\n // Value is too high\\n uint256 internal constant VALUE_TOO_HIGH = 26;\\n // Only strategy or protocol allowed\\n uint256 internal constant ONLY_STRATEGY_OR_CONTROLLER = 27;\\n // Normal withdraw possible\\n uint256 internal constant NORMAL_WITHDRAWAL_POSSIBLE = 28;\\n // User does not have permissions to join garden\\n uint256 internal constant USER_CANNOT_JOIN = 29;\\n // User does not have permissions to add strategies in garden\\n uint256 internal constant USER_CANNOT_ADD_STRATEGIES = 30;\\n // Only Protocol or garden\\n uint256 internal constant ONLY_PROTOCOL_OR_GARDEN = 31;\\n // Only Strategist\\n uint256 internal constant ONLY_STRATEGIST = 32;\\n // Only Integration\\n uint256 internal constant ONLY_INTEGRATION = 33;\\n // Only garden and data not set\\n uint256 internal constant ONLY_GARDEN_AND_DATA_NOT_SET = 34;\\n // Only active garden\\n uint256 internal constant ONLY_ACTIVE_GARDEN = 35;\\n // Contract is not a garden\\n uint256 internal constant NOT_A_GARDEN = 36;\\n // Not enough tokens\\n uint256 internal constant STRATEGIST_TOKENS_TOO_LOW = 37;\\n // Stake is too low\\n uint256 internal constant STAKE_HAS_TO_AT_LEAST_ONE = 38;\\n // Duration must be in range\\n uint256 internal constant DURATION_MUST_BE_IN_RANGE = 39;\\n // Max Capital Requested\\n uint256 internal constant MAX_CAPITAL_REQUESTED = 41;\\n // Votes are already resolved\\n uint256 internal constant VOTES_ALREADY_RESOLVED = 42;\\n // Voting window is closed\\n uint256 internal constant VOTING_WINDOW_IS_OVER = 43;\\n // Strategy needs to be active\\n uint256 internal constant STRATEGY_NEEDS_TO_BE_ACTIVE = 44;\\n // Max capital reached\\n uint256 internal constant MAX_CAPITAL_REACHED = 45;\\n // Capital is less then rebalance\\n uint256 internal constant CAPITAL_IS_LESS_THAN_REBALANCE = 46;\\n // Strategy is in cooldown period\\n uint256 internal constant STRATEGY_IN_COOLDOWN = 47;\\n // Strategy is not executed\\n uint256 internal constant STRATEGY_IS_NOT_EXECUTED = 48;\\n // Strategy is not over yet\\n uint256 internal constant STRATEGY_IS_NOT_OVER_YET = 49;\\n // Strategy is already finalized\\n uint256 internal constant STRATEGY_IS_ALREADY_FINALIZED = 50;\\n // No capital to unwind\\n uint256 internal constant STRATEGY_NO_CAPITAL_TO_UNWIND = 51;\\n // Strategy needs to be inactive\\n uint256 internal constant STRATEGY_NEEDS_TO_BE_INACTIVE = 52;\\n // Duration needs to be less\\n uint256 internal constant DURATION_NEEDS_TO_BE_LESS = 53;\\n // Can't sweep reserve asset\\n uint256 internal constant CANNOT_SWEEP_RESERVE_ASSET = 54;\\n // Voting window is opened\\n uint256 internal constant VOTING_WINDOW_IS_OPENED = 55;\\n // Strategy is executed\\n uint256 internal constant STRATEGY_IS_EXECUTED = 56;\\n // Min Rebalance Capital\\n uint256 internal constant MIN_REBALANCE_CAPITAL = 57;\\n // Not a valid strategy NFT\\n uint256 internal constant NOT_STRATEGY_NFT = 58;\\n // Garden Transfers Disabled\\n uint256 internal constant GARDEN_TRANSFERS_DISABLED = 59;\\n // Tokens are hardlocked\\n uint256 internal constant TOKENS_HARDLOCKED = 60;\\n // Max contributors reached\\n uint256 internal constant MAX_CONTRIBUTORS = 61;\\n // BABL Transfers Disabled\\n uint256 internal constant BABL_TRANSFERS_DISABLED = 62;\\n // Strategy duration range error\\n uint256 internal constant DURATION_RANGE = 63;\\n // Checks the min amount of voters\\n uint256 internal constant MIN_VOTERS_CHECK = 64;\\n // Ge contributor power error\\n uint256 internal constant GET_CONTRIBUTOR_POWER = 65;\\n // Not enough ETH set aside\\n uint256 internal constant NOT_ENOUGH_ETH = 66;\\n // Garden is already public\\n uint256 internal constant GARDEN_ALREADY_PUBLIC = 67;\\n // Withdrawal with penalty\\n uint256 internal constant WITHDRAWAL_WITH_PENALTY = 68;\\n // Withdrawal with penalty\\n uint256 internal constant ONLY_MINING_ACTIVE = 69;\\n // Overflow in supply\\n uint256 internal constant OVERFLOW_IN_SUPPLY = 70;\\n // Overflow in power\\n uint256 internal constant OVERFLOW_IN_POWER = 71;\\n // Not a system contract\\n uint256 internal constant NOT_A_SYSTEM_CONTRACT = 72;\\n // Strategy vs Garden mismatch\\n uint256 internal constant STRATEGY_GARDEN_MISMATCH = 73;\\n // Minimum quarters is 1\\n uint256 internal constant QUARTERS_MIN_1 = 74;\\n // Too many strategy operations\\n uint256 internal constant TOO_MANY_OPS = 75;\\n // Only operations\\n uint256 internal constant ONLY_OPERATION = 76;\\n // Strat params wrong length\\n uint256 internal constant STRAT_PARAMS_LENGTH = 77;\\n // Garden params wrong length\\n uint256 internal constant GARDEN_PARAMS_LENGTH = 78;\\n}\\n\",\"keccak256\":\"0xdbb485a596718830e08a89b785cddc69d0dc7f3f43a1a8a19268336f8d925067\",\"license\":\"Apache License\"},\"contracts/lib/Math.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n// Libraries\\nimport './SafeDecimalMath.sol';\\n\\n// https://docs.synthetix.io/contracts/source/libraries/math\\nlibrary Math {\\n using SafeMath for uint256;\\n using SafeDecimalMath for uint256;\\n\\n /**\\n * @dev Uses \\\"exponentiation by squaring\\\" algorithm where cost is 0(logN)\\n * vs 0(N) for naive repeated multiplication.\\n * Calculates x^n with x as fixed-point and n as regular unsigned int.\\n * Calculates to 18 digits of precision with SafeDecimalMath.unit()\\n */\\n function powDecimal(uint256 x, uint256 n) internal pure returns (uint256) {\\n // https://mpark.github.io/programming/2014/08/18/exponentiation-by-squaring/\\n\\n uint256 result = SafeDecimalMath.unit();\\n while (n > 0) {\\n if (n % 2 != 0) {\\n result = result.multiplyDecimal(x);\\n }\\n x = x.multiplyDecimal(x);\\n n /= 2;\\n }\\n return result;\\n }\\n\\n function abs(int256 x) internal pure returns (int256) {\\n return x >= 0 ? x : -x;\\n }\\n}\\n\",\"keccak256\":\"0xc2ff8055f98dd7253df98838d870391067d9c622a68f263c942616ca8122bd93\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"contracts/lib/SafeDecimalMath.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nlibrary SafeDecimalMath {\\n using SafeMath for uint256;\\n\\n /* Number of decimal places in the representations. */\\n uint8 public constant decimals = 18;\\n uint8 public constant highPrecisionDecimals = 27;\\n\\n /* The number representing 1.0. */\\n uint256 public constant UNIT = 10**uint256(decimals);\\n\\n /* The number representing 1.0 for higher fidelity numbers. */\\n uint256 public constant PRECISE_UNIT = 10**uint256(highPrecisionDecimals);\\n uint256 private constant UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR = 10**uint256(highPrecisionDecimals - decimals);\\n\\n /**\\n * @return Provides an interface to UNIT.\\n */\\n function unit() external pure returns (uint256) {\\n return UNIT;\\n }\\n\\n /**\\n * @return Provides an interface to PRECISE_UNIT.\\n */\\n function preciseUnit() external pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @return The result of multiplying x and y, interpreting the operands as fixed-point\\n * decimals.\\n *\\n * @dev A unit factor is divided out after the product of x and y is evaluated,\\n * so that product must be less than 2**256. As this is an integer division,\\n * the internal division always rounds down. This helps save on gas. Rounding\\n * is more expensive on gas.\\n */\\n function multiplyDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\\n /* Divide by UNIT to remove the extra factor introduced by the product. */\\n return x.mul(y) / UNIT;\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of the specified precision unit.\\n *\\n * @dev The operands should be in the form of a the specified unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function _multiplyDecimalRound(\\n uint256 x,\\n uint256 y,\\n uint256 precisionUnit\\n ) private pure returns (uint256) {\\n /* Divide by UNIT to remove the extra factor introduced by the product. */\\n uint256 quotientTimesTen = x.mul(y) / (precisionUnit / 10);\\n\\n if (quotientTimesTen % 10 >= 5) {\\n quotientTimesTen += 10;\\n }\\n\\n return quotientTimesTen / 10;\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of a precise unit.\\n *\\n * @dev The operands should be in the precise unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function multiplyDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _multiplyDecimalRound(x, y, PRECISE_UNIT);\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of a standard unit.\\n *\\n * @dev The operands should be in the standard unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function multiplyDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _multiplyDecimalRound(x, y, UNIT);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is a high\\n * precision decimal.\\n *\\n * @dev y is divided after the product of x and the standard precision unit\\n * is evaluated, so the product of x and UNIT must be less than 2**256. As\\n * this is an integer division, the result is always rounded down.\\n * This helps save on gas. Rounding is more expensive on gas.\\n */\\n function divideDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\\n /* Reintroduce the UNIT factor that will be divided out by y. */\\n return x.mul(UNIT).div(y);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * decimal in the precision unit specified in the parameter.\\n *\\n * @dev y is divided after the product of x and the specified precision unit\\n * is evaluated, so the product of x and the specified precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function _divideDecimalRound(\\n uint256 x,\\n uint256 y,\\n uint256 precisionUnit\\n ) private pure returns (uint256) {\\n uint256 resultTimesTen = x.mul(precisionUnit * 10).div(y);\\n\\n if (resultTimesTen % 10 >= 5) {\\n resultTimesTen += 10;\\n }\\n\\n return resultTimesTen / 10;\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * standard precision decimal.\\n *\\n * @dev y is divided after the product of x and the standard precision unit\\n * is evaluated, so the product of x and the standard precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function divideDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _divideDecimalRound(x, y, UNIT);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * high precision decimal.\\n *\\n * @dev y is divided after the product of x and the high precision unit\\n * is evaluated, so the product of x and the high precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function divideDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _divideDecimalRound(x, y, PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Convert a standard decimal representation to a high precision one.\\n */\\n function decimalToPreciseDecimal(uint256 i) internal pure returns (uint256) {\\n return i.mul(UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR);\\n }\\n\\n /**\\n * @dev Convert a high precision decimal to a standard decimal representation.\\n */\\n function preciseDecimalToDecimal(uint256 i) internal pure returns (uint256) {\\n uint256 quotientTimesTen = i / (UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR / 10);\\n\\n if (quotientTimesTen % 10 >= 5) {\\n quotientTimesTen += 10;\\n }\\n\\n return quotientTimesTen / 10;\\n }\\n}\\n\",\"keccak256\":\"0x1372be4fa0c5813417396f128f5aa45da1cd7679e2d247a8e17d1ba5f0141253\",\"license\":\"Apache License\"},\"contracts/strategies/Strategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\nimport {Initializable} from '@openzeppelin/contracts-upgradeable/proxy/Initializable.sol';\\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\n\\nimport {Errors, _require} from '../lib/BabylonErrors.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\nimport {SafeDecimalMath} from '../lib/SafeDecimalMath.sol';\\nimport {Math} from '../lib/Math.sol';\\nimport {AddressArrayUtils} from '../lib/AddressArrayUtils.sol';\\n\\nimport {IWETH} from '../interfaces/external/weth/IWETH.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {ITradeIntegration} from '../interfaces/ITradeIntegration.sol';\\nimport {IOperation} from '../interfaces/IOperation.sol';\\nimport {IIntegration} from '../interfaces/IIntegration.sol';\\nimport {IPriceOracle} from '../interfaces/IPriceOracle.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {IStrategyNFT} from '../interfaces/IStrategyNFT.sol';\\nimport {IRewardsDistributor} from '../interfaces/IRewardsDistributor.sol';\\n\\n/**\\n * @title Strategy\\n * @author Babylon Finance\\n *\\n * Base Strategy contract. Belongs to a garden. Abstract.\\n * Will be extended from specific strategy contracts.\\n */\\ncontract Strategy is ReentrancyGuard, IStrategy, Initializable {\\n using SignedSafeMath for int256;\\n using SafeMath for uint256;\\n using SafeCast for uint256;\\n using SafeCast for int256;\\n using PreciseUnitMath for int256;\\n using PreciseUnitMath for uint256;\\n using SafeDecimalMath for int256;\\n using SafeDecimalMath for uint256;\\n using Math for int256;\\n using Math for uint256;\\n using AddressArrayUtils for address[];\\n using Address for address;\\n using SafeERC20 for IERC20;\\n\\n /* ============ Events ============ */\\n event Invoked(address indexed _target, uint256 indexed _value, bytes _data, bytes _returnValue);\\n event StrategyVoted(address indexed _garden, uint256 _absoluteVotes, int256 _totalVotes, uint256 _timestamp);\\n event StrategyExecuted(address indexed _garden, uint256 _capital, uint256 _fee, uint256 timestamp);\\n event StrategyFinalized(address indexed _garden, uint256 _capitalReturned, uint256 _fee, uint256 timestamp);\\n event StrategyReduced(address indexed _garden, uint256 _amountReduced, uint256 timestamp);\\n event StrategyExpired(address indexed _garden, uint256 _timestamp);\\n event StrategyDeleted(address indexed _garden, uint256 _timestamp);\\n event StrategyDurationChanged(uint256 _newDuration, uint256 _oldDuration);\\n\\n /* ============ Modifiers ============ */\\n /**\\n * Throws if the sender is not the creator of the strategy\\n */\\n modifier onlyGovernorOrGarden {\\n _require(msg.sender == address(garden) || msg.sender == controller.owner(), Errors.ONLY_PROTOCOL_OR_GARDEN);\\n _;\\n }\\n\\n modifier onlyStrategist {\\n _require(msg.sender == strategist, Errors.ONLY_STRATEGIST);\\n _;\\n }\\n\\n modifier onlyContributor {\\n _require(IERC20(address(garden)).balanceOf(msg.sender) > 0, Errors.ONLY_CONTRIBUTOR);\\n _;\\n }\\n\\n /**\\n * Throws if the sender is not a Garden's integration or integration not enabled\\n */\\n modifier onlyIntegration() {\\n // Internal function used to reduce bytecode size\\n _require(\\n controller.isValidIntegration(IIntegration(msg.sender).getName(), msg.sender),\\n Errors.ONLY_INTEGRATION\\n );\\n _;\\n }\\n\\n /**\\n * Throws if the sender is not a Garden's integration or integration not enabled\\n */\\n modifier onlyOperation() {\\n bool found = false;\\n for (uint8 i = 0; i < opTypes.length; i++) {\\n found = found || msg.sender == controller.enabledOperations(opTypes[i]);\\n }\\n // Internal function used to reduce bytecode size\\n _require(found, Errors.ONLY_OPERATION);\\n _;\\n }\\n\\n /**\\n * Throws if the garden is not the caller or data is already set\\n */\\n modifier onlyGardenAndNotSet() {\\n _require(msg.sender == address(garden) && !dataSet, Errors.ONLY_GARDEN_AND_DATA_NOT_SET);\\n _;\\n }\\n\\n /**\\n * Throws if the garden is not active\\n */\\n modifier onlyActiveGarden() {\\n _require(garden.active() == true, Errors.ONLY_ACTIVE_GARDEN);\\n _;\\n }\\n\\n /**\\n * Throws if the sender is not a keeper in the protocol\\n * @param _fee The fee paid to keeper to compensate the gas cost\\n */\\n modifier onlyKeeper(uint256 _fee) {\\n _require(controller.isValidKeeper(msg.sender), Errors.ONLY_KEEPER);\\n // We assume that calling keeper functions should be less expensive than 1 million gas and the gas price should be lower than 1000 gwei.\\n _require(_fee <= MAX_KEEPER_FEE, Errors.FEE_TOO_HIGH);\\n _;\\n }\\n\\n /* ============ Constants ============ */\\n\\n uint256 internal constant SLIPPAGE_ALLOWED = 1e16; // 1%\\n uint256 internal constant HUNDRED_PERCENT = 1e18; // 100%\\n uint256 internal constant MAX_CANDIDATE_PERIOD = 7 days;\\n uint256 internal constant MIN_VOTERS_TO_BECOME_ACTIVE = 2;\\n uint256 internal constant ABSOLUTE_MIN_REBALANCE = 1e18;\\n address private constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\\n\\n // Max Operations\\n uint256 internal constant MAX_OPERATIONS = 6;\\n\\n // Keeper max fee\\n uint256 internal constant MAX_KEEPER_FEE = (1e6 * 1e3 gwei);\\n\\n // Quadratic penalty for looses\\n uint256 internal constant STAKE_QUADRATIC_PENALTY_FOR_LOSSES = 175e16; // 1.75e18\\n\\n /* ============ Structs ============ */\\n\\n /* ============ State Variables ============ */\\n\\n // Babylon Controller Address\\n IBabController public controller;\\n\\n // Type of operation.\\n // 0 = BuyOperation\\n // 1 = LiquidityOperation\\n // 2 = VaultOperation\\n // 3 = LendOperation\\n\\n // Asset Status\\n // 0 = Liquid\\n // 1 = Put as collateral\\n // 2 = Borrowed\\n // 3 = staked\\n\\n // Types and data for the operations of this strategy\\n uint8[] public override opTypes;\\n address[] public override opIntegrations;\\n address[] public override opDatas;\\n\\n // Garden that these strategies belong to\\n IGarden public override garden;\\n\\n address public override strategist; // Address of the strategist that submitted the bet\\n address public override strategyNft; // Address of the strategy nft\\n\\n uint256 public override enteredAt; // Timestamp when the strategy was submitted\\n uint256 public override enteredCooldownAt; // Timestamp when the strategy reached quorum\\n uint256 public override executedAt; // Timestamp when the strategy was executed\\n uint256 public override updatedAt; // Timestamp of last capital allocation update\\n uint256 public override exitedAt; // Timestamp when the strategy was submitted\\n\\n address[] public voters; // Addresses with the voters\\n int256 public override totalVotes; // Total votes staked\\n uint256 public override absoluteTotalVotes; // Absolute number of votes staked\\n uint256 public override totalPositiveVotes; // Total positive votes endorsing the strategy execution\\n uint256 public override totalNegativeVotes; // Total negative votes against the strategy execution\\n bool public override finalized; // Flag that indicates whether we exited the strategy\\n bool public override active; // Whether the strategy has met the voting quorum\\n bool public dataSet;\\n\\n uint256 public override duration; // Duration of the bet\\n uint256 public override stake; // Amount of stake by the strategist (in reserve asset) needs to be positive\\n uint256 public override maxCapitalRequested; // Amount of max capital to allocate\\n uint256 public override capitalAllocated; // Current amount of capital allocated\\n uint256 public override expectedReturn; // Expect return by this strategy\\n uint256 public override capitalReturned; // Actual return by this strategy\\n uint256 public override minRebalanceCapital; // Min amount of capital so that it is worth to rebalance the capital here\\n address[] public tokensNeeded; // Positions that need to be taken prior to enter the strategy\\n uint256[] public tokenAmountsNeeded; // Amount of these positions\\n\\n uint256 public override strategyRewards; // Rewards allocated for this strategy updated on finalized\\n uint256 public override rewardsTotalOverhead; // Potential extra amount we are giving in BABL rewards\\n\\n // Voters mapped to their votes.\\n mapping(address => int256) public votes;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Initializes the strategy for a garden\\n *\\n * @param _strategist Address of the strategist\\n * @param _garden Address of the garden\\n * @param _controller Address of the controller\\n * @param _maxCapitalRequested Max Capital requested denominated in the reserve asset (0 to be unlimited)\\n * @param _stake Stake with garden participations absolute amounts 1e18\\n * @param _strategyDuration Strategy duration in seconds\\n * @param _expectedReturn Expected return\\n * @param _minRebalanceCapital Min capital that makes executing the strategy worth it\\n * @param _strategyNft Address of the strategy nft\\n */\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital,\\n address _strategyNft\\n ) external override initializer {\\n controller = IBabController(_controller);\\n\\n _require(controller.isSystemContract(_garden), Errors.NOT_A_GARDEN);\\n garden = IGarden(_garden);\\n uint256 strategistUnlockedBalance =\\n IERC20(address(garden)).balanceOf(_strategist).sub(garden.getLockedBalance(_strategist));\\n _require(IERC20(address(garden)).balanceOf(_strategist) > 0, Errors.STRATEGIST_TOKENS_TOO_LOW);\\n _require(strategistUnlockedBalance >= _stake, Errors.TOKENS_STAKED);\\n // TODO: adjust this calc\\n _require(_stake > 0, Errors.STAKE_HAS_TO_AT_LEAST_ONE);\\n _require(\\n _strategyDuration >= garden.minStrategyDuration() && _strategyDuration <= garden.maxStrategyDuration(),\\n Errors.DURATION_MUST_BE_IN_RANGE\\n );\\n _require(_minRebalanceCapital >= ABSOLUTE_MIN_REBALANCE, Errors.MIN_REBALANCE_CAPITAL);\\n _require(_maxCapitalRequested >= _minRebalanceCapital, Errors.MAX_CAPITAL_REQUESTED);\\n _require(_strategyNft != address(0), Errors.NOT_STRATEGY_NFT);\\n\\n strategyNft = _strategyNft;\\n\\n strategist = _strategist;\\n enteredAt = block.timestamp;\\n stake = _stake;\\n duration = _strategyDuration;\\n expectedReturn = _expectedReturn;\\n capitalAllocated = 0;\\n minRebalanceCapital = _minRebalanceCapital;\\n maxCapitalRequested = _maxCapitalRequested;\\n totalVotes = _stake.toInt256();\\n votes[_strategist] = _stake.toInt256();\\n absoluteTotalVotes = _stake;\\n dataSet = false;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Sets the data for the operations of this strategy\\n * @param _opTypes An array with the op types\\n * @param _opIntegrations Addresses with the integration for each op\\n * @param _opDatas Bytes with the params for the op in the same position in the opTypes array\\n */\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external override onlyGardenAndNotSet {\\n _require(\\n (_opTypes.length == _opIntegrations.length) && (_opIntegrations.length == _opDatas.length),\\n Errors.TOO_MANY_OPS\\n );\\n _require(_opDatas.length < MAX_OPERATIONS && _opDatas.length > 0, Errors.TOO_MANY_OPS);\\n for (uint256 i = 0; i < _opTypes.length; i++) {\\n IOperation(controller.enabledOperations(_opTypes[i])).validateOperation(\\n _opDatas[i],\\n garden,\\n _opIntegrations[i],\\n i\\n );\\n _require(\\n controller.isValidIntegration(IIntegration(_opIntegrations[i]).getName(), _opIntegrations[i]),\\n Errors.ONLY_INTEGRATION\\n );\\n }\\n\\n opTypes = _opTypes;\\n opIntegrations = _opIntegrations;\\n opDatas = _opDatas;\\n dataSet = true;\\n }\\n\\n /**\\n * Adds off-chain voting results on-chain.\\n * @param _voters An array of garden member who voted on strategy.\\n * @param _votes An array of votes by on strategy by garden members.\\n * Votes can be positive or negative.\\n * @param _absoluteTotalVotes Absolute number of votes. _absoluteTotalVotes = abs(upvotes) + abs(downvotes).\\n * @param _totalVotes Total number of votes. _totalVotes = upvotes + downvotes.\\n * @param _fee The fee paid to keeper to compensate the gas cost\\n */\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 _fee\\n ) external override onlyKeeper(_fee) onlyActiveGarden {\\n _require(\\n _voters.length >= (garden.totalContributors() == 1 ? 1 : MIN_VOTERS_TO_BECOME_ACTIVE),\\n Errors.MIN_VOTERS_CHECK\\n );\\n _require(!active && !finalized, Errors.VOTES_ALREADY_RESOLVED);\\n _require(block.timestamp.sub(enteredAt) <= MAX_CANDIDATE_PERIOD, Errors.VOTING_WINDOW_IS_OVER);\\n active = true;\\n\\n // Set votes data\\n for (uint256 i = 0; i < _voters.length; i++) {\\n votes[_voters[i]] = _votes[i];\\n }\\n totalPositiveVotes = _absoluteTotalVotes.toInt256().add(_totalVotes).div(2).toUint256();\\n totalNegativeVotes = _absoluteTotalVotes.toInt256().sub(_totalVotes).div(2).toUint256();\\n voters = _voters;\\n absoluteTotalVotes = absoluteTotalVotes + _absoluteTotalVotes;\\n totalVotes = totalVotes + _totalVotes;\\n\\n // Initializes cooldown\\n enteredCooldownAt = block.timestamp;\\n emit StrategyVoted(address(garden), _absoluteTotalVotes, _totalVotes, block.timestamp);\\n garden.payKeeper(msg.sender, _fee);\\n }\\n\\n /**\\n * Executes an strategy that has been activated and gone through the cooldown period.\\n * Keeper will validate that quorum is reached, cacluates all the voting data and push it.\\n * @param _capital The capital to allocate to this strategy.\\n * @param _fee The fee paid to keeper to compensate the gas cost.\\n */\\n function executeStrategy(uint256 _capital, uint256 _fee)\\n external\\n override\\n onlyKeeper(_fee)\\n nonReentrant\\n onlyActiveGarden\\n {\\n _require(active, Errors.STRATEGY_NEEDS_TO_BE_ACTIVE);\\n _require(capitalAllocated.add(_capital) <= maxCapitalRequested, Errors.MAX_CAPITAL_REACHED);\\n _require(_capital >= minRebalanceCapital, Errors.CAPITAL_IS_LESS_THAN_REBALANCE);\\n _require(\\n block.timestamp.sub(enteredCooldownAt) >= garden.strategyCooldownPeriod(),\\n Errors.STRATEGY_IN_COOLDOWN\\n );\\n\\n // Execute enter operation\\n garden.allocateCapitalToStrategy(_capital);\\n capitalAllocated = capitalAllocated.add(_capital);\\n _enterStrategy(_capital);\\n\\n // Add to Rewards Distributor an update of the Protocol Principal for BABL Mining Rewards calculations\\n IRewardsDistributor rewardsDistributor = IRewardsDistributor(IBabController(controller).rewardsDistributor());\\n // Sets the executed timestamp on first execution\\n if (executedAt == 0) {\\n executedAt = block.timestamp;\\n } else {\\n // Updating allocation - we need to consider the difference for the calculation\\n // We control the potential overhead in BABL Rewards calculations to keep control\\n // and avoid distributing a wrong number (e.g. flash loans)\\n if (_hasMiningStarted()) {\\n // The Mining program has not started on time for this strategy\\n rewardsTotalOverhead = rewardsTotalOverhead.add(_capital.mul(block.timestamp.sub(updatedAt)));\\n }\\n }\\n if (_hasMiningStarted()) {\\n // The Mining program has not started on time for this strategy\\n rewardsDistributor.addProtocolPrincipal(_capital);\\n }\\n garden.payKeeper(msg.sender, _fee);\\n updatedAt = block.timestamp;\\n emit StrategyExecuted(address(garden), _capital, _fee, block.timestamp);\\n }\\n\\n /**\\n * Exits from an executed strategy.\\n * Returns balance back to the garden and sets the capital aside for withdrawals in ETH.\\n * Pays the keeper.\\n * Updates the reserve asset position accordingly.\\n * @param _fee The fee paid to keeper to compensate the gas cost\\n * @param _tokenURI URL with the JSON for the strategy\\n */\\n function finalizeStrategy(uint256 _fee, string memory _tokenURI)\\n external\\n override\\n onlyKeeper(_fee)\\n nonReentrant\\n onlyActiveGarden\\n {\\n _require(executedAt > 0, Errors.STRATEGY_IS_NOT_EXECUTED);\\n _require(block.timestamp > executedAt.add(duration), Errors.STRATEGY_IS_NOT_OVER_YET);\\n _require(!finalized, Errors.STRATEGY_IS_ALREADY_FINALIZED);\\n // Execute exit operations\\n _exitStrategy(HUNDRED_PERCENT);\\n // Mark as finalized\\n finalized = true;\\n active = false;\\n exitedAt = block.timestamp;\\n updatedAt = exitedAt;\\n // Mint NFT\\n IStrategyNFT(strategyNft).grantStrategyNFT(strategist, _tokenURI);\\n // Transfer rewards\\n _transferStrategyPrincipal(_fee);\\n // Send rest to garden if any\\n _sendReserveAssetToGarden();\\n emit StrategyFinalized(address(garden), capitalReturned, _fee, block.timestamp);\\n // Pay Keeper Fee\\n garden.payKeeper(msg.sender, _fee);\\n }\\n\\n /**\\n * Partially unwinds an strategy.\\n * Triggered from an immediate withdraw in the Garden.\\n * @param _amountToUnwind The amount of capital to unwind\\n */\\n function unwindStrategy(uint256 _amountToUnwind) external override onlyGovernorOrGarden nonReentrant {\\n _require(active && !finalized, Errors.STRATEGY_NEEDS_TO_BE_ACTIVE);\\n _require(_amountToUnwind <= capitalAllocated.sub(minRebalanceCapital), Errors.STRATEGY_NO_CAPITAL_TO_UNWIND);\\n // Exits and enters the strategy\\n _exitStrategy(_amountToUnwind.preciseDiv(capitalAllocated));\\n updatedAt = block.timestamp;\\n capitalAllocated = capitalAllocated.sub(_amountToUnwind);\\n // Removes protocol principal for the calculation of rewards\\n IRewardsDistributor rewardsDistributor = IRewardsDistributor(IBabController(controller).rewardsDistributor());\\n if (_hasMiningStarted()) {\\n // Only if the Mining program started on time for this strategy\\n rewardsDistributor.substractProtocolPrincipal(_amountToUnwind);\\n }\\n // Send the amount back to the warden for the immediate withdrawal\\n // TODO: Transfer the precise value; not entire balance\\n IERC20(garden.reserveAsset()).safeTransfer(\\n address(garden),\\n IERC20(garden.reserveAsset()).balanceOf(address(this))\\n );\\n emit StrategyReduced(address(garden), _amountToUnwind, block.timestamp);\\n }\\n\\n /**\\n * Expires a candidate that has spent more than CANDIDATE_PERIOD without\\n * reaching quorum\\n * @param _fee The keeper fee\\n */\\n function expireStrategy(uint256 _fee) external onlyKeeper(_fee) nonReentrant onlyActiveGarden {\\n _require(!active, Errors.STRATEGY_NEEDS_TO_BE_INACTIVE);\\n _deleteCandidateStrategy();\\n garden.payKeeper(msg.sender, _fee);\\n emit StrategyExpired(address(garden), block.timestamp);\\n }\\n\\n /**\\n * Delete a candidate strategy by the strategist\\n */\\n function deleteCandidateStrategy() external onlyStrategist {\\n _deleteCandidateStrategy();\\n emit StrategyDeleted(address(garden), block.timestamp);\\n }\\n\\n /**\\n * Lets the strategist change the duration of the strategy\\n * @param _newDuration New duration of the strategy\\n */\\n function changeStrategyDuration(uint256 _newDuration) external override onlyStrategist {\\n _require(!finalized, Errors.STRATEGY_IS_ALREADY_FINALIZED);\\n _require(_newDuration < duration, Errors.DURATION_NEEDS_TO_BE_LESS);\\n emit StrategyDurationChanged(_newDuration, duration);\\n duration = _newDuration;\\n }\\n\\n /**\\n * Any tokens (other than the target) that are sent here by mistake are recoverable by contributors\\n * Converts it to the reserve asset and sends it to the garden.\\n * @param _token Address of the token to sweep\\n */\\n function sweep(address _token) external onlyContributor {\\n _require(_token != garden.reserveAsset(), Errors.CANNOT_SWEEP_RESERVE_ASSET);\\n _require(!active, Errors.STRATEGY_NEEDS_TO_BE_INACTIVE);\\n\\n uint256 balance = IERC20(_token).balanceOf(address(this));\\n _require(balance > 0, Errors.BALANCE_TOO_LOW);\\n\\n _trade(_token, balance, garden.reserveAsset());\\n // Send WETH to garden\\n _sendReserveAssetToGarden();\\n }\\n\\n /**\\n * Helper to invoke Approve on ERC20 from integrations in the strategy context\\n */\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external override onlyIntegration {\\n IERC20(_asset).approve(_spender, _quantity);\\n }\\n\\n /**\\n * Helper to invoke a call to an external contract from integrations in the strategy context\\n * @param _target Address of the smart contract to call\\n * @param _value Quantity of Ether to provide the call (typically 0)\\n * @param _data Encoded function selector and arguments\\n * @return _returnValue Bytes encoded return value\\n */\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external override onlyIntegration returns (bytes memory) {\\n return _invoke(_target, _value, _data);\\n }\\n\\n /**\\n * Function that calculates the price using the oracle and executes a trade.\\n * Must call the exchange to get the price and pass minReceiveQuantity accordingly.\\n * @param _sendToken Token to exchange\\n * @param _sendQuantity Amount of tokens to send\\n * @param _receiveToken Token to receive\\n */\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external override onlyOperation returns (uint256) {\\n return _trade(_sendToken, _sendQuantity, _receiveToken);\\n }\\n\\n /**\\n * Deposits or withdraws weth from an operation in this context\\n * @param _isDeposit Wether is a deposit or withdraw\\n * @param _wethAmount Amount to deposit or withdraw\\n */\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external override onlyOperation {\\n if (_isDeposit) {\\n IWETH(WETH).deposit{value: _wethAmount}();\\n return;\\n }\\n IWETH(WETH).withdraw(_wethAmount);\\n }\\n\\n /* ============ External Getter Functions ============ */\\n\\n /**\\n * Returns whether this strategy is currently active or not\\n */\\n function isStrategyActive() public view override returns (bool) {\\n return executedAt > 0 && exitedAt == 0;\\n }\\n\\n /**\\n * Returns the number of operations in this strategy\\n */\\n function getOperationsCount() external view override returns (uint256) {\\n return opTypes.length;\\n }\\n\\n /**\\n * Get the non-state related details of a Strategy\\n *\\n */\\n function getStrategyDetails()\\n external\\n view\\n override\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n )\\n {\\n return (\\n address(this),\\n strategist,\\n opIntegrations.length,\\n stake,\\n absoluteTotalVotes,\\n totalVotes,\\n capitalAllocated,\\n capitalReturned,\\n duration,\\n expectedReturn,\\n maxCapitalRequested,\\n minRebalanceCapital,\\n enteredAt\\n );\\n }\\n\\n /**\\n * Get the state of a Strategy\\n *\\n */\\n function getStrategyState()\\n external\\n view\\n override\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n )\\n {\\n return (address(this), active, dataSet, finalized, executedAt, exitedAt, updatedAt);\\n }\\n\\n /**\\n * Get the operation params by index\\n *\\n */\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n override\\n returns (\\n uint8,\\n address,\\n address\\n )\\n {\\n return (opTypes[_index], opIntegrations[_index], opDatas[_index]);\\n }\\n\\n /**\\n * Gets the NAV of assets under management.\\n * It is the sum of the NAV of all the operations\\n *\\n * @return _nav NAV of the strategy\\n */\\n function getNAV() public view override returns (uint256) {\\n uint256 nav = 0;\\n for (uint256 i = 0; i < opTypes.length; i++) {\\n IOperation operation = IOperation(IBabController(controller).enabledOperations(uint256(opTypes[i])));\\n nav = nav.add(operation.getNAV(opDatas[i], garden, opIntegrations[i]));\\n }\\n return nav;\\n }\\n\\n /**\\n * Gets the votes casted by the contributor in this strategy\\n *\\n * @param _address Address of the contributor\\n * @return _votes Number of votes cast\\n */\\n function getUserVotes(address _address) external view override returns (int256) {\\n return votes[_address];\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Enters the strategy.\\n * Executes all the operations in order\\n * @param _capital Amount of capital that the strategy receives\\n */\\n function _enterStrategy(uint256 _capital) internal {\\n uint256 capitalForNexOperation = _capital;\\n address assetAccumulated = garden.reserveAsset();\\n uint8 assetStatus = 0; // liquid\\n for (uint256 i = 0; i < opTypes.length; i++) {\\n IOperation operation = IOperation(IBabController(controller).enabledOperations(opTypes[i]));\\n (assetAccumulated, capitalForNexOperation, assetStatus) = operation.executeOperation(\\n assetAccumulated,\\n capitalForNexOperation,\\n assetStatus,\\n opDatas[i],\\n garden,\\n opIntegrations[i]\\n );\\n }\\n }\\n\\n /**\\n * Exits the strategy.\\n * Exists all the operations starting by the end.\\n * @param _percentage of capital to exit from the strategy\\n */\\n function _exitStrategy(uint256 _percentage) internal {\\n for (uint256 i = opTypes.length; i > 0; i--) {\\n IOperation operation = IOperation(IBabController(controller).enabledOperations(opTypes[i - 1]));\\n operation.exitOperation(_percentage, opDatas[i - 1], garden, opIntegrations[i - 1]);\\n }\\n }\\n\\n /**\\n * Deletes this strategy and returns the stake to the strategist\\n */\\n function _deleteCandidateStrategy() internal {\\n _require(block.timestamp.sub(enteredAt) > MAX_CANDIDATE_PERIOD, Errors.VOTING_WINDOW_IS_OPENED);\\n _require(executedAt == 0, Errors.STRATEGY_IS_EXECUTED);\\n _require(!finalized, Errors.STRATEGY_IS_ALREADY_FINALIZED);\\n\\n IGarden(garden).expireCandidateStrategy(address(this));\\n // TODO: Call selfdestruct??\\n }\\n\\n /**\\n * Low level function that allows an integration to make an arbitrary function\\n * call to any contract from the garden (garden as msg.sender).\\n *\\n * @param _target Address of the smart contract to call\\n * @param _value Quantity of Ether to provide the call (typically 0)\\n * @param _data Encoded function selector and arguments\\n * @return _returnValue Bytes encoded return value\\n */\\n function _invoke(\\n address _target,\\n uint256 _value,\\n bytes memory _data\\n ) internal returns (bytes memory _returnValue) {\\n _returnValue = _target.functionCallWithValue(_data, _value);\\n emit Invoked(_target, _value, _data, _returnValue);\\n return _returnValue;\\n }\\n\\n function _sendReserveAssetToGarden() private {\\n uint256 remainingReserve = IERC20(garden.reserveAsset()).balanceOf(address(this));\\n // Sends the rest back if any\\n IERC20(garden.reserveAsset()).safeTransfer(address(garden), remainingReserve);\\n }\\n\\n /**\\n * Function that calculates the price using the oracle and executes a trade.\\n * Must call the exchange to get the price and pass minReceiveQuantity accordingly.\\n * @param _sendToken Token to exchange\\n * @param _sendQuantity Amount of tokens to send\\n * @param _receiveToken Token to receive\\n */\\n function _trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) internal returns (uint256) {\\n address tradeIntegration = IBabController(controller).defaultTradeIntegration();\\n // Uses on chain oracle for all internal strategy operations to avoid attacks // Updates UniSwap TWAP\\n IPriceOracle oracle = IPriceOracle(IBabController(controller).priceOracle());\\n oracle.updateAdapters(_sendToken, _receiveToken);\\n uint256 pricePerTokenUnit = oracle.getPrice(_sendToken, _receiveToken);\\n uint256 exactAmount = _sendQuantity.preciseMul(pricePerTokenUnit);\\n uint256 minAmountExpected = exactAmount.sub(exactAmount.preciseMul(SLIPPAGE_ALLOWED));\\n ITradeIntegration(tradeIntegration).trade(\\n address(this),\\n _sendToken,\\n _sendQuantity,\\n _receiveToken,\\n minAmountExpected\\n );\\n return minAmountExpected;\\n }\\n\\n function _transferStrategyPrincipal(uint256 _fee) internal {\\n capitalReturned = IERC20(garden.reserveAsset()).balanceOf(address(this)).sub(_fee);\\n address reserveAsset = garden.reserveAsset();\\n int256 reserveAssetDelta = capitalReturned.toInt256().sub(capitalAllocated.toInt256());\\n uint256 protocolProfits = 0;\\n // Strategy returns were positive\\n uint256 profits = capitalReturned > capitalAllocated ? capitalReturned.sub(capitalAllocated) : 0; // in reserve asset (weth)\\n if (capitalReturned >= capitalAllocated) {\\n // Send weth performance fee to the protocol\\n protocolProfits = IBabController(controller).protocolPerformanceFee().preciseMul(profits);\\n IERC20(reserveAsset).safeTransferFrom(\\n address(this),\\n IBabController(controller).treasury(),\\n protocolProfits\\n );\\n reserveAssetDelta.add(int256(-protocolProfits));\\n } else {\\n // Returns were negative\\n // Burn strategist stake and add the amount to the garden\\n uint256 burningAmount =\\n (stake.sub(capitalReturned.preciseDiv(capitalAllocated).preciseMul(stake))).multiplyDecimal(\\n STAKE_QUADRATIC_PENALTY_FOR_LOSSES\\n );\\n if (IERC20(address(garden)).balanceOf(strategist) < burningAmount) {\\n // Avoid underflow burning more than its balance\\n burningAmount = IERC20(address(garden)).balanceOf(strategist);\\n }\\n\\n garden.burnStrategistStake(strategist, burningAmount);\\n reserveAssetDelta.add(int256(burningAmount));\\n }\\n // Return the balance back to the garden\\n IERC20(reserveAsset).safeTransferFrom(address(this), address(garden), capitalReturned.sub(protocolProfits));\\n // Start a redemption window in the garden with the capital plus the profits for the lps\\n (, , uint256 lpsProfitSharing) = IBabController(controller).getProfitSharing();\\n garden.startWithdrawalWindow(\\n capitalReturned.sub(protocolProfits).sub(profits).add((profits).preciseMul(lpsProfitSharing)),\\n profits.sub(profits.preciseMul(lpsProfitSharing)).sub(protocolProfits),\\n reserveAssetDelta,\\n address(this)\\n );\\n IRewardsDistributor rewardsDistributor = IRewardsDistributor(IBabController(controller).rewardsDistributor());\\n // Substract the Principal in the Rewards Distributor to update the Protocol power value\\n if (_hasMiningStarted()) {\\n // Only if the Mining program started on time for this strategy\\n rewardsDistributor.substractProtocolPrincipal(capitalAllocated);\\n }\\n strategyRewards = rewardsDistributor.getStrategyRewards(address(this)); // Must be zero in case the mining program didnt started on time\\n }\\n\\n function _getPrice(address _assetOne, address _assetTwo) internal view returns (uint256) {\\n IPriceOracle oracle = IPriceOracle(IBabController(controller).priceOracle());\\n return oracle.getPrice(_assetOne, _assetTwo);\\n }\\n\\n function _hasMiningStarted() internal view returns (bool) {\\n IRewardsDistributor rewardsDistributor = IRewardsDistributor(IBabController(controller).rewardsDistributor());\\n uint256 rewardsStartTime = rewardsDistributor.START_TIME();\\n bool miningStarted = ((enteredAt > rewardsStartTime) && (rewardsStartTime != 0));\\n return miningStarted;\\n }\\n\\n // solhint-disable-next-line\\n receive() external payable {}\\n}\\n\",\"keccak256\":\"0x23f30b5453921cb07748cc7f75ec113639a8be3f50175a68ad2f07727f3c9e87\",\"license\":\"Apache License\"},\"contracts/strategies/StrategyFactory.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {Clones} from '@openzeppelin/contracts/proxy/Clones.sol';\\n\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {IStrategyFactory} from '../interfaces/IStrategyFactory.sol';\\nimport {StrategyNFT} from './StrategyNFT.sol';\\nimport {Strategy} from './Strategy.sol';\\n\\n/**\\n * @title StrategyFactory\\n * @author Babylon Finance\\n *\\n * Factory to create investment strategy contracts\\n */\\ncontract StrategyFactory is IStrategyFactory {\\n address payable private immutable strategy;\\n address private immutable strategyNft;\\n\\n constructor() {\\n strategy = address(new Strategy());\\n strategyNft = address(new StrategyNFT());\\n }\\n\\n /**\\n * Creates a new investment strategy using minimal proxies\\n *\\n * @param _name Name of the strategy\\n * @param _symbol Symbol of the strategy\\n * @param _strategist Address of the strategist\\n * @param _garden Address of the garden\\n * @param _controller Address of the controller\\n * @param _stratParams Strat Params\\n */\\n function createStrategy(\\n string memory _name,\\n string memory _symbol,\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256[] calldata _stratParams\\n ) external override returns (address) {\\n address payable clone = payable(Clones.clone(strategy));\\n address cloneNFT = Clones.clone(strategyNft);\\n StrategyNFT(cloneNFT).initialize(_controller, address(clone), _name, _symbol);\\n IStrategy(clone).initialize(\\n _strategist,\\n _garden,\\n _controller,\\n _stratParams[0],\\n _stratParams[1],\\n _stratParams[2],\\n _stratParams[3],\\n _stratParams[4],\\n cloneNFT\\n );\\n return clone;\\n }\\n}\\n\",\"keccak256\":\"0x1759a6715124248a5b98a3fd79b3af06611608091dbfeb1b03ff42fb22eca4b7\",\"license\":\"Apache License\"},\"contracts/strategies/StrategyNFT.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {ERC721Upgradeable} from '@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol';\\nimport {Counters} from '@openzeppelin/contracts/utils/Counters.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {IStrategyNFT} from '../interfaces/IStrategyNFT.sol';\\n\\n/**\\n * @title StrategyNFT\\n * @author Babylon Finance\\n *\\n * Contract the NFT for each Strategy\\n */\\ncontract StrategyNFT is ERC721Upgradeable, IStrategyNFT {\\n using Counters for Counters.Counter;\\n\\n /* ============ Events ============ */\\n\\n event StrategyNFTAwarded(address indexed _member, uint256 indexed _newItemId);\\n event StrategyURIUpdated(string _newValue, string _oldValue);\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlyStrategy {\\n require(IGarden(strategy.garden()).isStrategy(msg.sender), 'Only the strategy can mint the NFT');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the Controller contract\\n IBabController public controller;\\n IGarden public garden;\\n IStrategy public strategy;\\n\\n // Address of the Garden JSON (Shared JSON for each garden)\\n string public tokenURI;\\n\\n Counters.Counter private _tokenIds;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Sets the protocol controller\\n *\\n * @param _controller Address of controller contract\\n * @param _strategy Address of the strategy this NFT belongs to\\n * @param _name Name of the garden\\n * @param _symbol Symbol of the garden\\n */\\n function initialize(\\n address _controller,\\n address _strategy,\\n string memory _name,\\n string memory _symbol\\n ) external override initializer {\\n require(address(_controller) != address(0), 'Controller must exist');\\n __ERC721_init(_name, _symbol);\\n controller = IBabController(_controller);\\n strategy = IStrategy(_strategy);\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Awards the garden NFT to a user and gives him access to a specific garden\\n *\\n * @param _user Address of the user\\n */\\n function grantStrategyNFT(address _user, string memory _tokenURI) external override onlyStrategy returns (uint256) {\\n require(address(_user) != address(0), 'User must exist');\\n _updateStrategyURI(_tokenURI);\\n return _createOrGetStrategyNFT(_user);\\n }\\n\\n /**\\n * Updates the token URI of the garden NFT\\n *\\n * @param _tokenURI Address of the tokenURI\\n */\\n function updateStrategyURI(string memory _tokenURI) external override {\\n require(msg.sender == controller.owner(), 'Only owner can call this');\\n _updateStrategyURI(_tokenURI);\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Gives a new nft to the user or retrieve the existing one\\n *\\n * @param _user Address of the user\\n */\\n function _createOrGetStrategyNFT(address _user) private returns (uint256) {\\n uint256 newItemId = 0;\\n if (balanceOf(_user) == 0) {\\n _tokenIds.increment();\\n newItemId = _tokenIds.current();\\n _safeMint(_user, newItemId);\\n _setTokenURI(newItemId, tokenURI);\\n emit StrategyNFTAwarded(_user, newItemId);\\n } else {\\n newItemId = tokenOfOwnerByIndex(_user, 0);\\n }\\n return newItemId;\\n }\\n\\n /**\\n * Updates the token URI of the strategy NFT\\n *\\n * @param _tokenURI Address of the tokenURI\\n */\\n function _updateStrategyURI(string memory _tokenURI) private {\\n string memory oldURI = tokenURI;\\n tokenURI = _tokenURI;\\n emit StrategyURIUpdated(tokenURI, oldURI);\\n }\\n}\\n\",\"keccak256\":\"0x4f5af3164591c5b742ad58026439bc79148d84f69a4f4ba19e15e43817af032d\",\"license\":\"Apache License\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c060405234801561001057600080fd5b5060405161001d90610088565b604051809103906000f080158015610039573d6000803e3d6000fd5b5060601b6001600160601b03191660805260405161005690610095565b604051809103906000f080158015610072573d6000803e3d6000fd5b5060601b6001600160601b03191660a0526100a2565b6155d78061069a83390190565b612c4980615c7183390190565b60805160601c60a05160601c6105cf6100cb600039806102215250806101f452506105cf6000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c806399d5ea7114610030575b600080fd5b6101d0600480360360c081101561004657600080fd5b81019060208101813564010000000081111561006157600080fd5b82018360208201111561007357600080fd5b8035906020019184600183028401116401000000008311171561009557600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156100e857600080fd5b8201836020820111156100fa57600080fd5b8035906020019184600183028401116401000000008311171561011c57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092956001600160a01b03853581169660208701358216966040810135909216955091935090915060808101906060013564010000000081111561019157600080fd5b8201836020820111156101a357600080fd5b803590602001918460208302840111640100000000831117156101c557600080fd5b5090925090506101ec565b604080516001600160a01b039092168252519081900360200190f35b6000806102187f00000000000000000000000000000000000000000000000000000000000000006104bf565b905060006102457f00000000000000000000000000000000000000000000000000000000000000006104bf565b9050806001600160a01b0316632016a0d287848d8d6040518563ffffffff1660e01b815260040180856001600160a01b03168152602001846001600160a01b031681526020018060200180602001838103835285818151815260200191508051906020019080838360005b838110156102c85781810151838201526020016102b0565b50505050905090810190601f1680156102f55780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b83811015610328578181015183820152602001610310565b50505050905090810190601f1680156103555780820380516001836020036101000a031916815260200191505b509650505050505050600060405180830381600087803b15801561037857600080fd5b505af115801561038c573d6000803e3d6000fd5b50505050816001600160a01b031663a3711498898989898960008181106103af57fe5b905060200201358a8a60018181106103c357fe5b905060200201358b8b60028181106103d757fe5b905060200201358c8c60038181106103eb57fe5b905060200201358d8d60048181106103ff57fe5b905060200201358a6040518a63ffffffff1660e01b8152600401808a6001600160a01b03168152602001896001600160a01b03168152602001886001600160a01b03168152602001878152602001868152602001858152602001848152602001838152602001826001600160a01b031681526020019950505050505050505050600060405180830381600087803b15801561049957600080fd5b505af11580156104ad573d6000803e3d6000fd5b50939c9b505050505050505050505050565b60006040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528260601b60148201527f5af43d82803e903d91602b57fd5bf3000000000000000000000000000000000060288201526037816000f09150506001600160a01b03811661059457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f455243313136373a20637265617465206661696c656400000000000000000000604482015290519081900360640190fd5b91905056fea2646970667358221220b217404732e6223bce917c6c144abc7d8eeb6bc452fcfec3018228fa4b7fa18d64736f6c63430007060033608060405234801561001057600080fd5b5060016000556155b2806100256000396000f3fe60806040526004361061034e5760003560e01c80637b2b401a116101bb578063bf1dcfe2116100f7578063da58c7d911610095578063e4df5e1a1161006f578063e4df5e1a14610d90578063f101e82b14610da5578063f77c479114610dd5578063ffb5cd0914610dea57610355565b8063da58c7d914610d3c578063dbabf4f314610d66578063dd1033f814610d7b57610355565b8063d0f9953e116100d1578063d0f9953e14610cca578063d3406abd14610cdf578063d40244cb14610cf4578063d8bff5a514610d0957610355565b8063bf1dcfe214610b3d578063c2ea0bc414610b94578063c39b951c14610cb557610355565b806394bba464116101645780639947cb951161013e5780639947cb9514610a7c578063a30ca20414610aa6578063a371149814610abb578063b3f05b9714610b2857610355565b806394bba464146109f1578063950c782214610a0657806397ccdc6014610a3957610355565b80638a439b7a116101955780638a439b7a146109725780639033a52b146109b257806393baae41146109dc57610355565b80637b2b401a1461091e578063825deffe1461094857806389f942f11461095d57610355565b80633394fed21161028a57806356ba88b8116102335780636bc195dd1161020d5780636bc195dd146107d85780636db40dc2146108df5780636db9cc99146108f45780637519ab501461090957610355565b806356ba88b8146106f4578063577b6ab8146107095780636b3b75ea1461071e57610355565b8063449b982611610264578063449b98261461065c57806348a4beaa146106715780634b0fff0c146106ca57610355565b80633394fed2146105f35780633a4b66f11461061d578063422967241461063257610355565b80630e32db52116102f75780631a5cfcb7116102d15780631a5cfcb7146104a05780631faeaf76146104d25780631fe4a686146105ad57806330273356146105de57610355565b80630e32db521461041e5780630fb5a6b4146104615780631115bdcf1461047657610355565b806303976e381161032857806303976e38146103df57806303cddb2c146103f45780630d15fd771461040957610355565b80630126c6061461035a57806301681a621461038157806302fb0c5e146103b657610355565b3661035557005b600080fd5b34801561036657600080fd5b5061036f610e70565b60408051918252519081900360200190f35b34801561038d57600080fd5b506103b4600480360360208110156103a457600080fd5b50356001600160a01b0316611039565b005b3480156103c257600080fd5b506103cb611279565b604080519115158252519081900360200190f35b3480156103eb57600080fd5b5061036f611287565b34801561040057600080fd5b5061036f61128d565b34801561041557600080fd5b5061036f611293565b34801561042a57600080fd5b5061036f6004803603606081101561044157600080fd5b506001600160a01b03813581169160208101359160409091013516611299565b34801561046d57600080fd5b5061036f61139f565b34801561048257600080fd5b506103b46004803603602081101561049957600080fd5b50356113a5565b3480156104ac57600080fd5b506103b4600480360360408110156104c357600080fd5b50803515159060200135611604565b3480156104de57600080fd5b506103b4600480360360a08110156104f557600080fd5b81019060208101813564010000000081111561051057600080fd5b82018360208201111561052257600080fd5b8035906020019184602083028401116401000000008311171561054457600080fd5b91939092909160208101903564010000000081111561056257600080fd5b82018360208201111561057457600080fd5b8035906020019184602083028401116401000000008311171561059657600080fd5b9193509150803590602081013590604001356117e0565b3480156105b957600080fd5b506105c2611b2b565b604080516001600160a01b039092168252519081900360200190f35b3480156105ea57600080fd5b5061036f611b3a565b3480156105ff57600080fd5b506105c26004803603602081101561061657600080fd5b5035611b40565b34801561062957600080fd5b5061036f611b6a565b34801561063e57600080fd5b506103b46004803603602081101561065557600080fd5b5035611b70565b34801561066857600080fd5b5061036f611fa6565b34801561067d57600080fd5b5061069e6004803603602081101561069457600080fd5b503560ff16611fac565b6040805160ff90941684526001600160a01b039283166020850152911682820152519081900360600190f35b3480156106d657600080fd5b506103b4600480360360208110156106ed57600080fd5b503561203d565b34801561070057600080fd5b506105c26120ba565b34801561071557600080fd5b506103b46120c9565b34801561072a57600080fd5b506103b46004803603604081101561074157600080fd5b8135919081019060408101602082013564010000000081111561076357600080fd5b82018360208201111561077557600080fd5b8035906020019184600183028401116401000000008311171561079757600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061212e945050505050565b3480156107e457600080fd5b5061086a600480360360608110156107fb57600080fd5b6001600160a01b038235169160208101359181019060608101604082013564010000000081111561082b57600080fd5b82018360208201111561083d57600080fd5b8035906020019184600183028401116401000000008311171561085f57600080fd5b509092509050612499565b6040805160208082528351818301528351919283929083019185019080838360005b838110156108a457818101518382015260200161088c565b50505050905090810190601f1680156108d15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156108eb57600080fd5b5061036f612703565b34801561090057600080fd5b5061036f612709565b34801561091557600080fd5b5061036f61270f565b34801561092a57600080fd5b5061036f6004803603602081101561094157600080fd5b5035612715565b34801561095457600080fd5b5061036f612736565b34801561096957600080fd5b506105c261273c565b34801561097e57600080fd5b5061099c6004803603602081101561099557600080fd5b503561274b565b6040805160ff9092168252519081900360200190f35b3480156109be57600080fd5b506105c2600480360360208110156109d557600080fd5b503561277f565b3480156109e857600080fd5b5061036f61278f565b3480156109fd57600080fd5b506103cb612795565b348015610a1257600080fd5b5061036f60048036036020811015610a2957600080fd5b50356001600160a01b03166127a4565b348015610a4557600080fd5b506103b460048036036060811015610a5c57600080fd5b506001600160a01b038135811691602081013590911690604001356127bf565b348015610a8857600080fd5b506105c260048036036020811015610a9f57600080fd5b50356128a7565b348015610ab257600080fd5b5061036f6128b7565b348015610ac757600080fd5b506103b46004803603610120811015610adf57600080fd5b506001600160a01b0381358116916020810135821691604082013581169160608101359160808201359160a08101359160c08201359160e08101359161010090910135166128bd565b348015610b3457600080fd5b506103cb612e32565b348015610b4957600080fd5b50610b52612e3b565b604080516001600160a01b0390981688529515156020880152931515868601529115156060860152608085015260a084015260c0830152519081900360e00190f35b348015610ba057600080fd5b506103b460048036036060811015610bb757600080fd5b810190602081018135640100000000811115610bd257600080fd5b820183602082011115610be457600080fd5b80359060200191846020830284011164010000000083111715610c0657600080fd5b919390929091602081019035640100000000811115610c2457600080fd5b820183602082011115610c3657600080fd5b80359060200191846020830284011164010000000083111715610c5857600080fd5b919390929091602081019035640100000000811115610c7657600080fd5b820183602082011115610c8857600080fd5b80359060200191846020830284011164010000000083111715610caa57600080fd5b509092509050612e65565b348015610cc157600080fd5b5061036f613248565b348015610cd657600080fd5b5061036f61324e565b348015610ceb57600080fd5b5061036f613254565b348015610d0057600080fd5b5061036f61325a565b348015610d1557600080fd5b5061036f60048036036020811015610d2c57600080fd5b50356001600160a01b0316613260565b348015610d4857600080fd5b506105c260048036036020811015610d5f57600080fd5b5035613272565b348015610d7257600080fd5b5061036f613282565b348015610d8757600080fd5b5061036f613288565b348015610d9c57600080fd5b506103cb61328e565b348015610db157600080fd5b506103b460048036036040811015610dc857600080fd5b50803590602001356132a6565b348015610de157600080fd5b506105c261374c565b348015610df657600080fd5b50610dff613761565b604080516001600160a01b039e8f1681529c909d1660208d01528b8d019a909a5260608b019890985260808a019690965260a089019490945260c088019290925260e08701526101008601526101208501526101408401526101608301526101808201529051908190036101a00190f35b600080805b60025481101561103357600154600280546000926201000090046001600160a01b03169163201041989185908110610ea957fe5b90600052602060002090602091828204019190069054906101000a900460ff1660ff166040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610f0057600080fd5b505afa158015610f14573d6000803e3d6000fd5b505050506040513d6020811015610f2a57600080fd5b505160048054919250611028916001600160a01b03841691634222326a9186908110610f5257fe5b600091825260209091200154600554600380546001600160a01b03938416939092169188908110610f7f57fe5b60009182526020918290200154604080517fffffffff0000000000000000000000000000000000000000000000000000000060e088901b1681526001600160a01b039586166004820152938516602485015293166044830152915160648083019392829003018186803b158015610ff557600080fd5b505afa158015611009573d6000803e3d6000fd5b505050506040513d602081101561101f57600080fd5b50518490613794565b925050600101610e75565b50905090565b600554604080516370a0823160e01b815233600482015290516110bf926000926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b15801561108b57600080fd5b505afa15801561109f573d6000803e3d6000fd5b505050506040513d60208110156110b557600080fd5b505111600f6137f7565b60055460408051631f0b96b960e31b81529051611147926001600160a01b03169163f85cb5c8916004808301926020929190829003018186803b15801561110557600080fd5b505afa158015611119573d6000803e3d6000fd5b505050506040513d602081101561112f57600080fd5b50516001600160a01b038381169116141560366137f7565b60125461115e90610100900460ff161560346137f7565b6000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156111ad57600080fd5b505afa1580156111c1573d6000803e3d6000fd5b505050506040513d60208110156111d757600080fd5b505190506111e881151560086137f7565b61126c8282600560009054906101000a90046001600160a01b03166001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561123b57600080fd5b505afa15801561124f573d6000803e3d6000fd5b505050506040513d602081101561126557600080fd5b5051613805565b50611275613b01565b5050565b601254610100900460ff1681565b60185481565b60165481565b600e5481565b600080805b60025460ff8216101561137f5781806113755750600160029054906101000a90046001600160a01b03166001600160a01b0316632010419860028360ff16815481106112e657fe5b90600052602060002090602091828204019190069054906101000a900460ff166040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b15801561133d57600080fd5b505afa158015611351573d6000803e3d6000fd5b505050506040513d602081101561136757600080fd5b50516001600160a01b031633145b915060010161129e565b5061138b81604c6137f7565b611396858585613805565b95945050505050565b60135481565b8061143e600160029054906101000a90046001600160a01b03166001600160a01b031663411137c3336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561140b57600080fd5b505afa15801561141f573d6000803e3d6000fd5b505050506040513d602081101561143557600080fd5b505160126137f7565b611454670de0b6b3a764000082111560136137f7565b600260005414156114ac576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026000556005546040805163017d862f60e11b8152905161152f926001600160a01b0316916302fb0c5e916004808301926020929190829003018186803b1580156114f757600080fd5b505afa15801561150b573d6000803e3d6000fd5b505050506040513d602081101561152157600080fd5b5051151560011460236137f7565b60125461154690610100900460ff161560346137f7565b61154e613c39565b60055460408051634d5b1ba160e11b81523360048201526024810185905290516001600160a01b0390921691639ab637429160448082019260009290919082900301818387803b1580156115a157600080fd5b505af11580156115b5573d6000803e3d6000fd5b50506005546040805142815290516001600160a01b0390921693507f7a7d4c833d273b66e431c5f268c42ee3e788541592e07c77f232cd28c8991316925081900360200190a250506001600055565b6000805b60025460ff821610156116e95781806116df5750600160029054906101000a90046001600160a01b03166001600160a01b0316632010419860028360ff168154811061165057fe5b90600052602060002090602091828204019190069054906101000a900460ff166040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b1580156116a757600080fd5b505afa1580156116bb573d6000803e3d6000fd5b505050506040513d60208110156116d157600080fd5b50516001600160a01b031633145b9150600101611608565b506116f581604c6137f7565b82156117685773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b15801561174a57600080fd5b505af115801561175e573d6000803e3d6000fd5b50505050506117db565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b0316632e1a7d4d836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156117c257600080fd5b505af11580156117d6573d6000803e3d6000fd5b505050505b505050565b80611846600160029054906101000a90046001600160a01b03166001600160a01b031663411137c3336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561140b57600080fd5b61185c670de0b6b3a764000082111560136137f7565b6005546040805163017d862f60e11b815290516118a2926001600160a01b0316916302fb0c5e916004808301926020929190829003018186803b1580156114f757600080fd5b600554604080517ff251fc8c0000000000000000000000000000000000000000000000000000000081529051611948926001600160a01b03169163f251fc8c916004808301926020929190829003018186803b15801561190157600080fd5b505afa158015611915573d6000803e3d6000fd5b505050506040513d602081101561192b57600080fd5b505160011461193b57600261193e565b60015b88101560406137f7565b60125461196e90610100900460ff16158015611967575060125460ff16155b602a6137f7565b61199362093a8061198a60085442613cfe90919063ffffffff16565b1115602b6137f7565b6012805461ff00191661010017905560005b878110156119fb578686828181106119b957fe5b90506020020135601e60008b8b858181106119d057fe5b602090810292909201356001600160a01b0316835250810191909152604001600020556001016119a5565b50611a22611a1d6002611a1786611a1189613d5b565b90613da3565b90613e08565b613ec0565b601055611a40611a1d6002611a1786611a3a89613d5b565b90613f17565b601155611a4f600d8989615305565b50600f805485019055600e805484019055426009819055600554604080518781526020810187905280820193909352516001600160a01b03909116917f84d16af09d51e9126d9f6eddb4e8c072bb4b01dccb1f72e266ed2f66fc4b3792919081900360600190a260055460408051634d5b1ba160e11b81523360048201526024810185905290516001600160a01b0390921691639ab637429160448082019260009290919082900301818387803b158015611b0957600080fd5b505af1158015611b1d573d6000803e3d6000fd5b505050505050505050505050565b6006546001600160a01b031681565b60195481565b601a8181548110611b5057600080fd5b6000918252602090912001546001600160a01b0316905081565b60145481565b600554611c15906001600160a01b0316331480611c0e5750600160029054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611bd657600080fd5b505afa158015611bea573d6000803e3d6000fd5b505050506040513d6020811015611c0057600080fd5b50516001600160a01b031633145b601f6137f7565b60026000541415611c6d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600055601254611c9790610100900460ff168015611c90575060125460ff16155b602c6137f7565b611cbb611cb1601954601654613cfe90919063ffffffff16565b82111560336137f7565b611cd8611cd360165483613f7c90919063ffffffff16565b613f9a565b42600b55601654611ce99082613cfe565b601655600154604080517f3f2a554000000000000000000000000000000000000000000000000000000000815290516000926201000090046001600160a01b031691633f2a5540916004808301926020929190829003018186803b158015611d5057600080fd5b505afa158015611d64573d6000803e3d6000fd5b505050506040513d6020811015611d7a57600080fd5b50519050611d86614151565b15611dea57806001600160a01b031663f5750d0f836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015611dd157600080fd5b505af1158015611de5573d6000803e3d6000fd5b505050505b60055460408051631f0b96b960e31b81529051611f54926001600160a01b031691829163f85cb5c891600480820192602092909190829003018186803b158015611e3357600080fd5b505afa158015611e47573d6000803e3d6000fd5b505050506040513d6020811015611e5d57600080fd5b5051604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015611ea757600080fd5b505afa158015611ebb573d6000803e3d6000fd5b505050506040513d6020811015611ed157600080fd5b505160055460408051631f0b96b960e31b815290516001600160a01b039092169163f85cb5c891600480820192602092909190829003018186803b158015611f1857600080fd5b505afa158015611f2c573d6000803e3d6000fd5b505050506040513d6020811015611f4257600080fd5b50516001600160a01b03169190614277565b6005546040805184815242602082015281516001600160a01b03909316927fcff91fcd7fff5d12ce9ee075980ad73fde31d99f583cb228a04ee0ef4f34ba6f929181900390910190a250506001600055565b60115481565b600080600060028460ff1681548110611fc157fe5b90600052602060002090602091828204019190069054906101000a900460ff1660038560ff1681548110611ff157fe5b600091825260209091200154600480546001600160a01b039092169160ff881690811061201a57fe5b60009182526020909120015491945092506001600160a01b031690509193909250565b600654612056906001600160a01b0316331460206137f7565b6012546120689060ff161560326137f7565b612077601354821060356137f7565b60135460408051838152602081019290925280517f42fb010605de46a36c4814784d207e3b8a1ce9f6773eaea652c07d2a07e95e579281900390910190a1601355565b6005546001600160a01b031681565b6006546120e2906001600160a01b0316331460206137f7565b6120ea613c39565b6005546040805142815290516001600160a01b03909216917f4dcd504f23c1c204f965486c526a1e35cfb215bb4823dd1be0a172277bb1b3459181900360200190a2565b81612194600160029054906101000a90046001600160a01b03166001600160a01b031663411137c3336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561140b57600080fd5b6121aa670de0b6b3a764000082111560136137f7565b60026000541415612202576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026000556005546040805163017d862f60e11b8152905161224d926001600160a01b0316916302fb0c5e916004808301926020929190829003018186803b1580156114f757600080fd5b61225d6000600a541160306137f7565b612280612277601354600a5461379490919063ffffffff16565b421160316137f7565b6012546122929060ff161560326137f7565b6122a3670de0b6b3a7640000613f9a565b6012805461ff001960ff1990911660011716905542600c819055600b55600754600654604080517f3b5bb1d50000000000000000000000000000000000000000000000000000000081526001600160a01b0392831660048201818152602483019384528751604484015287519490951694633b5bb1d594919388939192909160640190602085019080838360005b83811015612349578181015183820152602001612331565b50505050905090810190601f1680156123765780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15801561239657600080fd5b505af11580156123aa573d6000803e3d6000fd5b505050506040513d60208110156123c057600080fd5b506123cc9050836142f7565b6123d4613b01565b60055460185460408051918252602082018690524282820152516001600160a01b03909216917f2d21f7a1772dd51a6d96bd1cb40623cb13b73fd3d037618d9688707ce1b5b9569181900360600190a260055460408051634d5b1ba160e11b81523360048201526024810186905290516001600160a01b0390921691639ab637429160448082019260009290919082900301818387803b15801561247757600080fd5b505af115801561248b573d6000803e3d6000fd5b505060016000555050505050565b60606126c2600160029054906101000a90046001600160a01b03166001600160a01b031663f4330b49336001600160a01b03166317d7de7c6040518163ffffffff1660e01b815260040160006040518083038186803b1580156124fb57600080fd5b505afa15801561250f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561253857600080fd5b810190808051604051939291908464010000000082111561255857600080fd5b90830190602082018581111561256d57600080fd5b825164010000000081118282018810171561258757600080fd5b82525081516020918201929091019080838360005b838110156125b457818101518382015260200161259c565b50505050905090810190601f1680156125e15780820380516001836020036101000a031916815260200191505b50604052505050336040518363ffffffff1660e01b81526004018080602001836001600160a01b03168152602001828103825284818151815260200191508051906020019080838360005b8381101561264457818101518382015260200161262c565b50505050905090810190601f1680156126715780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561268f57600080fd5b505afa1580156126a3573d6000803e3d6000fd5b505050506040513d60208110156126b957600080fd5b505160216137f7565b611396858585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250614aa992505050565b601c5481565b60085481565b600b5481565b601b818154811061272557600080fd5b600091825260209091200154905081565b600a5481565b6007546001600160a01b031681565b6002818154811061275b57600080fd5b9060005260206000209060209182820401919006915054906101000a900460ff1681565b60048181548110611b5057600080fd5b60155481565b60125462010000900460ff1681565b6001600160a01b03166000908152601e602052604090205490565b61281f600160029054906101000a90046001600160a01b03166001600160a01b031663f4330b49336001600160a01b03166317d7de7c6040518163ffffffff1660e01b815260040160006040518083038186803b1580156124fb57600080fd5b816001600160a01b031663095ea7b384836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561287657600080fd5b505af115801561288a573d6000803e3d6000fd5b505050506040513d60208110156128a057600080fd5b5050505050565b60038181548110611b5057600080fd5b60095481565b600154610100900460ff16806128d657506128d6614bd3565b806128e4575060015460ff16155b61291f5760405162461bcd60e51b815260040180806020018281038252602e81526020018061546e602e913960400191505060405180910390fd5b600154610100900460ff16158015612949576001805460ff1961ff00199091166101001716811790555b600180547fffffffffffffffffffff0000000000000000000000000000000000000000ffff16620100006001600160a01b038b811682029290921792839055604080517f13bc6d4b0000000000000000000000000000000000000000000000000000000081528d841660048201529051612a1d9492909204909216916313bc6d4b916024808301926020929190829003018186803b1580156129ea57600080fd5b505afa1580156129fe573d6000803e3d6000fd5b505050506040513d6020811015612a1457600080fd5b505160246137f7565b6005805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038b81169190911791829055604080517fc40868930000000000000000000000000000000000000000000000000000000081528d831660048201529051600093612b7993169163c4086893916024808301926020929190829003018186803b158015612aaa57600080fd5b505afa158015612abe573d6000803e3d6000fd5b505050506040513d6020811015612ad457600080fd5b8101908080519060200190929190505050600560009054906101000a90046001600160a01b03166001600160a01b03166370a082318e6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612b4757600080fd5b505afa158015612b5b573d6000803e3d6000fd5b505050506040513d6020811015612b7157600080fd5b505190613cfe565b600554604080516370a0823160e01b81526001600160a01b038f811660048301529151939450612c059360009392909216916370a0823191602480820192602092909190829003018186803b158015612bd157600080fd5b505afa158015612be5573d6000803e3d6000fd5b505050506040513d6020811015612bfb57600080fd5b50511160256137f7565b612c138782101560076137f7565b612c216000881160266137f7565b600554604080517f95cdbedb0000000000000000000000000000000000000000000000000000000081529051612d3b926001600160a01b0316916395cdbedb916004808301926020929190829003018186803b158015612c8057600080fd5b505afa158015612c94573d6000803e3d6000fd5b505050506040513d6020811015612caa57600080fd5b50518710801590612d345750600560009054906101000a90046001600160a01b03166001600160a01b031663297ce5986040518163ffffffff1660e01b815260040160206040518083038186803b158015612d0457600080fd5b505afa158015612d18573d6000803e3d6000fd5b505050506040513d6020811015612d2e57600080fd5b50518711155b60276137f7565b612d51670de0b6b3a764000085101560396137f7565b612d5f8489101560296137f7565b612d756001600160a01b0384161515603a6137f7565b600780546001600160a01b0380861673ffffffffffffffffffffffffffffffffffffffff199283161790925560068054928e169290911691909117905542600855601487905560138690556017859055600060165560198490556015889055612ddd87613d5b565b600e55612de987613d5b565b6001600160a01b038c166000908152601e602052604090205550600f8690556012805462ff0000191690558015612e26576001805461ff00191690555b50505050505050505050565b60125460ff1681565b601254600a54600c54600b54309460ff610100860481169562010000810482169591169390929091565b600554612e93906001600160a01b031633148015612e8c575060125462010000900460ff16155b60226137f7565b612eab8584148015612ea457508382145b604b6137f7565b612ec3600682108015612ea45750811515604b6137f7565b60005b85811015613207576001546201000090046001600160a01b03166320104198888884818110612ef157fe5b9050602002013560ff166040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612f3257600080fd5b505afa158015612f46573d6000803e3d6000fd5b505050506040513d6020811015612f5c57600080fd5b50516001600160a01b031663c8cd3075848484818110612f7857fe5b6005546001600160a01b0360209092029390930135811692169050888886818110612f9f57fe5b905060200201356001600160a01b0316856040518563ffffffff1660e01b815260040180856001600160a01b03168152602001846001600160a01b03168152602001836001600160a01b0316815260200182815260200194505050505060006040518083038186803b15801561301457600080fd5b505afa158015613028573d6000803e3d6000fd5b50506001546131ff92506201000090046001600160a01b0316905063f4330b4987878581811061305457fe5b905060200201356001600160a01b03166001600160a01b03166317d7de7c6040518163ffffffff1660e01b815260040160006040518083038186803b15801561309c57600080fd5b505afa1580156130b0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156130d957600080fd5b81019080805160405193929190846401000000008211156130f957600080fd5b90830190602082018581111561310e57600080fd5b825164010000000081118282018810171561312857600080fd5b82525081516020918201929091019080838360005b8381101561315557818101518382015260200161313d565b50505050905090810190601f1680156131825780820380516001836020036101000a031916815260200191505b5060405250505088888681811061319557fe5b905060200201356001600160a01b03166040518363ffffffff1660e01b81526004018080602001836001600160a01b03168152602001828103825284818151815260200191508051906020019080838360008381101561264457818101518382015260200161262c565b600101612ec6565b5061321460028787615371565b5061322160038585615305565b5061322e60048383615305565b50506012805462ff00001916620100001790555050505050565b600f5481565b600c5481565b60175481565b60105481565b601e6020526000908152604090205481565b600d8181548110611b5057600080fd5b601d5481565b60025490565b600080600a541180156132a15750600c54155b905090565b8061330c600160029054906101000a90046001600160a01b03166001600160a01b031663411137c3336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561140b57600080fd5b613322670de0b6b3a764000082111560136137f7565b6002600054141561337a576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026000556005546040805163017d862f60e11b815290516133c5926001600160a01b0316916302fb0c5e916004808301926020929190829003018186803b1580156114f757600080fd5b6012546133db90610100900460ff16602c6137f7565b6133ff6015546133f68560165461379490919063ffffffff16565b1115602d6137f7565b61340f601954841015602e6137f7565b600554604080517f3deddb3f00000000000000000000000000000000000000000000000000000000815290516134b1926001600160a01b031691633deddb3f916004808301926020929190829003018186803b15801561346e57600080fd5b505afa158015613482573d6000803e3d6000fd5b505050506040513d602081101561349857600080fd5b50516009546134a8904290613cfe565b1015602f6137f7565b600554604080517f4422b0dc0000000000000000000000000000000000000000000000000000000081526004810186905290516001600160a01b0390921691634422b0dc9160248082019260009290919082900301818387803b15801561351757600080fd5b505af115801561352b573d6000803e3d6000fd5b505060165461353d9250905084613794565b60165561354983614be4565b6000600160029054906101000a90046001600160a01b03166001600160a01b0316633f2a55406040518163ffffffff1660e01b815260040160206040518083038186803b15801561359957600080fd5b505afa1580156135ad573d6000803e3d6000fd5b505050506040513d60208110156135c357600080fd5b5051600a549091506135d85742600a55613614565b6135e0614151565b1561361457613610613607613600600b5442613cfe90919063ffffffff16565b8690614e47565b601d5490613794565b601d555b61361c614151565b1561368057806001600160a01b0316630fa454cf856040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561366757600080fd5b505af115801561367b573d6000803e3d6000fd5b505050505b60055460408051634d5b1ba160e11b81523360048201526024810186905290516001600160a01b0390921691639ab637429160448082019260009290919082900301818387803b1580156136d357600080fd5b505af11580156136e7573d6000803e3d6000fd5b505042600b819055600554604080518981526020810189905280820193909352516001600160a01b0390911693507f7f4467a4ca8be02143a9253e6c31362c7bc755929e5c68faf659636d307f1b8c92509081900360600190a2505060016000555050565b6001546201000090046001600160a01b031681565b600654600354601454600f54600e54601654601854601354601754601554601954600854309b6001600160a01b03169b9c565b6000828201838110156137ee576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b816112755761127581614ea0565b600080600160029054906101000a90046001600160a01b03166001600160a01b0316636176605e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561385657600080fd5b505afa15801561386a573d6000803e3d6000fd5b505050506040513d602081101561388057600080fd5b5051600154604080517f2630c12f0000000000000000000000000000000000000000000000000000000081529051929350600092620100009092046001600160a01b031691632630c12f91600480820192602092909190829003018186803b1580156138eb57600080fd5b505afa1580156138ff573d6000803e3d6000fd5b505050506040513d602081101561391557600080fd5b5051604080517f5e684bb30000000000000000000000000000000000000000000000000000000081526001600160a01b0389811660048301528781166024830152915192935090831691635e684bb39160448082019260009290919082900301818387803b15801561398657600080fd5b505af115801561399a573d6000803e3d6000fd5b505050506000816001600160a01b031663ac41865a88876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b1580156139fe57600080fd5b505afa158015613a12573d6000803e3d6000fd5b505050506040513d6020811015613a2857600080fd5b505190506000613a388783614ef3565b90506000613a57613a5083662386f26fc10000614ef3565b8390613cfe565b604080517ffa1ca8200000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038c81166024830152604482018c90528a811660648301526084820184905291519293509087169163fa1ca8209160a48082019260009290919082900301818387803b158015613ada57600080fd5b505af1158015613aee573d6000803e3d6000fd5b50929750505050505050505b9392505050565b60055460408051631f0b96b960e31b815290516000926001600160a01b03169163f85cb5c8916004808301926020929190829003018186803b158015613b4657600080fd5b505afa158015613b5a573d6000803e3d6000fd5b505050506040513d6020811015613b7057600080fd5b5051604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015613bba57600080fd5b505afa158015613bce573d6000803e3d6000fd5b505050506040513d6020811015613be457600080fd5b505160055460408051631f0b96b960e31b81529051929350613c36926001600160a01b03909216918491839163f85cb5c891600480820192602092909190829003018186803b158015611f1857600080fd5b50565b613c5d62093a80613c5560085442613cfe90919063ffffffff16565b1160376137f7565b613c6d600a5460001460386137f7565b601254613c7f9060ff161560326137f7565b600554604080517fb2644e6600000000000000000000000000000000000000000000000000000000815230600482015290516001600160a01b039092169163b2644e669160248082019260009290919082900301818387803b158015613ce457600080fd5b505af1158015613cf8573d6000803e3d6000fd5b50505050565b600082821115613d55576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000600160ff1b8210613d9f5760405162461bcd60e51b81526004018080602001828103825260288152602001806155076028913960400191505060405180910390fd5b5090565b6000828201818312801590613db85750838112155b80613dcd5750600083128015613dcd57508381125b6137ee5760405162461bcd60e51b81526004018080602001828103825260218152602001806154276021913960400191505060405180910390fd5b600081613e5c576040805162461bcd60e51b815260206004820181905260248201527f5369676e6564536166654d6174683a206469766973696f6e206279207a65726f604482015290519081900360640190fd5b81600019148015613e705750600160ff1b83145b15613eac5760405162461bcd60e51b815260040180806020018281038252602181526020018061549c6021913960400191505060405180910390fd5b6000828481613eb757fe5b05949350505050565b600080821215613d9f576040805162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f736974697665604482015290519081900360640190fd5b6000818303818312801590613f2c5750838113155b80613f415750600083128015613f4157508381135b6137ee5760405162461bcd60e51b815260040180806020018281038252602481526020018061552f6024913960400191505060405180910390fd5b60006137ee82613f9485670de0b6b3a7640000614e47565b90614f0b565b6002545b801561127557600154600280546000926201000090046001600160a01b0316916320104198916000198601908110613fd257fe5b90600052602060002090602091828204019190069054906101000a900460ff166040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b15801561402957600080fd5b505afa15801561403d573d6000803e3d6000fd5b505050506040513d602081101561405357600080fd5b5051600480549192506001600160a01b0383169163419ea18a918691600019870190811061407d57fe5b600091825260209091200154600554600380546001600160a01b03938416939092169160001989019081106140ae57fe5b6000918252602082200154604080517fffffffff0000000000000000000000000000000000000000000000000000000060e089901b16815260048101969096526001600160a01b03948516602487015292841660448601529290921660648401525160848084019382900301818387803b15801561412b57600080fd5b505af115801561413f573d6000803e3d6000fd5b50506000199093019250613f9e915050565b600080600160029054906101000a90046001600160a01b03166001600160a01b0316633f2a55406040518163ffffffff1660e01b815260040160206040518083038186803b1580156141a257600080fd5b505afa1580156141b6573d6000803e3d6000fd5b505050506040513d60208110156141cc57600080fd5b5051604080517fddaa26ad00000000000000000000000000000000000000000000000000000000815290519192506000916001600160a01b0384169163ddaa26ad916004808301926020929190829003018186803b15801561422d57600080fd5b505afa158015614241573d6000803e3d6000fd5b505050506040513d602081101561425757600080fd5b50516008549091506000908210801561426f57508115155b935050505090565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526117db908490614f72565b6143bd81600560009054906101000a90046001600160a01b03166001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561434957600080fd5b505afa15801561435d573d6000803e3d6000fd5b505050506040513d602081101561437357600080fd5b5051604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015612b4757600080fd5b60185560055460408051631f0b96b960e31b815290516000926001600160a01b03169163f85cb5c8916004808301926020929190829003018186803b15801561440557600080fd5b505afa158015614419573d6000803e3d6000fd5b505050506040513d602081101561442f57600080fd5b50516016549091506000906144529061444790613d5b565b611a3a601854613d5b565b905060008060165460185411614469576000614478565b60165460185461447891613cfe565b9050601654601854106145af5761450981600160029054906101000a90046001600160a01b03166001600160a01b031663568c08136040518163ffffffff1660e01b815260040160206040518083038186803b1580156144d757600080fd5b505afa1580156144eb573d6000803e3d6000fd5b505050506040513d602081101561450157600080fd5b505190614ef3565b915061459b30600160029054906101000a90046001600160a01b03166001600160a01b03166361d027b36040518163ffffffff1660e01b815260040160206040518083038186803b15801561455d57600080fd5b505afa158015614571573d6000803e3d6000fd5b505050506040513d602081101561458757600080fd5b50516001600160a01b038716919085615023565b6145a9836000849003613da3565b50614797565b60006145f26718493fba64ef00006145ec6145e36014546145dd601654601854613f7c90919063ffffffff16565b90614ef3565b60145490613cfe565b906150ab565b600554600654604080516370a0823160e01b81526001600160a01b0392831660048201529051939450849391909216916370a08231916024808301926020929190829003018186803b15801561464757600080fd5b505afa15801561465b573d6000803e3d6000fd5b505050506040513d602081101561467157600080fd5b505110156146f857600554600654604080516370a0823160e01b81526001600160a01b039283166004820152905191909216916370a08231916024808301926020929190829003018186803b1580156146c957600080fd5b505afa1580156146dd573d6000803e3d6000fd5b505050506040513d60208110156146f357600080fd5b505190505b600554600654604080517f2befcc5c0000000000000000000000000000000000000000000000000000000081526001600160a01b0392831660048201526024810185905290519190921691632befcc5c91604480830192600092919082900301818387803b15801561476957600080fd5b505af115801561477d573d6000803e3d6000fd5b505050506147948185613da390919063ffffffff16565b50505b6005546018546147cb9130916001600160a01b03909116906147b99086613cfe565b6001600160a01b038816929190615023565b6000600160029054906101000a90046001600160a01b03166001600160a01b0316632e0519cf6040518163ffffffff1660e01b815260040160606040518083038186803b15801561481b57600080fd5b505afa15801561482f573d6000803e3d6000fd5b505050506040513d606081101561484557600080fd5b50604001516005549091506001600160a01b031663250caaa861489061486b8585614ef3565b61488a8661488489601854613cfe90919063ffffffff16565b90613cfe565b90613794565b6148a8866148846148a18888614ef3565b8890613cfe565b87306040518563ffffffff1660e01b815260040180858152602001848152602001838152602001826001600160a01b03168152602001945050505050600060405180830381600087803b1580156148fe57600080fd5b505af1158015614912573d6000803e3d6000fd5b505050506000600160029054906101000a90046001600160a01b03166001600160a01b0316633f2a55406040518163ffffffff1660e01b815260040160206040518083038186803b15801561496657600080fd5b505afa15801561497a573d6000803e3d6000fd5b505050506040513d602081101561499057600080fd5b5051905061499c614151565b15614a0257806001600160a01b031663f5750d0f6016546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156149e957600080fd5b505af11580156149fd573d6000803e3d6000fd5b505050505b604080517f9de9a05200000000000000000000000000000000000000000000000000000000815230600482015290516001600160a01b03831691639de9a0529160248083019260209291908290030181600087803b158015614a6357600080fd5b505af1158015614a77573d6000803e3d6000fd5b505050506040513d6020811015614a8d57600080fd5b50516bffffffffffffffffffffffff16601c5550505050505050565b6060614abf6001600160a01b03851683856150c7565b905082846001600160a01b03167f2a936dbabeaea30adc1ddad138b1958497988474bef8b09a29411f0105ab8ab28484604051808060200180602001838103835285818151815260200191508051906020019080838360005b83811015614b30578181015183820152602001614b18565b50505050905090810190601f168015614b5d5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b83811015614b90578181015183820152602001614b78565b50505050905090810190601f168015614bbd5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a39392505050565b6000614bde306150f5565b15905090565b60055460408051631f0b96b960e31b8152905183926000926001600160a01b039091169163f85cb5c891600480820192602092909190829003018186803b158015614c2e57600080fd5b505afa158015614c42573d6000803e3d6000fd5b505050506040513d6020811015614c5857600080fd5b505190506000805b6002548110156128a057600154600280546000926201000090046001600160a01b03169163201041989185908110614c9457fe5b90600052602060002090602091828204019190069054906101000a900460ff166040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015614ceb57600080fd5b505afa158015614cff573d6000803e3d6000fd5b505050506040513d6020811015614d1557600080fd5b5051600480549192506001600160a01b038316916355d9750b9187918991889188908110614d3f57fe5b600091825260209091200154600554600380546001600160a01b0393841693909216918a908110614d6c57fe5b6000918252602082200154604080517fffffffff0000000000000000000000000000000000000000000000000000000060e08b901b1681526001600160a01b039889166004820152602481019790975260ff909516604487015292861660648601529085166084850152931660a48301525160c48083019360609383900390910190829087803b158015614dff57600080fd5b505af1158015614e13573d6000803e3d6000fd5b505050506040513d6060811015614e2957600080fd5b50805160208201516040909201519196509450925050600101614c60565b600082614e56575060006137f1565b82820282848281614e6357fe5b04146137ee5760405162461bcd60e51b81526004018080602001828103825260218152602001806154e66021913960400191505060405180910390fd5b62461bcd60e51b6000908152602060045260076024526642414223000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b60006137ee670de0b6b3a7640000613f948585614e47565b6000808211614f61576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381614f6a57fe5b049392505050565b6000614fc7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166150fb9092919063ffffffff16565b8051909150156117db57808060200190516020811015614fe657600080fd5b50516117db5760405162461bcd60e51b815260040180806020018281038252602a815260200180615553602a913960400191505060405180910390fd5b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052613cf8908590614f72565b6000670de0b6b3a76400006150c08484614e47565b81614f6a57fe5b60606150ed8484846040518060600160405280602981526020016154bd60299139615106565b949350505050565b3b151590565b60606150ed84846000855b6060824710156151475760405162461bcd60e51b81526004018080602001828103825260268152602001806154486026913960400191505060405180910390fd5b615150856150f5565b6151a1576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106151df5780518252601f1990920191602091820191016151c0565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114615241576040519150601f19603f3d011682016040523d82523d6000602084013e615246565b606091505b5091509150615256828286615261565b979650505050505050565b60608315615270575081613afa565b8251156152805782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156152ca5781810151838201526020016152b2565b50505050905090810190601f1680156152f75780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b828054828255906000526020600020908101928215615365579160200282015b8281111561536557815473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03843516178255602090920191600190910190615325565b50613d9f929150615411565b82805482825590600052602060002090601f016020900481019282156153655791602002820160005b838211156153db57833560ff1683826101000a81548160ff021916908360ff160217905550926020019260010160208160000104928301926001030261539a565b80156154085782816101000a81549060ff02191690556001016020816000010492830192600103026153db565b5050613d9f9291505b5b80821115613d9f576000815560010161541256fe5369676e6564536166654d6174683a206164646974696f6e206f766572666c6f77416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645369676e6564536166654d6174683a206469766973696f6e206f766572666c6f77416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7753616665436173743a2076616c756520646f65736e27742066697420696e20616e20696e743235365369676e6564536166654d6174683a207375627472616374696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122057b3b73ec0783ae83be6772bf196a39abc1d1d421310dcaa399aca7f57c148f764736f6c63430007060033608060405234801561001057600080fd5b50612c29806100206000396000f3fe608060405234801561001057600080fd5b50600436106101985760003560e01c806356ba88b8116100e3578063a8c62e761161008c578063ca6e9f7611610066578063ca6e9f7614610703578063e985e9c5146107a9578063f77c4791146107d757610198565b8063a8c62e7614610618578063b88d4fde14610620578063c87b56dd146106e657610198565b806370a08231116100bd57806370a08231146105bc57806395d89b41146105e2578063a22cb465146105ea57610198565b806356ba88b81461058f5780636352211e146105975780636c0360eb146105b457610198565b806323b872dd116101455780633c130d901161011f5780633c130d901461053457806342842e0e1461053c5780634f6ccce71461057257610198565b806323b872dd1461041c5780632f745c59146104525780633b5bb1d51461047e57610198565b8063095ea7b311610176578063095ea7b31461028e57806318160ddd146102bc5780632016a0d2146102d657610198565b806301ffc9a71461019d57806306fdde03146101d8578063081812fc14610255575b600080fd5b6101c4600480360360208110156101b357600080fd5b50356001600160e01b0319166107df565b604080519115158252519081900360200190f35b6101e0610802565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561021a578181015183820152602001610202565b50505050905090810190601f1680156102475780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102726004803603602081101561026b57600080fd5b5035610898565b604080516001600160a01b039092168252519081900360200190f35b6102ba600480360360408110156102a457600080fd5b506001600160a01b0381351690602001356108fa565b005b6102c46109d5565b60408051918252519081900360200190f35b6102ba600480360360808110156102ec57600080fd5b6001600160a01b03823581169260208101359091169181019060608101604082013564010000000081111561032057600080fd5b82018360208201111561033257600080fd5b8035906020019184600183028401116401000000008311171561035457600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156103a757600080fd5b8201836020820111156103b957600080fd5b803590602001918460018302840111640100000000831117156103db57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506109e6945050505050565b6102ba6004803603606081101561043257600080fd5b506001600160a01b03813581169160208101359091169060400135610b2e565b6102c46004803603604081101561046857600080fd5b506001600160a01b038135169060200135610b85565b6102c46004803603604081101561049457600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156104bf57600080fd5b8201836020820111156104d157600080fd5b803590602001918460018302840111640100000000831117156104f357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610bb0945050505050565b6101e0610d6f565b6102ba6004803603606081101561055257600080fd5b506001600160a01b03813581169160208101359091169060400135610dfd565b6102c46004803603602081101561058857600080fd5b5035610e18565b610272610e2e565b610272600480360360208110156105ad57600080fd5b5035610e3d565b6101e0610e65565b6102c4600480360360208110156105d257600080fd5b50356001600160a01b0316610ec6565b6101e0610f2e565b6102ba6004803603604081101561060057600080fd5b506001600160a01b0381351690602001351515610f8f565b610272611094565b6102ba6004803603608081101561063657600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561067157600080fd5b82018360208201111561068357600080fd5b803590602001918460018302840111640100000000831117156106a557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506110a3945050505050565b6101e0600480360360208110156106fc57600080fd5b5035611101565b6102ba6004803603602081101561071957600080fd5b81019060208101813564010000000081111561073457600080fd5b82018360208201111561074657600080fd5b8035906020019184600183028401116401000000008311171561076857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611382945050505050565b6101c4600480360360408110156107bf57600080fd5b506001600160a01b0381358116916020013516611464565b610272611492565b6001600160e01b0319811660009081526033602052604090205460ff165b919050565b606a8054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561088e5780601f106108635761010080835404028352916020019161088e565b820191906000526020600020905b81548152906001019060200180831161087157829003601f168201915b5050505050905090565b60006108a3826114a1565b6108de5760405162461bcd60e51b815260040180806020018281038252602c815260200180612ad0602c913960400191505060405180910390fd5b506000908152606860205260409020546001600160a01b031690565b600061090582610e3d565b9050806001600160a01b0316836001600160a01b031614156109585760405162461bcd60e51b8152600401808060200182810382526021815260200180612b806021913960400191505060405180910390fd5b806001600160a01b031661096a6114ae565b6001600160a01b0316148061098b575061098b816109866114ae565b611464565b6109c65760405162461bcd60e51b81526004018080602001828103825260388152602001806129f56038913960400191505060405180910390fd5b6109d083836114b2565b505050565b60006109e1606661152d565b905090565b600054610100900460ff16806109ff57506109ff611538565b80610a0d575060005460ff16155b610a485760405162461bcd60e51b815260040180806020018281038252602e815260200180612a80602e913960400191505060405180910390fd5b600054610100900460ff16158015610a73576000805460ff1961ff0019909116610100171660011790555b6001600160a01b038516610ace576040805162461bcd60e51b815260206004820152601560248201527f436f6e74726f6c6c6572206d7573742065786973740000000000000000000000604482015290519081900360640190fd5b610ad88383611549565b609780546001600160a01b0380881673ffffffffffffffffffffffffffffffffffffffff199283161790925560998054928716929091169190911790558015610b27576000805461ff00191690555b5050505050565b610b3f610b396114ae565b82611606565b610b7a5760405162461bcd60e51b8152600401808060200182810382526031815260200180612bc36031913960400191505060405180910390fd5b6109d08383836116aa565b6001600160a01b0382166000908152606560205260408120610ba790836117f6565b90505b92915050565b609954604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516000926001600160a01b0316916356ba88b8916004808301926020929190829003018186803b158015610c0e57600080fd5b505afa158015610c22573d6000803e3d6000fd5b505050506040513d6020811015610c3857600080fd5b5051604080517f2e8ebaae00000000000000000000000000000000000000000000000000000000815233600482015290516001600160a01b0390921691632e8ebaae91602480820192602092909190829003018186803b158015610c9b57600080fd5b505afa158015610caf573d6000803e3d6000fd5b505050506040513d6020811015610cc557600080fd5b5051610d025760405162461bcd60e51b8152600401808060200182810382526022815260200180612ba16022913960400191505060405180910390fd5b6001600160a01b038316610d5d576040805162461bcd60e51b815260206004820152600f60248201527f55736572206d7573742065786973740000000000000000000000000000000000604482015290519081900360640190fd5b610d6682611802565b610ba7836119c4565b609a805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610df55780601f10610dca57610100808354040283529160200191610df5565b820191906000526020600020905b815481529060010190602001808311610dd857829003601f168201915b505050505081565b6109d0838383604051806020016040528060008152506110a3565b600080610e26606684611ad2565b509392505050565b6098546001600160a01b031681565b6000610baa82604051806060016040528060298152602001612a576029913960669190611aee565b606d8054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561088e5780601f106108635761010080835404028352916020019161088e565b60006001600160a01b038216610f0d5760405162461bcd60e51b815260040180806020018281038252602a815260200180612a2d602a913960400191505060405180910390fd5b6001600160a01b0382166000908152606560205260409020610baa9061152d565b606b8054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561088e5780601f106108635761010080835404028352916020019161088e565b610f976114ae565b6001600160a01b0316826001600160a01b03161415610ffd576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b806069600061100a6114ae565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff19169215159290921790915561104e6114ae565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b6099546001600160a01b031681565b6110b46110ae6114ae565b83611606565b6110ef5760405162461bcd60e51b8152600401808060200182810382526031815260200180612bc36031913960400191505060405180910390fd5b6110fb84848484611b05565b50505050565b606061110c826114a1565b6111475760405162461bcd60e51b815260040180806020018281038252602f815260200180612b51602f913960400191505060405180910390fd5b6000828152606c602090815260408083208054825160026001831615610100026000190190921691909104601f8101859004850282018501909352828152929091908301828280156111da5780601f106111af576101008083540402835291602001916111da565b820191906000526020600020905b8154815290600101906020018083116111bd57829003601f168201915b5050505050905060006111eb610e65565b90508051600014156111ff575090506107fd565b8151156112c05780826040516020018083805190602001908083835b6020831061123a5780518252601f19909201916020918201910161121b565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106112825780518252601f199092019160209182019101611263565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052925050506107fd565b806112ca85611b57565b6040516020018083805190602001908083835b602083106112fc5780518252601f1990920191602091820191016112dd565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106113445780518252601f199092019160209182019101611325565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405292505050919050565b609760009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113d057600080fd5b505afa1580156113e4573d6000803e3d6000fd5b505050506040513d60208110156113fa57600080fd5b50516001600160a01b03163314611458576040805162461bcd60e51b815260206004820152601860248201527f4f6e6c79206f776e65722063616e2063616c6c20746869730000000000000000604482015290519081900360640190fd5b61146181611802565b50565b6001600160a01b03918216600090815260696020908152604080832093909416825291909152205460ff1690565b6097546001600160a01b031681565b6000610baa606683611c66565b3390565b6000818152606860205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841690811790915581906114f482610e3d565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000610baa82611c72565b600061154330611c76565b15905090565b600054610100900460ff16806115625750611562611538565b80611570575060005460ff16155b6115ab5760405162461bcd60e51b815260040180806020018281038252602e815260200180612a80602e913960400191505060405180910390fd5b600054610100900460ff161580156115d6576000805460ff1961ff0019909116610100171660011790555b6115de611c7c565b6115e6611d1d565b6115f08383611dd3565b80156109d0576000805461ff0019169055505050565b6000611611826114a1565b61164c5760405162461bcd60e51b815260040180806020018281038252602c8152602001806129c9602c913960400191505060405180910390fd5b600061165783610e3d565b9050806001600160a01b0316846001600160a01b031614806116925750836001600160a01b031661168784610898565b6001600160a01b0316145b806116a257506116a28185611464565b949350505050565b826001600160a01b03166116bd82610e3d565b6001600160a01b0316146117025760405162461bcd60e51b8152600401808060200182810382526029815260200180612b286029913960400191505060405180910390fd5b6001600160a01b0382166117475760405162461bcd60e51b815260040180806020018281038252602481526020018061297f6024913960400191505060405180910390fd5b6117528383836109d0565b61175d6000826114b2565b6001600160a01b038316600090815260656020526040902061177f9082611f03565b506001600160a01b03821660009081526065602052604090206117a29082611f0f565b506117af60668284611f1b565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000610ba78383611f31565b609a8054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526000939092909183018282801561188e5780601f106118635761010080835404028352916020019161188e565b820191906000526020600020905b81548152906001019060200180831161187157829003601f168201915b505085519394506118aa93609a93506020870192509050612889565b5060408051818152609a8054600260001961010060018416150201909116049282018390527fc5eb5ba7abcaa2fd10e5fa823a019606b52fcf655f6b7457457936db91dd0acd9290918491819060208201906060830190869080156119505780601f1061192557610100808354040283529160200191611950565b820191906000526020600020905b81548152906001019060200180831161193357829003601f168201915b5050838103825284518152845160209182019186019080838360005b8381101561198457818101518382015260200161196c565b50505050905090810190601f1680156119b15780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a15050565b6000806119d083610ec6565b611ac7576119de609b611f95565b6119e8609b611c72565b90506119f48382611f9e565b609a805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152611a8c93859391929091830182828015611a825780601f10611a5757610100808354040283529160200191611a82565b820191906000526020600020905b815481529060010190602001808311611a6557829003601f168201915b5050505050611fbc565b60405181906001600160a01b038516907f1fd9e9066bc1aced4997ab415f2984f25d421a50ce3131bee73e3f3a30c5ccbb90600090a3610baa565b610ba7836000610b85565b6000808080611ae1868661201f565b9097909650945050505050565b6000611afb84848461209a565b90505b9392505050565b611b108484846116aa565b611b1c84848484612164565b6110fb5760405162461bcd60e51b815260040180806020018281038252603281526020018061294d6032913960400191505060405180910390fd5b606081611b98575060408051808201909152600181527f300000000000000000000000000000000000000000000000000000000000000060208201526107fd565b8160005b8115611bb057600101600a82049150611b9c565b60008167ffffffffffffffff81118015611bc957600080fd5b506040519080825280601f01601f191660200182016040528015611bf4576020820181803683370190505b50859350905060001982015b8315611c5d57600a840660300160f81b82828060019003935081518110611c2357fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a84049350611c00565b50949350505050565b6000610ba783836122f6565b5490565b3b151590565b600054610100900460ff1680611c955750611c95611538565b80611ca3575060005460ff16155b611cde5760405162461bcd60e51b815260040180806020018281038252602e815260200180612a80602e913960400191505060405180910390fd5b600054610100900460ff16158015611d09576000805460ff1961ff0019909116610100171660011790555b8015611461576000805461ff001916905550565b600054610100900460ff1680611d365750611d36611538565b80611d44575060005460ff16155b611d7f5760405162461bcd60e51b815260040180806020018281038252602e815260200180612a80602e913960400191505060405180910390fd5b600054610100900460ff16158015611daa576000805460ff1961ff0019909116610100171660011790555b611d097f01ffc9a70000000000000000000000000000000000000000000000000000000061230e565b600054610100900460ff1680611dec5750611dec611538565b80611dfa575060005460ff16155b611e355760405162461bcd60e51b815260040180806020018281038252602e815260200180612a80602e913960400191505060405180910390fd5b600054610100900460ff16158015611e60576000805460ff1961ff0019909116610100171660011790555b8251611e7390606a906020860190612889565b508151611e8790606b906020850190612889565b50611eb17f80ac58cd0000000000000000000000000000000000000000000000000000000061230e565b611eda7f5b5e139f0000000000000000000000000000000000000000000000000000000061230e565b6115f07f780e9d630000000000000000000000000000000000000000000000000000000061230e565b6000610ba78383612392565b6000610ba78383612458565b6000611afb84846001600160a01b0385166124a2565b81546000908210611f735760405162461bcd60e51b815260040180806020018281038252602281526020018061292b6022913960400191505060405180910390fd5b826000018281548110611f8257fe5b9060005260206000200154905092915050565b80546001019055565b611fb8828260405180602001604052806000815250612539565b5050565b611fc5826114a1565b6120005760405162461bcd60e51b815260040180806020018281038252602c815260200180612afc602c913960400191505060405180910390fd5b6000828152606c6020908152604090912082516109d092840190612889565b8154600090819083106120635760405162461bcd60e51b8152600401808060200182810382526022815260200180612aae6022913960400191505060405180910390fd5b600084600001848154811061207457fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b600082815260018401602052604081205482816121355760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156120fa5781810151838201526020016120e2565b50505050905090810190601f1680156121275780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5084600001600182038154811061214857fe5b9060005260206000209060020201600101549150509392505050565b6000612178846001600160a01b0316611c76565b612184575060016116a2565b60006122bc630a85bd0160e11b6121996114ae565b88878760405160240180856001600160a01b03168152602001846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156122005781810151838201526020016121e8565b50505050905090810190601f16801561222d5780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405180606001604052806032815260200161294d603291396001600160a01b038816919061258b565b905060008180602001905160208110156122d557600080fd5b50516001600160e01b031916630a85bd0160e11b1492505050949350505050565b60009081526001919091016020526040902054151590565b6001600160e01b0319808216141561236d576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152603360205260409020805460ff19166001179055565b6000818152600183016020526040812054801561244e57835460001980830191908101906000908790839081106123c557fe5b90600052602060002001549050808760000184815481106123e257fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061241257fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610baa565b6000915050610baa565b600061246483836122f6565b61249a57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610baa565b506000610baa565b600082815260018401602052604081205480612507575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055611afe565b8285600001600183038154811061251a57fe5b9060005260206000209060020201600101819055506000915050611afe565b612543838361259a565b6125506000848484612164565b6109d05760405162461bcd60e51b815260040180806020018281038252603281526020018061294d6032913960400191505060405180910390fd5b6060611afb84846000856126c8565b6001600160a01b0382166125f5576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b6125fe816114a1565b15612650576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b61265c600083836109d0565b6001600160a01b038216600090815260656020526040902061267e9082611f0f565b5061268b60668284611f1b565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6060824710156127095760405162461bcd60e51b81526004018080602001828103825260268152602001806129a36026913960400191505060405180910390fd5b61271285611c76565b612763576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106127a15780518252601f199092019160209182019101612782565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612803576040519150601f19603f3d011682016040523d82523d6000602084013e612808565b606091505b5091509150612818828286612823565b979650505050505050565b60608315612832575081611afe565b8251156128425782518084602001fd5b60405162461bcd60e51b81526020600482018181528451602484015284518593919283926044019190850190808383600083156120fa5781810151838201526020016120e2565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826128bf5760008555612905565b82601f106128d857805160ff1916838001178555612905565b82800160010185558215612905579182015b828111156129055782518255916020019190600101906128ea565b50612911929150612915565b5090565b5b80821115612911576000815560010161291656fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724552433732313a207472616e7366657220746f20746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e64734552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732314d657461646174613a2055524920736574206f66206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314d657461646174613a2055524920717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724f6e6c79207468652073747261746567792063616e206d696e7420746865204e46544552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564a2646970667358221220e2813ef8060f44f56e69d99406135fc0634d5789dd22f6b08e405163ca3783f864736f6c63430007060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c806399d5ea7114610030575b600080fd5b6101d0600480360360c081101561004657600080fd5b81019060208101813564010000000081111561006157600080fd5b82018360208201111561007357600080fd5b8035906020019184600183028401116401000000008311171561009557600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156100e857600080fd5b8201836020820111156100fa57600080fd5b8035906020019184600183028401116401000000008311171561011c57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092956001600160a01b03853581169660208701358216966040810135909216955091935090915060808101906060013564010000000081111561019157600080fd5b8201836020820111156101a357600080fd5b803590602001918460208302840111640100000000831117156101c557600080fd5b5090925090506101ec565b604080516001600160a01b039092168252519081900360200190f35b6000806102187f00000000000000000000000000000000000000000000000000000000000000006104bf565b905060006102457f00000000000000000000000000000000000000000000000000000000000000006104bf565b9050806001600160a01b0316632016a0d287848d8d6040518563ffffffff1660e01b815260040180856001600160a01b03168152602001846001600160a01b031681526020018060200180602001838103835285818151815260200191508051906020019080838360005b838110156102c85781810151838201526020016102b0565b50505050905090810190601f1680156102f55780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b83811015610328578181015183820152602001610310565b50505050905090810190601f1680156103555780820380516001836020036101000a031916815260200191505b509650505050505050600060405180830381600087803b15801561037857600080fd5b505af115801561038c573d6000803e3d6000fd5b50505050816001600160a01b031663a3711498898989898960008181106103af57fe5b905060200201358a8a60018181106103c357fe5b905060200201358b8b60028181106103d757fe5b905060200201358c8c60038181106103eb57fe5b905060200201358d8d60048181106103ff57fe5b905060200201358a6040518a63ffffffff1660e01b8152600401808a6001600160a01b03168152602001896001600160a01b03168152602001886001600160a01b03168152602001878152602001868152602001858152602001848152602001838152602001826001600160a01b031681526020019950505050505050505050600060405180830381600087803b15801561049957600080fd5b505af11580156104ad573d6000803e3d6000fd5b50939c9b505050505050505050505050565b60006040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528260601b60148201527f5af43d82803e903d91602b57fd5bf3000000000000000000000000000000000060288201526037816000f09150506001600160a01b03811661059457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f455243313136373a20637265617465206661696c656400000000000000000000604482015290519081900360640190fd5b91905056fea2646970667358221220b217404732e6223bce917c6c144abc7d8eeb6bc452fcfec3018228fa4b7fa18d64736f6c63430007060033", + "args": [ + "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F" + ], + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_strategist\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_stratParams\",\"type\":\"uint256[]\"}],\"name\":\"createStrategy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Factory to create investment strategy contracts\",\"kind\":\"dev\",\"methods\":{\"createStrategy(string,string,address,address,uint256[])\":{\"params\":{\"_garden\":\"Address of the garden\",\"_name\":\"Name of the strategy\",\"_stratParams\":\"Strat Params\",\"_strategist\":\"Address of the strategist\",\"_symbol\":\"Symbol of the strategy\"}}},\"title\":\"StrategyFactory\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"createStrategy(string,string,address,address,uint256[])\":{\"notice\":\"Creates a new investment strategy using minimal proxies\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/strategies/StrategyFactory.sol\":\"StrategyFactory\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity >=0.4.24 <0.8.0;\\n\\nimport \\\"../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || _isConstructor() || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /// @dev Returns true if and only if the function is running in the constructor\\n function _isConstructor() private view returns (bool) {\\n return !AddressUpgradeable.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xd8e4eb08dcc1d1860fb347ba5ffd595242b9a1b66d49a47f2b4cb51c3f35017e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 { size := extcodesize(account) }\\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, \\\"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, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfc5ea91fa9ceb1961023b2a6c978b902888c52b90847ac7813fe3b79524165f6\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Clones.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for\\n * deploying minimal proxy contracts, also known as \\\"clones\\\".\\n *\\n * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies\\n * > a minimal bytecode implementation that delegates all calls to a known, fixed address.\\n *\\n * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`\\n * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the\\n * deterministic method.\\n *\\n * _Available since v3.4._\\n */\\nlibrary Clones {\\n /**\\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `master`.\\n *\\n * This function uses the create opcode, which should never revert.\\n */\\n function clone(address master) internal returns (address instance) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\\n mstore(add(ptr, 0x14), shl(0x60, master))\\n mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\\n instance := create(0, ptr, 0x37)\\n }\\n require(instance != address(0), \\\"ERC1167: create failed\\\");\\n }\\n\\n /**\\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `master`.\\n *\\n * This function uses the create2 opcode and a `salt` to deterministically deploy\\n * the clone. Using the same `master` and `salt` multiple time will revert, since\\n * the clones cannot be deployed twice at the same address.\\n */\\n function cloneDeterministic(address master, bytes32 salt) internal returns (address instance) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\\n mstore(add(ptr, 0x14), shl(0x60, master))\\n mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\\n instance := create2(0, ptr, 0x37, salt)\\n }\\n require(instance != address(0), \\\"ERC1167: create2 failed\\\");\\n }\\n\\n /**\\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\\n */\\n function predictDeterministicAddress(address master, bytes32 salt, address deployer) internal pure returns (address predicted) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\\n mstore(add(ptr, 0x14), shl(0x60, master))\\n mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000)\\n mstore(add(ptr, 0x38), shl(0x60, deployer))\\n mstore(add(ptr, 0x4c), salt)\\n mstore(add(ptr, 0x6c), keccak256(ptr, 0x37))\\n predicted := keccak256(add(ptr, 0x37), 0x55)\\n }\\n }\\n\\n /**\\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\\n */\\n function predictDeterministicAddress(address master, bytes32 salt) internal view returns (address predicted) {\\n return predictDeterministicAddress(master, salt, address(this));\\n }\\n}\\n\",\"keccak256\":\"0x0d24348f536f928d8b42789737bf34762faee065667ab530ea20969a9d9920d1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.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 using SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n // solhint-disable-next-line max-line-length\\n require((value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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 * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 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. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\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 { size := extcodesize(account) }\\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, \\\"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, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\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 /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\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, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x7b2b8baa20fd60ab4a328c8e34c64a353651b80ba4b5b157cbb61813f6f85d55\",\"license\":\"MIT\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editGardenNFT(address _newGardenNFT) external;\\n\\n function editStrategyNFT(address _newStrategyNFT) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function editUniswapFactory(address _newUniswapFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\\n\\n function maxContributorsPerGarden() external view returns (uint256);\\n\\n function gardenCreationIsOpen() external view returns (bool);\\n\\n function openPublicGardenCreation() external;\\n\\n function setMaxContributorsPerGarden(uint256 _newMax) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function gardenNFT() external view returns (address);\\n\\n function strategyNFT() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\\n\\n function uniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0xdee5a27301c24f507d312f32249487fa9b0a756062a7e479405a1d1ee9ee7bb8\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function isGardenStrategy(address _strategy) external view returns (bool);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategyActiveInGarden(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to,\\n bool _withPenalty\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x88f1786ffee23e386aaa1735177912e1b5a7cdd440dafe52fb139fe50fd621b4\",\"license\":\"Apache License\"},\"contracts/interfaces/IIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIntegration\\n * @author Babylon Finance\\n *\\n * Interface for protocol integrations\\n */\\ninterface IIntegration {\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xee03c9274ddf3257e3bfd2bb229fea3412c9105f178e64174f59efeafd53182c\",\"license\":\"Apache License\"},\"contracts/interfaces/IOperation.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from './IGarden.sol';\\nimport {IStrategy} from './IStrategy.sol';\\n\\n/**\\n * @title IOperation\\n * @author Babylon Finance\\n *\\n * Interface for an strategy operation\\n */\\ninterface IOperation {\\n function validateOperation(\\n address _data,\\n IGarden _garden,\\n address _integration,\\n uint256 _index\\n ) external view;\\n\\n function executeOperation(\\n address _asset,\\n uint256 _capital,\\n uint8 _assetStatus,\\n address _data,\\n IGarden _garden,\\n address _integration\\n )\\n external\\n returns (\\n address,\\n uint256,\\n uint8\\n );\\n\\n function exitOperation(\\n uint256 _percentage,\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external;\\n\\n function getNAV(\\n address _data,\\n IGarden _garden,\\n address _integration\\n ) external view returns (uint256);\\n\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x856e173e6c8e1fdbe54988df58d0805a23a6a2f8408bd4f90a488a1978e762ed\",\"license\":\"Apache License\"},\"contracts/interfaces/IPriceOracle.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol IPriceOracle)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPriceOracle\\n * @author Babylon Finance\\n *\\n * Interface for interacting with PriceOracle\\n */\\ninterface IPriceOracle {\\n /* ============ Functions ============ */\\n\\n function getPrice(address _assetOne, address _assetTwo) external view returns (uint256);\\n\\n function updateAdapters(address _assetOne, address _assetTwo) external;\\n}\\n\",\"keccak256\":\"0xa22e0e5e166f6f6714553b736ee921b916c37bc5b557042bf6042cc010d2a041\",\"license\":\"Apache License\"},\"contracts/interfaces/IRewardsDistributor.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IRewardsDistributor\\n * @author Babylon Finance\\n *\\n * Interface for the distribute rewards of the BABL Mining Program.\\n */\\n\\ninterface IRewardsDistributor {\\n // Structs\\n struct PrincipalPerTimestamp {\\n uint256 principal;\\n uint256 time;\\n uint256 timeListPointer;\\n }\\n\\n function protocolPrincipal() external view returns (uint256);\\n\\n function pid() external view returns (uint256);\\n\\n // solhint-disable-next-line\\n function EPOCH_DURATION() external pure returns (uint256);\\n\\n // solhint-disable-next-line\\n function START_TIME() external view returns (uint256);\\n\\n // solhint-disable-next-line\\n function Q1_REWARDS() external pure returns (uint256);\\n\\n // solhint-disable-next-line\\n function DECAY_RATE() external pure returns (uint256);\\n\\n function addProtocolPrincipal(uint256 _capital) external;\\n\\n function substractProtocolPrincipal(uint256 _capital) external;\\n\\n function getStrategyRewards(address _strategy) external returns (uint96);\\n\\n function sendTokensToContributor(address _to, uint96 _amount) external;\\n\\n function getRewards(\\n address _garden,\\n address _contributor,\\n address[] calldata _finalizedStrategies\\n ) external view returns (uint256, uint96);\\n\\n function getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) external view returns (uint256);\\n\\n /**\\n function getContributor(address _garden, address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256[] memory,\\n uint256\\n );\\n */\\n function updateGardenPower(address _garden, uint256 _pid) external;\\n\\n function setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw,\\n uint256 _pid\\n ) external;\\n\\n function tokenSupplyPerQuarter(uint256 quarter) external view returns (uint96);\\n\\n function checkProtocol(uint256 _time)\\n external\\n view\\n returns (\\n uint256 principal,\\n uint256 time,\\n uint256 quarterBelonging,\\n uint256 timeListPointer,\\n uint256 power\\n );\\n\\n function checkQuarter(uint256 _num)\\n external\\n view\\n returns (\\n uint256 quarterPrincipal,\\n uint256 quarterNumber,\\n uint256 quarterPower,\\n uint96 supplyPerQuarter\\n );\\n}\\n\",\"keccak256\":\"0xc68eb7826b0174d4f6dff50320abb2cd958a978d4537c57867dd828dc2798662\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n address,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x850597ec9a68eb86f31f13b6b77d3b31350b4ed3d0019dedfbd3550ad1a1d9e2\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategyFactory.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IIntegration} from './IIntegration.sol';\\n\\n/**\\n * @title IStrategyFactory\\n * @author Babylon Finance\\n *\\n * Interface for the strategy factory\\n */\\ninterface IStrategyFactory {\\n function createStrategy(\\n string memory _name,\\n string memory _symbol,\\n address _strategist,\\n address _garden,\\n uint256[] calldata _stratParams\\n ) external returns (address);\\n}\\n\",\"keccak256\":\"0x795c4903f51cf517c84cfbe9e628f7d0f2067c4b91f3cd31d6cff3f9842bb117\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategyNFT.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from './IGarden.sol';\\nimport {IBabController} from './IBabController.sol';\\n\\n/**\\n * @title IStrategyNFT\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Strategy NFT.\\n */\\ninterface IStrategyNFT {\\n struct StratDetail {\\n string name;\\n string symbol;\\n uint256 tokenId;\\n }\\n\\n function grantStrategyNFT(address _user, string memory _strategyTokenURI) external returns (uint256);\\n\\n function saveStrategyNameAndSymbol(\\n address _strategy,\\n string memory _name,\\n string memory _symbol\\n ) external;\\n\\n function getStrategyTokenURI(address _stratgy) external view returns (string memory);\\n\\n function getStrategyName(address _strategy) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x46fdbb37f7c283a4591a97880f1f5d7f57b0b0e58676ed33d727a88ab8823f89\",\"license\":\"Apache License\"},\"contracts/interfaces/ITradeIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title ITrade\\n * @author Babylon Finance\\n *\\n * Interface for trading protocol integrations\\n */\\ninterface ITradeIntegration {\\n function trade(\\n address _strategy,\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken,\\n uint256 _minReceiveQuantity\\n ) external;\\n\\n function getConversionRates(\\n address _sourceToken,\\n address _destinationToken,\\n uint256 _sourceQuantity\\n ) external returns (uint256, uint256);\\n}\\n\",\"keccak256\":\"0x95df25f2cbfd3d82a9e22c9202f9fc2c497e90fd6e5fcfb00c4162f6447c0cbd\",\"license\":\"Apache License\"},\"contracts/interfaces/external/weth/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface IWETH is IERC20 {\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n}\\n\",\"keccak256\":\"0xacc7980a650b7a753ee51f1bbc0ae4f641e84261bcc02cfdaf87ee8136483684\",\"license\":\"MIT\"},\"contracts/lib/AddressArrayUtils.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n/**\\n * @title AddressArrayUtils\\n * @author Set Protocol\\n *\\n * Utility functions to handle Address Arrays\\n */\\nlibrary AddressArrayUtils {\\n /**\\n * Finds the index of the first occurrence of the given element.\\n * @param A The input array to search\\n * @param a The value to find\\n * @return Returns (index and isIn) for the first occurrence starting from index 0\\n */\\n function indexOf(address[] memory A, address a) internal pure returns (uint256, bool) {\\n uint256 length = A.length;\\n for (uint256 i = 0; i < length; i++) {\\n if (A[i] == a) {\\n return (i, true);\\n }\\n }\\n return (uint256(-1), false);\\n }\\n\\n /**\\n * Returns true if the value is present in the list. Uses indexOf internally.\\n * @param A The input array to search\\n * @param a The value to find\\n * @return Returns isIn for the first occurrence starting from index 0\\n */\\n function contains(address[] memory A, address a) internal pure returns (bool) {\\n (, bool isIn) = indexOf(A, a);\\n return isIn;\\n }\\n\\n /**\\n * Returns true if there are 2 elements that are the same in an array\\n * @param A The input array to search\\n * @return Returns boolean for the first occurrence of a duplicate\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n require(A.length > 0, 'A is empty');\\n\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n address current = A[i];\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (current == A[j]) {\\n return true;\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @param A The input array to search\\n * @param a The address to remove\\n * @return Returns the array with the object removed.\\n */\\n function remove(address[] memory A, address a) internal pure returns (address[] memory) {\\n (uint256 index, bool isIn) = indexOf(A, a);\\n if (!isIn) {\\n revert('Address not in array.');\\n } else {\\n (address[] memory _A, ) = pop(A, index);\\n return _A;\\n }\\n }\\n\\n /**\\n * Removes specified index from array\\n * @param A The input array to search\\n * @param index The index to remove\\n * @return Returns the new array and the removed entry\\n */\\n function pop(address[] memory A, uint256 index) internal pure returns (address[] memory, address) {\\n uint256 length = A.length;\\n require(index < A.length, 'Index must be < A length');\\n address[] memory newAddresses = new address[](length - 1);\\n for (uint256 i = 0; i < index; i++) {\\n newAddresses[i] = A[i];\\n }\\n for (uint256 j = index + 1; j < length; j++) {\\n newAddresses[j - 1] = A[j];\\n }\\n return (newAddresses, A[index]);\\n }\\n\\n /**\\n * Returns the combination of the two arrays\\n * @param A The first array\\n * @param B The second array\\n * @return Returns A extended by B\\n */\\n function extend(address[] memory A, address[] memory B) internal pure returns (address[] memory) {\\n uint256 aLength = A.length;\\n uint256 bLength = B.length;\\n address[] memory newAddresses = new address[](aLength + bLength);\\n for (uint256 i = 0; i < aLength; i++) {\\n newAddresses[i] = A[i];\\n }\\n for (uint256 j = 0; j < bLength; j++) {\\n newAddresses[aLength + j] = B[j];\\n }\\n return newAddresses;\\n }\\n}\\n\",\"keccak256\":\"0x409127cd8cadb573e5de48fd992efbd8b0f1e243d235abc3c5f2fa873195c16a\",\"license\":\"Apache License\"},\"contracts/lib/BabylonErrors.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n// solhint-disable\\n\\n/**\\n * @notice Forked from https://github.com/balancer-labs/balancer-core-v2/blob/master/contracts/lib/helpers/BalancerErrors.sol\\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 // 'BAB#{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 \\\"BAB#\\\" part is a known constant\\n // (0x42414223): 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(0x42414223000000, 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 // Max deposit limit needs to be under the limit\\n uint256 internal constant MAX_DEPOSIT_LIMIT = 0;\\n // Creator needs to deposit\\n uint256 internal constant MIN_CONTRIBUTION = 1;\\n // Min Garden token supply >= 0\\n uint256 internal constant MIN_TOKEN_SUPPLY = 2;\\n // Deposit hardlock needs to be at least 1 block\\n uint256 internal constant DEPOSIT_HARDLOCK = 3;\\n // Needs to be at least the minimum\\n uint256 internal constant MIN_LIQUIDITY = 4;\\n // _reserveAssetQuantity is not equal to msg.value\\n uint256 internal constant MSG_VALUE_DO_NOT_MATCH = 5;\\n // Withdrawal amount has to be equal or less than msg.sender balance\\n uint256 internal constant MSG_SENDER_TOKENS_DO_NOT_MATCH = 6;\\n // Tokens are staked\\n uint256 internal constant TOKENS_STAKED = 7;\\n // Balance too low\\n uint256 internal constant BALANCE_TOO_LOW = 8;\\n // msg.sender doesn't have enough tokens\\n uint256 internal constant MSG_SENDER_TOKENS_TOO_LOW = 9;\\n // There is an open redemption window already\\n uint256 internal constant REDEMPTION_OPENED_ALREADY = 10;\\n // Cannot request twice in the same window\\n uint256 internal constant ALREADY_REQUESTED = 11;\\n // Rewards and profits already claimed\\n uint256 internal constant ALREADY_CLAIMED = 12;\\n // Value have to be greater than zero\\n uint256 internal constant GREATER_THAN_ZERO = 13;\\n // Must be reserve asset\\n uint256 internal constant MUST_BE_RESERVE_ASSET = 14;\\n // Only contributors allowed\\n uint256 internal constant ONLY_CONTRIBUTOR = 15;\\n // Only controller allowed\\n uint256 internal constant ONLY_CONTROLLER = 16;\\n // Only creator allowed\\n uint256 internal constant ONLY_CREATOR = 17;\\n // Only keeper allowed\\n uint256 internal constant ONLY_KEEPER = 18;\\n // Fee is too high\\n uint256 internal constant FEE_TOO_HIGH = 19;\\n // Only strategy allowed\\n uint256 internal constant ONLY_STRATEGY = 20;\\n // Only active allowed\\n uint256 internal constant ONLY_ACTIVE = 21;\\n // Only inactive allowed\\n uint256 internal constant ONLY_INACTIVE = 22;\\n // Address should be not zero address\\n uint256 internal constant ADDRESS_IS_ZERO = 23;\\n // Not within range\\n uint256 internal constant NOT_IN_RANGE = 24;\\n // Value is too low\\n uint256 internal constant VALUE_TOO_LOW = 25;\\n // Value is too high\\n uint256 internal constant VALUE_TOO_HIGH = 26;\\n // Only strategy or protocol allowed\\n uint256 internal constant ONLY_STRATEGY_OR_CONTROLLER = 27;\\n // Normal withdraw possible\\n uint256 internal constant NORMAL_WITHDRAWAL_POSSIBLE = 28;\\n // User does not have permissions to join garden\\n uint256 internal constant USER_CANNOT_JOIN = 29;\\n // User does not have permissions to add strategies in garden\\n uint256 internal constant USER_CANNOT_ADD_STRATEGIES = 30;\\n // Only Protocol or garden\\n uint256 internal constant ONLY_PROTOCOL_OR_GARDEN = 31;\\n // Only Strategist\\n uint256 internal constant ONLY_STRATEGIST = 32;\\n // Only Integration\\n uint256 internal constant ONLY_INTEGRATION = 33;\\n // Only garden and data not set\\n uint256 internal constant ONLY_GARDEN_AND_DATA_NOT_SET = 34;\\n // Only active garden\\n uint256 internal constant ONLY_ACTIVE_GARDEN = 35;\\n // Contract is not a garden\\n uint256 internal constant NOT_A_GARDEN = 36;\\n // Not enough tokens\\n uint256 internal constant STRATEGIST_TOKENS_TOO_LOW = 37;\\n // Stake is too low\\n uint256 internal constant STAKE_HAS_TO_AT_LEAST_ONE = 38;\\n // Duration must be in range\\n uint256 internal constant DURATION_MUST_BE_IN_RANGE = 39;\\n // Max Capital Requested\\n uint256 internal constant MAX_CAPITAL_REQUESTED = 41;\\n // Votes are already resolved\\n uint256 internal constant VOTES_ALREADY_RESOLVED = 42;\\n // Voting window is closed\\n uint256 internal constant VOTING_WINDOW_IS_OVER = 43;\\n // Strategy needs to be active\\n uint256 internal constant STRATEGY_NEEDS_TO_BE_ACTIVE = 44;\\n // Max capital reached\\n uint256 internal constant MAX_CAPITAL_REACHED = 45;\\n // Capital is less then rebalance\\n uint256 internal constant CAPITAL_IS_LESS_THAN_REBALANCE = 46;\\n // Strategy is in cooldown period\\n uint256 internal constant STRATEGY_IN_COOLDOWN = 47;\\n // Strategy is not executed\\n uint256 internal constant STRATEGY_IS_NOT_EXECUTED = 48;\\n // Strategy is not over yet\\n uint256 internal constant STRATEGY_IS_NOT_OVER_YET = 49;\\n // Strategy is already finalized\\n uint256 internal constant STRATEGY_IS_ALREADY_FINALIZED = 50;\\n // No capital to unwind\\n uint256 internal constant STRATEGY_NO_CAPITAL_TO_UNWIND = 51;\\n // Strategy needs to be inactive\\n uint256 internal constant STRATEGY_NEEDS_TO_BE_INACTIVE = 52;\\n // Duration needs to be less\\n uint256 internal constant DURATION_NEEDS_TO_BE_LESS = 53;\\n // Can't sweep reserve asset\\n uint256 internal constant CANNOT_SWEEP_RESERVE_ASSET = 54;\\n // Voting window is opened\\n uint256 internal constant VOTING_WINDOW_IS_OPENED = 55;\\n // Strategy is executed\\n uint256 internal constant STRATEGY_IS_EXECUTED = 56;\\n // Min Rebalance Capital\\n uint256 internal constant MIN_REBALANCE_CAPITAL = 57;\\n // Not a valid strategy NFT\\n uint256 internal constant NOT_STRATEGY_NFT = 58;\\n // Garden Transfers Disabled\\n uint256 internal constant GARDEN_TRANSFERS_DISABLED = 59;\\n // Tokens are hardlocked\\n uint256 internal constant TOKENS_HARDLOCKED = 60;\\n // Max contributors reached\\n uint256 internal constant MAX_CONTRIBUTORS = 61;\\n // BABL Transfers Disabled\\n uint256 internal constant BABL_TRANSFERS_DISABLED = 62;\\n // Strategy duration range error\\n uint256 internal constant DURATION_RANGE = 63;\\n // Checks the min amount of voters\\n uint256 internal constant MIN_VOTERS_CHECK = 64;\\n // Ge contributor power error\\n uint256 internal constant CONTRIBUTOR_POWER_CHECK_WINDOW = 65;\\n // Not enough reserve set aside\\n uint256 internal constant NOT_ENOUGH_RESERVE = 66;\\n // Garden is already public\\n uint256 internal constant GARDEN_ALREADY_PUBLIC = 67;\\n // Withdrawal with penalty\\n uint256 internal constant WITHDRAWAL_WITH_PENALTY = 68;\\n // Withdrawal with penalty\\n uint256 internal constant ONLY_MINING_ACTIVE = 69;\\n // Overflow in supply\\n uint256 internal constant OVERFLOW_IN_SUPPLY = 70;\\n // Overflow in power\\n uint256 internal constant OVERFLOW_IN_POWER = 71;\\n // Not a system contract\\n uint256 internal constant NOT_A_SYSTEM_CONTRACT = 72;\\n // Strategy vs Garden mismatch\\n uint256 internal constant STRATEGY_GARDEN_MISMATCH = 73;\\n // Minimum quarters is 1\\n uint256 internal constant QUARTERS_MIN_1 = 74;\\n // Too many strategy operations\\n uint256 internal constant TOO_MANY_OPS = 75;\\n // Only operations\\n uint256 internal constant ONLY_OPERATION = 76;\\n // Strat params wrong length\\n uint256 internal constant STRAT_PARAMS_LENGTH = 77;\\n // Garden params wrong length\\n uint256 internal constant GARDEN_PARAMS_LENGTH = 78;\\n // Token names too long\\n uint256 internal constant NAME_TOO_LONG = 79;\\n // Contributor power overflows over garden power\\n uint256 internal constant CONTRIBUTOR_POWER_OVERFLOW = 80;\\n // Contributor power window out of bounds\\n uint256 internal constant CONTRIBUTOR_POWER_CHECK_DEPOSITS = 81;\\n}\\n\",\"keccak256\":\"0x9c9c2ea9026fe9033762f7221e2d5a91ed6b5f64cc14558b89fbd975cfb2d7b7\",\"license\":\"Apache License\"},\"contracts/lib/Math.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n// Libraries\\nimport './SafeDecimalMath.sol';\\n\\n// https://docs.synthetix.io/contracts/source/libraries/math\\nlibrary Math {\\n using SafeMath for uint256;\\n using SafeDecimalMath for uint256;\\n\\n /**\\n * @dev Uses \\\"exponentiation by squaring\\\" algorithm where cost is 0(logN)\\n * vs 0(N) for naive repeated multiplication.\\n * Calculates x^n with x as fixed-point and n as regular unsigned int.\\n * Calculates to 18 digits of precision with SafeDecimalMath.unit()\\n */\\n function powDecimal(uint256 x, uint256 n) internal pure returns (uint256) {\\n // https://mpark.github.io/programming/2014/08/18/exponentiation-by-squaring/\\n\\n uint256 result = SafeDecimalMath.unit();\\n while (n > 0) {\\n if (n % 2 != 0) {\\n result = result.multiplyDecimal(x);\\n }\\n x = x.multiplyDecimal(x);\\n n /= 2;\\n }\\n return result;\\n }\\n\\n function abs(int256 x) internal pure returns (int256) {\\n return x >= 0 ? x : -x;\\n }\\n}\\n\",\"keccak256\":\"0xc2ff8055f98dd7253df98838d870391067d9c622a68f263c942616ca8122bd93\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"contracts/lib/SafeDecimalMath.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nlibrary SafeDecimalMath {\\n using SafeMath for uint256;\\n\\n /* Number of decimal places in the representations. */\\n uint8 public constant decimals = 18;\\n uint8 public constant highPrecisionDecimals = 27;\\n\\n /* The number representing 1.0. */\\n uint256 public constant UNIT = 10**uint256(decimals);\\n\\n /* The number representing 1.0 for higher fidelity numbers. */\\n uint256 public constant PRECISE_UNIT = 10**uint256(highPrecisionDecimals);\\n uint256 private constant UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR = 10**uint256(highPrecisionDecimals - decimals);\\n\\n /**\\n * @return Provides an interface to UNIT.\\n */\\n function unit() external pure returns (uint256) {\\n return UNIT;\\n }\\n\\n /**\\n * @return Provides an interface to PRECISE_UNIT.\\n */\\n function preciseUnit() external pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @return The result of multiplying x and y, interpreting the operands as fixed-point\\n * decimals.\\n *\\n * @dev A unit factor is divided out after the product of x and y is evaluated,\\n * so that product must be less than 2**256. As this is an integer division,\\n * the internal division always rounds down. This helps save on gas. Rounding\\n * is more expensive on gas.\\n */\\n function multiplyDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\\n /* Divide by UNIT to remove the extra factor introduced by the product. */\\n return x.mul(y) / UNIT;\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of the specified precision unit.\\n *\\n * @dev The operands should be in the form of a the specified unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function _multiplyDecimalRound(\\n uint256 x,\\n uint256 y,\\n uint256 precisionUnit\\n ) private pure returns (uint256) {\\n /* Divide by UNIT to remove the extra factor introduced by the product. */\\n uint256 quotientTimesTen = x.mul(y) / (precisionUnit / 10);\\n\\n if (quotientTimesTen % 10 >= 5) {\\n quotientTimesTen += 10;\\n }\\n\\n return quotientTimesTen / 10;\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of a precise unit.\\n *\\n * @dev The operands should be in the precise unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function multiplyDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _multiplyDecimalRound(x, y, PRECISE_UNIT);\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of a standard unit.\\n *\\n * @dev The operands should be in the standard unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function multiplyDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _multiplyDecimalRound(x, y, UNIT);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is a high\\n * precision decimal.\\n *\\n * @dev y is divided after the product of x and the standard precision unit\\n * is evaluated, so the product of x and UNIT must be less than 2**256. As\\n * this is an integer division, the result is always rounded down.\\n * This helps save on gas. Rounding is more expensive on gas.\\n */\\n function divideDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\\n /* Reintroduce the UNIT factor that will be divided out by y. */\\n return x.mul(UNIT).div(y);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * decimal in the precision unit specified in the parameter.\\n *\\n * @dev y is divided after the product of x and the specified precision unit\\n * is evaluated, so the product of x and the specified precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function _divideDecimalRound(\\n uint256 x,\\n uint256 y,\\n uint256 precisionUnit\\n ) private pure returns (uint256) {\\n uint256 resultTimesTen = x.mul(precisionUnit * 10).div(y);\\n\\n if (resultTimesTen % 10 >= 5) {\\n resultTimesTen += 10;\\n }\\n\\n return resultTimesTen / 10;\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * standard precision decimal.\\n *\\n * @dev y is divided after the product of x and the standard precision unit\\n * is evaluated, so the product of x and the standard precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function divideDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _divideDecimalRound(x, y, UNIT);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * high precision decimal.\\n *\\n * @dev y is divided after the product of x and the high precision unit\\n * is evaluated, so the product of x and the high precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function divideDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _divideDecimalRound(x, y, PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Convert a standard decimal representation to a high precision one.\\n */\\n function decimalToPreciseDecimal(uint256 i) internal pure returns (uint256) {\\n return i.mul(UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR);\\n }\\n\\n /**\\n * @dev Convert a high precision decimal to a standard decimal representation.\\n */\\n function preciseDecimalToDecimal(uint256 i) internal pure returns (uint256) {\\n uint256 quotientTimesTen = i / (UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR / 10);\\n\\n if (quotientTimesTen % 10 >= 5) {\\n quotientTimesTen += 10;\\n }\\n\\n return quotientTimesTen / 10;\\n }\\n}\\n\",\"keccak256\":\"0x1372be4fa0c5813417396f128f5aa45da1cd7679e2d247a8e17d1ba5f0141253\",\"license\":\"Apache License\"},\"contracts/strategies/Strategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\nimport {Initializable} from '@openzeppelin/contracts-upgradeable/proxy/Initializable.sol';\\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\n\\nimport {Errors, _require} from '../lib/BabylonErrors.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\nimport {SafeDecimalMath} from '../lib/SafeDecimalMath.sol';\\nimport {Math} from '../lib/Math.sol';\\nimport {AddressArrayUtils} from '../lib/AddressArrayUtils.sol';\\n\\nimport {IWETH} from '../interfaces/external/weth/IWETH.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {ITradeIntegration} from '../interfaces/ITradeIntegration.sol';\\nimport {IOperation} from '../interfaces/IOperation.sol';\\nimport {IIntegration} from '../interfaces/IIntegration.sol';\\nimport {IPriceOracle} from '../interfaces/IPriceOracle.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {IStrategyNFT} from '../interfaces/IStrategyNFT.sol';\\nimport {IRewardsDistributor} from '../interfaces/IRewardsDistributor.sol';\\n\\n/**\\n * @title Strategy\\n * @author Babylon Finance\\n *\\n * Base Strategy contract. Belongs to a garden. Abstract.\\n * Will be extended from specific strategy contracts.\\n */\\ncontract Strategy is ReentrancyGuard, IStrategy, Initializable {\\n using SignedSafeMath for int256;\\n using SafeMath for uint256;\\n using SafeCast for uint256;\\n using SafeCast for int256;\\n using PreciseUnitMath for int256;\\n using PreciseUnitMath for uint256;\\n using SafeDecimalMath for int256;\\n using SafeDecimalMath for uint256;\\n using Math for int256;\\n using Math for uint256;\\n using AddressArrayUtils for address[];\\n using Address for address;\\n using SafeERC20 for IERC20;\\n\\n /* ============ Events ============ */\\n event Invoked(address indexed _target, uint256 indexed _value, bytes _data, bytes _returnValue);\\n event StrategyVoted(address indexed _garden, uint256 _absoluteVotes, int256 _totalVotes, uint256 _timestamp);\\n event StrategyExecuted(address indexed _garden, uint256 _capital, uint256 _fee, uint256 timestamp);\\n event StrategyFinalized(address indexed _garden, uint256 _capitalReturned, uint256 _fee, uint256 timestamp);\\n event StrategyReduced(address indexed _garden, uint256 _amountReduced, uint256 timestamp);\\n event StrategyExpired(address indexed _garden, uint256 _timestamp);\\n event StrategyDeleted(address indexed _garden, uint256 _timestamp);\\n event StrategyDurationChanged(uint256 _newDuration, uint256 _oldDuration);\\n\\n /* ============ Modifiers ============ */\\n /**\\n * Throws if the sender is not the creator of the strategy\\n */\\n modifier onlyGovernorOrGarden {\\n _require(\\n (msg.sender == address(garden) && IBabController(controller).isSystemContract(address(garden))) ||\\n msg.sender == controller.owner(),\\n Errors.ONLY_PROTOCOL_OR_GARDEN\\n );\\n _;\\n }\\n\\n modifier onlyStrategist {\\n _require(msg.sender == strategist, Errors.ONLY_STRATEGIST);\\n _;\\n }\\n\\n modifier onlyContributor {\\n _require(\\n IERC20(address(garden)).balanceOf(msg.sender) > 0 &&\\n IBabController(controller).isSystemContract(address(garden)),\\n Errors.ONLY_CONTRIBUTOR\\n );\\n _;\\n }\\n\\n /**\\n * Throws if the sender is not a Garden's integration or integration not enabled\\n */\\n modifier onlyIntegration() {\\n // Internal function used to reduce bytecode size\\n _require(\\n controller.isValidIntegration(IIntegration(msg.sender).getName(), msg.sender),\\n Errors.ONLY_INTEGRATION\\n );\\n _;\\n }\\n\\n /**\\n * Throws if the sender is not a Garden's integration or integration not enabled\\n */\\n modifier onlyOperation() {\\n bool found = false;\\n for (uint8 i = 0; i < opTypes.length; i++) {\\n found = found || msg.sender == controller.enabledOperations(opTypes[i]);\\n }\\n // Internal function used to reduce bytecode size\\n _require(found, Errors.ONLY_OPERATION);\\n _;\\n }\\n\\n /**\\n * Throws if the garden is not the caller or data is already set\\n */\\n modifier onlyGardenAndNotSet() {\\n _require(\\n msg.sender == address(garden) && !dataSet && IBabController(controller).isSystemContract(address(garden)),\\n Errors.ONLY_GARDEN_AND_DATA_NOT_SET\\n );\\n _;\\n }\\n\\n /**\\n * Throws if the garden is not active\\n */\\n modifier onlyActiveGarden() {\\n _require(\\n garden.active() == true && IBabController(controller).isSystemContract(address(garden)),\\n Errors.ONLY_ACTIVE_GARDEN\\n );\\n _;\\n }\\n\\n /**\\n * Throws if the sender is not a keeper in the protocol\\n * @param _fee The fee paid to keeper to compensate the gas cost\\n */\\n modifier onlyKeeper(uint256 _fee) {\\n _require(controller.isValidKeeper(msg.sender), Errors.ONLY_KEEPER);\\n // We assume that calling keeper functions should be less expensive than 1 million gas and the gas price should be lower than 1000 gwei.\\n _require(_fee <= MAX_KEEPER_FEE, Errors.FEE_TOO_HIGH);\\n _;\\n }\\n\\n /* ============ Constants ============ */\\n\\n uint256 internal constant SLIPPAGE_ALLOWED = 5e16; // 1%\\n uint256 internal constant HUNDRED_PERCENT = 1e18; // 100%\\n uint256 internal constant MAX_CANDIDATE_PERIOD = 7 days;\\n uint256 internal constant MIN_VOTERS_TO_BECOME_ACTIVE = 2;\\n uint256 internal constant ABSOLUTE_MIN_REBALANCE = 1e18;\\n address private constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\\n\\n // Max Operations\\n uint256 internal constant MAX_OPERATIONS = 6;\\n\\n // Keeper max fee\\n uint256 internal constant MAX_KEEPER_FEE = (1e6 * 1e3 gwei);\\n\\n // Quadratic penalty for looses\\n uint256 internal constant STAKE_QUADRATIC_PENALTY_FOR_LOSSES = 175e16; // 1.75e18\\n\\n /* ============ Structs ============ */\\n\\n /* ============ State Variables ============ */\\n\\n // Babylon Controller Address\\n IBabController public controller;\\n\\n // Type of operation.\\n // 0 = BuyOperation\\n // 1 = LiquidityOperation\\n // 2 = VaultOperation\\n // 3 = LendOperation\\n\\n // Asset Status\\n // 0 = Liquid\\n // 1 = Put as collateral\\n // 2 = Borrowed\\n // 3 = staked\\n\\n // Types and data for the operations of this strategy\\n uint8[] public override opTypes;\\n address[] public override opIntegrations;\\n address[] public override opDatas;\\n\\n // Garden that these strategies belong to\\n IGarden public override garden;\\n\\n address public override strategist; // Address of the strategist that submitted the bet\\n\\n uint256 public override enteredAt; // Timestamp when the strategy was submitted\\n uint256 public override enteredCooldownAt; // Timestamp when the strategy reached quorum\\n uint256 public override executedAt; // Timestamp when the strategy was executed\\n uint256 public override updatedAt; // Timestamp of last capital allocation update\\n uint256 public override exitedAt; // Timestamp when the strategy was submitted\\n\\n address[] public voters; // Addresses with the voters\\n int256 public override totalVotes; // Total votes staked\\n uint256 public override absoluteTotalVotes; // Absolute number of votes staked\\n uint256 public override totalPositiveVotes; // Total positive votes endorsing the strategy execution\\n uint256 public override totalNegativeVotes; // Total negative votes against the strategy execution\\n bool public override finalized; // Flag that indicates whether we exited the strategy\\n bool public override active; // Whether the strategy has met the voting quorum\\n bool public dataSet;\\n\\n uint256 public override duration; // Duration of the bet\\n uint256 public override stake; // Amount of stake by the strategist (in reserve asset) needs to be positive\\n uint256 public override maxCapitalRequested; // Amount of max capital to allocate\\n uint256 public override capitalAllocated; // Current amount of capital allocated\\n uint256 public override expectedReturn; // Expect return by this strategy\\n uint256 public override capitalReturned; // Actual return by this strategy\\n uint256 public override minRebalanceCapital; // Min amount of capital so that it is worth to rebalance the capital here\\n address[] public tokensNeeded; // Positions that need to be taken prior to enter the strategy\\n uint256[] public tokenAmountsNeeded; // Amount of these positions\\n\\n uint256 public override strategyRewards; // Rewards allocated for this strategy updated on finalized\\n uint256 public override rewardsTotalOverhead; // Potential extra amount we are giving in BABL rewards\\n\\n // Voters mapped to their votes.\\n mapping(address => int256) public votes;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Initializes the strategy for a garden\\n *\\n * @param _strategist Address of the strategist\\n * @param _garden Address of the garden\\n * @param _controller Address of the controller\\n * @param _maxCapitalRequested Max Capital requested denominated in the reserve asset (0 to be unlimited)\\n * @param _stake Stake with garden participations absolute amounts 1e18\\n * @param _strategyDuration Strategy duration in seconds\\n * @param _expectedReturn Expected return\\n * @param _minRebalanceCapital Min capital that makes executing the strategy worth it\\n */\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital\\n ) external override initializer {\\n controller = IBabController(_controller);\\n\\n _require(controller.isSystemContract(_garden), Errors.NOT_A_GARDEN);\\n garden = IGarden(_garden);\\n uint256 strategistUnlockedBalance =\\n IERC20(address(garden)).balanceOf(_strategist).sub(garden.getLockedBalance(_strategist));\\n _require(IERC20(address(garden)).balanceOf(_strategist) > 0, Errors.STRATEGIST_TOKENS_TOO_LOW);\\n _require(strategistUnlockedBalance >= _stake, Errors.TOKENS_STAKED);\\n // TODO: adjust this calc\\n _require(_stake > 0, Errors.STAKE_HAS_TO_AT_LEAST_ONE);\\n _require(\\n _strategyDuration >= garden.minStrategyDuration() && _strategyDuration <= garden.maxStrategyDuration(),\\n Errors.DURATION_MUST_BE_IN_RANGE\\n );\\n _require(_minRebalanceCapital >= ABSOLUTE_MIN_REBALANCE, Errors.MIN_REBALANCE_CAPITAL);\\n _require(_maxCapitalRequested >= _minRebalanceCapital, Errors.MAX_CAPITAL_REQUESTED);\\n\\n strategist = _strategist;\\n enteredAt = block.timestamp;\\n stake = _stake;\\n duration = _strategyDuration;\\n expectedReturn = _expectedReturn;\\n capitalAllocated = 0;\\n minRebalanceCapital = _minRebalanceCapital;\\n maxCapitalRequested = _maxCapitalRequested;\\n totalVotes = _stake.toInt256();\\n votes[_strategist] = _stake.toInt256();\\n absoluteTotalVotes = _stake;\\n dataSet = false;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Sets the data for the operations of this strategy\\n * @param _opTypes An array with the op types\\n * @param _opIntegrations Addresses with the integration for each op\\n * @param _opDatas Bytes with the params for the op in the same position in the opTypes array\\n */\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external override onlyGardenAndNotSet {\\n _require(\\n (_opTypes.length == _opIntegrations.length) && (_opIntegrations.length == _opDatas.length),\\n Errors.TOO_MANY_OPS\\n );\\n _require(_opDatas.length < MAX_OPERATIONS && _opDatas.length > 0, Errors.TOO_MANY_OPS);\\n for (uint256 i = 0; i < _opTypes.length; i++) {\\n IOperation(controller.enabledOperations(_opTypes[i])).validateOperation(\\n _opDatas[i],\\n garden,\\n _opIntegrations[i],\\n i\\n );\\n _require(\\n controller.isValidIntegration(IIntegration(_opIntegrations[i]).getName(), _opIntegrations[i]),\\n Errors.ONLY_INTEGRATION\\n );\\n }\\n\\n opTypes = _opTypes;\\n opIntegrations = _opIntegrations;\\n opDatas = _opDatas;\\n dataSet = true;\\n }\\n\\n /**\\n * Adds off-chain voting results on-chain.\\n * @param _voters An array of garden member who voted on strategy.\\n * @param _votes An array of votes by on strategy by garden members.\\n * Votes can be positive or negative.\\n * @param _absoluteTotalVotes Absolute number of votes. _absoluteTotalVotes = abs(upvotes) + abs(downvotes).\\n * @param _totalVotes Total number of votes. _totalVotes = upvotes + downvotes.\\n * @param _fee The fee paid to keeper to compensate the gas cost\\n */\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 _fee\\n ) external override onlyKeeper(_fee) onlyActiveGarden {\\n _require(\\n _voters.length >= (garden.totalContributors() == 1 ? 1 : MIN_VOTERS_TO_BECOME_ACTIVE),\\n Errors.MIN_VOTERS_CHECK\\n );\\n _require(!active && !finalized, Errors.VOTES_ALREADY_RESOLVED);\\n _require(block.timestamp.sub(enteredAt) <= MAX_CANDIDATE_PERIOD, Errors.VOTING_WINDOW_IS_OVER);\\n active = true;\\n\\n // Set votes data\\n for (uint256 i = 0; i < _voters.length; i++) {\\n votes[_voters[i]] = _votes[i];\\n }\\n totalPositiveVotes = _absoluteTotalVotes.toInt256().add(_totalVotes).div(2).toUint256();\\n totalNegativeVotes = _absoluteTotalVotes.toInt256().sub(_totalVotes).div(2).toUint256();\\n voters = _voters;\\n absoluteTotalVotes = absoluteTotalVotes + _absoluteTotalVotes;\\n totalVotes = totalVotes + _totalVotes;\\n\\n // Initializes cooldown\\n enteredCooldownAt = block.timestamp;\\n emit StrategyVoted(address(garden), _absoluteTotalVotes, _totalVotes, block.timestamp);\\n garden.payKeeper(msg.sender, _fee);\\n }\\n\\n /**\\n * Executes an strategy that has been activated and gone through the cooldown period.\\n * Keeper will validate that quorum is reached, cacluates all the voting data and push it.\\n * @param _capital The capital to allocate to this strategy.\\n * @param _fee The fee paid to keeper to compensate the gas cost.\\n */\\n function executeStrategy(uint256 _capital, uint256 _fee)\\n external\\n override\\n onlyKeeper(_fee)\\n nonReentrant\\n onlyActiveGarden\\n {\\n _require(active, Errors.STRATEGY_NEEDS_TO_BE_ACTIVE);\\n _require(capitalAllocated.add(_capital) <= maxCapitalRequested, Errors.MAX_CAPITAL_REACHED);\\n _require(_capital >= minRebalanceCapital, Errors.CAPITAL_IS_LESS_THAN_REBALANCE);\\n _require(\\n block.timestamp.sub(enteredCooldownAt) >= garden.strategyCooldownPeriod(),\\n Errors.STRATEGY_IN_COOLDOWN\\n );\\n\\n // Execute enter operation\\n garden.allocateCapitalToStrategy(_capital);\\n capitalAllocated = capitalAllocated.add(_capital);\\n _enterStrategy(_capital);\\n\\n // Add to Rewards Distributor an update of the Protocol Principal for BABL Mining Rewards calculations\\n IRewardsDistributor rewardsDistributor = IRewardsDistributor(IBabController(controller).rewardsDistributor());\\n // Sets the executed timestamp on first execution\\n if (executedAt == 0) {\\n executedAt = block.timestamp;\\n } else {\\n // Updating allocation - we need to consider the difference for the calculation\\n // We control the potential overhead in BABL Rewards calculations to keep control\\n // and avoid distributing a wrong number (e.g. flash loans)\\n if (_hasMiningStarted()) {\\n // The Mining program has not started on time for this strategy\\n rewardsTotalOverhead = rewardsTotalOverhead.add(_capital.mul(block.timestamp.sub(updatedAt)));\\n }\\n }\\n if (_hasMiningStarted()) {\\n // The Mining program has not started on time for this strategy\\n rewardsDistributor.addProtocolPrincipal(_capital);\\n }\\n garden.payKeeper(msg.sender, _fee);\\n updatedAt = block.timestamp;\\n emit StrategyExecuted(address(garden), _capital, _fee, block.timestamp);\\n }\\n\\n /**\\n * Exits from an executed strategy.\\n * Returns balance back to the garden and sets the capital aside for withdrawals in ETH.\\n * Pays the keeper.\\n * Updates the reserve asset position accordingly.\\n * @param _fee The fee paid to keeper to compensate the gas cost\\n * @param _tokenURI URL with the JSON for the strategy\\n */\\n function finalizeStrategy(uint256 _fee, string memory _tokenURI)\\n external\\n override\\n onlyKeeper(_fee)\\n nonReentrant\\n onlyActiveGarden\\n {\\n _require(executedAt > 0, Errors.STRATEGY_IS_NOT_EXECUTED);\\n _require(block.timestamp > executedAt.add(duration), Errors.STRATEGY_IS_NOT_OVER_YET);\\n _require(!finalized, Errors.STRATEGY_IS_ALREADY_FINALIZED);\\n // Execute exit operations\\n _exitStrategy(HUNDRED_PERCENT);\\n // Mark as finalized\\n finalized = true;\\n active = false;\\n exitedAt = block.timestamp;\\n updatedAt = exitedAt;\\n // Mint NFT\\n IStrategyNFT(IBabController(controller).strategyNFT()).grantStrategyNFT(strategist, _tokenURI);\\n // Pay Keeper Fee\\n garden.payKeeper(msg.sender, _fee);\\n // Transfer rewards\\n _transferStrategyPrincipal(_fee);\\n // Send rest to garden if any\\n _sendReserveAssetToGarden();\\n emit StrategyFinalized(address(garden), capitalReturned, _fee, block.timestamp);\\n }\\n\\n /**\\n * Partially unwinds an strategy.\\n * Triggered from an immediate withdraw in the Garden.\\n * @param _amountToUnwind The amount of capital to unwind\\n */\\n function unwindStrategy(uint256 _amountToUnwind) external override onlyGovernorOrGarden nonReentrant {\\n _require(active && !finalized, Errors.STRATEGY_NEEDS_TO_BE_ACTIVE);\\n _require(_amountToUnwind <= capitalAllocated.sub(minRebalanceCapital), Errors.STRATEGY_NO_CAPITAL_TO_UNWIND);\\n // Exits and enters the strategy\\n _exitStrategy(_amountToUnwind.preciseDiv(capitalAllocated));\\n updatedAt = block.timestamp;\\n capitalAllocated = capitalAllocated.sub(_amountToUnwind);\\n // Removes protocol principal for the calculation of rewards\\n IRewardsDistributor rewardsDistributor = IRewardsDistributor(IBabController(controller).rewardsDistributor());\\n if (_hasMiningStarted()) {\\n // Only if the Mining program started on time for this strategy\\n rewardsDistributor.substractProtocolPrincipal(_amountToUnwind);\\n }\\n // Send the amount back to the warden for the immediate withdrawal\\n // TODO: Transfer the precise value; not entire balance\\n IERC20(garden.reserveAsset()).safeTransfer(\\n address(garden),\\n IERC20(garden.reserveAsset()).balanceOf(address(this))\\n );\\n emit StrategyReduced(address(garden), _amountToUnwind, block.timestamp);\\n }\\n\\n /**\\n * Expires a candidate that has spent more than CANDIDATE_PERIOD without\\n * reaching quorum\\n * @param _fee The keeper fee\\n */\\n function expireStrategy(uint256 _fee) external onlyKeeper(_fee) nonReentrant onlyActiveGarden {\\n _require(!active, Errors.STRATEGY_NEEDS_TO_BE_INACTIVE);\\n _require(block.timestamp.sub(enteredAt) > MAX_CANDIDATE_PERIOD, Errors.VOTING_WINDOW_IS_OPENED);\\n // pay keeper before expiring strategy\\n garden.payKeeper(msg.sender, _fee);\\n _deleteCandidateStrategy();\\n emit StrategyExpired(address(garden), block.timestamp);\\n }\\n\\n /**\\n * Delete a candidate strategy by the strategist\\n */\\n function deleteCandidateStrategy() external onlyStrategist {\\n _deleteCandidateStrategy();\\n emit StrategyDeleted(address(garden), block.timestamp);\\n }\\n\\n /**\\n * Lets the strategist change the duration of the strategy\\n * @param _newDuration New duration of the strategy\\n */\\n function changeStrategyDuration(uint256 _newDuration) external override onlyStrategist {\\n _require(!finalized, Errors.STRATEGY_IS_ALREADY_FINALIZED);\\n _require(_newDuration < duration, Errors.DURATION_NEEDS_TO_BE_LESS);\\n _require(_newDuration >= garden.minStrategyDuration(), Errors.DURATION_NEEDS_TO_BE_LESS);\\n emit StrategyDurationChanged(_newDuration, duration);\\n duration = _newDuration;\\n }\\n\\n /**\\n * Any tokens (other than the target) that are sent here by mistake are recoverable by contributors\\n * Converts it to the reserve asset and sends it to the garden.\\n * @param _token Address of the token to sweep\\n */\\n function sweep(address _token) external onlyContributor {\\n _require(_token != garden.reserveAsset(), Errors.CANNOT_SWEEP_RESERVE_ASSET);\\n _require(!active, Errors.STRATEGY_NEEDS_TO_BE_INACTIVE);\\n\\n uint256 balance = IERC20(_token).balanceOf(address(this));\\n _require(balance > 0, Errors.BALANCE_TOO_LOW);\\n\\n _trade(_token, balance, garden.reserveAsset());\\n // Send reserve asset to garden\\n _sendReserveAssetToGarden();\\n }\\n\\n /**\\n * Helper to invoke Approve on ERC20 from integrations in the strategy context\\n */\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external override onlyIntegration {\\n IERC20(_asset).approve(_spender, _quantity);\\n }\\n\\n /**\\n * Helper to invoke a call to an external contract from integrations in the strategy context\\n * @param _target Address of the smart contract to call\\n * @param _value Quantity of Ether to provide the call (typically 0)\\n * @param _data Encoded function selector and arguments\\n * @return _returnValue Bytes encoded return value\\n */\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external override onlyIntegration returns (bytes memory) {\\n return _invoke(_target, _value, _data);\\n }\\n\\n /**\\n * Function that calculates the price using the oracle and executes a trade.\\n * Must call the exchange to get the price and pass minReceiveQuantity accordingly.\\n * @param _sendToken Token to exchange\\n * @param _sendQuantity Amount of tokens to send\\n * @param _receiveToken Token to receive\\n */\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external override onlyOperation returns (uint256) {\\n return _trade(_sendToken, _sendQuantity, _receiveToken);\\n }\\n\\n /**\\n * Deposits or withdraws weth from an operation in this context\\n * @param _isDeposit Wether is a deposit or withdraw\\n * @param _wethAmount Amount to deposit or withdraw\\n */\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external override onlyOperation {\\n if (_isDeposit) {\\n IWETH(WETH).deposit{value: _wethAmount}();\\n return;\\n }\\n IWETH(WETH).withdraw(_wethAmount);\\n }\\n\\n /* ============ External Getter Functions ============ */\\n\\n /**\\n * Returns whether this strategy is currently active or not\\n */\\n function isStrategyActive() public view override returns (bool) {\\n return executedAt > 0 && exitedAt == 0;\\n }\\n\\n /**\\n * Returns the number of operations in this strategy\\n */\\n function getOperationsCount() external view override returns (uint256) {\\n return opTypes.length;\\n }\\n\\n /**\\n * Get the non-state related details of a Strategy\\n *\\n */\\n function getStrategyDetails()\\n external\\n view\\n override\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n address,\\n uint256\\n )\\n {\\n return (\\n address(this),\\n strategist,\\n opIntegrations.length,\\n stake,\\n absoluteTotalVotes,\\n totalVotes,\\n capitalAllocated,\\n capitalReturned,\\n duration,\\n expectedReturn,\\n maxCapitalRequested,\\n minRebalanceCapital,\\n IBabController(controller).strategyNFT(),\\n enteredAt\\n );\\n }\\n\\n /**\\n * Get the state of a Strategy\\n *\\n */\\n function getStrategyState()\\n external\\n view\\n override\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n )\\n {\\n return (address(this), active, dataSet, finalized, executedAt, exitedAt, updatedAt);\\n }\\n\\n /**\\n * Get the operation params by index\\n *\\n */\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n override\\n returns (\\n uint8,\\n address,\\n address\\n )\\n {\\n return (opTypes[_index], opIntegrations[_index], opDatas[_index]);\\n }\\n\\n /**\\n * Gets the NAV of assets under management.\\n * It is the sum of the NAV of all the operations\\n *\\n * @return _nav NAV of the strategy\\n */\\n function getNAV() public view override returns (uint256) {\\n uint256 nav = 0;\\n for (uint256 i = 0; i < opTypes.length; i++) {\\n IOperation operation = IOperation(IBabController(controller).enabledOperations(uint256(opTypes[i])));\\n nav = nav.add(operation.getNAV(opDatas[i], garden, opIntegrations[i]));\\n }\\n return nav;\\n }\\n\\n /**\\n * Gets the votes casted by the contributor in this strategy\\n *\\n * @param _address Address of the contributor\\n * @return _votes Number of votes cast\\n */\\n function getUserVotes(address _address) external view override returns (int256) {\\n return votes[_address];\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Enters the strategy.\\n * Executes all the operations in order\\n * @param _capital Amount of capital that the strategy receives\\n */\\n function _enterStrategy(uint256 _capital) internal {\\n uint256 capitalForNexOperation = _capital;\\n address assetAccumulated = garden.reserveAsset();\\n uint8 assetStatus = 0; // liquid\\n for (uint256 i = 0; i < opTypes.length; i++) {\\n IOperation operation = IOperation(IBabController(controller).enabledOperations(opTypes[i]));\\n (assetAccumulated, capitalForNexOperation, assetStatus) = operation.executeOperation(\\n assetAccumulated,\\n capitalForNexOperation,\\n assetStatus,\\n opDatas[i],\\n garden,\\n opIntegrations[i]\\n );\\n }\\n }\\n\\n /**\\n * Exits the strategy.\\n * Exists all the operations starting by the end.\\n * @param _percentage of capital to exit from the strategy\\n */\\n function _exitStrategy(uint256 _percentage) internal {\\n for (uint256 i = opTypes.length; i > 0; i--) {\\n IOperation operation = IOperation(IBabController(controller).enabledOperations(opTypes[i - 1]));\\n operation.exitOperation(_percentage, opDatas[i - 1], garden, opIntegrations[i - 1]);\\n }\\n }\\n\\n /**\\n * Deletes this strategy and returns the stake to the strategist\\n */\\n function _deleteCandidateStrategy() internal {\\n _require(executedAt == 0, Errors.STRATEGY_IS_EXECUTED);\\n _require(!finalized, Errors.STRATEGY_IS_ALREADY_FINALIZED);\\n\\n IGarden(garden).expireCandidateStrategy(address(this));\\n // TODO: Call selfdestruct??\\n }\\n\\n /**\\n * Low level function that allows an integration to make an arbitrary function\\n * call to any contract from the garden (garden as msg.sender).\\n *\\n * @param _target Address of the smart contract to call\\n * @param _value Quantity of Ether to provide the call (typically 0)\\n * @param _data Encoded function selector and arguments\\n * @return _returnValue Bytes encoded return value\\n */\\n function _invoke(\\n address _target,\\n uint256 _value,\\n bytes memory _data\\n ) internal returns (bytes memory _returnValue) {\\n _returnValue = _target.functionCallWithValue(_data, _value);\\n emit Invoked(_target, _value, _data, _returnValue);\\n return _returnValue;\\n }\\n\\n function _sendReserveAssetToGarden() private {\\n uint256 remainingReserve = IERC20(garden.reserveAsset()).balanceOf(address(this));\\n // Sends the rest back if any\\n IERC20(garden.reserveAsset()).safeTransfer(address(garden), remainingReserve);\\n }\\n\\n /**\\n * Function that calculates the price using the oracle and executes a trade.\\n * Must call the exchange to get the price and pass minReceiveQuantity accordingly.\\n * @param _sendToken Token to exchange\\n * @param _sendQuantity Amount of tokens to send\\n * @param _receiveToken Token to receive\\n */\\n function _trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) internal returns (uint256) {\\n address tradeIntegration = IBabController(controller).defaultTradeIntegration();\\n // Uses on chain oracle for all internal strategy operations to avoid attacks // Updates UniSwap TWAP\\n IPriceOracle oracle = IPriceOracle(IBabController(controller).priceOracle());\\n uint256 pricePerTokenUnit = oracle.getPrice(_sendToken, _receiveToken);\\n uint256 exactAmount = _sendQuantity.preciseMul(pricePerTokenUnit);\\n uint256 minAmountExpected = exactAmount.sub(exactAmount.preciseMul(SLIPPAGE_ALLOWED));\\n ITradeIntegration(tradeIntegration).trade(\\n address(this),\\n _sendToken,\\n _sendQuantity,\\n _receiveToken,\\n minAmountExpected\\n );\\n return minAmountExpected;\\n }\\n\\n function _transferStrategyPrincipal(uint256 _fee) internal {\\n capitalReturned = IERC20(garden.reserveAsset()).balanceOf(address(this)).sub(_fee);\\n address reserveAsset = garden.reserveAsset();\\n int256 reserveAssetDelta = capitalReturned.toInt256().sub(capitalAllocated.toInt256());\\n uint256 protocolProfits = 0;\\n // Strategy returns were positive\\n uint256 profits = capitalReturned > capitalAllocated ? capitalReturned.sub(capitalAllocated) : 0; // in reserve asset (weth)\\n if (capitalReturned >= capitalAllocated) {\\n // Send weth performance fee to the protocol\\n protocolProfits = IBabController(controller).protocolPerformanceFee().preciseMul(profits);\\n IERC20(reserveAsset).safeTransferFrom(\\n address(this),\\n IBabController(controller).treasury(),\\n protocolProfits\\n );\\n reserveAssetDelta = reserveAssetDelta.add(int256(-protocolProfits));\\n } else {\\n // Returns were negative\\n // Burn strategist stake and add the amount to the garden\\n uint256 burningAmount =\\n (stake.sub(capitalReturned.preciseDiv(capitalAllocated).preciseMul(stake))).multiplyDecimal(\\n STAKE_QUADRATIC_PENALTY_FOR_LOSSES\\n );\\n if (IERC20(address(garden)).balanceOf(strategist) < burningAmount) {\\n // Avoid underflow burning more than its balance\\n burningAmount = IERC20(address(garden)).balanceOf(strategist);\\n }\\n\\n garden.burnStrategistStake(strategist, burningAmount);\\n reserveAssetDelta = reserveAssetDelta.add(int256(burningAmount));\\n }\\n // Return the balance back to the garden\\n IERC20(reserveAsset).safeTransferFrom(address(this), address(garden), capitalReturned.sub(protocolProfits));\\n // Start a redemption window in the garden with the capital plus the profits for the lps\\n (, , uint256 lpsProfitSharing) = IBabController(controller).getProfitSharing();\\n garden.startWithdrawalWindow(\\n capitalReturned.sub(profits).add((profits).preciseMul(lpsProfitSharing)),\\n profits.sub(profits.preciseMul(lpsProfitSharing)).sub(protocolProfits),\\n reserveAssetDelta,\\n address(this)\\n );\\n IRewardsDistributor rewardsDistributor = IRewardsDistributor(IBabController(controller).rewardsDistributor());\\n // Substract the Principal in the Rewards Distributor to update the Protocol power value\\n if (_hasMiningStarted()) {\\n // Only if the Mining program started on time for this strategy\\n rewardsDistributor.substractProtocolPrincipal(capitalAllocated);\\n }\\n strategyRewards = rewardsDistributor.getStrategyRewards(address(this)); // Must be zero in case the mining program didnt started on time\\n }\\n\\n function _getPrice(address _assetOne, address _assetTwo) internal view returns (uint256) {\\n IPriceOracle oracle = IPriceOracle(IBabController(controller).priceOracle());\\n return oracle.getPrice(_assetOne, _assetTwo);\\n }\\n\\n function _hasMiningStarted() internal view returns (bool) {\\n IRewardsDistributor rewardsDistributor = IRewardsDistributor(IBabController(controller).rewardsDistributor());\\n uint256 rewardsStartTime = rewardsDistributor.START_TIME();\\n bool miningStarted = ((enteredAt > rewardsStartTime) && (rewardsStartTime != 0));\\n return miningStarted;\\n }\\n\\n // solhint-disable-next-line\\n receive() external payable {}\\n}\\n\",\"keccak256\":\"0x8804a0cdeb415a44b74928f9bb9dff2e5cbb4a007733b4ae1874c81233345f0c\",\"license\":\"Apache License\"},\"contracts/strategies/StrategyFactory.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {Clones} from '@openzeppelin/contracts/proxy/Clones.sol';\\n\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {IStrategyNFT} from '../interfaces/IStrategyNFT.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IStrategyFactory} from '../interfaces/IStrategyFactory.sol';\\nimport {Strategy} from './Strategy.sol';\\n\\n/**\\n * @title StrategyFactory\\n * @author Babylon Finance\\n *\\n * Factory to create investment strategy contracts\\n */\\ncontract StrategyFactory is IStrategyFactory {\\n address private immutable controller;\\n address payable private immutable strategy;\\n\\n constructor(address _controller) {\\n require(_controller != address(0), 'Controller is zero');\\n\\n controller = _controller;\\n strategy = address(new Strategy());\\n }\\n\\n /**\\n * Creates a new investment strategy using minimal proxies\\n *\\n * @param _name Name of the strategy\\n * @param _symbol Symbol of the strategy\\n * @param _strategist Address of the strategist\\n * @param _garden Address of the garden\\n * @param _stratParams Strat Params\\n */\\n function createStrategy(\\n string memory _name,\\n string memory _symbol,\\n address _strategist,\\n address _garden,\\n uint256[] calldata _stratParams\\n ) external override returns (address) {\\n address payable clone = payable(Clones.clone(strategy));\\n IStrategy(clone).initialize(\\n _strategist,\\n _garden,\\n controller,\\n _stratParams[0],\\n _stratParams[1],\\n _stratParams[2],\\n _stratParams[3],\\n _stratParams[4]\\n );\\n IStrategyNFT(IBabController(controller).strategyNFT()).saveStrategyNameAndSymbol(clone, _name, _symbol);\\n return clone;\\n }\\n}\\n\",\"keccak256\":\"0x6672b3735fed1a99344367423fb2879039a559fbe21b8c6875f1d1d425f4c582\",\"license\":\"Apache License\"}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b506040516160013803806160018339818101604052602081101561003357600080fd5b50516001600160a01b038116610085576040805162461bcd60e51b8152602060048201526012602482015271436f6e74726f6c6c6572206973207a65726f60701b604482015290519081900360640190fd5b6001600160601b0319606082901b166080526040516100a3906100d6565b604051809103906000f0801580156100bf573d6000803e3d6000fd5b5060601b6001600160601b03191660a052506100e3565b6158bc8061074583390190565b60805160601c60a05160601c610634610111600039806101eb525080610224528061034352506106346000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c806378afca3e14610030575b600080fd5b6101c7600480360360a081101561004657600080fd5b81019060208101813564010000000081111561006157600080fd5b82018360208201111561007357600080fd5b8035906020019184600183028401116401000000008311171561009557600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156100e857600080fd5b8201836020820111156100fa57600080fd5b8035906020019184600183028401116401000000008311171561011c57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092956001600160a01b03853581169660208701359091169591945092506060810191506040013564010000000081111561018857600080fd5b82018360208201111561019a57600080fd5b803590602001918460208302840111640100000000831117156101bc57600080fd5b5090925090506101e3565b604080516001600160a01b039092168252519081900360200190f35b60008061020f7f0000000000000000000000000000000000000000000000000000000000000000610524565b9050806001600160a01b031663df8fa43087877f00000000000000000000000000000000000000000000000000000000000000008888600081811061025057fe5b905060200201358989600181811061026457fe5b905060200201358a8a600281811061027857fe5b905060200201358b8b600381811061028c57fe5b905060200201358c8c60048181106102a057fe5b905060200201356040518963ffffffff1660e01b815260040180896001600160a01b03168152602001886001600160a01b03168152602001876001600160a01b0316815260200186815260200185815260200184815260200183815260200182815260200198505050505050505050600060405180830381600087803b15801561032957600080fd5b505af115801561033d573d6000803e3d6000fd5b505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d6a45aa56040518163ffffffff1660e01b815260040160206040518083038186803b15801561039a57600080fd5b505afa1580156103ae573d6000803e3d6000fd5b505050506040513d60208110156103c457600080fd5b50516040517f0cfa5cda0000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483019081526060602484019081528c5160648501528c519290941693630cfa5cda9386938e938e9390929091604482019160840190602087019080838360005b83811015610451578181015183820152602001610439565b50505050905090810190601f16801561047e5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156104b1578181015183820152602001610499565b50505050905090810190601f1680156104de5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561050057600080fd5b505af1158015610514573d6000803e3d6000fd5b50929a9950505050505050505050565b60006040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528260601b60148201527f5af43d82803e903d91602b57fd5bf3000000000000000000000000000000000060288201526037816000f09150506001600160a01b0381166105f957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f455243313136373a20637265617465206661696c656400000000000000000000604482015290519081900360640190fd5b91905056fea26469706673582212200e94595b54080f9adf5f40962304b6bb252977af75677be5c97f482d92b87cd564736f6c63430007060033608060405234801561001057600080fd5b50600160005561589680620000266000396000f3fe6080604052600436106103435760003560e01c80637b2b401a116101b0578063c39b951c116100ec578063dbabf4f311610095578063e4df5e1a1161006f578063e4df5e1a14610d65578063f101e82b14610d7a578063f77c479114610daa578063ffb5cd0914610dbf5761034a565b8063dbabf4f314610cd9578063dd1033f814610cee578063df8fa43014610d035761034a565b8063d40244cb116100c6578063d40244cb14610c67578063d8bff5a514610c7c578063da58c7d914610caf5761034a565b8063c39b951c14610c28578063d0f9953e14610c3d578063d3406abd14610c525761034a565b8063950c782211610159578063a30ca20411610133578063a30ca20414610a86578063b3f05b9714610a9b578063bf1dcfe214610ab0578063c2ea0bc414610b075761034a565b8063950c7822146109e657806397ccdc6014610a195780639947cb9514610a5c5761034a565b80639033a52b1161018a5780639033a52b1461099257806393baae41146109bc57806394bba464146109d15761034a565b80637b2b401a14610913578063825deffe1461093d5780638a439b7a146109525761034a565b80633394fed21161027f57806356ba88b8116102285780636bc195dd116102025780636bc195dd146107cd5780636db40dc2146108d45780636db9cc99146108e95780637519ab50146108fe5761034a565b806356ba88b8146106e9578063577b6ab8146106fe5780636b3b75ea146107135761034a565b8063449b982611610259578063449b98261461065157806348a4beaa146106665780634b0fff0c146106bf5761034a565b80633394fed2146105e85780633a4b66f11461061257806342296724146106275761034a565b80630e32db52116102ec5780631a5cfcb7116102c65780631a5cfcb7146104955780631faeaf76146104c75780631fe4a686146105a257806330273356146105d35761034a565b80630e32db52146104135780630fb5a6b4146104565780631115bdcf1461046b5761034a565b806303976e381161031d57806303976e38146103d457806303cddb2c146103e95780630d15fd77146103fe5761034a565b80630126c6061461034f57806301681a621461037657806302fb0c5e146103ab5761034a565b3661034a57005b600080fd5b34801561035b57600080fd5b50610364610e60565b60408051918252519081900360200190f35b34801561038257600080fd5b506103a96004803603602081101561039957600080fd5b50356001600160a01b0316611029565b005b3480156103b757600080fd5b506103c06112f4565b604080519115158252519081900360200190f35b3480156103e057600080fd5b50610364611302565b3480156103f557600080fd5b50610364611308565b34801561040a57600080fd5b5061036461130e565b34801561041f57600080fd5b506103646004803603606081101561043657600080fd5b506001600160a01b03813581169160208101359160409091013516611314565b34801561046257600080fd5b5061036461141a565b34801561047757600080fd5b506103a96004803603602081101561048e57600080fd5b5035611420565b3480156104a157600080fd5b506103a9600480360360408110156104b857600080fd5b5080351515906020013561172e565b3480156104d357600080fd5b506103a9600480360360a08110156104ea57600080fd5b81019060208101813564010000000081111561050557600080fd5b82018360208201111561051757600080fd5b8035906020019184602083028401116401000000008311171561053957600080fd5b91939092909160208101903564010000000081111561055757600080fd5b82018360208201111561056957600080fd5b8035906020019184602083028401116401000000008311171561058b57600080fd5b91935091508035906020810135906040013561190a565b3480156105ae57600080fd5b506105b7611c55565b604080516001600160a01b039092168252519081900360200190f35b3480156105df57600080fd5b50610364611c64565b3480156105f457600080fd5b506105b76004803603602081101561060b57600080fd5b5035611c6a565b34801561061e57600080fd5b50610364611c94565b34801561063357600080fd5b506103a96004803603602081101561064a57600080fd5b5035611c9a565b34801561065d57600080fd5b5061036461215b565b34801561067257600080fd5b506106936004803603602081101561068957600080fd5b503560ff16612161565b6040805160ff90941684526001600160a01b039283166020850152911682820152519081900360600190f35b3480156106cb57600080fd5b506103a9600480360360208110156106e257600080fd5b50356121f2565b3480156106f557600080fd5b506105b76122eb565b34801561070a57600080fd5b506103a96122fa565b34801561071f57600080fd5b506103a96004803603604081101561073657600080fd5b8135919081019060408101602082013564010000000081111561075857600080fd5b82018360208201111561076a57600080fd5b8035906020019184600183028401116401000000008311171561078c57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061235f945050505050565b3480156107d957600080fd5b5061085f600480360360608110156107f057600080fd5b6001600160a01b038235169160208101359181019060608101604082013564010000000081111561082057600080fd5b82018360208201111561083257600080fd5b8035906020019184600183028401116401000000008311171561085457600080fd5b509092509050612755565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610899578181015183820152602001610881565b50505050905090810190601f1680156108c65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156108e057600080fd5b506103646129bf565b3480156108f557600080fd5b506103646129c5565b34801561090a57600080fd5b506103646129cb565b34801561091f57600080fd5b506103646004803603602081101561093657600080fd5b50356129d1565b34801561094957600080fd5b506103646129f2565b34801561095e57600080fd5b5061097c6004803603602081101561097557600080fd5b50356129f8565b6040805160ff9092168252519081900360200190f35b34801561099e57600080fd5b506105b7600480360360208110156109b557600080fd5b5035612a2c565b3480156109c857600080fd5b50610364612a3c565b3480156109dd57600080fd5b506103c0612a42565b3480156109f257600080fd5b5061036460048036036020811015610a0957600080fd5b50356001600160a01b0316612a51565b348015610a2557600080fd5b506103a960048036036060811015610a3c57600080fd5b506001600160a01b03813581169160208101359091169060400135612a6c565b348015610a6857600080fd5b506105b760048036036020811015610a7f57600080fd5b5035612b54565b348015610a9257600080fd5b50610364612b64565b348015610aa757600080fd5b506103c0612b6a565b348015610abc57600080fd5b50610ac5612b73565b604080516001600160a01b0390981688529515156020880152931515868601529115156060860152608085015260a084015260c0830152519081900360e00190f35b348015610b1357600080fd5b506103a960048036036060811015610b2a57600080fd5b810190602081018135640100000000811115610b4557600080fd5b820183602082011115610b5757600080fd5b80359060200191846020830284011164010000000083111715610b7957600080fd5b919390929091602081019035640100000000811115610b9757600080fd5b820183602082011115610ba957600080fd5b80359060200191846020830284011164010000000083111715610bcb57600080fd5b919390929091602081019035640100000000811115610be957600080fd5b820183602082011115610bfb57600080fd5b80359060200191846020830284011164010000000083111715610c1d57600080fd5b509092509050612b9d565b348015610c3457600080fd5b5061036461300b565b348015610c4957600080fd5b50610364613011565b348015610c5e57600080fd5b50610364613017565b348015610c7357600080fd5b5061036461301d565b348015610c8857600080fd5b5061036460048036036020811015610c9f57600080fd5b50356001600160a01b0316613023565b348015610cbb57600080fd5b506105b760048036036020811015610cd257600080fd5b5035613035565b348015610ce557600080fd5b50610364613045565b348015610cfa57600080fd5b5061036461304b565b348015610d0f57600080fd5b506103a96004803603610100811015610d2757600080fd5b506001600160a01b03813581169160208101358216916040820135169060608101359060808101359060a08101359060c08101359060e00135613051565b348015610d7157600080fd5b506103c0613544565b348015610d8657600080fd5b506103a960048036036040811015610d9d57600080fd5b508035906020013561355c565b348015610db657600080fd5b506105b7613a02565b348015610dcb57600080fd5b50610dd4613a17565b604051808f6001600160a01b031681526020018e6001600160a01b031681526020018d81526020018c81526020018b81526020018a8152602001898152602001888152602001878152602001868152602001858152602001848152602001836001600160a01b031681526020018281526020019e50505050505050505050505050505060405180910390f35b600080805b60025481101561102357600154600280546000926201000090046001600160a01b03169163201041989185908110610e9957fe5b90600052602060002090602091828204019190069054906101000a900460ff1660ff166040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610ef057600080fd5b505afa158015610f04573d6000803e3d6000fd5b505050506040513d6020811015610f1a57600080fd5b505160048054919250611018916001600160a01b03841691634222326a9186908110610f4257fe5b600091825260209091200154600554600380546001600160a01b03938416939092169188908110610f6f57fe5b60009182526020918290200154604080517fffffffff0000000000000000000000000000000000000000000000000000000060e088901b1681526001600160a01b039586166004820152938516602485015293166044830152915160648083019392829003018186803b158015610fe557600080fd5b505afa158015610ff9573d6000803e3d6000fd5b505050506040513d602081101561100f57600080fd5b50518490613b1c565b925050600101610e65565b50905090565b600554604080516370a0823160e01b8152336004820152905161113a926000926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b15801561107b57600080fd5b505afa15801561108f573d6000803e3d6000fd5b505050506040513d60208110156110a557600080fd5b50511180156111335750600154600554604080516313bc6d4b60e01b81526001600160a01b039283166004820152905162010000909304909116916313bc6d4b91602480820192602092909190829003018186803b15801561110657600080fd5b505afa15801561111a573d6000803e3d6000fd5b505050506040513d602081101561113057600080fd5b50515b600f613b7f565b60055460408051631f0b96b960e31b815290516111c2926001600160a01b03169163f85cb5c8916004808301926020929190829003018186803b15801561118057600080fd5b505afa158015611194573d6000803e3d6000fd5b505050506040513d60208110156111aa57600080fd5b50516001600160a01b03838116911614156036613b7f565b6011546111d990610100900460ff16156034613b7f565b6000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561122857600080fd5b505afa15801561123c573d6000803e3d6000fd5b505050506040513d602081101561125257600080fd5b505190506112638115156008613b7f565b6112e78282600560009054906101000a90046001600160a01b03166001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b1580156112b657600080fd5b505afa1580156112ca573d6000803e3d6000fd5b505050506040513d60208110156112e057600080fd5b5051613b8d565b506112f0613e13565b5050565b601154610100900460ff1681565b60175481565b60155481565b600d5481565b600080805b60025460ff821610156113fa5781806113f05750600160029054906101000a90046001600160a01b03166001600160a01b0316632010419860028360ff168154811061136157fe5b90600052602060002090602091828204019190069054906101000a900460ff166040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b1580156113b857600080fd5b505afa1580156113cc573d6000803e3d6000fd5b505050506040513d60208110156113e257600080fd5b50516001600160a01b031633145b9150600101611319565b5061140681604c613b7f565b611411858585613b8d565b95945050505050565b60125481565b806114b9600160029054906101000a90046001600160a01b03166001600160a01b031663411137c3336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561148657600080fd5b505afa15801561149a573d6000803e3d6000fd5b505050506040513d60208110156114b057600080fd5b50516012613b7f565b6114cf670de0b6b3a76400008211156013613b7f565b60026000541415611527576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026000556005546040805163017d862f60e11b81529051611635926001600160a01b0316916302fb0c5e916004808301926020929190829003018186803b15801561157257600080fd5b505afa158015611586573d6000803e3d6000fd5b505050506040513d602081101561159c57600080fd5b50511515600114801561162e5750600154600554604080516313bc6d4b60e01b81526001600160a01b039283166004820152905162010000909304909116916313bc6d4b91602480820192602092909190829003018186803b15801561160157600080fd5b505afa158015611615573d6000803e3d6000fd5b505050506040513d602081101561162b57600080fd5b50515b6023613b7f565b60115461164c90610100900460ff16156034613b7f565b61167062093a8061166860075442613f4b90919063ffffffff16565b116037613b7f565b60055460408051634d5b1ba160e11b81523360048201526024810185905290516001600160a01b0390921691639ab637429160448082019260009290919082900301818387803b1580156116c357600080fd5b505af11580156116d7573d6000803e3d6000fd5b505050506116e3613fa8565b6005546040805142815290516001600160a01b03909216917f7a7d4c833d273b66e431c5f268c42ee3e788541592e07c77f232cd28c89913169181900360200190a250506001600055565b6000805b60025460ff821610156118135781806118095750600160029054906101000a90046001600160a01b03166001600160a01b0316632010419860028360ff168154811061177a57fe5b90600052602060002090602091828204019190069054906101000a900460ff166040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b1580156117d157600080fd5b505afa1580156117e5573d6000803e3d6000fd5b505050506040513d60208110156117fb57600080fd5b50516001600160a01b031633145b9150600101611732565b5061181f81604c613b7f565b82156118925773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b15801561187457600080fd5b505af1158015611888573d6000803e3d6000fd5b5050505050611905565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b0316632e1a7d4d836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156118ec57600080fd5b505af1158015611900573d6000803e3d6000fd5b505050505b505050565b80611970600160029054906101000a90046001600160a01b03166001600160a01b031663411137c3336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561148657600080fd5b611986670de0b6b3a76400008211156013613b7f565b6005546040805163017d862f60e11b815290516119cc926001600160a01b0316916302fb0c5e916004808301926020929190829003018186803b15801561157257600080fd5b600554604080517ff251fc8c0000000000000000000000000000000000000000000000000000000081529051611a72926001600160a01b03169163f251fc8c916004808301926020929190829003018186803b158015611a2b57600080fd5b505afa158015611a3f573d6000803e3d6000fd5b505050506040513d6020811015611a5557600080fd5b5051600114611a65576002611a68565b60015b8810156040613b7f565b601154611a9890610100900460ff16158015611a91575060115460ff16155b602a613b7f565b611abd62093a80611ab460075442613f4b90919063ffffffff16565b1115602b613b7f565b6011805461ff00191661010017905560005b87811015611b2557868682818110611ae357fe5b90506020020135601d60008b8b85818110611afa57fe5b602090810292909201356001600160a01b031683525081019190915260400160002055600101611acf565b50611b4c611b476002611b4186611b3b89614049565b90614091565b906140f6565b6141ae565b600f55611b6a611b476002611b4186611b6489614049565b90614205565b601055611b79600c89896155e9565b50600e805485019055600d805484019055426008819055600554604080518781526020810187905280820193909352516001600160a01b03909116917f84d16af09d51e9126d9f6eddb4e8c072bb4b01dccb1f72e266ed2f66fc4b3792919081900360600190a260055460408051634d5b1ba160e11b81523360048201526024810185905290516001600160a01b0390921691639ab637429160448082019260009290919082900301818387803b158015611c3357600080fd5b505af1158015611c47573d6000803e3d6000fd5b505050505050505050505050565b6006546001600160a01b031681565b60185481565b60198181548110611c7a57600080fd5b6000918252602090912001546001600160a01b0316905081565b60135481565b600554611dca906001600160a01b031633148015611d375750600154600554604080516313bc6d4b60e01b81526001600160a01b039283166004820152905162010000909304909116916313bc6d4b91602480820192602092909190829003018186803b158015611d0a57600080fd5b505afa158015611d1e573d6000803e3d6000fd5b505050506040513d6020811015611d3457600080fd5b50515b80611dc35750600160029054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d8b57600080fd5b505afa158015611d9f573d6000803e3d6000fd5b505050506040513d6020811015611db557600080fd5b50516001600160a01b031633145b601f613b7f565b60026000541415611e22576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600055601154611e4c90610100900460ff168015611e45575060115460ff16155b602c613b7f565b611e70611e66601854601554613f4b90919063ffffffff16565b8211156033613b7f565b611e8d611e886015548361426a90919063ffffffff16565b614288565b42600a55601554611e9e9082613f4b565b601555600154604080517f3f2a554000000000000000000000000000000000000000000000000000000000815290516000926201000090046001600160a01b031691633f2a5540916004808301926020929190829003018186803b158015611f0557600080fd5b505afa158015611f19573d6000803e3d6000fd5b505050506040513d6020811015611f2f57600080fd5b50519050611f3b61443f565b15611f9f57806001600160a01b031663f5750d0f836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015611f8657600080fd5b505af1158015611f9a573d6000803e3d6000fd5b505050505b60055460408051631f0b96b960e31b81529051612109926001600160a01b031691829163f85cb5c891600480820192602092909190829003018186803b158015611fe857600080fd5b505afa158015611ffc573d6000803e3d6000fd5b505050506040513d602081101561201257600080fd5b5051604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561205c57600080fd5b505afa158015612070573d6000803e3d6000fd5b505050506040513d602081101561208657600080fd5b505160055460408051631f0b96b960e31b815290516001600160a01b039092169163f85cb5c891600480820192602092909190829003018186803b1580156120cd57600080fd5b505afa1580156120e1573d6000803e3d6000fd5b505050506040513d60208110156120f757600080fd5b50516001600160a01b03169190614565565b6005546040805184815242602082015281516001600160a01b03909316927fcff91fcd7fff5d12ce9ee075980ad73fde31d99f583cb228a04ee0ef4f34ba6f929181900390910190a250506001600055565b60105481565b600080600060028460ff168154811061217657fe5b90600052602060002090602091828204019190069054906101000a900460ff1660038560ff16815481106121a657fe5b600091825260209091200154600480546001600160a01b039092169160ff88169081106121cf57fe5b60009182526020909120015491945092506001600160a01b031690509193909250565b60065461220b906001600160a01b031633146020613b7f565b60115461221d9060ff16156032613b7f565b61222c60125482106035613b7f565b600554604080516395cdbedb60e01b815290516122a8926001600160a01b0316916395cdbedb916004808301926020929190829003018186803b15801561227257600080fd5b505afa158015612286573d6000803e3d6000fd5b505050506040513d602081101561229c57600080fd5b50518210156035613b7f565b60125460408051838152602081019290925280517f42fb010605de46a36c4814784d207e3b8a1ce9f6773eaea652c07d2a07e95e579281900390910190a1601255565b6005546001600160a01b031681565b600654612313906001600160a01b031633146020613b7f565b61231b613fa8565b6005546040805142815290516001600160a01b03909216917f4dcd504f23c1c204f965486c526a1e35cfb215bb4823dd1be0a172277bb1b3459181900360200190a2565b816123c5600160029054906101000a90046001600160a01b03166001600160a01b031663411137c3336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561148657600080fd5b6123db670de0b6b3a76400008211156013613b7f565b60026000541415612433576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026000556005546040805163017d862f60e11b8152905161247e926001600160a01b0316916302fb0c5e916004808301926020929190829003018186803b15801561157257600080fd5b61248e6000600954116030613b7f565b6124b16124a8601254600954613b1c90919063ffffffff16565b42116031613b7f565b6011546124c39060ff16156032613b7f565b6124d4670de0b6b3a7640000614288565b60118054600160ff19909116811761ff00191690915542600b819055600a5554604080517fd6a45aa50000000000000000000000000000000000000000000000000000000081529051620100009092046001600160a01b03169163d6a45aa591600480820192602092909190829003018186803b15801561255457600080fd5b505afa158015612568573d6000803e3d6000fd5b505050506040513d602081101561257e57600080fd5b5051600654604080517f3b5bb1d50000000000000000000000000000000000000000000000000000000081526001600160a01b0392831660048201818152602483019384528751604484015287519490951694633b5bb1d594919388939192909160640190602085019080838360005b838110156126065781810151838201526020016125ee565b50505050905090810190601f1680156126335780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15801561265357600080fd5b505af1158015612667573d6000803e3d6000fd5b505050506040513d602081101561267d57600080fd5b505060055460408051634d5b1ba160e11b81523360048201526024810186905290516001600160a01b0390921691639ab637429160448082019260009290919082900301818387803b1580156126d257600080fd5b505af11580156126e6573d6000803e3d6000fd5b505050506126f3836145e5565b6126fb613e13565b60055460175460408051918252602082018690524282820152516001600160a01b03909216917f2d21f7a1772dd51a6d96bd1cb40623cb13b73fd3d037618d9688707ce1b5b9569181900360600190a25050600160005550565b606061297e600160029054906101000a90046001600160a01b03166001600160a01b031663f4330b49336001600160a01b03166317d7de7c6040518163ffffffff1660e01b815260040160006040518083038186803b1580156127b757600080fd5b505afa1580156127cb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156127f457600080fd5b810190808051604051939291908464010000000082111561281457600080fd5b90830190602082018581111561282957600080fd5b825164010000000081118282018810171561284357600080fd5b82525081516020918201929091019080838360005b83811015612870578181015183820152602001612858565b50505050905090810190601f16801561289d5780820380516001836020036101000a031916815260200191505b50604052505050336040518363ffffffff1660e01b81526004018080602001836001600160a01b03168152602001828103825284818151815260200191508051906020019080838360005b838110156129005781810151838201526020016128e8565b50505050905090810190601f16801561292d5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561294b57600080fd5b505afa15801561295f573d6000803e3d6000fd5b505050506040513d602081101561297557600080fd5b50516021613b7f565b611411858585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250614d8d92505050565b601b5481565b60075481565b600a5481565b601a81815481106129e157600080fd5b600091825260209091200154905081565b60095481565b60028181548110612a0857600080fd5b9060005260206000209060209182820401919006915054906101000a900460ff1681565b60048181548110611c7a57600080fd5b60145481565b60115462010000900460ff1681565b6001600160a01b03166000908152601d602052604090205490565b612acc600160029054906101000a90046001600160a01b03166001600160a01b031663f4330b49336001600160a01b03166317d7de7c6040518163ffffffff1660e01b815260040160006040518083038186803b1580156127b757600080fd5b816001600160a01b031663095ea7b384836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015612b2357600080fd5b505af1158015612b37573d6000803e3d6000fd5b505050506040513d6020811015612b4d57600080fd5b5050505050565b60038181548110611c7a57600080fd5b60085481565b60115460ff1681565b601154600954600b54600a54309460ff610100860481169562010000810482169591169390929091565b600554612c56906001600160a01b031633148015612bc4575060115462010000900460ff16155b8015612c4f5750600154600554604080516313bc6d4b60e01b81526001600160a01b039283166004820152905162010000909304909116916313bc6d4b91602480820192602092909190829003018186803b158015612c2257600080fd5b505afa158015612c36573d6000803e3d6000fd5b505050506040513d6020811015612c4c57600080fd5b50515b6022613b7f565b612c6e8584148015612c6757508382145b604b613b7f565b612c86600682108015612c675750811515604b613b7f565b60005b85811015612fca576001546201000090046001600160a01b03166320104198888884818110612cb457fe5b9050602002013560ff166040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015612cf557600080fd5b505afa158015612d09573d6000803e3d6000fd5b505050506040513d6020811015612d1f57600080fd5b50516001600160a01b031663c8cd3075848484818110612d3b57fe5b6005546001600160a01b0360209092029390930135811692169050888886818110612d6257fe5b905060200201356001600160a01b0316856040518563ffffffff1660e01b815260040180856001600160a01b03168152602001846001600160a01b03168152602001836001600160a01b0316815260200182815260200194505050505060006040518083038186803b158015612dd757600080fd5b505afa158015612deb573d6000803e3d6000fd5b5050600154612fc292506201000090046001600160a01b0316905063f4330b49878785818110612e1757fe5b905060200201356001600160a01b03166001600160a01b03166317d7de7c6040518163ffffffff1660e01b815260040160006040518083038186803b158015612e5f57600080fd5b505afa158015612e73573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015612e9c57600080fd5b8101908080516040519392919084640100000000821115612ebc57600080fd5b908301906020820185811115612ed157600080fd5b8251640100000000811182820188101715612eeb57600080fd5b82525081516020918201929091019080838360005b83811015612f18578181015183820152602001612f00565b50505050905090810190601f168015612f455780820380516001836020036101000a031916815260200191505b50604052505050888886818110612f5857fe5b905060200201356001600160a01b03166040518363ffffffff1660e01b81526004018080602001836001600160a01b0316815260200182810382528481815181526020019150805190602001908083836000838110156129005781810151838201526020016128e8565b600101612c89565b50612fd760028787615655565b50612fe4600385856155e9565b50612ff1600483836155e9565b50506011805462ff00001916620100001790555050505050565b600e5481565b600b5481565b60165481565b600f5481565b601d6020526000908152604090205481565b600c8181548110611c7a57600080fd5b601c5481565b60025490565b600154610100900460ff168061306a575061306a614eb7565b80613078575060015460ff16155b6130b35760405162461bcd60e51b815260040180806020018281038252602e815260200180615752602e913960400191505060405180910390fd5b600154610100900460ff161580156130dd576001805460ff1961ff00199091166101001716811790555b600180547fffffffffffffffffffff0000000000000000000000000000000000000000ffff16620100006001600160a01b038a811682029290921792839055604080516313bc6d4b60e01b81528c8416600482015290516131989492909204909216916313bc6d4b916024808301926020929190829003018186803b15801561316557600080fd5b505afa158015613179573d6000803e3d6000fd5b505050506040513d602081101561318f57600080fd5b50516024613b7f565b6005805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038a81169190911791829055604080517fc40868930000000000000000000000000000000000000000000000000000000081528c8316600482015290516000936132d093169163c4086893916024808301926020929190829003018186803b15801561322557600080fd5b505afa158015613239573d6000803e3d6000fd5b505050506040513d602081101561324f57600080fd5b5051600554604080516370a0823160e01b81526001600160a01b038f81166004830152915191909216916370a08231916024808301926020929190829003018186803b15801561329e57600080fd5b505afa1580156132b2573d6000803e3d6000fd5b505050506040513d60208110156132c857600080fd5b505190613f4b565b600554604080516370a0823160e01b81526001600160a01b038e81166004830152915193945061335c9360009392909216916370a0823191602480820192602092909190829003018186803b15801561332857600080fd5b505afa15801561333c573d6000803e3d6000fd5b505050506040513d602081101561335257600080fd5b5051116025613b7f565b61336a868210156007613b7f565b613378600087116026613b7f565b600554604080516395cdbedb60e01b81529051613479926001600160a01b0316916395cdbedb916004808301926020929190829003018186803b1580156133be57600080fd5b505afa1580156133d2573d6000803e3d6000fd5b505050506040513d60208110156133e857600080fd5b505186108015906134725750600560009054906101000a90046001600160a01b03166001600160a01b031663297ce5986040518163ffffffff1660e01b815260040160206040518083038186803b15801561344257600080fd5b505afa158015613456573d6000803e3d6000fd5b505050506040513d602081101561346c57600080fd5b50518611155b6027613b7f565b61348f670de0b6b3a76400008410156039613b7f565b61349d838810156029613b7f565b6006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038c16179055426007556013869055601285905560168490556000601555601883905560148790556134f086614049565b600d556134fc86614049565b6001600160a01b038b166000908152601d602052604090205550600e8590556011805462ff0000191690558015613539576001805461ff00191690555b505050505050505050565b6000806009541180156135575750600b54155b905090565b806135c2600160029054906101000a90046001600160a01b03166001600160a01b031663411137c3336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561148657600080fd5b6135d8670de0b6b3a76400008211156013613b7f565b60026000541415613630576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026000556005546040805163017d862f60e11b8152905161367b926001600160a01b0316916302fb0c5e916004808301926020929190829003018186803b15801561157257600080fd5b60115461369190610100900460ff16602c613b7f565b6136b56014546136ac85601554613b1c90919063ffffffff16565b1115602d613b7f565b6136c5601854841015602e613b7f565b600554604080517f3deddb3f0000000000000000000000000000000000000000000000000000000081529051613767926001600160a01b031691633deddb3f916004808301926020929190829003018186803b15801561372457600080fd5b505afa158015613738573d6000803e3d6000fd5b505050506040513d602081101561374e57600080fd5b505160085461375e904290613f4b565b1015602f613b7f565b600554604080517f4422b0dc0000000000000000000000000000000000000000000000000000000081526004810186905290516001600160a01b0390921691634422b0dc9160248082019260009290919082900301818387803b1580156137cd57600080fd5b505af11580156137e1573d6000803e3d6000fd5b50506015546137f39250905084613b1c565b6015556137ff83614ec8565b6000600160029054906101000a90046001600160a01b03166001600160a01b0316633f2a55406040518163ffffffff1660e01b815260040160206040518083038186803b15801561384f57600080fd5b505afa158015613863573d6000803e3d6000fd5b505050506040513d602081101561387957600080fd5b505160095490915061388e57426009556138ca565b61389661443f565b156138ca576138c66138bd6138b6600a5442613f4b90919063ffffffff16565b869061512b565b601c5490613b1c565b601c555b6138d261443f565b1561393657806001600160a01b0316630fa454cf856040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561391d57600080fd5b505af1158015613931573d6000803e3d6000fd5b505050505b60055460408051634d5b1ba160e11b81523360048201526024810186905290516001600160a01b0390921691639ab637429160448082019260009290919082900301818387803b15801561398957600080fd5b505af115801561399d573d6000803e3d6000fd5b505042600a819055600554604080518981526020810189905280820193909352516001600160a01b0390911693507f7f4467a4ca8be02143a9253e6c31362c7bc755929e5c68faf659636d307f1b8c92509081900360600190a2505060016000555050565b6001546201000090046001600160a01b031681565b60008060008060008060008060008060008060008030600660009054906101000a90046001600160a01b0316600380549050601354600e54600d54601554601754601254601654601454601854600160029054906101000a90046001600160a01b03166001600160a01b031663d6a45aa56040518163ffffffff1660e01b815260040160206040518083038186803b158015613ab257600080fd5b505afa158015613ac6573d6000803e3d6000fd5b505050506040513d6020811015613adc57600080fd5b81019080805190602001909291905050506007549d509d509d509d509d509d509d509d509d509d509d509d509d509d50909192939495969798999a9b9c9d565b600082820183811015613b76576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b816112f0576112f081615184565b600080600160029054906101000a90046001600160a01b03166001600160a01b0316636176605e6040518163ffffffff1660e01b815260040160206040518083038186803b158015613bde57600080fd5b505afa158015613bf2573d6000803e3d6000fd5b505050506040513d6020811015613c0857600080fd5b5051600154604080517f2630c12f0000000000000000000000000000000000000000000000000000000081529051929350600092620100009092046001600160a01b031691632630c12f91600480820192602092909190829003018186803b158015613c7357600080fd5b505afa158015613c87573d6000803e3d6000fd5b505050506040513d6020811015613c9d57600080fd5b5051604080517fac41865a0000000000000000000000000000000000000000000000000000000081526001600160a01b038981166004830152878116602483015291519293506000929184169163ac41865a91604480820192602092909190829003018186803b158015613d1057600080fd5b505afa158015613d24573d6000803e3d6000fd5b505050506040513d6020811015613d3a57600080fd5b505190506000613d4a87836151d7565b90506000613d69613d628366b1a2bc2ec500006151d7565b8390613f4b565b604080517ffa1ca8200000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038c81166024830152604482018c90528a811660648301526084820184905291519293509087169163fa1ca8209160a48082019260009290919082900301818387803b158015613dec57600080fd5b505af1158015613e00573d6000803e3d6000fd5b50929750505050505050505b9392505050565b60055460408051631f0b96b960e31b815290516000926001600160a01b03169163f85cb5c8916004808301926020929190829003018186803b158015613e5857600080fd5b505afa158015613e6c573d6000803e3d6000fd5b505050506040513d6020811015613e8257600080fd5b5051604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015613ecc57600080fd5b505afa158015613ee0573d6000803e3d6000fd5b505050506040513d6020811015613ef657600080fd5b505160055460408051631f0b96b960e31b81529051929350613f48926001600160a01b03909216918491839163f85cb5c891600480820192602092909190829003018186803b1580156120cd57600080fd5b50565b600082821115613fa2576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b613fb86009546000146038613b7f565b601154613fca9060ff16156032613b7f565b600554604080517fb2644e6600000000000000000000000000000000000000000000000000000000815230600482015290516001600160a01b039092169163b2644e669160248082019260009290919082900301818387803b15801561402f57600080fd5b505af1158015614043573d6000803e3d6000fd5b50505050565b6000600160ff1b821061408d5760405162461bcd60e51b81526004018080602001828103825260288152602001806157eb6028913960400191505060405180910390fd5b5090565b60008282018183128015906140a65750838112155b806140bb57506000831280156140bb57508381125b613b765760405162461bcd60e51b815260040180806020018281038252602181526020018061570b6021913960400191505060405180910390fd5b60008161414a576040805162461bcd60e51b815260206004820181905260248201527f5369676e6564536166654d6174683a206469766973696f6e206279207a65726f604482015290519081900360640190fd5b8160001914801561415e5750600160ff1b83145b1561419a5760405162461bcd60e51b81526004018080602001828103825260218152602001806157806021913960400191505060405180910390fd5b60008284816141a557fe5b05949350505050565b60008082121561408d576040805162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f736974697665604482015290519081900360640190fd5b600081830381831280159061421a5750838113155b8061422f575060008312801561422f57508381135b613b765760405162461bcd60e51b81526004018080602001828103825260248152602001806158136024913960400191505060405180910390fd5b6000613b768261428285670de0b6b3a764000061512b565b906151ef565b6002545b80156112f057600154600280546000926201000090046001600160a01b03169163201041989160001986019081106142c057fe5b90600052602060002090602091828204019190069054906101000a900460ff166040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b15801561431757600080fd5b505afa15801561432b573d6000803e3d6000fd5b505050506040513d602081101561434157600080fd5b5051600480549192506001600160a01b0383169163419ea18a918691600019870190811061436b57fe5b600091825260209091200154600554600380546001600160a01b039384169390921691600019890190811061439c57fe5b6000918252602082200154604080517fffffffff0000000000000000000000000000000000000000000000000000000060e089901b16815260048101969096526001600160a01b03948516602487015292841660448601529290921660648401525160848084019382900301818387803b15801561441957600080fd5b505af115801561442d573d6000803e3d6000fd5b5050600019909301925061428c915050565b600080600160029054906101000a90046001600160a01b03166001600160a01b0316633f2a55406040518163ffffffff1660e01b815260040160206040518083038186803b15801561449057600080fd5b505afa1580156144a4573d6000803e3d6000fd5b505050506040513d60208110156144ba57600080fd5b5051604080517fddaa26ad00000000000000000000000000000000000000000000000000000000815290519192506000916001600160a01b0384169163ddaa26ad916004808301926020929190829003018186803b15801561451b57600080fd5b505afa15801561452f573d6000803e3d6000fd5b505050506040513d602081101561454557600080fd5b50516007549091506000908210801561455d57508115155b935050505090565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611905908490615256565b6146ab81600560009054906101000a90046001600160a01b03166001600160a01b031663f85cb5c86040518163ffffffff1660e01b815260040160206040518083038186803b15801561463757600080fd5b505afa15801561464b573d6000803e3d6000fd5b505050506040513d602081101561466157600080fd5b5051604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561329e57600080fd5b60175560055460408051631f0b96b960e31b815290516000926001600160a01b03169163f85cb5c8916004808301926020929190829003018186803b1580156146f357600080fd5b505afa158015614707573d6000803e3d6000fd5b505050506040513d602081101561471d57600080fd5b50516015549091506000906147409061473590614049565b611b64601754614049565b905060008060155460175411614757576000614766565b60155460175461476691613f4b565b90506015546017541061489e576147f781600160029054906101000a90046001600160a01b03166001600160a01b031663568c08136040518163ffffffff1660e01b815260040160206040518083038186803b1580156147c557600080fd5b505afa1580156147d9573d6000803e3d6000fd5b505050506040513d60208110156147ef57600080fd5b5051906151d7565b915061488930600160029054906101000a90046001600160a01b03166001600160a01b03166361d027b36040518163ffffffff1660e01b815260040160206040518083038186803b15801561484b57600080fd5b505afa15801561485f573d6000803e3d6000fd5b505050506040513d602081101561487557600080fd5b50516001600160a01b038716919085615307565b614897836000849003614091565b9250614a87565b60006148e16718493fba64ef00006148db6148d26013546148cc60155460175461426a90919063ffffffff16565b906151d7565b60135490613f4b565b9061538f565b600554600654604080516370a0823160e01b81526001600160a01b0392831660048201529051939450849391909216916370a08231916024808301926020929190829003018186803b15801561493657600080fd5b505afa15801561494a573d6000803e3d6000fd5b505050506040513d602081101561496057600080fd5b505110156149e757600554600654604080516370a0823160e01b81526001600160a01b039283166004820152905191909216916370a08231916024808301926020929190829003018186803b1580156149b857600080fd5b505afa1580156149cc573d6000803e3d6000fd5b505050506040513d60208110156149e257600080fd5b505190505b600554600654604080517f2befcc5c0000000000000000000000000000000000000000000000000000000081526001600160a01b0392831660048201526024810185905290519190921691632befcc5c91604480830192600092919082900301818387803b158015614a5857600080fd5b505af1158015614a6c573d6000803e3d6000fd5b50505050614a83818561409190919063ffffffff16565b9350505b600554601754614abb9130916001600160a01b0390911690614aa99086613f4b565b6001600160a01b038816929190615307565b6000600160029054906101000a90046001600160a01b03166001600160a01b0316632e0519cf6040518163ffffffff1660e01b815260040160606040518083038186803b158015614b0b57600080fd5b505afa158015614b1f573d6000803e3d6000fd5b505050506040513d6060811015614b3557600080fd5b50604001516005549091506001600160a01b031663250caaa8614b6e614b5b85856151d7565b601754614b689087613f4b565b90613b1c565b614b8c86614b86614b7f88886151d7565b8890613f4b565b90613f4b565b87306040518563ffffffff1660e01b815260040180858152602001848152602001838152602001826001600160a01b03168152602001945050505050600060405180830381600087803b158015614be257600080fd5b505af1158015614bf6573d6000803e3d6000fd5b505050506000600160029054906101000a90046001600160a01b03166001600160a01b0316633f2a55406040518163ffffffff1660e01b815260040160206040518083038186803b158015614c4a57600080fd5b505afa158015614c5e573d6000803e3d6000fd5b505050506040513d6020811015614c7457600080fd5b50519050614c8061443f565b15614ce657806001600160a01b031663f5750d0f6015546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015614ccd57600080fd5b505af1158015614ce1573d6000803e3d6000fd5b505050505b604080517f9de9a05200000000000000000000000000000000000000000000000000000000815230600482015290516001600160a01b03831691639de9a0529160248083019260209291908290030181600087803b158015614d4757600080fd5b505af1158015614d5b573d6000803e3d6000fd5b505050506040513d6020811015614d7157600080fd5b50516bffffffffffffffffffffffff16601b5550505050505050565b6060614da36001600160a01b03851683856153ab565b905082846001600160a01b03167f2a936dbabeaea30adc1ddad138b1958497988474bef8b09a29411f0105ab8ab28484604051808060200180602001838103835285818151815260200191508051906020019080838360005b83811015614e14578181015183820152602001614dfc565b50505050905090810190601f168015614e415780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b83811015614e74578181015183820152602001614e5c565b50505050905090810190601f168015614ea15780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a39392505050565b6000614ec2306153d9565b15905090565b60055460408051631f0b96b960e31b8152905183926000926001600160a01b039091169163f85cb5c891600480820192602092909190829003018186803b158015614f1257600080fd5b505afa158015614f26573d6000803e3d6000fd5b505050506040513d6020811015614f3c57600080fd5b505190506000805b600254811015612b4d57600154600280546000926201000090046001600160a01b03169163201041989185908110614f7857fe5b90600052602060002090602091828204019190069054906101000a900460ff166040518263ffffffff1660e01b8152600401808260ff16815260200191505060206040518083038186803b158015614fcf57600080fd5b505afa158015614fe3573d6000803e3d6000fd5b505050506040513d6020811015614ff957600080fd5b5051600480549192506001600160a01b038316916355d9750b918791899188918890811061502357fe5b600091825260209091200154600554600380546001600160a01b0393841693909216918a90811061505057fe5b6000918252602082200154604080517fffffffff0000000000000000000000000000000000000000000000000000000060e08b901b1681526001600160a01b039889166004820152602481019790975260ff909516604487015292861660648601529085166084850152931660a48301525160c48083019360609383900390910190829087803b1580156150e357600080fd5b505af11580156150f7573d6000803e3d6000fd5b505050506040513d606081101561510d57600080fd5b50805160208201516040909201519196509450925050600101614f44565b60008261513a57506000613b79565b8282028284828161514757fe5b0414613b765760405162461bcd60e51b81526004018080602001828103825260218152602001806157ca6021913960400191505060405180910390fd5b62461bcd60e51b6000908152602060045260076024526642414223000030600a808404818106603090810160081b95839006959095019082900491820690940160101b939093010160c81b604452606490fd5b6000613b76670de0b6b3a7640000614282858561512b565b6000808211615245576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161524e57fe5b049392505050565b60006152ab826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166153df9092919063ffffffff16565b805190915015611905578080602001905160208110156152ca57600080fd5b50516119055760405162461bcd60e51b815260040180806020018281038252602a815260200180615837602a913960400191505060405180910390fd5b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052614043908590615256565b6000670de0b6b3a76400006153a4848461512b565b8161524e57fe5b60606153d18484846040518060600160405280602981526020016157a1602991396153ea565b949350505050565b3b151590565b60606153d184846000855b60608247101561542b5760405162461bcd60e51b815260040180806020018281038252602681526020018061572c6026913960400191505060405180910390fd5b615434856153d9565b615485576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106154c35780518252601f1990920191602091820191016154a4565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114615525576040519150601f19603f3d011682016040523d82523d6000602084013e61552a565b606091505b509150915061553a828286615545565b979650505050505050565b60608315615554575081613e0c565b8251156155645782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156155ae578181015183820152602001615596565b50505050905090810190601f1680156155db5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b828054828255906000526020600020908101928215615649579160200282015b8281111561564957815473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03843516178255602090920191600190910190615609565b5061408d9291506156f5565b82805482825590600052602060002090601f016020900481019282156156495791602002820160005b838211156156bf57833560ff1683826101000a81548160ff021916908360ff160217905550926020019260010160208160000104928301926001030261567e565b80156156ec5782816101000a81549060ff02191690556001016020816000010492830192600103026156bf565b505061408d9291505b5b8082111561408d57600081556001016156f656fe5369676e6564536166654d6174683a206164646974696f6e206f766572666c6f77416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65645369676e6564536166654d6174683a206469766973696f6e206f766572666c6f77416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7753616665436173743a2076616c756520646f65736e27742066697420696e20616e20696e743235365369676e6564536166654d6174683a207375627472616374696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212209ed243ca50cc172723b6694b9a1d0e8280dc0a97c91bc9e2f2732cd41244bacf64736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c806378afca3e14610030575b600080fd5b6101c7600480360360a081101561004657600080fd5b81019060208101813564010000000081111561006157600080fd5b82018360208201111561007357600080fd5b8035906020019184600183028401116401000000008311171561009557600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156100e857600080fd5b8201836020820111156100fa57600080fd5b8035906020019184600183028401116401000000008311171561011c57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092956001600160a01b03853581169660208701359091169591945092506060810191506040013564010000000081111561018857600080fd5b82018360208201111561019a57600080fd5b803590602001918460208302840111640100000000831117156101bc57600080fd5b5090925090506101e3565b604080516001600160a01b039092168252519081900360200190f35b60008061020f7f0000000000000000000000000000000000000000000000000000000000000000610524565b9050806001600160a01b031663df8fa43087877f00000000000000000000000000000000000000000000000000000000000000008888600081811061025057fe5b905060200201358989600181811061026457fe5b905060200201358a8a600281811061027857fe5b905060200201358b8b600381811061028c57fe5b905060200201358c8c60048181106102a057fe5b905060200201356040518963ffffffff1660e01b815260040180896001600160a01b03168152602001886001600160a01b03168152602001876001600160a01b0316815260200186815260200185815260200184815260200183815260200182815260200198505050505050505050600060405180830381600087803b15801561032957600080fd5b505af115801561033d573d6000803e3d6000fd5b505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d6a45aa56040518163ffffffff1660e01b815260040160206040518083038186803b15801561039a57600080fd5b505afa1580156103ae573d6000803e3d6000fd5b505050506040513d60208110156103c457600080fd5b50516040517f0cfa5cda0000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483019081526060602484019081528c5160648501528c519290941693630cfa5cda9386938e938e9390929091604482019160840190602087019080838360005b83811015610451578181015183820152602001610439565b50505050905090810190601f16801561047e5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156104b1578181015183820152602001610499565b50505050905090810190601f1680156104de5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561050057600080fd5b505af1158015610514573d6000803e3d6000fd5b50929a9950505050505050505050565b60006040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528260601b60148201527f5af43d82803e903d91602b57fd5bf3000000000000000000000000000000000060288201526037816000f09150506001600160a01b0381166105f957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f455243313136373a20637265617465206661696c656400000000000000000000604482015290519081900360640190fd5b91905056fea26469706673582212200e94595b54080f9adf5f40962304b6bb252977af75677be5c97f482d92b87cd564736f6c63430007060033", "devdoc": { "author": "Babylon Finance Factory to create investment strategy contracts", "kind": "dev", "methods": { - "createStrategy(string,string,address,address,address,uint256[])": { + "createStrategy(string,string,address,address,uint256[])": { "params": { - "_controller": "Address of the controller", "_garden": "Address of the garden", "_name": "Name of the strategy", "_stratParams": "Strat Params", @@ -93,7 +95,7 @@ "userdoc": { "kind": "user", "methods": { - "createStrategy(string,string,address,address,address,uint256[])": { + "createStrategy(string,string,address,address,uint256[])": { "notice": "Creates a new investment strategy using minimal proxies" } }, diff --git a/deployments/artifacts/mainnet/StrategyNFT.json b/deployments/artifacts/mainnet/StrategyNFT.json new file mode 100644 index 000000000..6349483fa --- /dev/null +++ b/deployments/artifacts/mainnet/StrategyNFT.json @@ -0,0 +1,1040 @@ +{ + "address": "0xc9fB8599828B1E8D928a2Cc92Ea77d0E26B6d3A3", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_controller", + "type": "address" + }, + { + "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": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_member", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_newItemId", + "type": "uint256" + } + ], + "name": "StrategyNFTAwarded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "baseURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "controller", + "outputs": [ + { + "internalType": "contract IBabController", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_strategy", + "type": "address" + } + ], + "name": "getStrategyName", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_strategy", + "type": "address" + } + ], + "name": "getStrategyTokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "string", + "name": "_strategyTokenURI", + "type": "string" + } + ], + "name": "grantStrategyNFT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_strategy", + "type": "address" + }, + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + } + ], + "name": "saveStrategyNameAndSymbol", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "stratDetails", + "outputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenOfOwnerByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "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": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x6e4580f076d78a96d82a8a19bc78597ce1fe3fab91b6a73ecffcec8d254f0b3a", + "receipt": { + "to": null, + "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", + "contractAddress": "0xc9fB8599828B1E8D928a2Cc92Ea77d0E26B6d3A3", + "transactionIndex": 36, + "gasUsed": "2376759", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x99df5b09b4de0171c46c6e7ff30235a543f1f864be5c032cfccf0ff304232aa2", + "transactionHash": "0x6e4580f076d78a96d82a8a19bc78597ce1fe3fab91b6a73ecffcec8d254f0b3a", + "logs": [], + "blockNumber": 12451363, + "cumulativeGasUsed": "3906424", + "status": 1, + "byzantium": true + }, + "args": [ + "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F", + "Babylon Strategy NFT", + "STRAT_NFT" + ], + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"},{\"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\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_member\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_newItemId\",\"type\":\"uint256\"}],\"name\":\"StrategyNFTAwarded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"baseURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"contract IBabController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"}],\"name\":\"getStrategyName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"}],\"name\":\"getStrategyTokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_strategyTokenURI\",\"type\":\"string\"}],\"name\":\"grantStrategyNFT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"name\":\"saveStrategyNameAndSymbol\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"stratDetails\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenOfOwnerByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"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\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Contract the NFT for each Strategy\",\"kind\":\"dev\",\"methods\":{\"approve(address,uint256)\":{\"details\":\"See {IERC721-approve}.\"},\"balanceOf(address)\":{\"details\":\"See {IERC721-balanceOf}.\"},\"baseURI()\":{\"details\":\"Returns the base URI set via {_setBaseURI}. This will be automatically added as a prefix in {tokenURI} to each token's URI, or to the token ID if no specific URI is set for that token ID.\"},\"constructor\":{\"params\":{\"_controller\":\"Address of controller contract\",\"_name\":\"Name of the garden\",\"_symbol\":\"Symbol of the garden\"}},\"getApproved(uint256)\":{\"details\":\"See {IERC721-getApproved}.\"},\"grantStrategyNFT(address,string)\":{\"params\":{\"_strategyTokenURI\":\"Strategy token URI\",\"_user\":\"Address of the user\"}},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC721-isApprovedForAll}.\"},\"name()\":{\"details\":\"See {IERC721Metadata-name}.\"},\"ownerOf(uint256)\":{\"details\":\"See {IERC721-ownerOf}.\"},\"safeTransferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,bytes)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"saveStrategyNameAndSymbol(address,string,string)\":{\"params\":{\"_name\":\"Strategy Name\",\"_strategy\":\"Address of the strategy\",\"_symbol\":\"Strategy Symbol\"}},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC721-setApprovalForAll}.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}. Time complexity O(1), guaranteed to always use less than 30 000 gas.\"},\"symbol()\":{\"details\":\"See {IERC721Metadata-symbol}.\"},\"tokenByIndex(uint256)\":{\"details\":\"See {IERC721Enumerable-tokenByIndex}.\"},\"tokenOfOwnerByIndex(address,uint256)\":{\"details\":\"See {IERC721Enumerable-tokenOfOwnerByIndex}.\"},\"tokenURI(uint256)\":{\"details\":\"See {IERC721Metadata-tokenURI}.\"},\"totalSupply()\":{\"details\":\"See {IERC721Enumerable-totalSupply}.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-transferFrom}.\"}},\"title\":\"StrategyNFT\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Sets the protocol controller\"},\"grantStrategyNFT(address,string)\":{\"notice\":\"Awards the garden NFT to a user and gives him access to a specific garden\"},\"saveStrategyNameAndSymbol(address,string,string)\":{\"notice\":\"Saves the name an symbol for a new created strategy\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/strategies/StrategyNFT.sol\":\"StrategyNFT\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts may inherit from this and call {_registerInterface} to declare\\n * their support of an interface.\\n */\\nabstract contract ERC165 is IERC165 {\\n /*\\n * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7\\n */\\n bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;\\n\\n /**\\n * @dev Mapping of interface ids to whether or not it's supported.\\n */\\n mapping(bytes4 => bool) private _supportedInterfaces;\\n\\n constructor () internal {\\n // Derived contracts need only register support for their own interfaces,\\n // we register support for ERC165 itself here\\n _registerInterface(_INTERFACE_ID_ERC165);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n *\\n * Time complexity O(1), guaranteed to always use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return _supportedInterfaces[interfaceId];\\n }\\n\\n /**\\n * @dev Registers the contract as an implementer of the interface defined by\\n * `interfaceId`. Support of the actual ERC165 interface is automatic and\\n * registering its interface id is not required.\\n *\\n * See {IERC165-supportsInterface}.\\n *\\n * Requirements:\\n *\\n * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).\\n */\\n function _registerInterface(bytes4 interfaceId) internal virtual {\\n require(interfaceId != 0xffffffff, \\\"ERC165: invalid interface id\\\");\\n _supportedInterfaces[interfaceId] = true;\\n }\\n}\\n\",\"keccak256\":\"0x24141d2f6b98d4cb77a8936eae8cbaad2e261d9062bdc08036096f4550092501\",\"license\":\"MIT\"},\"@openzeppelin/contracts/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xf70bc25d981e4ec9673a995ad2995d5d493ea188d3d8f388bba9c227ce09fb82\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC721.sol\\\";\\nimport \\\"./IERC721Metadata.sol\\\";\\nimport \\\"./IERC721Enumerable.sol\\\";\\nimport \\\"./IERC721Receiver.sol\\\";\\nimport \\\"../../introspection/ERC165.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/EnumerableSet.sol\\\";\\nimport \\\"../../utils/EnumerableMap.sol\\\";\\nimport \\\"../../utils/Strings.sol\\\";\\n\\n/**\\n * @title ERC721 Non-Fungible Token Standard basic implementation\\n * @dev see https://eips.ethereum.org/EIPS/eip-721\\n */\\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {\\n using SafeMath for uint256;\\n using Address for address;\\n using EnumerableSet for EnumerableSet.UintSet;\\n using EnumerableMap for EnumerableMap.UintToAddressMap;\\n using Strings for uint256;\\n\\n // Equals to `bytes4(keccak256(\\\"onERC721Received(address,address,uint256,bytes)\\\"))`\\n // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector`\\n bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;\\n\\n // Mapping from holder address to their (enumerable) set of owned tokens\\n mapping (address => EnumerableSet.UintSet) private _holderTokens;\\n\\n // Enumerable mapping from token ids to their owners\\n EnumerableMap.UintToAddressMap private _tokenOwners;\\n\\n // Mapping from token ID to approved address\\n mapping (uint256 => address) private _tokenApprovals;\\n\\n // Mapping from owner to operator approvals\\n mapping (address => mapping (address => bool)) private _operatorApprovals;\\n\\n // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Optional mapping for token URIs\\n mapping (uint256 => string) private _tokenURIs;\\n\\n // Base URI\\n string private _baseURI;\\n\\n /*\\n * bytes4(keccak256('balanceOf(address)')) == 0x70a08231\\n * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e\\n * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3\\n * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc\\n * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465\\n * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5\\n * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd\\n * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e\\n * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde\\n *\\n * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^\\n * 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;\\n\\n /*\\n * bytes4(keccak256('name()')) == 0x06fdde03\\n * bytes4(keccak256('symbol()')) == 0x95d89b41\\n * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd\\n *\\n * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f;\\n\\n /*\\n * bytes4(keccak256('totalSupply()')) == 0x18160ddd\\n * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59\\n * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7\\n *\\n * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63\\n */\\n bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;\\n\\n /**\\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\\n */\\n constructor (string memory name_, string memory symbol_) public {\\n _name = name_;\\n _symbol = symbol_;\\n\\n // register the supported interfaces to conform to ERC721 via ERC165\\n _registerInterface(_INTERFACE_ID_ERC721);\\n _registerInterface(_INTERFACE_ID_ERC721_METADATA);\\n _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE);\\n }\\n\\n /**\\n * @dev See {IERC721-balanceOf}.\\n */\\n function balanceOf(address owner) public view virtual override returns (uint256) {\\n require(owner != address(0), \\\"ERC721: balance query for the zero address\\\");\\n return _holderTokens[owner].length();\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n return _tokenOwners.get(tokenId, \\\"ERC721: owner query for nonexistent token\\\");\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-name}.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-symbol}.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-tokenURI}.\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n require(_exists(tokenId), \\\"ERC721Metadata: URI query for nonexistent token\\\");\\n\\n string memory _tokenURI = _tokenURIs[tokenId];\\n string memory base = baseURI();\\n\\n // If there is no base URI, return the token URI.\\n if (bytes(base).length == 0) {\\n return _tokenURI;\\n }\\n // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).\\n if (bytes(_tokenURI).length > 0) {\\n return string(abi.encodePacked(base, _tokenURI));\\n }\\n // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI.\\n return string(abi.encodePacked(base, tokenId.toString()));\\n }\\n\\n /**\\n * @dev Returns the base URI set via {_setBaseURI}. This will be\\n * automatically added as a prefix in {tokenURI} to each token's URI, or\\n * to the token ID if no specific URI is set for that token ID.\\n */\\n function baseURI() public view virtual returns (string memory) {\\n return _baseURI;\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\\n return _holderTokens[owner].at(index);\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds\\n return _tokenOwners.length();\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenByIndex}.\\n */\\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\\n (uint256 tokenId, ) = _tokenOwners.at(index);\\n return tokenId;\\n }\\n\\n /**\\n * @dev See {IERC721-approve}.\\n */\\n function approve(address to, uint256 tokenId) public virtual override {\\n address owner = ERC721.ownerOf(tokenId);\\n require(to != owner, \\\"ERC721: approval to current owner\\\");\\n\\n require(_msgSender() == owner || ERC721.isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not owner nor approved for all\\\"\\n );\\n\\n _approve(to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-getApproved}.\\n */\\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\\n require(_exists(tokenId), \\\"ERC721: approved query for nonexistent token\\\");\\n\\n return _tokenApprovals[tokenId];\\n }\\n\\n /**\\n * @dev See {IERC721-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n require(operator != _msgSender(), \\\"ERC721: approve to caller\\\");\\n\\n _operatorApprovals[_msgSender()][operator] = approved;\\n emit ApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC721-isApprovedForAll}.\\n */\\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[owner][operator];\\n }\\n\\n /**\\n * @dev See {IERC721-transferFrom}.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) public virtual override {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: transfer caller is not owner nor approved\\\");\\n\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: transfer caller is not owner nor approved\\\");\\n _safeTransfer(from, to, tokenId, _data);\\n }\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * `_data` is additional data, it has no specified format and it is sent in call to `to`.\\n *\\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\\n * implement alternative mechanisms to perform token transfer, such as signature-based.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual {\\n _transfer(from, to, tokenId);\\n require(_checkOnERC721Received(from, to, tokenId, _data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Returns whether `tokenId` exists.\\n *\\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\\n *\\n * Tokens start existing when they are minted (`_mint`),\\n * and stop existing when they are burned (`_burn`).\\n */\\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\\n return _tokenOwners.contains(tokenId);\\n }\\n\\n /**\\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\\n require(_exists(tokenId), \\\"ERC721: operator query for nonexistent token\\\");\\n address owner = ERC721.ownerOf(tokenId);\\n return (spender == owner || getApproved(tokenId) == spender || ERC721.isApprovedForAll(owner, spender));\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n d*\\n * - `tokenId` must not exist.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeMint(address to, uint256 tokenId) internal virtual {\\n _safeMint(to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\\n */\\n function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual {\\n _mint(to, tokenId);\\n require(_checkOnERC721Received(address(0), to, tokenId, _data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Mints `tokenId` and transfers it to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - `to` cannot be the zero address.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _mint(address to, uint256 tokenId) internal virtual {\\n require(to != address(0), \\\"ERC721: mint to the zero address\\\");\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n _beforeTokenTransfer(address(0), to, tokenId);\\n\\n _holderTokens[to].add(tokenId);\\n\\n _tokenOwners.set(tokenId, to);\\n\\n emit Transfer(address(0), to, tokenId);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _burn(uint256 tokenId) internal virtual {\\n address owner = ERC721.ownerOf(tokenId); // internal owner\\n\\n _beforeTokenTransfer(owner, address(0), tokenId);\\n\\n // Clear approvals\\n _approve(address(0), tokenId);\\n\\n // Clear metadata (if any)\\n if (bytes(_tokenURIs[tokenId]).length != 0) {\\n delete _tokenURIs[tokenId];\\n }\\n\\n _holderTokens[owner].remove(tokenId);\\n\\n _tokenOwners.remove(tokenId);\\n\\n emit Transfer(owner, address(0), tokenId);\\n }\\n\\n /**\\n * @dev Transfers `tokenId` from `from` to `to`.\\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _transfer(address from, address to, uint256 tokenId) internal virtual {\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer of token that is not own\\\"); // internal owner\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId);\\n\\n // Clear approvals from the previous owner\\n _approve(address(0), tokenId);\\n\\n _holderTokens[from].remove(tokenId);\\n _holderTokens[to].add(tokenId);\\n\\n _tokenOwners.set(tokenId, to);\\n\\n emit Transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {\\n require(_exists(tokenId), \\\"ERC721Metadata: URI set of nonexistent token\\\");\\n _tokenURIs[tokenId] = _tokenURI;\\n }\\n\\n /**\\n * @dev Internal function to set the base URI for all token IDs. It is\\n * automatically added as a prefix to the value returned in {tokenURI},\\n * or to the token ID if {tokenURI} is empty.\\n */\\n function _setBaseURI(string memory baseURI_) internal virtual {\\n _baseURI = baseURI_;\\n }\\n\\n /**\\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\\n * The call is not executed if the target address is not a contract.\\n *\\n * @param from address representing the previous owner of the given token ID\\n * @param to target address that will receive the tokens\\n * @param tokenId uint256 ID of the token to be transferred\\n * @param _data bytes optional data to send along with the call\\n * @return bool whether the call correctly returned the expected magic value\\n */\\n function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data)\\n private returns (bool)\\n {\\n if (!to.isContract()) {\\n return true;\\n }\\n bytes memory returndata = to.functionCall(abi.encodeWithSelector(\\n IERC721Receiver(to).onERC721Received.selector,\\n _msgSender(),\\n from,\\n tokenId,\\n _data\\n ), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n bytes4 retval = abi.decode(returndata, (bytes4));\\n return (retval == _ERC721_RECEIVED);\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * Emits an {Approval} event.\\n */\\n function _approve(address to, uint256 tokenId) internal virtual {\\n _tokenApprovals[tokenId] = to;\\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId); // internal owner\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\\n * transferred to `to`.\\n * - When `from` is zero, `tokenId` will be minted for `to`.\\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { }\\n}\\n\",\"keccak256\":\"0x118ed7540f56b21ff92e21ebaa73584048e98d2ac04ca67571329bb8dbd9032f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"../../introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n}\\n\",\"keccak256\":\"0x2d99a0deb6648c34fbc66d6ac4a2d64798d7a5321b45624f6736fadc63da1962\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"./IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Enumerable is IERC721 {\\n\\n /**\\n * @dev Returns the total amount of tokens stored by the contract.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns a token ID owned by `owner` at a given `index` of its token list.\\n * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);\\n\\n /**\\n * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.\\n * Use along with {totalSupply} to enumerate all tokens.\\n */\\n function tokenByIndex(uint256 index) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xe6bd1b1218338b6f9fe17776f48623b4ac3d8a40405f74a44bc23c00abe2ca13\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\n\\nimport \\\"./IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xccb917776f826ac6b68bd5a15a5f711e3967848a52ba11e6104d9a4f593314a7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721Receiver {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.\\n */\\n function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0x52146049d6709c870e8ddcd988b5155cb6c5d640cfcd8978aee52bc1ba2ec4eb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\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 { size := extcodesize(account) }\\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, \\\"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, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Counters.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../math/SafeMath.sol\\\";\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath}\\n * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never\\n * directly accessed.\\n */\\nlibrary Counters {\\n using SafeMath for uint256;\\n\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n // The {SafeMath} overflow check can be skipped here, see the comment at the top\\n counter._value += 1;\\n }\\n\\n function decrement(Counter storage counter) internal {\\n counter._value = counter._value.sub(1);\\n }\\n}\\n\",\"keccak256\":\"0x21662e4254ce4ac8570b30cc7ab31435966b3cb778a56ba4d09276881cfb2437\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/EnumerableMap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 *\\n * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are\\n * supported.\\n */\\nlibrary EnumerableMap {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Map type with\\n // bytes32 keys and values.\\n // The Map implementation uses private functions, and user-facing\\n // implementations (such as Uint256ToAddressMap) are just wrappers around\\n // the underlying Map.\\n // This means that we can only create new EnumerableMaps for types that fit\\n // in bytes32.\\n\\n struct MapEntry {\\n bytes32 _key;\\n bytes32 _value;\\n }\\n\\n struct Map {\\n // Storage of map keys and values\\n MapEntry[] _entries;\\n\\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 (bytes32 => 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(Map storage map, bytes32 key, bytes32 value) private 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 if (keyIndex == 0) { // Equivalent to !contains(map, key)\\n map._entries.push(MapEntry({ _key: key, _value: value }));\\n // The entry is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n map._indexes[key] = map._entries.length;\\n return true;\\n } else {\\n map._entries[keyIndex - 1]._value = value;\\n return false;\\n }\\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(Map storage map, bytes32 key) private 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 if (keyIndex != 0) { // Equivalent to contains(map, key)\\n // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one\\n // in the array, and then remove the last entry (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = keyIndex - 1;\\n uint256 lastIndex = map._entries.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 MapEntry 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 map._entries.pop();\\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(Map storage map, bytes32 key) private 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(Map storage map) private view returns (uint256) {\\n return map._entries.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(Map storage map, uint256 index) private view returns (bytes32, bytes32) {\\n require(map._entries.length > index, \\\"EnumerableMap: index out of bounds\\\");\\n\\n MapEntry storage entry = map._entries[index];\\n return (entry._key, entry._value);\\n }\\n\\n /**\\n * @dev Tries to returns the value associated with `key`. O(1).\\n * Does not revert if `key` is not in the map.\\n */\\n function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key)\\n return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based\\n }\\n\\n /**\\n * @dev Returns the value associated with `key`. O(1).\\n *\\n * Requirements:\\n *\\n * - `key` must be in the map.\\n */\\n function _get(Map storage map, bytes32 key) private view returns (bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n require(keyIndex != 0, \\\"EnumerableMap: nonexistent key\\\"); // Equivalent to contains(map, key)\\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\\n }\\n\\n /**\\n * @dev Same as {_get}, with a custom error message when `key` is not in the map.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {_tryGet}.\\n */\\n function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) {\\n uint256 keyIndex = map._indexes[key];\\n require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key)\\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\\n }\\n\\n // UintToAddressMap\\n\\n struct UintToAddressMap {\\n Map _inner;\\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(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) {\\n return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the key was removed from the map, that is if it was present.\\n */\\n function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) {\\n return _remove(map._inner, bytes32(key));\\n }\\n\\n /**\\n * @dev Returns true if the key is in the map. O(1).\\n */\\n function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) {\\n return _contains(map._inner, bytes32(key));\\n }\\n\\n /**\\n * @dev Returns the number of elements in the map. O(1).\\n */\\n function length(UintToAddressMap storage map) internal view returns (uint256) {\\n return _length(map._inner);\\n }\\n\\n /**\\n * @dev Returns the element 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 *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) {\\n (bytes32 key, bytes32 value) = _at(map._inner, index);\\n return (uint256(key), address(uint160(uint256(value))));\\n }\\n\\n /**\\n * @dev Tries to returns the value associated with `key`. O(1).\\n * Does not revert if `key` is not in the map.\\n *\\n * _Available since v3.4._\\n */\\n function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) {\\n (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key));\\n return (success, address(uint160(uint256(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.\\n */\\n function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {\\n return address(uint160(uint256(_get(map._inner, bytes32(key)))));\\n }\\n\\n /**\\n * @dev Same as {get}, with a custom error message when `key` is not in the map.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryGet}.\\n */\\n function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) {\\n return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage))));\\n }\\n}\\n\",\"keccak256\":\"0x4b087f06b6670a131a5a14e53b1d2a5ef19c034cc5ec42eeebcf9554325744ad\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\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 (bytes32 => 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(Set storage set, bytes32 value) private 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(Set storage set, bytes32 value) private 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) { // 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 bytes32 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(Set storage set, bytes32 value) private 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(Set storage set) private 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(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\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(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\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(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\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(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\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 return _add(set._inner, bytes32(uint256(uint160(value))));\\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 return _remove(set._inner, bytes32(uint256(uint160(value))));\\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 _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\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 return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\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(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\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(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\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(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x1562cd9922fbf739edfb979f506809e2743789cbde3177515542161c3d04b164\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n uint256 index = digits - 1;\\n temp = value;\\n while (temp != 0) {\\n buffer[index--] = bytes1(uint8(48 + temp % 10));\\n temp /= 10;\\n }\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0xa1e12f97981f1d0964b1c048978606a57127c56c438bab61cdfe269cad859a74\",\"license\":\"MIT\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editGardenNFT(address _newGardenNFT) external;\\n\\n function editStrategyNFT(address _newStrategyNFT) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function editUniswapFactory(address _newUniswapFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\\n\\n function maxContributorsPerGarden() external view returns (uint256);\\n\\n function gardenCreationIsOpen() external view returns (bool);\\n\\n function openPublicGardenCreation() external;\\n\\n function setMaxContributorsPerGarden(uint256 _newMax) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function gardenNFT() external view returns (address);\\n\\n function strategyNFT() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\\n\\n function uniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0xdee5a27301c24f507d312f32249487fa9b0a756062a7e479405a1d1ee9ee7bb8\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function isGardenStrategy(address _strategy) external view returns (bool);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategyActiveInGarden(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to,\\n bool _withPenalty\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x88f1786ffee23e386aaa1735177912e1b5a7cdd440dafe52fb139fe50fd621b4\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n address,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x850597ec9a68eb86f31f13b6b77d3b31350b4ed3d0019dedfbd3550ad1a1d9e2\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategyNFT.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from './IGarden.sol';\\nimport {IBabController} from './IBabController.sol';\\n\\n/**\\n * @title IStrategyNFT\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Strategy NFT.\\n */\\ninterface IStrategyNFT {\\n struct StratDetail {\\n string name;\\n string symbol;\\n uint256 tokenId;\\n }\\n\\n function grantStrategyNFT(address _user, string memory _strategyTokenURI) external returns (uint256);\\n\\n function saveStrategyNameAndSymbol(\\n address _strategy,\\n string memory _name,\\n string memory _symbol\\n ) external;\\n\\n function getStrategyTokenURI(address _stratgy) external view returns (string memory);\\n\\n function getStrategyName(address _strategy) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x46fdbb37f7c283a4591a97880f1f5d7f57b0b0e58676ed33d727a88ab8823f89\",\"license\":\"Apache License\"},\"contracts/strategies/StrategyNFT.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {ERC721} from '@openzeppelin/contracts/token/ERC721/ERC721.sol';\\nimport {Counters} from '@openzeppelin/contracts/utils/Counters.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {IStrategyNFT} from '../interfaces/IStrategyNFT.sol';\\n\\n/**\\n * @title StrategyNFT\\n * @author Babylon Finance\\n *\\n * Contract the NFT for each Strategy\\n */\\ncontract StrategyNFT is ERC721, IStrategyNFT {\\n using Counters for Counters.Counter;\\n\\n /* ============ Events ============ */\\n\\n event StrategyNFTAwarded(address indexed _member, uint256 indexed _newItemId);\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlyStrategy {\\n IStrategy strategy = IStrategy(msg.sender);\\n require(\\n IGarden(strategy.garden()).isStrategyActiveInGarden(msg.sender) && controller.isSystemContract(msg.sender),\\n 'Only the strategy can mint the NFT'\\n );\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the Controller contract\\n IBabController public controller;\\n\\n mapping(address => StratDetail) public stratDetails;\\n\\n Counters.Counter private _tokenIds;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Sets the protocol controller\\n *\\n * @param _controller Address of controller contract\\n * @param _name Name of the garden\\n * @param _symbol Symbol of the garden\\n */\\n constructor(\\n address _controller,\\n string memory _name,\\n string memory _symbol\\n ) ERC721(_name, _symbol) {\\n require(address(_controller) != address(0), 'Controller must exist');\\n require(bytes(_name).length < 50, 'Strategy Name is too long');\\n controller = IBabController(_controller);\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Awards the garden NFT to a user and gives him access to a specific garden\\n *\\n * @param _user Address of the user\\n * @param _strategyTokenURI Strategy token URI\\n */\\n function grantStrategyNFT(address _user, string memory _strategyTokenURI)\\n external\\n override\\n onlyStrategy\\n returns (uint256)\\n {\\n require(address(_user) != address(0), 'User must exist');\\n _tokenIds.increment();\\n uint256 newItemId = _tokenIds.current();\\n _safeMint(_user, newItemId);\\n _setTokenURI(newItemId, _strategyTokenURI);\\n stratDetails[msg.sender].tokenId = newItemId;\\n emit StrategyNFTAwarded(_user, newItemId);\\n return newItemId;\\n }\\n\\n /**\\n * Saves the name an symbol for a new created strategy\\n *\\n * @param _strategy Address of the strategy\\n * @param _name Strategy Name\\n * @param _symbol Strategy Symbol\\n */\\n function saveStrategyNameAndSymbol(\\n address _strategy,\\n string memory _name,\\n string memory _symbol\\n ) external override {\\n require(controller.isSystemContract(msg.sender), 'Only a system contract can call this');\\n StratDetail storage stratDetail = stratDetails[_strategy];\\n stratDetail.name = _name;\\n stratDetail.symbol = _symbol;\\n }\\n\\n function getStrategyTokenURI(address _strategy) external view override returns (string memory) {\\n return tokenURI(stratDetails[_strategy].tokenId);\\n }\\n\\n function getStrategyName(address _strategy) external view override returns (string memory) {\\n return stratDetails[_strategy].name;\\n }\\n}\\n\",\"keccak256\":\"0xa88711b2d55e202e68808ecc77dcdedf5da3b79aa22ff7cbff25b25f3a7b4d03\",\"license\":\"Apache License\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b5060405162002b2738038062002b27833981810160405260608110156200003757600080fd5b8151602083018051604051929492938301929190846401000000008211156200005f57600080fd5b9083019060208201858111156200007557600080fd5b82516401000000008111828201881017156200009057600080fd5b82525081516020918201929091019080838360005b83811015620000bf578181015183820152602001620000a5565b50505050905090810190601f168015620000ed5780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011157600080fd5b9083019060208201858111156200012757600080fd5b82516401000000008111828201881017156200014257600080fd5b82525081516020918201929091019080838360005b838110156200017157818101518382015260200162000157565b50505050905090810190601f1680156200019f5780820380516001836020036101000a031916815260200191505b5060405250839150829050620001bc6301ffc9a760e01b620002fb565b8151620001d190600690602085019062000380565b508051620001e790600790602084019062000380565b50620001fa6380ac58cd60e01b620002fb565b6200020c635b5e139f60e01b620002fb565b6200021e63780e9d6360e01b620002fb565b50506001600160a01b0383166200027c576040805162461bcd60e51b815260206004820152601560248201527f436f6e74726f6c6c6572206d7573742065786973740000000000000000000000604482015290519081900360640190fd5b6032825110620002d3576040805162461bcd60e51b815260206004820152601960248201527f5374726174656779204e616d6520697320746f6f206c6f6e6700000000000000604482015290519081900360640190fd5b5050600a80546001600160a01b0319166001600160a01b03929092169190911790556200042c565b6001600160e01b031980821614156200035b576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620003b8576000855562000403565b82601f10620003d357805160ff191683800117855562000403565b8280016001018555821562000403579182015b8281111562000403578251825591602001919060010190620003e6565b506200041192915062000415565b5090565b5b8082111562000411576000815560010162000416565b6126eb806200043c6000396000f3fe608060405234801561001057600080fd5b506004361061018d5760003560e01c80634f6ccce7116100e3578063a99fffbe1161008c578063c87b56dd11610066578063c87b56dd14610829578063e985e9c514610846578063f77c4791146108745761018d565b8063a99fffbe14610632578063b88d4fde14610658578063c3d971901461071e5761018d565b806370a08231116100bd57806370a08231146105d657806395d89b41146105fc578063a22cb465146106045761018d565b80634f6ccce7146105945780636352211e146105b15780636c0360eb146105ce5761018d565b806318160ddd116101455780632f745c591161011f5780632f745c591461047c5780633b5bb1d5146104a857806342842e0e1461055e5761018d565b806318160ddd1461040657806323b0e4151461042057806323b872dd146104465761018d565b8063081812fc11610176578063081812fc14610262578063095ea7b31461029b5780630cfa5cda146102c95761018d565b806301ffc9a71461019257806306fdde03146101e5575b600080fd5b6101d1600480360360208110156101a857600080fd5b50357fffffffff000000000000000000000000000000000000000000000000000000001661087c565b604080519115158252519081900360200190f35b6101ed6108b7565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561022757818101518382015260200161020f565b50505050905090810190601f1680156102545780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61027f6004803603602081101561027857600080fd5b503561094d565b604080516001600160a01b039092168252519081900360200190f35b6102c7600480360360408110156102b157600080fd5b506001600160a01b0381351690602001356109af565b005b6102c7600480360360608110156102df57600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561030a57600080fd5b82018360208201111561031c57600080fd5b8035906020019184600183028401116401000000008311171561033e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561039157600080fd5b8201836020820111156103a357600080fd5b803590602001918460018302840111640100000000831117156103c557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610a8a945050505050565b61040e610b86565b60408051918252519081900360200190f35b6101ed6004803603602081101561043657600080fd5b50356001600160a01b0316610b97565b6102c76004803603606081101561045c57600080fd5b506001600160a01b03813581169160208101359091169060400135610c42565b61040e6004803603604081101561049257600080fd5b506001600160a01b038135169060200135610c99565b61040e600480360360408110156104be57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156104e957600080fd5b8201836020820111156104fb57600080fd5b8035906020019184600183028401116401000000008311171561051d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610cc4945050505050565b6102c76004803603606081101561057457600080fd5b506001600160a01b03813581169160208101359091169060400135610f4d565b61040e600480360360208110156105aa57600080fd5b5035610f68565b61027f600480360360208110156105c757600080fd5b5035610f7e565b6101ed610fa6565b61040e600480360360208110156105ec57600080fd5b50356001600160a01b0316611007565b6101ed61106f565b6102c76004803603604081101561061a57600080fd5b506001600160a01b03813516906020013515156110d0565b6101ed6004803603602081101561064857600080fd5b50356001600160a01b03166111d5565b6102c76004803603608081101561066e57600080fd5b6001600160a01b038235811692602081013590911691604082013591908101906080810160608201356401000000008111156106a957600080fd5b8201836020820111156106bb57600080fd5b803590602001918460018302840111640100000000831117156106dd57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506111fd945050505050565b6107446004803603602081101561073457600080fd5b50356001600160a01b031661125b565b604051808060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561078b578181015183820152602001610773565b50505050905090810190601f1680156107b85780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156107eb5781810151838201526020016107d3565b50505050905090810190601f1680156108185780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b6101ed6004803603602081101561083f57600080fd5b50356113a0565b6101d16004803603604081101561085c57600080fd5b506001600160a01b0381358116916020013516611621565b61027f61164f565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526020819052604090205460ff165b919050565b60068054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156109435780601f1061091857610100808354040283529160200191610943565b820191906000526020600020905b81548152906001019060200180831161092657829003601f168201915b5050505050905090565b60006109588261165e565b6109935760405162461bcd60e51b815260040180806020018281038252602c81526020018061256e602c913960400191505060405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006109ba82610f7e565b9050806001600160a01b0316836001600160a01b03161415610a0d5760405162461bcd60e51b815260040180806020018281038252602181526020018061261e6021913960400191505060405180910390fd5b806001600160a01b0316610a1f61166b565b6001600160a01b03161480610a405750610a4081610a3b61166b565b611621565b610a7b5760405162461bcd60e51b81526004018080602001828103825260388152602001806124c16038913960400191505060405180910390fd5b610a85838361166f565b505050565b600a54604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b158015610ad557600080fd5b505afa158015610ae9573d6000803e3d6000fd5b505050506040513d6020811015610aff57600080fd5b5051610b3c5760405162461bcd60e51b815260040180806020018281038252602481526020018061263f6024913960400191505060405180910390fd5b6001600160a01b0383166000908152600b6020908152604090912083519091610b6991839186019061237b565b508151610b7f906001830190602085019061237b565b5050505050565b6000610b9260026116f5565b905090565b6001600160a01b0381166000908152600b602090815260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845260609392830182828015610c365780601f10610c0b57610100808354040283529160200191610c36565b820191906000526020600020905b815481529060010190602001808311610c1957829003601f168201915b50505050509050919050565b610c53610c4d61166b565b82611700565b610c8e5760405162461bcd60e51b81526004018080602001828103825260318152602001806126856031913960400191505060405180910390fd5b610a858383836117a4565b6001600160a01b0382166000908152600160205260408120610cbb90836118f0565b90505b92915050565b600080339050806001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015610d0357600080fd5b505afa158015610d17573d6000803e3d6000fd5b505050506040513d6020811015610d2d57600080fd5b5051604080517f17ab9f2000000000000000000000000000000000000000000000000000000000815233600482015290516001600160a01b03909216916317ab9f2091602480820192602092909190829003018186803b158015610d9057600080fd5b505afa158015610da4573d6000803e3d6000fd5b505050506040513d6020811015610dba57600080fd5b50518015610e3b5750600a54604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b158015610e0e57600080fd5b505afa158015610e22573d6000803e3d6000fd5b505050506040513d6020811015610e3857600080fd5b50515b610e765760405162461bcd60e51b81526004018080602001828103825260228152602001806126636022913960400191505060405180910390fd5b6001600160a01b038416610ed1576040805162461bcd60e51b815260206004820152600f60248201527f55736572206d7573742065786973740000000000000000000000000000000000604482015290519081900360640190fd5b610edb600c6118fc565b6000610ee7600c611905565b9050610ef38582611909565b610efd8185611927565b336000908152600b60205260408082206002018390555182916001600160a01b038816917f1fd9e9066bc1aced4997ab415f2984f25d421a50ce3131bee73e3f3a30c5ccbb9190a3949350505050565b610a85838383604051806020016040528060008152506111fd565b600080610f7660028461198a565b509392505050565b6000610cbe8260405180606001604052806029815260200161252360299139600291906119a6565b60098054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156109435780601f1061091857610100808354040283529160200191610943565b60006001600160a01b03821661104e5760405162461bcd60e51b815260040180806020018281038252602a8152602001806124f9602a913960400191505060405180910390fd5b6001600160a01b0382166000908152600160205260409020610cbe906116f5565b60078054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156109435780601f1061091857610100808354040283529160200191610943565b6110d861166b565b6001600160a01b0316826001600160a01b0316141561113e576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b806005600061114b61166b565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff19169215159290921790915561118f61166b565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b6001600160a01b0381166000908152600b6020526040902060020154606090610cbe906113a0565b61120e61120861166b565b83611700565b6112495760405162461bcd60e51b81526004018080602001828103825260318152602001806126856031913960400191505060405180910390fd5b611255848484846119bd565b50505050565b600b6020908152600091825260409182902080548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084529092918391908301828280156112f25780601f106112c7576101008083540402835291602001916112f2565b820191906000526020600020905b8154815290600101906020018083116112d557829003601f168201915b505050505090806001018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156113905780601f1061136557610100808354040283529160200191611390565b820191906000526020600020905b81548152906001019060200180831161137357829003601f168201915b5050505050908060020154905083565b60606113ab8261165e565b6113e65760405162461bcd60e51b815260040180806020018281038252602f8152602001806125ef602f913960400191505060405180910390fd5b60008281526008602090815260408083208054825160026001831615610100026000190190921691909104601f8101859004850282018501909352828152929091908301828280156114795780601f1061144e57610100808354040283529160200191611479565b820191906000526020600020905b81548152906001019060200180831161145c57829003601f168201915b50505050509050600061148a610fa6565b905080516000141561149e575090506108b2565b81511561155f5780826040516020018083805190602001908083835b602083106114d95780518252601f1990920191602091820191016114ba565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106115215780518252601f199092019160209182019101611502565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052925050506108b2565b8061156985611a0f565b6040516020018083805190602001908083835b6020831061159b5780518252601f19909201916020918201910161157c565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106115e35780518252601f1990920191602091820191016115c4565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405292505050919050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b600a546001600160a01b031681565b6000610cbe600283611b1e565b3390565b600081815260046020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03841690811790915581906116bc82610f7e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000610cbe82611905565b600061170b8261165e565b6117465760405162461bcd60e51b815260040180806020018281038252602c815260200180612495602c913960400191505060405180910390fd5b600061175183610f7e565b9050806001600160a01b0316846001600160a01b0316148061178c5750836001600160a01b03166117818461094d565b6001600160a01b0316145b8061179c575061179c8185611621565b949350505050565b826001600160a01b03166117b782610f7e565b6001600160a01b0316146117fc5760405162461bcd60e51b81526004018080602001828103825260298152602001806125c66029913960400191505060405180910390fd5b6001600160a01b0382166118415760405162461bcd60e51b81526004018080602001828103825260248152602001806124716024913960400191505060405180910390fd5b61184c838383610a85565b61185760008261166f565b6001600160a01b03831660009081526001602052604090206118799082611b2a565b506001600160a01b038216600090815260016020526040902061189c9082611b36565b506118a960028284611b42565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000610cbb8383611b58565b80546001019055565b5490565b611923828260405180602001604052806000815250611bbc565b5050565b6119308261165e565b61196b5760405162461bcd60e51b815260040180806020018281038252602c81526020018061259a602c913960400191505060405180910390fd5b60008281526008602090815260409091208251610a859284019061237b565b60008080806119998686611c0e565b9097909650945050505050565b60006119b3848484611c89565b90505b9392505050565b6119c88484846117a4565b6119d484848484611d53565b6112555760405162461bcd60e51b815260040180806020018281038252603281526020018061243f6032913960400191505060405180910390fd5b606081611a50575060408051808201909152600181527f300000000000000000000000000000000000000000000000000000000000000060208201526108b2565b8160005b8115611a6857600101600a82049150611a54565b60008167ffffffffffffffff81118015611a8157600080fd5b506040519080825280601f01601f191660200182016040528015611aac576020820181803683370190505b50859350905060001982015b8315611b1557600a840660300160f81b82828060019003935081518110611adb57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a84049350611ab8565b50949350505050565b6000610cbb8383611efd565b6000610cbb8383611f15565b6000610cbb8383611fdb565b60006119b384846001600160a01b038516612025565b81546000908210611b9a5760405162461bcd60e51b815260040180806020018281038252602281526020018061241d6022913960400191505060405180910390fd5b826000018281548110611ba957fe5b9060005260206000200154905092915050565b611bc683836120bc565b611bd36000848484611d53565b610a855760405162461bcd60e51b815260040180806020018281038252603281526020018061243f6032913960400191505060405180910390fd5b815460009081908310611c525760405162461bcd60e51b815260040180806020018281038252602281526020018061254c6022913960400191505060405180910390fd5b6000846000018481548110611c6357fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b60008281526001840160205260408120548281611d245760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611ce9578181015183820152602001611cd1565b50505050905090810190601f168015611d165780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50846000016001820381548110611d3757fe5b9060005260206000209060020201600101549150509392505050565b6000611d67846001600160a01b03166121ea565b611d735750600161179c565b6000611eab630a85bd0160e11b611d8861166b565b88878760405160240180856001600160a01b03168152602001846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611def578181015183820152602001611dd7565b50505050905090810190601f168015611e1c5780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405180606001604052806032815260200161243f603291396001600160a01b03881691906121f0565b90506000818060200190516020811015611ec457600080fd5b50517fffffffff0000000000000000000000000000000000000000000000000000000016630a85bd0160e11b1492505050949350505050565b60009081526001919091016020526040902054151590565b60008181526001830160205260408120548015611fd15783546000198083019190810190600090879083908110611f4857fe5b9060005260206000200154905080876000018481548110611f6557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080611f9557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610cbe565b6000915050610cbe565b6000611fe78383611efd565b61201d57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610cbe565b506000610cbe565b60008281526001840160205260408120548061208a5750506040805180820182528381526020808201848152865460018181018955600089815284812095516002909302909501918255915190820155865486845281880190925292909120556119b6565b8285600001600183038154811061209d57fe5b90600052602060002090600202016001018190555060009150506119b6565b6001600160a01b038216612117576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b6121208161165e565b15612172576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b61217e60008383610a85565b6001600160a01b03821660009081526001602052604090206121a09082611b36565b506121ad60028284611b42565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b3b151590565b60606119b3848460008585612204856121ea565b612255576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106122935780518252601f199092019160209182019101612274565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146122f5576040519150601f19603f3d011682016040523d82523d6000602084013e6122fa565b606091505b509150915061230a828286612315565b979650505050505050565b606083156123245750816119b6565b8251156123345782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315611ce9578181015183820152602001611cd1565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826123b157600085556123f7565b82601f106123ca57805160ff19168380011785556123f7565b828001600101855582156123f7579182015b828111156123f75782518255916020019190600101906123dc565b50612403929150612407565b5090565b5b80821115612403576000815560010161240856fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724552433732313a207472616e7366657220746f20746865207a65726f20616464726573734552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e64734552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732314d657461646174613a2055524920736574206f66206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314d657461646174613a2055524920717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724f6e6c7920612073797374656d20636f6e74726163742063616e2063616c6c20746869734f6e6c79207468652073747261746567792063616e206d696e7420746865204e46544552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564a264697066735822122062b937c057472987167578bae738d504ffa7a103a6dcc33d07ca5a40e41b298364736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061018d5760003560e01c80634f6ccce7116100e3578063a99fffbe1161008c578063c87b56dd11610066578063c87b56dd14610829578063e985e9c514610846578063f77c4791146108745761018d565b8063a99fffbe14610632578063b88d4fde14610658578063c3d971901461071e5761018d565b806370a08231116100bd57806370a08231146105d657806395d89b41146105fc578063a22cb465146106045761018d565b80634f6ccce7146105945780636352211e146105b15780636c0360eb146105ce5761018d565b806318160ddd116101455780632f745c591161011f5780632f745c591461047c5780633b5bb1d5146104a857806342842e0e1461055e5761018d565b806318160ddd1461040657806323b0e4151461042057806323b872dd146104465761018d565b8063081812fc11610176578063081812fc14610262578063095ea7b31461029b5780630cfa5cda146102c95761018d565b806301ffc9a71461019257806306fdde03146101e5575b600080fd5b6101d1600480360360208110156101a857600080fd5b50357fffffffff000000000000000000000000000000000000000000000000000000001661087c565b604080519115158252519081900360200190f35b6101ed6108b7565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561022757818101518382015260200161020f565b50505050905090810190601f1680156102545780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61027f6004803603602081101561027857600080fd5b503561094d565b604080516001600160a01b039092168252519081900360200190f35b6102c7600480360360408110156102b157600080fd5b506001600160a01b0381351690602001356109af565b005b6102c7600480360360608110156102df57600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561030a57600080fd5b82018360208201111561031c57600080fd5b8035906020019184600183028401116401000000008311171561033e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561039157600080fd5b8201836020820111156103a357600080fd5b803590602001918460018302840111640100000000831117156103c557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610a8a945050505050565b61040e610b86565b60408051918252519081900360200190f35b6101ed6004803603602081101561043657600080fd5b50356001600160a01b0316610b97565b6102c76004803603606081101561045c57600080fd5b506001600160a01b03813581169160208101359091169060400135610c42565b61040e6004803603604081101561049257600080fd5b506001600160a01b038135169060200135610c99565b61040e600480360360408110156104be57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156104e957600080fd5b8201836020820111156104fb57600080fd5b8035906020019184600183028401116401000000008311171561051d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610cc4945050505050565b6102c76004803603606081101561057457600080fd5b506001600160a01b03813581169160208101359091169060400135610f4d565b61040e600480360360208110156105aa57600080fd5b5035610f68565b61027f600480360360208110156105c757600080fd5b5035610f7e565b6101ed610fa6565b61040e600480360360208110156105ec57600080fd5b50356001600160a01b0316611007565b6101ed61106f565b6102c76004803603604081101561061a57600080fd5b506001600160a01b03813516906020013515156110d0565b6101ed6004803603602081101561064857600080fd5b50356001600160a01b03166111d5565b6102c76004803603608081101561066e57600080fd5b6001600160a01b038235811692602081013590911691604082013591908101906080810160608201356401000000008111156106a957600080fd5b8201836020820111156106bb57600080fd5b803590602001918460018302840111640100000000831117156106dd57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506111fd945050505050565b6107446004803603602081101561073457600080fd5b50356001600160a01b031661125b565b604051808060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561078b578181015183820152602001610773565b50505050905090810190601f1680156107b85780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156107eb5781810151838201526020016107d3565b50505050905090810190601f1680156108185780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b6101ed6004803603602081101561083f57600080fd5b50356113a0565b6101d16004803603604081101561085c57600080fd5b506001600160a01b0381358116916020013516611621565b61027f61164f565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526020819052604090205460ff165b919050565b60068054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156109435780601f1061091857610100808354040283529160200191610943565b820191906000526020600020905b81548152906001019060200180831161092657829003601f168201915b5050505050905090565b60006109588261165e565b6109935760405162461bcd60e51b815260040180806020018281038252602c81526020018061256e602c913960400191505060405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006109ba82610f7e565b9050806001600160a01b0316836001600160a01b03161415610a0d5760405162461bcd60e51b815260040180806020018281038252602181526020018061261e6021913960400191505060405180910390fd5b806001600160a01b0316610a1f61166b565b6001600160a01b03161480610a405750610a4081610a3b61166b565b611621565b610a7b5760405162461bcd60e51b81526004018080602001828103825260388152602001806124c16038913960400191505060405180910390fd5b610a85838361166f565b505050565b600a54604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b158015610ad557600080fd5b505afa158015610ae9573d6000803e3d6000fd5b505050506040513d6020811015610aff57600080fd5b5051610b3c5760405162461bcd60e51b815260040180806020018281038252602481526020018061263f6024913960400191505060405180910390fd5b6001600160a01b0383166000908152600b6020908152604090912083519091610b6991839186019061237b565b508151610b7f906001830190602085019061237b565b5050505050565b6000610b9260026116f5565b905090565b6001600160a01b0381166000908152600b602090815260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845260609392830182828015610c365780601f10610c0b57610100808354040283529160200191610c36565b820191906000526020600020905b815481529060010190602001808311610c1957829003601f168201915b50505050509050919050565b610c53610c4d61166b565b82611700565b610c8e5760405162461bcd60e51b81526004018080602001828103825260318152602001806126856031913960400191505060405180910390fd5b610a858383836117a4565b6001600160a01b0382166000908152600160205260408120610cbb90836118f0565b90505b92915050565b600080339050806001600160a01b03166356ba88b86040518163ffffffff1660e01b815260040160206040518083038186803b158015610d0357600080fd5b505afa158015610d17573d6000803e3d6000fd5b505050506040513d6020811015610d2d57600080fd5b5051604080517f17ab9f2000000000000000000000000000000000000000000000000000000000815233600482015290516001600160a01b03909216916317ab9f2091602480820192602092909190829003018186803b158015610d9057600080fd5b505afa158015610da4573d6000803e3d6000fd5b505050506040513d6020811015610dba57600080fd5b50518015610e3b5750600a54604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b158015610e0e57600080fd5b505afa158015610e22573d6000803e3d6000fd5b505050506040513d6020811015610e3857600080fd5b50515b610e765760405162461bcd60e51b81526004018080602001828103825260228152602001806126636022913960400191505060405180910390fd5b6001600160a01b038416610ed1576040805162461bcd60e51b815260206004820152600f60248201527f55736572206d7573742065786973740000000000000000000000000000000000604482015290519081900360640190fd5b610edb600c6118fc565b6000610ee7600c611905565b9050610ef38582611909565b610efd8185611927565b336000908152600b60205260408082206002018390555182916001600160a01b038816917f1fd9e9066bc1aced4997ab415f2984f25d421a50ce3131bee73e3f3a30c5ccbb9190a3949350505050565b610a85838383604051806020016040528060008152506111fd565b600080610f7660028461198a565b509392505050565b6000610cbe8260405180606001604052806029815260200161252360299139600291906119a6565b60098054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156109435780601f1061091857610100808354040283529160200191610943565b60006001600160a01b03821661104e5760405162461bcd60e51b815260040180806020018281038252602a8152602001806124f9602a913960400191505060405180910390fd5b6001600160a01b0382166000908152600160205260409020610cbe906116f5565b60078054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156109435780601f1061091857610100808354040283529160200191610943565b6110d861166b565b6001600160a01b0316826001600160a01b0316141561113e576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b806005600061114b61166b565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff19169215159290921790915561118f61166b565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b6001600160a01b0381166000908152600b6020526040902060020154606090610cbe906113a0565b61120e61120861166b565b83611700565b6112495760405162461bcd60e51b81526004018080602001828103825260318152602001806126856031913960400191505060405180910390fd5b611255848484846119bd565b50505050565b600b6020908152600091825260409182902080548351601f600260001961010060018616150201909316929092049182018490048402810184019094528084529092918391908301828280156112f25780601f106112c7576101008083540402835291602001916112f2565b820191906000526020600020905b8154815290600101906020018083116112d557829003601f168201915b505050505090806001018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156113905780601f1061136557610100808354040283529160200191611390565b820191906000526020600020905b81548152906001019060200180831161137357829003601f168201915b5050505050908060020154905083565b60606113ab8261165e565b6113e65760405162461bcd60e51b815260040180806020018281038252602f8152602001806125ef602f913960400191505060405180910390fd5b60008281526008602090815260408083208054825160026001831615610100026000190190921691909104601f8101859004850282018501909352828152929091908301828280156114795780601f1061144e57610100808354040283529160200191611479565b820191906000526020600020905b81548152906001019060200180831161145c57829003601f168201915b50505050509050600061148a610fa6565b905080516000141561149e575090506108b2565b81511561155f5780826040516020018083805190602001908083835b602083106114d95780518252601f1990920191602091820191016114ba565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106115215780518252601f199092019160209182019101611502565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052925050506108b2565b8061156985611a0f565b6040516020018083805190602001908083835b6020831061159b5780518252601f19909201916020918201910161157c565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106115e35780518252601f1990920191602091820191016115c4565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405292505050919050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b600a546001600160a01b031681565b6000610cbe600283611b1e565b3390565b600081815260046020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03841690811790915581906116bc82610f7e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000610cbe82611905565b600061170b8261165e565b6117465760405162461bcd60e51b815260040180806020018281038252602c815260200180612495602c913960400191505060405180910390fd5b600061175183610f7e565b9050806001600160a01b0316846001600160a01b0316148061178c5750836001600160a01b03166117818461094d565b6001600160a01b0316145b8061179c575061179c8185611621565b949350505050565b826001600160a01b03166117b782610f7e565b6001600160a01b0316146117fc5760405162461bcd60e51b81526004018080602001828103825260298152602001806125c66029913960400191505060405180910390fd5b6001600160a01b0382166118415760405162461bcd60e51b81526004018080602001828103825260248152602001806124716024913960400191505060405180910390fd5b61184c838383610a85565b61185760008261166f565b6001600160a01b03831660009081526001602052604090206118799082611b2a565b506001600160a01b038216600090815260016020526040902061189c9082611b36565b506118a960028284611b42565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000610cbb8383611b58565b80546001019055565b5490565b611923828260405180602001604052806000815250611bbc565b5050565b6119308261165e565b61196b5760405162461bcd60e51b815260040180806020018281038252602c81526020018061259a602c913960400191505060405180910390fd5b60008281526008602090815260409091208251610a859284019061237b565b60008080806119998686611c0e565b9097909650945050505050565b60006119b3848484611c89565b90505b9392505050565b6119c88484846117a4565b6119d484848484611d53565b6112555760405162461bcd60e51b815260040180806020018281038252603281526020018061243f6032913960400191505060405180910390fd5b606081611a50575060408051808201909152600181527f300000000000000000000000000000000000000000000000000000000000000060208201526108b2565b8160005b8115611a6857600101600a82049150611a54565b60008167ffffffffffffffff81118015611a8157600080fd5b506040519080825280601f01601f191660200182016040528015611aac576020820181803683370190505b50859350905060001982015b8315611b1557600a840660300160f81b82828060019003935081518110611adb57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a84049350611ab8565b50949350505050565b6000610cbb8383611efd565b6000610cbb8383611f15565b6000610cbb8383611fdb565b60006119b384846001600160a01b038516612025565b81546000908210611b9a5760405162461bcd60e51b815260040180806020018281038252602281526020018061241d6022913960400191505060405180910390fd5b826000018281548110611ba957fe5b9060005260206000200154905092915050565b611bc683836120bc565b611bd36000848484611d53565b610a855760405162461bcd60e51b815260040180806020018281038252603281526020018061243f6032913960400191505060405180910390fd5b815460009081908310611c525760405162461bcd60e51b815260040180806020018281038252602281526020018061254c6022913960400191505060405180910390fd5b6000846000018481548110611c6357fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b60008281526001840160205260408120548281611d245760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611ce9578181015183820152602001611cd1565b50505050905090810190601f168015611d165780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50846000016001820381548110611d3757fe5b9060005260206000209060020201600101549150509392505050565b6000611d67846001600160a01b03166121ea565b611d735750600161179c565b6000611eab630a85bd0160e11b611d8861166b565b88878760405160240180856001600160a01b03168152602001846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611def578181015183820152602001611dd7565b50505050905090810190601f168015611e1c5780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405180606001604052806032815260200161243f603291396001600160a01b03881691906121f0565b90506000818060200190516020811015611ec457600080fd5b50517fffffffff0000000000000000000000000000000000000000000000000000000016630a85bd0160e11b1492505050949350505050565b60009081526001919091016020526040902054151590565b60008181526001830160205260408120548015611fd15783546000198083019190810190600090879083908110611f4857fe5b9060005260206000200154905080876000018481548110611f6557fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080611f9557fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610cbe565b6000915050610cbe565b6000611fe78383611efd565b61201d57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610cbe565b506000610cbe565b60008281526001840160205260408120548061208a5750506040805180820182528381526020808201848152865460018181018955600089815284812095516002909302909501918255915190820155865486845281880190925292909120556119b6565b8285600001600183038154811061209d57fe5b90600052602060002090600202016001018190555060009150506119b6565b6001600160a01b038216612117576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b6121208161165e565b15612172576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b61217e60008383610a85565b6001600160a01b03821660009081526001602052604090206121a09082611b36565b506121ad60028284611b42565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b3b151590565b60606119b3848460008585612204856121ea565b612255576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106122935780518252601f199092019160209182019101612274565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146122f5576040519150601f19603f3d011682016040523d82523d6000602084013e6122fa565b606091505b509150915061230a828286612315565b979650505050505050565b606083156123245750816119b6565b8251156123345782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315611ce9578181015183820152602001611cd1565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826123b157600085556123f7565b82601f106123ca57805160ff19168380011785556123f7565b828001600101855582156123f7579182015b828111156123f75782518255916020019190600101906123dc565b50612403929150612407565b5090565b5b80821115612403576000815560010161240856fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724552433732313a207472616e7366657220746f20746865207a65726f20616464726573734552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e64734552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732314d657461646174613a2055524920736574206f66206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314d657461646174613a2055524920717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724f6e6c7920612073797374656d20636f6e74726163742063616e2063616c6c20746869734f6e6c79207468652073747261746567792063616e206d696e7420746865204e46544552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564a264697066735822122062b937c057472987167578bae738d504ffa7a103a6dcc33d07ca5a40e41b298364736f6c63430007060033", + "devdoc": { + "author": "Babylon Finance Contract the NFT for each Strategy", + "kind": "dev", + "methods": { + "approve(address,uint256)": { + "details": "See {IERC721-approve}." + }, + "balanceOf(address)": { + "details": "See {IERC721-balanceOf}." + }, + "baseURI()": { + "details": "Returns the base URI set via {_setBaseURI}. This will be automatically added as a prefix in {tokenURI} to each token's URI, or to the token ID if no specific URI is set for that token ID." + }, + "constructor": { + "params": { + "_controller": "Address of controller contract", + "_name": "Name of the garden", + "_symbol": "Symbol of the garden" + } + }, + "getApproved(uint256)": { + "details": "See {IERC721-getApproved}." + }, + "grantStrategyNFT(address,string)": { + "params": { + "_strategyTokenURI": "Strategy token URI", + "_user": "Address of the user" + } + }, + "isApprovedForAll(address,address)": { + "details": "See {IERC721-isApprovedForAll}." + }, + "name()": { + "details": "See {IERC721Metadata-name}." + }, + "ownerOf(uint256)": { + "details": "See {IERC721-ownerOf}." + }, + "safeTransferFrom(address,address,uint256)": { + "details": "See {IERC721-safeTransferFrom}." + }, + "safeTransferFrom(address,address,uint256,bytes)": { + "details": "See {IERC721-safeTransferFrom}." + }, + "saveStrategyNameAndSymbol(address,string,string)": { + "params": { + "_name": "Strategy Name", + "_strategy": "Address of the strategy", + "_symbol": "Strategy Symbol" + } + }, + "setApprovalForAll(address,bool)": { + "details": "See {IERC721-setApprovalForAll}." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}. Time complexity O(1), guaranteed to always use less than 30 000 gas." + }, + "symbol()": { + "details": "See {IERC721Metadata-symbol}." + }, + "tokenByIndex(uint256)": { + "details": "See {IERC721Enumerable-tokenByIndex}." + }, + "tokenOfOwnerByIndex(address,uint256)": { + "details": "See {IERC721Enumerable-tokenOfOwnerByIndex}." + }, + "tokenURI(uint256)": { + "details": "See {IERC721Metadata-tokenURI}." + }, + "totalSupply()": { + "details": "See {IERC721Enumerable-totalSupply}." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC721-transferFrom}." + } + }, + "title": "StrategyNFT", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "constructor": { + "notice": "Sets the protocol controller" + }, + "grantStrategyNFT(address,string)": { + "notice": "Awards the garden NFT to a user and gives him access to a specific garden" + }, + "saveStrategyNameAndSymbol(address,string,string)": { + "notice": "Saves the name an symbol for a new created strategy" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1572, + "contract": "contracts/strategies/StrategyNFT.sol:StrategyNFT", + "label": "_supportedInterfaces", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes4,t_bool)" + }, + { + "astId": 3081, + "contract": "contracts/strategies/StrategyNFT.sol:StrategyNFT", + "label": "_holderTokens", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_struct(UintSet)5497_storage)" + }, + { + "astId": 3083, + "contract": "contracts/strategies/StrategyNFT.sol:StrategyNFT", + "label": "_tokenOwners", + "offset": 0, + "slot": "2", + "type": "t_struct(UintToAddressMap)4874_storage" + }, + { + "astId": 3087, + "contract": "contracts/strategies/StrategyNFT.sol:StrategyNFT", + "label": "_tokenApprovals", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_uint256,t_address)" + }, + { + "astId": 3093, + "contract": "contracts/strategies/StrategyNFT.sol:StrategyNFT", + "label": "_operatorApprovals", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" + }, + { + "astId": 3095, + "contract": "contracts/strategies/StrategyNFT.sol:StrategyNFT", + "label": "_name", + "offset": 0, + "slot": "6", + "type": "t_string_storage" + }, + { + "astId": 3097, + "contract": "contracts/strategies/StrategyNFT.sol:StrategyNFT", + "label": "_symbol", + "offset": 0, + "slot": "7", + "type": "t_string_storage" + }, + { + "astId": 3101, + "contract": "contracts/strategies/StrategyNFT.sol:StrategyNFT", + "label": "_tokenURIs", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_uint256,t_string_storage)" + }, + { + "astId": 3103, + "contract": "contracts/strategies/StrategyNFT.sol:StrategyNFT", + "label": "_baseURI", + "offset": 0, + "slot": "9", + "type": "t_string_storage" + }, + { + "astId": 31319, + "contract": "contracts/strategies/StrategyNFT.sol:StrategyNFT", + "label": "controller", + "offset": 0, + "slot": "10", + "type": "t_contract(IBabController)22767" + }, + { + "astId": 31323, + "contract": "contracts/strategies/StrategyNFT.sol:StrategyNFT", + "label": "stratDetails", + "offset": 0, + "slot": "11", + "type": "t_mapping(t_address,t_struct(StratDetail)24030_storage)" + }, + { + "astId": 31325, + "contract": "contracts/strategies/StrategyNFT.sol:StrategyNFT", + "label": "_tokenIds", + "offset": 0, + "slot": "12", + "type": "t_struct(Counter)4500_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_struct(MapEntry)4548_storage)dyn_storage": { + "base": "t_struct(MapEntry)4548_storage", + "encoding": "dynamic_array", + "label": "struct EnumerableMap.MapEntry[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes4": { + "encoding": "inplace", + "label": "bytes4", + "numberOfBytes": "4" + }, + "t_contract(IBabController)22767": { + "encoding": "inplace", + "label": "contract IBabController", + "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_struct(StratDetail)24030_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct IStrategyNFT.StratDetail)", + "numberOfBytes": "32", + "value": "t_struct(StratDetail)24030_storage" + }, + "t_mapping(t_address,t_struct(UintSet)5497_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.UintSet)", + "numberOfBytes": "32", + "value": "t_struct(UintSet)5497_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes4,t_bool)": { + "encoding": "mapping", + "key": "t_bytes4", + "label": "mapping(bytes4 => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_uint256,t_address)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_uint256,t_string_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => string)", + "numberOfBytes": "32", + "value": "t_string_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Counter)4500_storage": { + "encoding": "inplace", + "label": "struct Counters.Counter", + "members": [ + { + "astId": 4499, + "contract": "contracts/strategies/StrategyNFT.sol:StrategyNFT", + "label": "_value", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Map)4556_storage": { + "encoding": "inplace", + "label": "struct EnumerableMap.Map", + "members": [ + { + "astId": 4551, + "contract": "contracts/strategies/StrategyNFT.sol:StrategyNFT", + "label": "_entries", + "offset": 0, + "slot": "0", + "type": "t_array(t_struct(MapEntry)4548_storage)dyn_storage" + }, + { + "astId": 4555, + "contract": "contracts/strategies/StrategyNFT.sol:StrategyNFT", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(MapEntry)4548_storage": { + "encoding": "inplace", + "label": "struct EnumerableMap.MapEntry", + "members": [ + { + "astId": 4545, + "contract": "contracts/strategies/StrategyNFT.sol:StrategyNFT", + "label": "_key", + "offset": 0, + "slot": "0", + "type": "t_bytes32" + }, + { + "astId": 4547, + "contract": "contracts/strategies/StrategyNFT.sol:StrategyNFT", + "label": "_value", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)5111_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 5106, + "contract": "contracts/strategies/StrategyNFT.sol:StrategyNFT", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 5110, + "contract": "contracts/strategies/StrategyNFT.sol:StrategyNFT", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(StratDetail)24030_storage": { + "encoding": "inplace", + "label": "struct IStrategyNFT.StratDetail", + "members": [ + { + "astId": 24025, + "contract": "contracts/strategies/StrategyNFT.sol:StrategyNFT", + "label": "name", + "offset": 0, + "slot": "0", + "type": "t_string_storage" + }, + { + "astId": 24027, + "contract": "contracts/strategies/StrategyNFT.sol:StrategyNFT", + "label": "symbol", + "offset": 0, + "slot": "1", + "type": "t_string_storage" + }, + { + "astId": 24029, + "contract": "contracts/strategies/StrategyNFT.sol:StrategyNFT", + "label": "tokenId", + "offset": 0, + "slot": "2", + "type": "t_uint256" + } + ], + "numberOfBytes": "96" + }, + "t_struct(UintSet)5497_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.UintSet", + "members": [ + { + "astId": 5496, + "contract": "contracts/strategies/StrategyNFT.sol:StrategyNFT", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)5111_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(UintToAddressMap)4874_storage": { + "encoding": "inplace", + "label": "struct EnumerableMap.UintToAddressMap", + "members": [ + { + "astId": 4873, + "contract": "contracts/strategies/StrategyNFT.sol:StrategyNFT", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Map)4556_storage" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/artifacts/mainnet/SushiswapPoolIntegration.json b/deployments/artifacts/mainnet/SushiswapPoolIntegration.json index 4ec3c3041..937fd3ce6 100644 --- a/deployments/artifacts/mainnet/SushiswapPoolIntegration.json +++ b/deployments/artifacts/mainnet/SushiswapPoolIntegration.json @@ -1,5 +1,5 @@ { - "address": "0x0e0FFFB6a55C88670874e1d3e638F10Bdde43C5a", + "address": "0x5AB55c258a206faed897b79376660E20A82D7281", "abi": [ { "inputs": [ @@ -358,31 +358,31 @@ "type": "function" } ], - "transactionHash": "0x3fffea46dcea26ef82cd7d8c5180ffb9d802a9741c6d903d00f118943323a5e5", + "transactionHash": "0x499097db2e0028faea5a41d181e307f07bda442ce1a9b9a8599484efe25e0b73", "receipt": { "to": null, "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", - "contractAddress": "0x0e0FFFB6a55C88670874e1d3e638F10Bdde43C5a", - "transactionIndex": 88, + "contractAddress": "0x5AB55c258a206faed897b79376660E20A82D7281", + "transactionIndex": 126, "gasUsed": "1981247", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xa08610504e0852d05c7766396141df55b495d3bd3c992484205bbe5e5ae6fede", - "transactionHash": "0x3fffea46dcea26ef82cd7d8c5180ffb9d802a9741c6d903d00f118943323a5e5", + "blockHash": "0x1bc29fdf0c3a857549ebc43763d72a2c5c07c3851f4e78736975bd4411b99330", + "transactionHash": "0x499097db2e0028faea5a41d181e307f07bda442ce1a9b9a8599484efe25e0b73", "logs": [], - "blockNumber": 12360975, - "cumulativeGasUsed": "7695372", + "blockNumber": 12451289, + "cumulativeGasUsed": "7703946", "status": 1, "byzantium": true }, "args": [ - "0xffe7c30daDb1B132b86aB7bbede496615d54c8Ac", + "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F", "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", "0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F" ], - "solcInputHash": "a02a2075cf667a20c416d2d0a5e8f337", - "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_weth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_sushiswapRouterAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_pool\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_poolTokensOut\",\"type\":\"uint256\"}],\"name\":\"PoolEntered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_pool\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_poolTokensIn\",\"type\":\"uint256\"}],\"name\":\"PoolExited\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MAX_DELTA_BLOCKS\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_poolTokensIn\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"_tokensOut\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_minAmountsOut\",\"type\":\"uint256[]\"}],\"name\":\"exitPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_liquidity\",\"type\":\"uint256\"}],\"name\":\"getPoolMinAmountsOut\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_minAmountsOut\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"}],\"name\":\"getPoolTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getPoolTokensOut\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"getPoolWeights\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"initializedByGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"}],\"name\":\"isPool\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_poolTokensOut\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"_tokensIn\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_maxAmountsIn\",\"type\":\"uint256[]\"}],\"name\":\"joinPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"uniRouter\",\"outputs\":[{\"internalType\":\"contract IUniswapV2Router\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Protocol Sushiswap Protocol pool integration\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of the controller\",\"_sushiswapRouterAddress\":\"Address of Sushiswap router\",\"_weth\":\"Address of the WETH ERC20\"}},\"exitPool(address,address,uint256,address[],uint256[])\":{\"params\":{\"_minAmountsOut\":\"Array of min token quantities to receive from the pool\",\"_poolAddress\":\"Address of the pool token to join\",\"_poolTokensIn\":\"Pool tokens to exchange for the underlying tokens\",\"_strategy\":\"Address of the strategy\",\"_tokensOut\":\"Array of token addresses to withdraw\"}},\"isPool(address)\":{\"params\":{\"_poolAddress\":\"Pool address to check\"},\"returns\":{\"_0\":\"bool True if the address is a pool\"}},\"joinPool(address,address,uint256,address[],uint256[])\":{\"params\":{\"_maxAmountsIn\":\"Array of max token quantities to pull out from the garden\",\"_poolAddress\":\"Address of the pool token to join\",\"_poolTokensOut\":\"Min amount of pool tokens to receive\",\"_strategy\":\"Address of the strategy\",\"_tokensIn\":\"Array of token addresses to deposit\"}}},\"title\":\"SushiswapPoolIntegration\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates the integration\"},\"exitPool(address,address,uint256,address[],uint256[])\":{\"notice\":\"Exits a liquidity pool. Accrue protocol fee (if any)\"},\"getName()\":{\"notice\":\"Returns the name of the integration\"},\"isPool(address)\":{\"notice\":\"Checks whether a pool address is valid\"},\"joinPool(address,address,uint256,address[],uint256[])\":{\"notice\":\"Joins a pool\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/integrations/pool/SushiswapPoolIntegration.sol\":\"SushiswapPoolIntegration\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\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 /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\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, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x7b2b8baa20fd60ab4a328c8e34c64a353651b80ba4b5b157cbb61813f6f85d55\",\"license\":\"MIT\"},\"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol\":{\"content\":\"pragma solidity >=0.5.0;\\n\\ninterface IUniswapV2Pair {\\n event Approval(address indexed owner, address indexed spender, uint value);\\n event Transfer(address indexed from, address indexed to, uint value);\\n\\n function name() external pure returns (string memory);\\n function symbol() external pure returns (string memory);\\n function decimals() external pure returns (uint8);\\n function totalSupply() external view returns (uint);\\n function balanceOf(address owner) external view returns (uint);\\n function allowance(address owner, address spender) external view returns (uint);\\n\\n function approve(address spender, uint value) external returns (bool);\\n function transfer(address to, uint value) external returns (bool);\\n function transferFrom(address from, address to, uint value) external returns (bool);\\n\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n function PERMIT_TYPEHASH() external pure returns (bytes32);\\n function nonces(address owner) external view returns (uint);\\n\\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\\n\\n event Mint(address indexed sender, uint amount0, uint amount1);\\n event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\\n event Swap(\\n address indexed sender,\\n uint amount0In,\\n uint amount1In,\\n uint amount0Out,\\n uint amount1Out,\\n address indexed to\\n );\\n event Sync(uint112 reserve0, uint112 reserve1);\\n\\n function MINIMUM_LIQUIDITY() external pure returns (uint);\\n function factory() external view returns (address);\\n function token0() external view returns (address);\\n function token1() external view returns (address);\\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\\n function price0CumulativeLast() external view returns (uint);\\n function price1CumulativeLast() external view returns (uint);\\n function kLast() external view returns (uint);\\n\\n function mint(address to) external returns (uint liquidity);\\n function burn(address to) external returns (uint amount0, uint amount1);\\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\\n function skim(address to) external;\\n function sync() external;\\n\\n function initialize(address, address) external;\\n}\\n\",\"keccak256\":\"0x7c9bc70e5996c763e02ff38905282bc24fb242b0ef2519a003b36824fc524a4b\"},\"contracts/integrations/BaseIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IIntegration} from '../interfaces/IIntegration.sol';\\nimport {IWETH} from '../interfaces/external/weth/IWETH.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\n\\n/**\\n * @title BaseIntegration\\n * @author Babylon Finance\\n *\\n * Abstract class that houses common Integration-related state and functions.\\n */\\nabstract contract BaseIntegration {\\n using SafeCast for int256;\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlySystemContract() {\\n require(IBabController(controller).isSystemContract(msg.sender), 'Only system can call this');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the controller\\n address public controller;\\n // Wrapped ETH address\\n address public immutable weth;\\n // Name of the integration\\n string public name;\\n mapping(address => bool) public initializedByGarden;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) {\\n require(_controller != address(0), 'Controller must be defined');\\n name = _name;\\n controller = _controller;\\n weth = _weth;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the name of the integration\\n */\\n function getName() external view returns (string memory) {\\n return name;\\n }\\n}\\n\",\"keccak256\":\"0xf15da8b024a5a4f205b363420cb5851fd1c4225970999aed5f00d829bbd4f638\",\"license\":\"Apache License\"},\"contracts/integrations/pool/PoolIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\n\\nimport {IPoolIntegration} from '../../interfaces/IPoolIntegration.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\n\\nimport {BaseIntegration} from '../BaseIntegration.sol';\\n\\n/**\\n * @title PoolIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Base class for integration with trading protocols\\n */\\nabstract contract PoolIntegration is BaseIntegration, ReentrancyGuard, IPoolIntegration {\\n using SafeMath for uint256;\\n using SafeCast for uint256;\\n\\n /* ============ Struct ============ */\\n\\n struct PoolInfo {\\n IGarden garden; // Garden address\\n IStrategy strategy; // Strategy address\\n address pool; // Pool address\\n uint256 totalSupply; // Total Supply of the pool\\n uint256 poolTokensInTransaction; // Pool tokens affected by this transaction\\n uint256 poolTokensInStrategy; // Pool tokens strategy balance\\n uint256[] limitPoolTokenQuantities;\\n }\\n\\n /* ============ Events ============ */\\n\\n event PoolEntered(address indexed _strategy, address indexed _garden, address _pool, uint256 _poolTokensOut);\\n\\n event PoolExited(address indexed _strategy, address indexed _garden, address _pool, uint256 _poolTokensIn);\\n\\n /* ============ Constants ============ */\\n\\n uint256 internal constant SLIPPAGE_ALLOWED = 1e16; // 1%\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) BaseIntegration(_name, _weth, _controller) {}\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Joins a pool\\n *\\n * @param _strategy Address of the strategy\\n * @param _poolAddress Address of the pool token to join\\n * @param _poolTokensOut Min amount of pool tokens to receive\\n * @param _tokensIn Array of token addresses to deposit\\n * @param _maxAmountsIn Array of max token quantities to pull out from the garden\\n */\\n function joinPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensOut,\\n address[] calldata _tokensIn,\\n uint256[] calldata _maxAmountsIn\\n ) external override nonReentrant onlySystemContract {\\n PoolInfo memory poolInfo = _createPoolInfo(_strategy, _poolAddress, _poolTokensOut, _tokensIn, _maxAmountsIn);\\n _validatePreJoinPoolData(poolInfo);\\n // Approve spending of the tokens\\n for (uint256 i = 0; i < _tokensIn.length; i++) {\\n // No need to approve ETH\\n if (_tokensIn[i] != address(0)) {\\n poolInfo.strategy.invokeApprove(_getSpender(_poolAddress), _tokensIn[i], _maxAmountsIn[i]);\\n }\\n }\\n (address targetPool, uint256 callValue, bytes memory methodData) =\\n _getJoinPoolCalldata(_strategy, _poolAddress, _poolTokensOut, _tokensIn, _maxAmountsIn);\\n poolInfo.strategy.invokeFromIntegration(targetPool, callValue, methodData);\\n poolInfo.poolTokensInTransaction = IERC20(poolInfo.pool).balanceOf(address(poolInfo.strategy)).sub(\\n poolInfo.poolTokensInStrategy\\n );\\n _validatePostJoinPoolData(poolInfo);\\n\\n emit PoolEntered(address(poolInfo.strategy), address(poolInfo.garden), poolInfo.pool, _poolTokensOut);\\n }\\n\\n /**\\n * Exits a liquidity pool. Accrue protocol fee (if any)\\n *\\n * @param _strategy Address of the strategy\\n * @param _poolAddress Address of the pool token to join\\n * @param _poolTokensIn Pool tokens to exchange for the underlying tokens\\n * @param _tokensOut Array of token addresses to withdraw\\n * @param _minAmountsOut Array of min token quantities to receive from the pool\\n */\\n function exitPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensIn,\\n address[] calldata _tokensOut,\\n uint256[] calldata _minAmountsOut\\n ) external override nonReentrant onlySystemContract {\\n PoolInfo memory poolInfo = _createPoolInfo(_strategy, _poolAddress, _poolTokensIn, _tokensOut, _minAmountsOut);\\n _validatePreExitPoolData(poolInfo);\\n // Approve spending of the pool token\\n poolInfo.strategy.invokeApprove(_getSpender(_poolAddress), _poolAddress, _poolTokensIn);\\n\\n (address targetPool, uint256 callValue, bytes memory methodData) =\\n _getExitPoolCalldata(_strategy, _poolAddress, _poolTokensIn, _tokensOut, _minAmountsOut);\\n poolInfo.strategy.invokeFromIntegration(targetPool, callValue, methodData);\\n _validatePostExitPoolData(poolInfo);\\n\\n emit PoolExited(address(poolInfo.strategy), address(poolInfo.garden), poolInfo.pool, _poolTokensIn);\\n }\\n\\n /**\\n * Checks whether a pool address is valid\\n *\\n * @param _poolAddress Pool address to check\\n * @return bool True if the address is a pool\\n */\\n function isPool(address _poolAddress) external view override returns (bool) {\\n return _isPool(_poolAddress);\\n }\\n\\n function getPoolTokens(\\n address /* _poolAddress */\\n ) external view virtual override returns (address[] memory);\\n\\n function getPoolWeights(\\n address /*_poolAddress */\\n ) external view virtual override returns (uint256[] memory);\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Create and return PoolInfo struct\\n *\\n * @param _strategy Address of the strategy\\n * @param _pool Address of the pool\\n * @param _poolTokensInTransaction Number of pool tokens involved\\n * hparam _poolTokens Addresseses of the pool tokens\\n * @param _limitPoolTokenQuantities Limit quantity of the pool tokens\\n *\\n * return PoolInfo Struct containing data for pool\\n */\\n function _createPoolInfo(\\n address _strategy,\\n address _pool,\\n uint256 _poolTokensInTransaction,\\n address[] calldata, /* _poolTokens */\\n uint256[] calldata _limitPoolTokenQuantities\\n ) internal view returns (PoolInfo memory) {\\n PoolInfo memory poolInfo;\\n poolInfo.strategy = IStrategy(_strategy);\\n poolInfo.garden = IGarden(poolInfo.strategy.garden());\\n poolInfo.pool = _pool;\\n poolInfo.totalSupply = IERC20(_pool).totalSupply();\\n poolInfo.poolTokensInStrategy = IERC20(_pool).balanceOf(_strategy);\\n poolInfo.poolTokensInTransaction = _poolTokensInTransaction;\\n poolInfo.limitPoolTokenQuantities = _limitPoolTokenQuantities;\\n\\n return poolInfo;\\n }\\n\\n /**\\n * Validate pre pool join data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePreJoinPoolData(PoolInfo memory _poolInfo) internal view {\\n require(_isPool(_poolInfo.pool), 'The pool address is not valid');\\n require(_poolInfo.poolTokensInTransaction > 0, 'Min pool tokens to receive must be greater than 0');\\n }\\n\\n /**\\n * Validate pre pool data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePreExitPoolData(PoolInfo memory _poolInfo) internal view {\\n require(_isPool(_poolInfo.pool), 'The pool address is not valid');\\n require(_poolInfo.poolTokensInTransaction > 0, 'Pool tokens to exchange must be greater than 0');\\n require(\\n _poolInfo.poolTokensInStrategy >= _poolInfo.poolTokensInTransaction,\\n 'The strategy does not have enough pool tokens'\\n );\\n }\\n\\n /**\\n * Validate post join pool data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePostJoinPoolData(PoolInfo memory _poolInfo) internal view {\\n require(\\n (IERC20(_poolInfo.pool).balanceOf(address(_poolInfo.strategy)) > _poolInfo.poolTokensInStrategy),\\n 'The strategy did not receive the pool tokens'\\n );\\n }\\n\\n /**\\n * Validate post exit pool data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePostExitPoolData(PoolInfo memory _poolInfo) internal view {\\n require(\\n IERC20(_poolInfo.pool).balanceOf(address(_poolInfo.strategy)) ==\\n _poolInfo.poolTokensInStrategy - _poolInfo.poolTokensInTransaction,\\n 'The strategy did not return the pool tokens'\\n );\\n // TODO: validate individual tokens received\\n }\\n\\n /**\\n * Return join pool calldata which is already generated from the pool API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * hparam _poolTokensOut Amount of pool tokens to send\\n * hparam _tokensIn Addresses of tokens to send to the pool\\n * hparam _maxAmountsIn Amounts of tokens to send to the pool\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getJoinPoolCalldata(\\n address, /* _strategy */\\n address, /* _poolAddress */\\n uint256, /* _poolTokensOut */\\n address[] calldata, /* _tokensIn */\\n uint256[] calldata /* _maxAmountsIn */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n /**\\n * Return exit pool calldata which is already generated from the pool API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * hparam _poolTokensIn Amount of pool tokens to receive\\n * hparam _tokensOut Addresses of tokens to receive\\n * hparam _minAmountsOut Amounts of pool tokens to receive\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getExitPoolCalldata(\\n address, /* _strategy */\\n address, /* _poolAddress */\\n uint256, /* _poolTokensIn */\\n address[] calldata, /* _tokensOut */\\n uint256[] calldata /* _minAmountsOut */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n function _isPool(\\n address /* _poolAddress */\\n ) internal view virtual returns (bool);\\n\\n function _getSpender(\\n address /* _poolAddress */\\n ) internal view virtual returns (address);\\n}\\n\",\"keccak256\":\"0x0b8b81675c457a05c1a2ab85cf840cd8504bb7a6a1d68c0969d80755b423c3e6\",\"license\":\"Apache License\"},\"contracts/integrations/pool/SushiswapPoolIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {UniswapPoolIntegration} from './UniswapPoolIntegration.sol';\\n\\n/**\\n * @title SushiswapPoolIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Sushiswap Protocol pool integration\\n */\\ncontract SushiswapPoolIntegration is UniswapPoolIntegration {\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _controller Address of the controller\\n * @param _weth Address of the WETH ERC20\\n * @param _sushiswapRouterAddress Address of Sushiswap router\\n */\\n constructor(\\n address _controller,\\n address _weth,\\n address _sushiswapRouterAddress\\n ) UniswapPoolIntegration(_controller, _weth, _sushiswapRouterAddress) {\\n name = 'sushiswap_pool';\\n }\\n}\\n\",\"keccak256\":\"0x2dca19f5563a84e9ee2c542cd86f0bd1f5ccfda2cba2c68c212a564df54c7a77\",\"license\":\"Apache License\"},\"contracts/integrations/pool/UniswapPoolIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';\\nimport {PoolIntegration} from './PoolIntegration.sol';\\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\\nimport {IUniswapV2Router} from '../../interfaces/external/uniswap/IUniswapV2Router.sol';\\n\\n/**\\n * @title BalancerIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Kyber protocol trade integration\\n */\\ncontract UniswapPoolIntegration is PoolIntegration {\\n using SafeMath for uint256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ State Variables ============ */\\n\\n // Address of Uniswap V2 Router\\n IUniswapV2Router public uniRouter;\\n\\n /* ============ Constants ============ */\\n\\n uint8 public immutable MAX_DELTA_BLOCKS = 5;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _controller Address of the controller\\n * @param _weth Address of the WETH ERC20\\n * @param _uniswapRouterAddress Address of Uniswap router\\n */\\n constructor(\\n address _controller,\\n address _weth,\\n address _uniswapRouterAddress\\n ) PoolIntegration('uniswap_pool', _weth, _controller) {\\n uniRouter = IUniswapV2Router(_uniswapRouterAddress);\\n }\\n\\n /* ============ External Functions ============ */\\n\\n function getPoolTokens(address _poolAddress) external view override returns (address[] memory) {\\n address[] memory result = new address[](2);\\n result[0] = IUniswapV2Pair(_poolAddress).token0();\\n result[1] = IUniswapV2Pair(_poolAddress).token1();\\n return result;\\n }\\n\\n function getPoolWeights(\\n address /* _poolAddress */\\n ) external pure override returns (uint256[] memory) {\\n uint256[] memory result = new uint256[](2);\\n result[0] = 5e17; // 50%\\n result[1] = 5e17; // 50%\\n return result;\\n }\\n\\n function getPoolTokensOut(\\n address, /* _poolAddress */\\n address, /* _poolToken */\\n uint256 /* _maxAmountsIn */\\n ) external pure override returns (uint256) {\\n // return 1 since _poolTokensOut are not used\\n return 1;\\n }\\n\\n function getPoolMinAmountsOut(address _poolAddress, uint256 _liquidity)\\n external\\n view\\n override\\n returns (uint256[] memory _minAmountsOut)\\n {\\n uint256 totalSupply = IUniswapV2Pair(_poolAddress).totalSupply();\\n uint256[] memory result = new uint256[](2);\\n result[0] = IERC20(IUniswapV2Pair(_poolAddress).token0())\\n .balanceOf(_poolAddress)\\n .mul(_liquidity)\\n .div(totalSupply)\\n .preciseMul(1e18 - SLIPPAGE_ALLOWED);\\n result[1] = IERC20(IUniswapV2Pair(_poolAddress).token1())\\n .balanceOf(_poolAddress)\\n .mul(_liquidity)\\n .div(totalSupply)\\n .preciseMul(1e18 - SLIPPAGE_ALLOWED);\\n return result;\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n function _isPool(address _poolAddress) internal pure override returns (bool) {\\n return IUniswapV2Pair(_poolAddress).MINIMUM_LIQUIDITY() > 0;\\n }\\n\\n function _getSpender(\\n address //_poolAddress\\n ) internal view override returns (address) {\\n return address(uniRouter);\\n }\\n\\n /**\\n * Return join pool calldata which is already generated from the pool API\\n *\\n * @param _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * hparam _poolTokensOut Amount of pool tokens to send\\n * @param _tokensIn Addresses of tokens to send to the pool\\n * @param _maxAmountsIn Amounts of tokens to send to the pool\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getJoinPoolCalldata(\\n address _strategy,\\n address, /* _poolAddress */\\n uint256, /* _poolTokensOut */\\n address[] calldata _tokensIn,\\n uint256[] calldata _maxAmountsIn\\n )\\n internal\\n view\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n // Encode method data for Garden to invoke\\n require(_tokensIn.length == 2, 'Two tokens required');\\n require(_maxAmountsIn.length == 2, 'Two amounts required');\\n return (address(uniRouter), 0, _getMethodData(_strategy, _tokensIn, _maxAmountsIn));\\n }\\n\\n function _getMethodData(\\n address _strategy,\\n address[] calldata _tokensIn,\\n uint256[] calldata _maxAmountsIn\\n ) private view returns (bytes memory) {\\n return\\n abi.encodeWithSignature(\\n 'addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)',\\n _tokensIn[0],\\n _tokensIn[1],\\n _maxAmountsIn[0],\\n _maxAmountsIn[1],\\n _maxAmountsIn[0].sub(_maxAmountsIn[0].preciseMul(SLIPPAGE_ALLOWED)),\\n _maxAmountsIn[1].sub(_maxAmountsIn[1].preciseMul(SLIPPAGE_ALLOWED)),\\n _strategy,\\n block.timestamp.add(MAX_DELTA_BLOCKS)\\n );\\n }\\n\\n /**\\n * Return exit pool calldata which is already generated from the pool API\\n *\\n * @param _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * @param _poolTokensIn Amount of pool tokens to liquidate\\n * @param _tokensOut Addresses of tokens to receive\\n * @param _minAmountsOut Amounts of tokens to receive\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getExitPoolCalldata(\\n address _strategy,\\n address, /* _poolAddress */\\n uint256 _poolTokensIn,\\n address[] calldata _tokensOut,\\n uint256[] calldata _minAmountsOut\\n )\\n internal\\n view\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n require(_tokensOut.length == 2, 'Two tokens required');\\n require(_minAmountsOut.length == 2, 'Two amounts required');\\n // Encode method data for Garden to invoke\\n bytes memory methodData =\\n abi.encodeWithSignature(\\n 'removeLiquidity(address,address,uint256,uint256,uint256,address,uint256)',\\n _tokensOut[0],\\n _tokensOut[1],\\n _poolTokensIn,\\n _minAmountsOut[0],\\n _minAmountsOut[1],\\n _strategy,\\n block.timestamp.add(MAX_DELTA_BLOCKS)\\n );\\n\\n return (address(uniRouter), 0, methodData);\\n }\\n}\\n\",\"keccak256\":\"0xa2fb8569345f5cfdf0243a0c64ddc09e563943e52187385dee005a22b8f505b4\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityMinimum(uint256 _minRiskyPairLiquidityEth) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minRiskyPairLiquidityEth() external view returns (uint256);\\n\\n function getUniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0x57cf4ece98219f805a416e8c24728d30d9b37c4126d66785d2617b97e35ffae6\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function nftAddress() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategy(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function reenableEthForStrategies() external;\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x5e460136e0b45024ea1c1f32cde607f3ce75dd5b14cee34007d6bbd08beabc82\",\"license\":\"Apache License\"},\"contracts/interfaces/IIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIntegration\\n * @author Babylon Finance\\n *\\n * Interface for protocol integrations\\n */\\ninterface IIntegration {\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xee03c9274ddf3257e3bfd2bb229fea3412c9105f178e64174f59efeafd53182c\",\"license\":\"Apache License\"},\"contracts/interfaces/IPoolIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPoolIntegration\\n * @author Babylon Finance\\n *\\n * Interface for liquiditypool protocol integrations\\n */\\ninterface IPoolIntegration {\\n function joinPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensOut,\\n address[] memory _poolTokens,\\n uint256[] memory _maxAmountsIn\\n ) external;\\n\\n function exitPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensIn,\\n address[] memory _poolTokens,\\n uint256[] memory _minAmountsOut\\n ) external;\\n\\n function getPoolTokens(address _poolAddress) external view returns (address[] memory);\\n\\n function getPoolWeights(address _poolAddress) external view returns (uint256[] memory);\\n\\n function getPoolTokensOut(\\n address _poolAdress,\\n address _tokenAddress,\\n uint256 _maxAmountsIn\\n ) external view returns (uint256);\\n\\n function getPoolMinAmountsOut(address _poolAddress, uint256 _poolTokenAmount)\\n external\\n view\\n returns (uint256[] memory _minAmountsOut);\\n\\n function isPool(address _poolAddress) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xee7df0934dad8d729ee6dacf85e1ec327a0c8e17bcabaa2afa7d14d93325f9ac\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital,\\n address _strategyNft\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function strategyNft() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x4396906e436eb68c96715e0a53ae1656ac5d7934ebdaeb58ec3c33953465bc39\",\"license\":\"Apache License\"},\"contracts/interfaces/external/uniswap/IUniswapV2Router.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\ninterface IUniswapV2Router {\\n function factory() external pure returns (address);\\n\\n function WETH() external pure returns (address);\\n\\n function addLiquidity(\\n address tokenA,\\n address tokenB,\\n uint256 amountADesired,\\n uint256 amountBDesired,\\n uint256 amountAMin,\\n uint256 amountBMin,\\n address to,\\n uint256 deadline\\n )\\n external\\n returns (\\n uint256 amountA,\\n uint256 amountB,\\n uint256 liquidity\\n );\\n\\n function addLiquidityETH(\\n address token,\\n uint256 amountTokenDesired,\\n uint256 amountTokenMin,\\n uint256 amountETHMin,\\n address to,\\n uint256 deadline\\n )\\n external\\n payable\\n returns (\\n uint256 amountToken,\\n uint256 amountETH,\\n uint256 liquidity\\n );\\n\\n function removeLiquidity(\\n address tokenA,\\n address tokenB,\\n uint256 liquidity,\\n uint256 amountAMin,\\n uint256 amountBMin,\\n address to,\\n uint256 deadline\\n ) external returns (uint256 amountA, uint256 amountB);\\n\\n function removeLiquidityETH(\\n address token,\\n uint256 liquidity,\\n uint256 amountTokenMin,\\n uint256 amountETHMin,\\n address to,\\n uint256 deadline\\n ) external returns (uint256 amountToken, uint256 amountETH);\\n\\n function removeLiquidityWithPermit(\\n address tokenA,\\n address tokenB,\\n uint256 liquidity,\\n uint256 amountAMin,\\n uint256 amountBMin,\\n address to,\\n uint256 deadline,\\n bool approveMax,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external returns (uint256 amountA, uint256 amountB);\\n\\n function removeLiquidityETHWithPermit(\\n address token,\\n uint256 liquidity,\\n uint256 amountTokenMin,\\n uint256 amountETHMin,\\n address to,\\n uint256 deadline,\\n bool approveMax,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external returns (uint256 amountToken, uint256 amountETH);\\n\\n function swapExactTokensForTokens(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address[] calldata path,\\n address to,\\n uint256 deadline\\n ) external returns (uint256[] memory amounts);\\n\\n function swapTokensForExactTokens(\\n uint256 amountOut,\\n uint256 amountInMax,\\n address[] calldata path,\\n address to,\\n uint256 deadline\\n ) external returns (uint256[] memory amounts);\\n\\n function swapExactETHForTokens(\\n uint256 amountOutMin,\\n address[] calldata path,\\n address to,\\n uint256 deadline\\n ) external payable returns (uint256[] memory amounts);\\n\\n function swapTokensForExactETH(\\n uint256 amountOut,\\n uint256 amountInMax,\\n address[] calldata path,\\n address to,\\n uint256 deadline\\n ) external returns (uint256[] memory amounts);\\n\\n function swapExactTokensForETH(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address[] calldata path,\\n address to,\\n uint256 deadline\\n ) external returns (uint256[] memory amounts);\\n\\n function swapETHForExactTokens(\\n uint256 amountOut,\\n address[] calldata path,\\n address to,\\n uint256 deadline\\n ) external payable returns (uint256[] memory amounts);\\n\\n function quote(\\n uint256 amountA,\\n uint256 reserveA,\\n uint256 reserveB\\n ) external pure returns (uint256 amountB);\\n\\n function getAmountOut(\\n uint256 amountIn,\\n uint256 reserveIn,\\n uint256 reserveOut\\n ) external pure returns (uint256 amountOut);\\n\\n function getAmountIn(\\n uint256 amountOut,\\n uint256 reserveIn,\\n uint256 reserveOut\\n ) external pure returns (uint256 amountIn);\\n\\n function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts);\\n\\n function getAmountsIn(uint256 amountOut, address[] calldata path) external view returns (uint256[] memory amounts);\\n}\\n\",\"keccak256\":\"0x9225efc2274e92f1d4eb00d8c576fa571fd11335087a23cf3d1787167fa00b64\",\"license\":\"Apache License\"},\"contracts/interfaces/external/weth/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface IWETH is IERC20 {\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n}\\n\",\"keccak256\":\"0xacc7980a650b7a753ee51f1bbc0ae4f641e84261bcc02cfdaf87ee8136483684\",\"license\":\"MIT\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c0604052600560f81b60a0523480156200001957600080fd5b506040516200238038038062002380833981810160405260608110156200003f57600080fd5b5080516020808301516040938401518451808601909552600c85526b1d5b9a5cddd85c17dc1bdbdb60a21b92850192909252919283908390839082848282826001600160a01b038116620000da576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c6572206d75737420626520646566696e6564000000000000604482015290519081900360640190fd5b8251620000ef90600190602086019062000183565b50600080546001600160a01b03199081166001600160a01b039384161790915560609290921b6001600160601b031916608052600160038190556004805490931697909116969096179055505060408051808201909152600e8082526d1cdd5cda1a5cddd85c17dc1bdbdb60921b6020909201918252620001799650939450929150620001839050565b505050506200022f565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001bb576000855562000206565b82601f10620001d657805160ff191683800117855562000206565b8280016001018555821562000206579182015b8281111562000206578251825591602001919060010190620001e9565b506200021492915062000218565b5090565b5b8082111562000214576000815560010162000219565b60805160601c60a05160f81c61211d620002636000398061062052806118465280611eb652508061064d525061211d6000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063708a34761161008c578063bd9d8ad911610066578063bd9d8ad91461042c578063ca4f2803146104a2578063f5e39325146104c8578063f77c4791146104f4576100ea565b8063708a34761461031c578063a0e47bf6146103fe578063b10198fb14610406576100ea565b80633cd5bd95116100c85780633cd5bd95146101925780633fc8cef3146101da5780635b16ebb7146101fe57806362cc395a14610238576100ea565b806306fdde03146100ef57806317d7de7c1461016c57806330adee6514610174575b600080fd5b6100f76104fc565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610131578181015183820152602001610119565b50505050905090810190601f16801561015e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100f7610589565b61017c61061e565b6040805160ff9092168252519081900360200190f35b6101c8600480360360608110156101a857600080fd5b506001600160a01b03813581169160208101359091169060400135610642565b60408051918252519081900360200190f35b6101e261064b565b604080516001600160a01b039092168252519081900360200190f35b6102246004803603602081101561021457600080fd5b50356001600160a01b031661066f565b604080519115158252519081900360200190f35b61031a600480360360a081101561024e57600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561028957600080fd5b82018360208201111561029b57600080fd5b803590602001918460208302840111640100000000831117156102bd57600080fd5b9193909290916020810190356401000000008111156102db57600080fd5b8201836020820111156102ed57600080fd5b8035906020019184602083028401116401000000008311171561030f57600080fd5b509092509050610680565b005b61031a600480360360a081101561033257600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561036d57600080fd5b82018360208201111561037f57600080fd5b803590602001918460208302840111640100000000831117156103a157600080fd5b9193909290916020810190356401000000008111156103bf57600080fd5b8201836020820111156103d157600080fd5b803590602001918460208302840111640100000000831117156103f357600080fd5b509092509050610a9d565b6101e2610fbc565b6102246004803603602081101561041c57600080fd5b50356001600160a01b0316610fcb565b6104526004803603602081101561044257600080fd5b50356001600160a01b0316610fe0565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561048e578181015183820152602001610476565b505050509050019250505060405180910390f35b610452600480360360208110156104b857600080fd5b50356001600160a01b031661104e565b610452600480360360408110156104de57600080fd5b506001600160a01b038135169060200135611198565b6101e26113c0565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105815780601f1061055657610100808354040283529160200191610581565b820191906000526020600020905b81548152906001019060200180831161056457829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156106145780601f106105e957610100808354040283529160200191610614565b820191906000526020600020905b8154815290600101906020018083116105f757829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b60019392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061067a826113cf565b92915050565b600260035414156106d8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b15801561072857600080fd5b505afa15801561073c573d6000803e3d6000fd5b505050506040513d602081101561075257600080fd5b50516107a5576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b60006107b68888888888888861143e565b90506107c181611631565b80602001516001600160a01b03166397ccdc606107dd8961171c565b89896040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561083557600080fd5b505af1158015610849573d6000803e3d6000fd5b5050505060008060006108618b8b8b8b8b8b8b61172c565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156108de5781810151838201526020016108c6565b50505050905090810190601f16801561090b5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561092c57600080fd5b505af1158015610940573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561096957600080fd5b810190808051604051939291908464010000000082111561098957600080fd5b90830190602082018581111561099e57600080fd5b82516401000000008111828201881017156109b857600080fd5b82525081516020918201929091019080838360005b838110156109e55781810151838201526020016109cd565b50505050905090810190601f168015610a125780820380516001836020036101000a031916815260200191505b5060405250505050610a2384611931565b83600001516001600160a01b031684602001516001600160a01b03167f7659e40cf608296ce5aa9eff9c80adc7a49cb481173fc4e302e3983827b042df86604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b60026003541415610af5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b158015610b4557600080fd5b505afa158015610b59573d6000803e3d6000fd5b505050506040513d6020811015610b6f57600080fd5b5051610bc2576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b6000610bd38888888888888861143e565b9050610bde816119f9565b60005b84811015610cd7576000868683818110610bf757fe5b905060200201356001600160a01b03166001600160a01b031614610ccf5781602001516001600160a01b03166397ccdc60610c318a61171c565b888885818110610c3d57fe5b905060200201356001600160a01b0316878786818110610c5957fe5b905060200201356040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015610cb657600080fd5b505af1158015610cca573d6000803e3d6000fd5b505050505b600101610be1565b506000806000610cec8b8b8b8b8b8b8b611a9a565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610d69578181015183820152602001610d51565b50505050905090810190601f168015610d965780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610db757600080fd5b505af1158015610dcb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610df457600080fd5b8101908080516040519392919084640100000000821115610e1457600080fd5b908301906020820185811115610e2957600080fd5b8251640100000000811182820188101715610e4357600080fd5b82525081516020918201929091019080838360005b83811015610e70578181015183820152602001610e58565b50505050905090810190601f168015610e9d5780820380516001836020036101000a031916815260200191505b5060405250505050610f348460a0015185604001516001600160a01b03166370a0823187602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f0257600080fd5b505afa158015610f16573d6000803e3d6000fd5b505050506040513d6020811015610f2c57600080fd5b505190611b77565b6080850152610f4284611bd4565b83600001516001600160a01b031684602001516001600160a01b03167fe5ca6288535c5c6c2462c912b4033eade15b80926717896a2d58a2defdeb912886604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b6004546001600160a01b031681565b60026020526000908152604090205460ff1681565b604080516002808252606080830184529260009291906020830190803683370190505090506706f05b59d3b200008160008151811061101b57fe5b6020026020010181815250506706f05b59d3b200008160018151811061103d57fe5b602090810291909101015292915050565b60408051600280825260608083018452926000929190602083019080368337019050509050826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156110ac57600080fd5b505afa1580156110c0573d6000803e3d6000fd5b505050506040513d60208110156110d657600080fd5b5051815182906000906110e557fe5b60200260200101906001600160a01b031690816001600160a01b031681525050826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561113e57600080fd5b505afa158015611152573d6000803e3d6000fd5b505050506040513d602081101561116857600080fd5b505181518290600190811061117957fe5b6001600160a01b03909216602092830291909101909101529050919050565b60606000836001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111d557600080fd5b505afa1580156111e9573d6000803e3d6000fd5b505050506040513d60208110156111ff57600080fd5b50516040805160028082526060820183529293506000929091602083019080368337019050509050611331662386f26fc10000670de0b6b3a76400000361132b84611325888a6001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561127d57600080fd5b505afa158015611291573d6000803e3d6000fd5b505050506040513d60208110156112a757600080fd5b5051604080516370a0823160e01b81526001600160a01b038e81166004830152915191909216916370a08231916024808301926020929190829003018186803b1580156112f357600080fd5b505afa158015611307573d6000803e3d6000fd5b505050506040513d602081101561131d57600080fd5b505190611c96565b90611cf6565b90611d5d565b8160008151811061133e57fe5b6020026020010181815250506113a0662386f26fc10000670de0b6b3a76400000361132b84611325888a6001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561127d57600080fd5b816001815181106113ad57fe5b6020908102919091010152949350505050565b6000546001600160a01b031681565b600080826001600160a01b031663ba9a7a566040518163ffffffff1660e01b815260040160206040518083038186803b15801561140b57600080fd5b505afa15801561141f573d6000803e3d6000fd5b505050506040513d602081101561143557600080fd5b50511192915050565b611446611f8b565b61144e611f8b565b6001600160a01b0389166020808301829052604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b892600480840193919291829003018186803b1580156114ac57600080fd5b505afa1580156114c0573d6000803e3d6000fd5b505050506040513d60208110156114d657600080fd5b50516001600160a01b0390811682528816604080830182905280517f18160ddd00000000000000000000000000000000000000000000000000000000815290516318160ddd91600480820192602092909190829003018186803b15801561153c57600080fd5b505afa158015611550573d6000803e3d6000fd5b505050506040513d602081101561156657600080fd5b50516060820152604080516370a0823160e01b81526001600160a01b038b811660048301529151918a16916370a0823191602480820192602092909190829003018186803b1580156115b757600080fd5b505afa1580156115cb573d6000803e3d6000fd5b505050506040513d60208110156115e157600080fd5b505160a0820152608081018790526040805160208581028281018201909352858252909186918691829185019084908082843760009201919091525050505060c082015298975050505050505050565b61163e81604001516113cf565b61168f576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b60008160800151116116d25760405162461bcd60e51b815260040180806020018281038252602e815260200180612036602e913960400191505060405180910390fd5b80608001518160a0015110156117195760405162461bcd60e51b815260040180806020018281038252602d815260200180612090602d913960400191505060405180910390fd5b50565b506004546001600160a01b031690565b600080606060028614611786576040805162461bcd60e51b815260206004820152601360248201527f54776f20746f6b656e7320726571756972656400000000000000000000000000604482015290519081900360640190fd5b600284146117db576040805162461bcd60e51b815260206004820152601460248201527f54776f20616d6f756e7473207265717569726564000000000000000000000000604482015290519081900360640190fd5b6000878760008181106117ea57fe5b905060200201356001600160a01b03168888600181811061180757fe5b905060200201356001600160a01b03168a8888600081811061182557fe5b905060200201358989600181811061183957fe5b905060200201358f6118777f000000000000000000000000000000000000000000000000000000000000000060ff1642611d7590919063ffffffff16565b604080516001600160a01b03988916602482015296881660448801526064870195909552608486019390935260a4850191909152841660c484015260e4808401919091528151808403909101815261010490920190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fbaa2abde000000000000000000000000000000000000000000000000000000001790526004549091169450600093509150509750975097945050505050565b80608001518160a001510381604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561199157600080fd5b505afa1580156119a5573d6000803e3d6000fd5b505050506040513d60208110156119bb57600080fd5b5051146117195760405162461bcd60e51b815260040180806020018281038252602b8152602001806120bd602b913960400191505060405180910390fd5b611a0681604001516113cf565b611a57576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b60008160800151116117195760405162461bcd60e51b8152600401808060200182810382526031815260200180611fe46031913960400191505060405180910390fd5b600080606060028614611af4576040805162461bcd60e51b815260206004820152601360248201527f54776f20746f6b656e7320726571756972656400000000000000000000000000604482015290519081900360640190fd5b60028414611b49576040805162461bcd60e51b815260206004820152601460248201527f54776f20616d6f756e7473207265717569726564000000000000000000000000604482015290519081900360640190fd5b6004546001600160a01b03166000611b648c8a8a8a8a611dcf565b9250925092509750975097945050505050565b600082821115611bce576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b8060a0015181604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611c2e57600080fd5b505afa158015611c42573d6000803e3d6000fd5b505050506040513d6020811015611c5857600080fd5b5051116117195760405162461bcd60e51b815260040180806020018281038252602c815260200180612064602c913960400191505060405180910390fd5b600082611ca55750600061067a565b82820282848281611cb257fe5b0414611cef5760405162461bcd60e51b81526004018080602001828103825260218152602001806120156021913960400191505060405180910390fd5b9392505050565b6000808211611d4c576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611d5557fe5b049392505050565b6000611cef670de0b6b3a76400006113258585611c96565b600082820183811015611cef576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b606084846000818110611dde57fe5b905060200201356001600160a01b031685856001818110611dfb57fe5b905060200201356001600160a01b031684846000818110611e1857fe5b9050602002013585856001818110611e2c57fe5b90506020020135611e85611e63662386f26fc1000089896000818110611e4e57fe5b90506020020135611d5d90919063ffffffff16565b88886000818110611e7057fe5b90506020020135611b7790919063ffffffff16565b611ead611ea0662386f26fc100008a8a6001818110611e4e57fe5b89896001818110611e7057fe5b8b611edb4260ff7f000000000000000000000000000000000000000000000000000000000000000016611d75565b604080516001600160a01b03998a16602482015297891660448901526064880196909652608487019490945260a486019290925260c485015290931660e4830152610104808301939093528051808303909301835261012490910190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fe8e3370000000000000000000000000000000000000000000000000000000000179052905095945050505050565b6040518060e0016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160608152509056fe4d696e20706f6f6c20746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77506f6f6c20746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520737472617465677920646964206e6f7420726563656976652074686520706f6f6c20746f6b656e7354686520737472617465677920646f6573206e6f74206861766520656e6f75676820706f6f6c20746f6b656e7354686520737472617465677920646964206e6f742072657475726e2074686520706f6f6c20746f6b656e73a264697066735822122095a346e2c53514ef26f0d00728ad3c6e454d66a2e373c9afff50dfbfc9cb4b3a64736f6c63430007060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063708a34761161008c578063bd9d8ad911610066578063bd9d8ad91461042c578063ca4f2803146104a2578063f5e39325146104c8578063f77c4791146104f4576100ea565b8063708a34761461031c578063a0e47bf6146103fe578063b10198fb14610406576100ea565b80633cd5bd95116100c85780633cd5bd95146101925780633fc8cef3146101da5780635b16ebb7146101fe57806362cc395a14610238576100ea565b806306fdde03146100ef57806317d7de7c1461016c57806330adee6514610174575b600080fd5b6100f76104fc565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610131578181015183820152602001610119565b50505050905090810190601f16801561015e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100f7610589565b61017c61061e565b6040805160ff9092168252519081900360200190f35b6101c8600480360360608110156101a857600080fd5b506001600160a01b03813581169160208101359091169060400135610642565b60408051918252519081900360200190f35b6101e261064b565b604080516001600160a01b039092168252519081900360200190f35b6102246004803603602081101561021457600080fd5b50356001600160a01b031661066f565b604080519115158252519081900360200190f35b61031a600480360360a081101561024e57600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561028957600080fd5b82018360208201111561029b57600080fd5b803590602001918460208302840111640100000000831117156102bd57600080fd5b9193909290916020810190356401000000008111156102db57600080fd5b8201836020820111156102ed57600080fd5b8035906020019184602083028401116401000000008311171561030f57600080fd5b509092509050610680565b005b61031a600480360360a081101561033257600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561036d57600080fd5b82018360208201111561037f57600080fd5b803590602001918460208302840111640100000000831117156103a157600080fd5b9193909290916020810190356401000000008111156103bf57600080fd5b8201836020820111156103d157600080fd5b803590602001918460208302840111640100000000831117156103f357600080fd5b509092509050610a9d565b6101e2610fbc565b6102246004803603602081101561041c57600080fd5b50356001600160a01b0316610fcb565b6104526004803603602081101561044257600080fd5b50356001600160a01b0316610fe0565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561048e578181015183820152602001610476565b505050509050019250505060405180910390f35b610452600480360360208110156104b857600080fd5b50356001600160a01b031661104e565b610452600480360360408110156104de57600080fd5b506001600160a01b038135169060200135611198565b6101e26113c0565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105815780601f1061055657610100808354040283529160200191610581565b820191906000526020600020905b81548152906001019060200180831161056457829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156106145780601f106105e957610100808354040283529160200191610614565b820191906000526020600020905b8154815290600101906020018083116105f757829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b60019392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061067a826113cf565b92915050565b600260035414156106d8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b15801561072857600080fd5b505afa15801561073c573d6000803e3d6000fd5b505050506040513d602081101561075257600080fd5b50516107a5576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b60006107b68888888888888861143e565b90506107c181611631565b80602001516001600160a01b03166397ccdc606107dd8961171c565b89896040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561083557600080fd5b505af1158015610849573d6000803e3d6000fd5b5050505060008060006108618b8b8b8b8b8b8b61172c565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156108de5781810151838201526020016108c6565b50505050905090810190601f16801561090b5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561092c57600080fd5b505af1158015610940573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561096957600080fd5b810190808051604051939291908464010000000082111561098957600080fd5b90830190602082018581111561099e57600080fd5b82516401000000008111828201881017156109b857600080fd5b82525081516020918201929091019080838360005b838110156109e55781810151838201526020016109cd565b50505050905090810190601f168015610a125780820380516001836020036101000a031916815260200191505b5060405250505050610a2384611931565b83600001516001600160a01b031684602001516001600160a01b03167f7659e40cf608296ce5aa9eff9c80adc7a49cb481173fc4e302e3983827b042df86604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b60026003541415610af5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b158015610b4557600080fd5b505afa158015610b59573d6000803e3d6000fd5b505050506040513d6020811015610b6f57600080fd5b5051610bc2576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b6000610bd38888888888888861143e565b9050610bde816119f9565b60005b84811015610cd7576000868683818110610bf757fe5b905060200201356001600160a01b03166001600160a01b031614610ccf5781602001516001600160a01b03166397ccdc60610c318a61171c565b888885818110610c3d57fe5b905060200201356001600160a01b0316878786818110610c5957fe5b905060200201356040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015610cb657600080fd5b505af1158015610cca573d6000803e3d6000fd5b505050505b600101610be1565b506000806000610cec8b8b8b8b8b8b8b611a9a565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610d69578181015183820152602001610d51565b50505050905090810190601f168015610d965780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610db757600080fd5b505af1158015610dcb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610df457600080fd5b8101908080516040519392919084640100000000821115610e1457600080fd5b908301906020820185811115610e2957600080fd5b8251640100000000811182820188101715610e4357600080fd5b82525081516020918201929091019080838360005b83811015610e70578181015183820152602001610e58565b50505050905090810190601f168015610e9d5780820380516001836020036101000a031916815260200191505b5060405250505050610f348460a0015185604001516001600160a01b03166370a0823187602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f0257600080fd5b505afa158015610f16573d6000803e3d6000fd5b505050506040513d6020811015610f2c57600080fd5b505190611b77565b6080850152610f4284611bd4565b83600001516001600160a01b031684602001516001600160a01b03167fe5ca6288535c5c6c2462c912b4033eade15b80926717896a2d58a2defdeb912886604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b6004546001600160a01b031681565b60026020526000908152604090205460ff1681565b604080516002808252606080830184529260009291906020830190803683370190505090506706f05b59d3b200008160008151811061101b57fe5b6020026020010181815250506706f05b59d3b200008160018151811061103d57fe5b602090810291909101015292915050565b60408051600280825260608083018452926000929190602083019080368337019050509050826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156110ac57600080fd5b505afa1580156110c0573d6000803e3d6000fd5b505050506040513d60208110156110d657600080fd5b5051815182906000906110e557fe5b60200260200101906001600160a01b031690816001600160a01b031681525050826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561113e57600080fd5b505afa158015611152573d6000803e3d6000fd5b505050506040513d602081101561116857600080fd5b505181518290600190811061117957fe5b6001600160a01b03909216602092830291909101909101529050919050565b60606000836001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111d557600080fd5b505afa1580156111e9573d6000803e3d6000fd5b505050506040513d60208110156111ff57600080fd5b50516040805160028082526060820183529293506000929091602083019080368337019050509050611331662386f26fc10000670de0b6b3a76400000361132b84611325888a6001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561127d57600080fd5b505afa158015611291573d6000803e3d6000fd5b505050506040513d60208110156112a757600080fd5b5051604080516370a0823160e01b81526001600160a01b038e81166004830152915191909216916370a08231916024808301926020929190829003018186803b1580156112f357600080fd5b505afa158015611307573d6000803e3d6000fd5b505050506040513d602081101561131d57600080fd5b505190611c96565b90611cf6565b90611d5d565b8160008151811061133e57fe5b6020026020010181815250506113a0662386f26fc10000670de0b6b3a76400000361132b84611325888a6001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561127d57600080fd5b816001815181106113ad57fe5b6020908102919091010152949350505050565b6000546001600160a01b031681565b600080826001600160a01b031663ba9a7a566040518163ffffffff1660e01b815260040160206040518083038186803b15801561140b57600080fd5b505afa15801561141f573d6000803e3d6000fd5b505050506040513d602081101561143557600080fd5b50511192915050565b611446611f8b565b61144e611f8b565b6001600160a01b0389166020808301829052604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b892600480840193919291829003018186803b1580156114ac57600080fd5b505afa1580156114c0573d6000803e3d6000fd5b505050506040513d60208110156114d657600080fd5b50516001600160a01b0390811682528816604080830182905280517f18160ddd00000000000000000000000000000000000000000000000000000000815290516318160ddd91600480820192602092909190829003018186803b15801561153c57600080fd5b505afa158015611550573d6000803e3d6000fd5b505050506040513d602081101561156657600080fd5b50516060820152604080516370a0823160e01b81526001600160a01b038b811660048301529151918a16916370a0823191602480820192602092909190829003018186803b1580156115b757600080fd5b505afa1580156115cb573d6000803e3d6000fd5b505050506040513d60208110156115e157600080fd5b505160a0820152608081018790526040805160208581028281018201909352858252909186918691829185019084908082843760009201919091525050505060c082015298975050505050505050565b61163e81604001516113cf565b61168f576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b60008160800151116116d25760405162461bcd60e51b815260040180806020018281038252602e815260200180612036602e913960400191505060405180910390fd5b80608001518160a0015110156117195760405162461bcd60e51b815260040180806020018281038252602d815260200180612090602d913960400191505060405180910390fd5b50565b506004546001600160a01b031690565b600080606060028614611786576040805162461bcd60e51b815260206004820152601360248201527f54776f20746f6b656e7320726571756972656400000000000000000000000000604482015290519081900360640190fd5b600284146117db576040805162461bcd60e51b815260206004820152601460248201527f54776f20616d6f756e7473207265717569726564000000000000000000000000604482015290519081900360640190fd5b6000878760008181106117ea57fe5b905060200201356001600160a01b03168888600181811061180757fe5b905060200201356001600160a01b03168a8888600081811061182557fe5b905060200201358989600181811061183957fe5b905060200201358f6118777f000000000000000000000000000000000000000000000000000000000000000060ff1642611d7590919063ffffffff16565b604080516001600160a01b03988916602482015296881660448801526064870195909552608486019390935260a4850191909152841660c484015260e4808401919091528151808403909101815261010490920190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fbaa2abde000000000000000000000000000000000000000000000000000000001790526004549091169450600093509150509750975097945050505050565b80608001518160a001510381604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561199157600080fd5b505afa1580156119a5573d6000803e3d6000fd5b505050506040513d60208110156119bb57600080fd5b5051146117195760405162461bcd60e51b815260040180806020018281038252602b8152602001806120bd602b913960400191505060405180910390fd5b611a0681604001516113cf565b611a57576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b60008160800151116117195760405162461bcd60e51b8152600401808060200182810382526031815260200180611fe46031913960400191505060405180910390fd5b600080606060028614611af4576040805162461bcd60e51b815260206004820152601360248201527f54776f20746f6b656e7320726571756972656400000000000000000000000000604482015290519081900360640190fd5b60028414611b49576040805162461bcd60e51b815260206004820152601460248201527f54776f20616d6f756e7473207265717569726564000000000000000000000000604482015290519081900360640190fd5b6004546001600160a01b03166000611b648c8a8a8a8a611dcf565b9250925092509750975097945050505050565b600082821115611bce576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b8060a0015181604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611c2e57600080fd5b505afa158015611c42573d6000803e3d6000fd5b505050506040513d6020811015611c5857600080fd5b5051116117195760405162461bcd60e51b815260040180806020018281038252602c815260200180612064602c913960400191505060405180910390fd5b600082611ca55750600061067a565b82820282848281611cb257fe5b0414611cef5760405162461bcd60e51b81526004018080602001828103825260218152602001806120156021913960400191505060405180910390fd5b9392505050565b6000808211611d4c576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611d5557fe5b049392505050565b6000611cef670de0b6b3a76400006113258585611c96565b600082820183811015611cef576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b606084846000818110611dde57fe5b905060200201356001600160a01b031685856001818110611dfb57fe5b905060200201356001600160a01b031684846000818110611e1857fe5b9050602002013585856001818110611e2c57fe5b90506020020135611e85611e63662386f26fc1000089896000818110611e4e57fe5b90506020020135611d5d90919063ffffffff16565b88886000818110611e7057fe5b90506020020135611b7790919063ffffffff16565b611ead611ea0662386f26fc100008a8a6001818110611e4e57fe5b89896001818110611e7057fe5b8b611edb4260ff7f000000000000000000000000000000000000000000000000000000000000000016611d75565b604080516001600160a01b03998a16602482015297891660448901526064880196909652608487019490945260a486019290925260c485015290931660e4830152610104808301939093528051808303909301835261012490910190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fe8e3370000000000000000000000000000000000000000000000000000000000179052905095945050505050565b6040518060e0016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160608152509056fe4d696e20706f6f6c20746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77506f6f6c20746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520737472617465677920646964206e6f7420726563656976652074686520706f6f6c20746f6b656e7354686520737472617465677920646f6573206e6f74206861766520656e6f75676820706f6f6c20746f6b656e7354686520737472617465677920646964206e6f742072657475726e2074686520706f6f6c20746f6b656e73a264697066735822122095a346e2c53514ef26f0d00728ad3c6e454d66a2e373c9afff50dfbfc9cb4b3a64736f6c63430007060033", + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_weth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_sushiswapRouterAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_pool\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_poolTokensOut\",\"type\":\"uint256\"}],\"name\":\"PoolEntered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_pool\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_poolTokensIn\",\"type\":\"uint256\"}],\"name\":\"PoolExited\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MAX_DELTA_BLOCKS\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_poolTokensIn\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"_tokensOut\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_minAmountsOut\",\"type\":\"uint256[]\"}],\"name\":\"exitPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_liquidity\",\"type\":\"uint256\"}],\"name\":\"getPoolMinAmountsOut\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_minAmountsOut\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"}],\"name\":\"getPoolTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getPoolTokensOut\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"getPoolWeights\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"initializedByGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"}],\"name\":\"isPool\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_poolTokensOut\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"_tokensIn\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_maxAmountsIn\",\"type\":\"uint256[]\"}],\"name\":\"joinPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"uniRouter\",\"outputs\":[{\"internalType\":\"contract IUniswapV2Router\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Protocol Sushiswap Protocol pool integration\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of the controller\",\"_sushiswapRouterAddress\":\"Address of Sushiswap router\",\"_weth\":\"Address of the WETH ERC20\"}},\"exitPool(address,address,uint256,address[],uint256[])\":{\"params\":{\"_minAmountsOut\":\"Array of min token quantities to receive from the pool\",\"_poolAddress\":\"Address of the pool token to join\",\"_poolTokensIn\":\"Pool tokens to exchange for the underlying tokens\",\"_strategy\":\"Address of the strategy\",\"_tokensOut\":\"Array of token addresses to withdraw\"}},\"isPool(address)\":{\"params\":{\"_poolAddress\":\"Pool address to check\"},\"returns\":{\"_0\":\"bool True if the address is a pool\"}},\"joinPool(address,address,uint256,address[],uint256[])\":{\"params\":{\"_maxAmountsIn\":\"Array of max token quantities to pull out from the garden\",\"_poolAddress\":\"Address of the pool token to join\",\"_poolTokensOut\":\"Min amount of pool tokens to receive\",\"_strategy\":\"Address of the strategy\",\"_tokensIn\":\"Array of token addresses to deposit\"}}},\"title\":\"SushiswapPoolIntegration\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates the integration\"},\"exitPool(address,address,uint256,address[],uint256[])\":{\"notice\":\"Exits a liquidity pool. Accrue protocol fee (if any)\"},\"getName()\":{\"notice\":\"Returns the name of the integration\"},\"isPool(address)\":{\"notice\":\"Checks whether a pool address is valid\"},\"joinPool(address,address,uint256,address[],uint256[])\":{\"notice\":\"Joins a pool\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/integrations/pool/SushiswapPoolIntegration.sol\":\"SushiswapPoolIntegration\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\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 /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\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, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x7b2b8baa20fd60ab4a328c8e34c64a353651b80ba4b5b157cbb61813f6f85d55\",\"license\":\"MIT\"},\"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol\":{\"content\":\"pragma solidity >=0.5.0;\\n\\ninterface IUniswapV2Pair {\\n event Approval(address indexed owner, address indexed spender, uint value);\\n event Transfer(address indexed from, address indexed to, uint value);\\n\\n function name() external pure returns (string memory);\\n function symbol() external pure returns (string memory);\\n function decimals() external pure returns (uint8);\\n function totalSupply() external view returns (uint);\\n function balanceOf(address owner) external view returns (uint);\\n function allowance(address owner, address spender) external view returns (uint);\\n\\n function approve(address spender, uint value) external returns (bool);\\n function transfer(address to, uint value) external returns (bool);\\n function transferFrom(address from, address to, uint value) external returns (bool);\\n\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n function PERMIT_TYPEHASH() external pure returns (bytes32);\\n function nonces(address owner) external view returns (uint);\\n\\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\\n\\n event Mint(address indexed sender, uint amount0, uint amount1);\\n event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\\n event Swap(\\n address indexed sender,\\n uint amount0In,\\n uint amount1In,\\n uint amount0Out,\\n uint amount1Out,\\n address indexed to\\n );\\n event Sync(uint112 reserve0, uint112 reserve1);\\n\\n function MINIMUM_LIQUIDITY() external pure returns (uint);\\n function factory() external view returns (address);\\n function token0() external view returns (address);\\n function token1() external view returns (address);\\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\\n function price0CumulativeLast() external view returns (uint);\\n function price1CumulativeLast() external view returns (uint);\\n function kLast() external view returns (uint);\\n\\n function mint(address to) external returns (uint liquidity);\\n function burn(address to) external returns (uint amount0, uint amount1);\\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\\n function skim(address to) external;\\n function sync() external;\\n\\n function initialize(address, address) external;\\n}\\n\",\"keccak256\":\"0x7c9bc70e5996c763e02ff38905282bc24fb242b0ef2519a003b36824fc524a4b\"},\"contracts/integrations/BaseIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IIntegration} from '../interfaces/IIntegration.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\n\\n/**\\n * @title BaseIntegration\\n * @author Babylon Finance\\n *\\n * Abstract class that houses common Integration-related state and functions.\\n */\\nabstract contract BaseIntegration {\\n using SafeCast for int256;\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlySystemContract() {\\n require(IBabController(controller).isSystemContract(msg.sender), 'Only system can call this');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the controller\\n address public controller;\\n // Wrapped ETH address\\n address public immutable weth;\\n // Name of the integration\\n string public name;\\n mapping(address => bool) public initializedByGarden;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) {\\n require(_controller != address(0), 'Controller must be defined');\\n name = _name;\\n controller = _controller;\\n weth = _weth;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the name of the integration\\n */\\n function getName() external view returns (string memory) {\\n return name;\\n }\\n}\\n\",\"keccak256\":\"0x2834e38218ae7abce3038140002a433c22ea9303d65b2d929cd88f6d5f712812\",\"license\":\"Apache License\"},\"contracts/integrations/pool/PoolIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\n\\nimport {IPoolIntegration} from '../../interfaces/IPoolIntegration.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\n\\nimport {BaseIntegration} from '../BaseIntegration.sol';\\n\\n/**\\n * @title PoolIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Base class for integration with trading protocols\\n */\\nabstract contract PoolIntegration is BaseIntegration, ReentrancyGuard, IPoolIntegration {\\n using SafeMath for uint256;\\n using SafeCast for uint256;\\n\\n /* ============ Struct ============ */\\n\\n struct PoolInfo {\\n IGarden garden; // Garden address\\n IStrategy strategy; // Strategy address\\n address pool; // Pool address\\n uint256 totalSupply; // Total Supply of the pool\\n uint256 poolTokensInTransaction; // Pool tokens affected by this transaction\\n uint256 poolTokensInStrategy; // Pool tokens strategy balance\\n uint256[] limitPoolTokenQuantities;\\n }\\n\\n /* ============ Events ============ */\\n\\n event PoolEntered(address indexed _strategy, address indexed _garden, address _pool, uint256 _poolTokensOut);\\n\\n event PoolExited(address indexed _strategy, address indexed _garden, address _pool, uint256 _poolTokensIn);\\n\\n /* ============ Constants ============ */\\n\\n uint256 internal constant SLIPPAGE_ALLOWED = 1e16; // 1%\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) BaseIntegration(_name, _weth, _controller) {}\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Joins a pool\\n *\\n * @param _strategy Address of the strategy\\n * @param _poolAddress Address of the pool token to join\\n * @param _poolTokensOut Min amount of pool tokens to receive\\n * @param _tokensIn Array of token addresses to deposit\\n * @param _maxAmountsIn Array of max token quantities to pull out from the garden\\n */\\n function joinPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensOut,\\n address[] calldata _tokensIn,\\n uint256[] calldata _maxAmountsIn\\n ) external override nonReentrant onlySystemContract {\\n PoolInfo memory poolInfo = _createPoolInfo(_strategy, _poolAddress, _poolTokensOut, _tokensIn, _maxAmountsIn);\\n _validatePreJoinPoolData(poolInfo);\\n // Approve spending of the tokens\\n for (uint256 i = 0; i < _tokensIn.length; i++) {\\n // No need to approve ETH\\n if (_tokensIn[i] != address(0)) {\\n poolInfo.strategy.invokeApprove(_getSpender(_poolAddress), _tokensIn[i], _maxAmountsIn[i]);\\n }\\n }\\n (address targetPool, uint256 callValue, bytes memory methodData) =\\n _getJoinPoolCalldata(_strategy, _poolAddress, _poolTokensOut, _tokensIn, _maxAmountsIn);\\n poolInfo.strategy.invokeFromIntegration(targetPool, callValue, methodData);\\n poolInfo.poolTokensInTransaction = IERC20(poolInfo.pool).balanceOf(address(poolInfo.strategy)).sub(\\n poolInfo.poolTokensInStrategy\\n );\\n _validatePostJoinPoolData(poolInfo);\\n\\n emit PoolEntered(address(poolInfo.strategy), address(poolInfo.garden), poolInfo.pool, _poolTokensOut);\\n }\\n\\n /**\\n * Exits a liquidity pool. Accrue protocol fee (if any)\\n *\\n * @param _strategy Address of the strategy\\n * @param _poolAddress Address of the pool token to join\\n * @param _poolTokensIn Pool tokens to exchange for the underlying tokens\\n * @param _tokensOut Array of token addresses to withdraw\\n * @param _minAmountsOut Array of min token quantities to receive from the pool\\n */\\n function exitPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensIn,\\n address[] calldata _tokensOut,\\n uint256[] calldata _minAmountsOut\\n ) external override nonReentrant onlySystemContract {\\n PoolInfo memory poolInfo = _createPoolInfo(_strategy, _poolAddress, _poolTokensIn, _tokensOut, _minAmountsOut);\\n _validatePreExitPoolData(poolInfo);\\n // Approve spending of the pool token\\n poolInfo.strategy.invokeApprove(_getSpender(_poolAddress), _poolAddress, _poolTokensIn);\\n\\n (address targetPool, uint256 callValue, bytes memory methodData) =\\n _getExitPoolCalldata(_strategy, _poolAddress, _poolTokensIn, _tokensOut, _minAmountsOut);\\n poolInfo.strategy.invokeFromIntegration(targetPool, callValue, methodData);\\n _validatePostExitPoolData(poolInfo);\\n\\n emit PoolExited(address(poolInfo.strategy), address(poolInfo.garden), poolInfo.pool, _poolTokensIn);\\n }\\n\\n /**\\n * Checks whether a pool address is valid\\n *\\n * @param _poolAddress Pool address to check\\n * @return bool True if the address is a pool\\n */\\n function isPool(address _poolAddress) external view override returns (bool) {\\n return _isPool(_poolAddress);\\n }\\n\\n function getPoolTokens(\\n address /* _poolAddress */\\n ) external view virtual override returns (address[] memory);\\n\\n function getPoolWeights(\\n address /*_poolAddress */\\n ) external view virtual override returns (uint256[] memory);\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Create and return PoolInfo struct\\n *\\n * @param _strategy Address of the strategy\\n * @param _pool Address of the pool\\n * @param _poolTokensInTransaction Number of pool tokens involved\\n * hparam _poolTokens Addresseses of the pool tokens\\n * @param _limitPoolTokenQuantities Limit quantity of the pool tokens\\n *\\n * return PoolInfo Struct containing data for pool\\n */\\n function _createPoolInfo(\\n address _strategy,\\n address _pool,\\n uint256 _poolTokensInTransaction,\\n address[] calldata, /* _poolTokens */\\n uint256[] calldata _limitPoolTokenQuantities\\n ) internal view returns (PoolInfo memory) {\\n PoolInfo memory poolInfo;\\n poolInfo.strategy = IStrategy(_strategy);\\n poolInfo.garden = IGarden(poolInfo.strategy.garden());\\n poolInfo.pool = _pool;\\n poolInfo.totalSupply = IERC20(_pool).totalSupply();\\n poolInfo.poolTokensInStrategy = IERC20(_pool).balanceOf(_strategy);\\n poolInfo.poolTokensInTransaction = _poolTokensInTransaction;\\n poolInfo.limitPoolTokenQuantities = _limitPoolTokenQuantities;\\n\\n return poolInfo;\\n }\\n\\n /**\\n * Validate pre pool join data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePreJoinPoolData(PoolInfo memory _poolInfo) internal view {\\n require(_isPool(_poolInfo.pool), 'The pool address is not valid');\\n require(_poolInfo.poolTokensInTransaction > 0, 'Min pool tokens to receive must be greater than 0');\\n }\\n\\n /**\\n * Validate pre pool data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePreExitPoolData(PoolInfo memory _poolInfo) internal view {\\n require(_isPool(_poolInfo.pool), 'The pool address is not valid');\\n require(_poolInfo.poolTokensInTransaction > 0, 'Pool tokens to exchange must be greater than 0');\\n require(\\n _poolInfo.poolTokensInStrategy >= _poolInfo.poolTokensInTransaction,\\n 'The strategy does not have enough pool tokens'\\n );\\n }\\n\\n /**\\n * Validate post join pool data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePostJoinPoolData(PoolInfo memory _poolInfo) internal view {\\n require(\\n (IERC20(_poolInfo.pool).balanceOf(address(_poolInfo.strategy)) > _poolInfo.poolTokensInStrategy),\\n 'The strategy did not receive the pool tokens'\\n );\\n }\\n\\n /**\\n * Validate post exit pool data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePostExitPoolData(PoolInfo memory _poolInfo) internal view {\\n require(\\n IERC20(_poolInfo.pool).balanceOf(address(_poolInfo.strategy)) ==\\n _poolInfo.poolTokensInStrategy - _poolInfo.poolTokensInTransaction,\\n 'The strategy did not return the pool tokens'\\n );\\n // TODO: validate individual tokens received\\n }\\n\\n /**\\n * Return join pool calldata which is already generated from the pool API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * hparam _poolTokensOut Amount of pool tokens to send\\n * hparam _tokensIn Addresses of tokens to send to the pool\\n * hparam _maxAmountsIn Amounts of tokens to send to the pool\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getJoinPoolCalldata(\\n address, /* _strategy */\\n address, /* _poolAddress */\\n uint256, /* _poolTokensOut */\\n address[] calldata, /* _tokensIn */\\n uint256[] calldata /* _maxAmountsIn */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n /**\\n * Return exit pool calldata which is already generated from the pool API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * hparam _poolTokensIn Amount of pool tokens to receive\\n * hparam _tokensOut Addresses of tokens to receive\\n * hparam _minAmountsOut Amounts of pool tokens to receive\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getExitPoolCalldata(\\n address, /* _strategy */\\n address, /* _poolAddress */\\n uint256, /* _poolTokensIn */\\n address[] calldata, /* _tokensOut */\\n uint256[] calldata /* _minAmountsOut */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n function _isPool(\\n address /* _poolAddress */\\n ) internal view virtual returns (bool);\\n\\n function _getSpender(\\n address /* _poolAddress */\\n ) internal view virtual returns (address);\\n}\\n\",\"keccak256\":\"0xdb4cc931a671cbf8ab93c43a5e9e2853b8d5cfc744eeec928ad3659b23f2db90\",\"license\":\"Apache License\"},\"contracts/integrations/pool/SushiswapPoolIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {UniswapPoolIntegration} from './UniswapPoolIntegration.sol';\\n\\n/**\\n * @title SushiswapPoolIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Sushiswap Protocol pool integration\\n */\\ncontract SushiswapPoolIntegration is UniswapPoolIntegration {\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _controller Address of the controller\\n * @param _weth Address of the WETH ERC20\\n * @param _sushiswapRouterAddress Address of Sushiswap router\\n */\\n constructor(\\n address _controller,\\n address _weth,\\n address _sushiswapRouterAddress\\n ) UniswapPoolIntegration(_controller, _weth, _sushiswapRouterAddress) {\\n name = 'sushiswap_pool';\\n }\\n}\\n\",\"keccak256\":\"0xa277a4d17b00e827263b93eee2ea3e93b5fd5812b3e93b9e2bdd5775e5537e3f\",\"license\":\"Apache License\"},\"contracts/integrations/pool/UniswapPoolIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';\\nimport {PoolIntegration} from './PoolIntegration.sol';\\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\\nimport {IUniswapV2Router} from '../../interfaces/external/uniswap/IUniswapV2Router.sol';\\n\\n/**\\n * @title BalancerIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Kyber protocol trade integration\\n */\\ncontract UniswapPoolIntegration is PoolIntegration {\\n using SafeMath for uint256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ State Variables ============ */\\n\\n // Address of Uniswap V2 Router\\n IUniswapV2Router public uniRouter;\\n\\n /* ============ Constants ============ */\\n\\n uint8 public immutable MAX_DELTA_BLOCKS = 5;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _controller Address of the controller\\n * @param _weth Address of the WETH ERC20\\n * @param _uniswapRouterAddress Address of Uniswap router\\n */\\n constructor(\\n address _controller,\\n address _weth,\\n address _uniswapRouterAddress\\n ) PoolIntegration('uniswap_pool', _weth, _controller) {\\n uniRouter = IUniswapV2Router(_uniswapRouterAddress);\\n }\\n\\n /* ============ External Functions ============ */\\n\\n function getPoolTokens(address _poolAddress) external view override returns (address[] memory) {\\n address[] memory result = new address[](2);\\n result[0] = IUniswapV2Pair(_poolAddress).token0();\\n result[1] = IUniswapV2Pair(_poolAddress).token1();\\n return result;\\n }\\n\\n function getPoolWeights(\\n address /* _poolAddress */\\n ) external pure override returns (uint256[] memory) {\\n uint256[] memory result = new uint256[](2);\\n result[0] = 5e17; // 50%\\n result[1] = 5e17; // 50%\\n return result;\\n }\\n\\n function getPoolTokensOut(\\n address, /* _poolAddress */\\n address, /* _poolToken */\\n uint256 /* _maxAmountsIn */\\n ) external pure override returns (uint256) {\\n // return 1 since _poolTokensOut are not used\\n return 1;\\n }\\n\\n function getPoolMinAmountsOut(address _poolAddress, uint256 _liquidity)\\n external\\n view\\n override\\n returns (uint256[] memory _minAmountsOut)\\n {\\n uint256 totalSupply = IUniswapV2Pair(_poolAddress).totalSupply();\\n uint256[] memory result = new uint256[](2);\\n result[0] = IERC20(IUniswapV2Pair(_poolAddress).token0())\\n .balanceOf(_poolAddress)\\n .mul(_liquidity)\\n .div(totalSupply)\\n .preciseMul(1e18 - SLIPPAGE_ALLOWED);\\n result[1] = IERC20(IUniswapV2Pair(_poolAddress).token1())\\n .balanceOf(_poolAddress)\\n .mul(_liquidity)\\n .div(totalSupply)\\n .preciseMul(1e18 - SLIPPAGE_ALLOWED);\\n return result;\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n function _isPool(address _poolAddress) internal pure override returns (bool) {\\n return IUniswapV2Pair(_poolAddress).MINIMUM_LIQUIDITY() > 0;\\n }\\n\\n function _getSpender(\\n address //_poolAddress\\n ) internal view override returns (address) {\\n return address(uniRouter);\\n }\\n\\n /**\\n * Return join pool calldata which is already generated from the pool API\\n *\\n * @param _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * hparam _poolTokensOut Amount of pool tokens to send\\n * @param _tokensIn Addresses of tokens to send to the pool\\n * @param _maxAmountsIn Amounts of tokens to send to the pool\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getJoinPoolCalldata(\\n address _strategy,\\n address, /* _poolAddress */\\n uint256, /* _poolTokensOut */\\n address[] calldata _tokensIn,\\n uint256[] calldata _maxAmountsIn\\n )\\n internal\\n view\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n // Encode method data for Garden to invoke\\n require(_tokensIn.length == 2, 'Two tokens required');\\n require(_maxAmountsIn.length == 2, 'Two amounts required');\\n return (address(uniRouter), 0, _getMethodData(_strategy, _tokensIn, _maxAmountsIn));\\n }\\n\\n function _getMethodData(\\n address _strategy,\\n address[] calldata _tokensIn,\\n uint256[] calldata _maxAmountsIn\\n ) private view returns (bytes memory) {\\n return\\n abi.encodeWithSignature(\\n 'addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)',\\n _tokensIn[0],\\n _tokensIn[1],\\n _maxAmountsIn[0],\\n _maxAmountsIn[1],\\n _maxAmountsIn[0].sub(_maxAmountsIn[0].preciseMul(SLIPPAGE_ALLOWED)),\\n _maxAmountsIn[1].sub(_maxAmountsIn[1].preciseMul(SLIPPAGE_ALLOWED)),\\n _strategy,\\n block.timestamp.add(MAX_DELTA_BLOCKS)\\n );\\n }\\n\\n /**\\n * Return exit pool calldata which is already generated from the pool API\\n *\\n * @param _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * @param _poolTokensIn Amount of pool tokens to liquidate\\n * @param _tokensOut Addresses of tokens to receive\\n * @param _minAmountsOut Amounts of tokens to receive\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getExitPoolCalldata(\\n address _strategy,\\n address, /* _poolAddress */\\n uint256 _poolTokensIn,\\n address[] calldata _tokensOut,\\n uint256[] calldata _minAmountsOut\\n )\\n internal\\n view\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n require(_tokensOut.length == 2, 'Two tokens required');\\n require(_minAmountsOut.length == 2, 'Two amounts required');\\n // Encode method data for Garden to invoke\\n bytes memory methodData =\\n abi.encodeWithSignature(\\n 'removeLiquidity(address,address,uint256,uint256,uint256,address,uint256)',\\n _tokensOut[0],\\n _tokensOut[1],\\n _poolTokensIn,\\n _minAmountsOut[0],\\n _minAmountsOut[1],\\n _strategy,\\n block.timestamp.add(MAX_DELTA_BLOCKS)\\n );\\n\\n return (address(uniRouter), 0, methodData);\\n }\\n}\\n\",\"keccak256\":\"0x13a92084da0f9f0ed84df8f33136aed212e4d94f873fd302ba7b1bd68bac178a\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editGardenNFT(address _newGardenNFT) external;\\n\\n function editStrategyNFT(address _newStrategyNFT) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function editUniswapFactory(address _newUniswapFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\\n\\n function maxContributorsPerGarden() external view returns (uint256);\\n\\n function gardenCreationIsOpen() external view returns (bool);\\n\\n function openPublicGardenCreation() external;\\n\\n function setMaxContributorsPerGarden(uint256 _newMax) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function gardenNFT() external view returns (address);\\n\\n function strategyNFT() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\\n\\n function uniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0xdee5a27301c24f507d312f32249487fa9b0a756062a7e479405a1d1ee9ee7bb8\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function isGardenStrategy(address _strategy) external view returns (bool);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategyActiveInGarden(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to,\\n bool _withPenalty\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x88f1786ffee23e386aaa1735177912e1b5a7cdd440dafe52fb139fe50fd621b4\",\"license\":\"Apache License\"},\"contracts/interfaces/IIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIntegration\\n * @author Babylon Finance\\n *\\n * Interface for protocol integrations\\n */\\ninterface IIntegration {\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xee03c9274ddf3257e3bfd2bb229fea3412c9105f178e64174f59efeafd53182c\",\"license\":\"Apache License\"},\"contracts/interfaces/IPoolIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPoolIntegration\\n * @author Babylon Finance\\n *\\n * Interface for liquiditypool protocol integrations\\n */\\ninterface IPoolIntegration {\\n function joinPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensOut,\\n address[] memory _poolTokens,\\n uint256[] memory _maxAmountsIn\\n ) external;\\n\\n function exitPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensIn,\\n address[] memory _poolTokens,\\n uint256[] memory _minAmountsOut\\n ) external;\\n\\n function getPoolTokens(address _poolAddress) external view returns (address[] memory);\\n\\n function getPoolWeights(address _poolAddress) external view returns (uint256[] memory);\\n\\n function getPoolTokensOut(\\n address _poolAdress,\\n address _tokenAddress,\\n uint256 _maxAmountsIn\\n ) external view returns (uint256);\\n\\n function getPoolMinAmountsOut(address _poolAddress, uint256 _poolTokenAmount)\\n external\\n view\\n returns (uint256[] memory _minAmountsOut);\\n\\n function isPool(address _poolAddress) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xee7df0934dad8d729ee6dacf85e1ec327a0c8e17bcabaa2afa7d14d93325f9ac\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n address,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x850597ec9a68eb86f31f13b6b77d3b31350b4ed3d0019dedfbd3550ad1a1d9e2\",\"license\":\"Apache License\"},\"contracts/interfaces/external/uniswap/IUniswapV2Router.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\ninterface IUniswapV2Router {\\n function factory() external pure returns (address);\\n\\n function WETH() external pure returns (address);\\n\\n function addLiquidity(\\n address tokenA,\\n address tokenB,\\n uint256 amountADesired,\\n uint256 amountBDesired,\\n uint256 amountAMin,\\n uint256 amountBMin,\\n address to,\\n uint256 deadline\\n )\\n external\\n returns (\\n uint256 amountA,\\n uint256 amountB,\\n uint256 liquidity\\n );\\n\\n function addLiquidityETH(\\n address token,\\n uint256 amountTokenDesired,\\n uint256 amountTokenMin,\\n uint256 amountETHMin,\\n address to,\\n uint256 deadline\\n )\\n external\\n payable\\n returns (\\n uint256 amountToken,\\n uint256 amountETH,\\n uint256 liquidity\\n );\\n\\n function removeLiquidity(\\n address tokenA,\\n address tokenB,\\n uint256 liquidity,\\n uint256 amountAMin,\\n uint256 amountBMin,\\n address to,\\n uint256 deadline\\n ) external returns (uint256 amountA, uint256 amountB);\\n\\n function removeLiquidityETH(\\n address token,\\n uint256 liquidity,\\n uint256 amountTokenMin,\\n uint256 amountETHMin,\\n address to,\\n uint256 deadline\\n ) external returns (uint256 amountToken, uint256 amountETH);\\n\\n function removeLiquidityWithPermit(\\n address tokenA,\\n address tokenB,\\n uint256 liquidity,\\n uint256 amountAMin,\\n uint256 amountBMin,\\n address to,\\n uint256 deadline,\\n bool approveMax,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external returns (uint256 amountA, uint256 amountB);\\n\\n function removeLiquidityETHWithPermit(\\n address token,\\n uint256 liquidity,\\n uint256 amountTokenMin,\\n uint256 amountETHMin,\\n address to,\\n uint256 deadline,\\n bool approveMax,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external returns (uint256 amountToken, uint256 amountETH);\\n\\n function swapExactTokensForTokens(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address[] calldata path,\\n address to,\\n uint256 deadline\\n ) external returns (uint256[] memory amounts);\\n\\n function swapTokensForExactTokens(\\n uint256 amountOut,\\n uint256 amountInMax,\\n address[] calldata path,\\n address to,\\n uint256 deadline\\n ) external returns (uint256[] memory amounts);\\n\\n function swapExactETHForTokens(\\n uint256 amountOutMin,\\n address[] calldata path,\\n address to,\\n uint256 deadline\\n ) external payable returns (uint256[] memory amounts);\\n\\n function swapTokensForExactETH(\\n uint256 amountOut,\\n uint256 amountInMax,\\n address[] calldata path,\\n address to,\\n uint256 deadline\\n ) external returns (uint256[] memory amounts);\\n\\n function swapExactTokensForETH(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address[] calldata path,\\n address to,\\n uint256 deadline\\n ) external returns (uint256[] memory amounts);\\n\\n function swapETHForExactTokens(\\n uint256 amountOut,\\n address[] calldata path,\\n address to,\\n uint256 deadline\\n ) external payable returns (uint256[] memory amounts);\\n\\n function quote(\\n uint256 amountA,\\n uint256 reserveA,\\n uint256 reserveB\\n ) external pure returns (uint256 amountB);\\n\\n function getAmountOut(\\n uint256 amountIn,\\n uint256 reserveIn,\\n uint256 reserveOut\\n ) external pure returns (uint256 amountOut);\\n\\n function getAmountIn(\\n uint256 amountOut,\\n uint256 reserveIn,\\n uint256 reserveOut\\n ) external pure returns (uint256 amountIn);\\n\\n function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts);\\n\\n function getAmountsIn(uint256 amountOut, address[] calldata path) external view returns (uint256[] memory amounts);\\n}\\n\",\"keccak256\":\"0x9225efc2274e92f1d4eb00d8c576fa571fd11335087a23cf3d1787167fa00b64\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"}},\"version\":1}", + "bytecode": "0x60c0604052600560f81b60a0523480156200001957600080fd5b506040516200238038038062002380833981810160405260608110156200003f57600080fd5b5080516020808301516040938401518451808601909552600c85526b1d5b9a5cddd85c17dc1bdbdb60a21b92850192909252919283908390839082848282826001600160a01b038116620000da576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c6572206d75737420626520646566696e6564000000000000604482015290519081900360640190fd5b8251620000ef90600190602086019062000183565b50600080546001600160a01b03199081166001600160a01b039384161790915560609290921b6001600160601b031916608052600160038190556004805490931697909116969096179055505060408051808201909152600e8082526d1cdd5cda1a5cddd85c17dc1bdbdb60921b6020909201918252620001799650939450929150620001839050565b505050506200022f565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001bb576000855562000206565b82601f10620001d657805160ff191683800117855562000206565b8280016001018555821562000206579182015b8281111562000206578251825591602001919060010190620001e9565b506200021492915062000218565b5090565b5b8082111562000214576000815560010162000219565b60805160601c60a05160f81c61211d620002636000398061062052806118465280611eb652508061064d525061211d6000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063708a34761161008c578063bd9d8ad911610066578063bd9d8ad91461042c578063ca4f2803146104a2578063f5e39325146104c8578063f77c4791146104f4576100ea565b8063708a34761461031c578063a0e47bf6146103fe578063b10198fb14610406576100ea565b80633cd5bd95116100c85780633cd5bd95146101925780633fc8cef3146101da5780635b16ebb7146101fe57806362cc395a14610238576100ea565b806306fdde03146100ef57806317d7de7c1461016c57806330adee6514610174575b600080fd5b6100f76104fc565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610131578181015183820152602001610119565b50505050905090810190601f16801561015e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100f7610589565b61017c61061e565b6040805160ff9092168252519081900360200190f35b6101c8600480360360608110156101a857600080fd5b506001600160a01b03813581169160208101359091169060400135610642565b60408051918252519081900360200190f35b6101e261064b565b604080516001600160a01b039092168252519081900360200190f35b6102246004803603602081101561021457600080fd5b50356001600160a01b031661066f565b604080519115158252519081900360200190f35b61031a600480360360a081101561024e57600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561028957600080fd5b82018360208201111561029b57600080fd5b803590602001918460208302840111640100000000831117156102bd57600080fd5b9193909290916020810190356401000000008111156102db57600080fd5b8201836020820111156102ed57600080fd5b8035906020019184602083028401116401000000008311171561030f57600080fd5b509092509050610680565b005b61031a600480360360a081101561033257600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561036d57600080fd5b82018360208201111561037f57600080fd5b803590602001918460208302840111640100000000831117156103a157600080fd5b9193909290916020810190356401000000008111156103bf57600080fd5b8201836020820111156103d157600080fd5b803590602001918460208302840111640100000000831117156103f357600080fd5b509092509050610a9d565b6101e2610fbc565b6102246004803603602081101561041c57600080fd5b50356001600160a01b0316610fcb565b6104526004803603602081101561044257600080fd5b50356001600160a01b0316610fe0565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561048e578181015183820152602001610476565b505050509050019250505060405180910390f35b610452600480360360208110156104b857600080fd5b50356001600160a01b031661104e565b610452600480360360408110156104de57600080fd5b506001600160a01b038135169060200135611198565b6101e26113c0565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105815780601f1061055657610100808354040283529160200191610581565b820191906000526020600020905b81548152906001019060200180831161056457829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156106145780601f106105e957610100808354040283529160200191610614565b820191906000526020600020905b8154815290600101906020018083116105f757829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b60019392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061067a826113cf565b92915050565b600260035414156106d8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b15801561072857600080fd5b505afa15801561073c573d6000803e3d6000fd5b505050506040513d602081101561075257600080fd5b50516107a5576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b60006107b68888888888888861143e565b90506107c181611631565b80602001516001600160a01b03166397ccdc606107dd8961171c565b89896040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561083557600080fd5b505af1158015610849573d6000803e3d6000fd5b5050505060008060006108618b8b8b8b8b8b8b61172c565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156108de5781810151838201526020016108c6565b50505050905090810190601f16801561090b5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561092c57600080fd5b505af1158015610940573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561096957600080fd5b810190808051604051939291908464010000000082111561098957600080fd5b90830190602082018581111561099e57600080fd5b82516401000000008111828201881017156109b857600080fd5b82525081516020918201929091019080838360005b838110156109e55781810151838201526020016109cd565b50505050905090810190601f168015610a125780820380516001836020036101000a031916815260200191505b5060405250505050610a2384611931565b83600001516001600160a01b031684602001516001600160a01b03167f7659e40cf608296ce5aa9eff9c80adc7a49cb481173fc4e302e3983827b042df86604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b60026003541415610af5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b158015610b4557600080fd5b505afa158015610b59573d6000803e3d6000fd5b505050506040513d6020811015610b6f57600080fd5b5051610bc2576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b6000610bd38888888888888861143e565b9050610bde816119f9565b60005b84811015610cd7576000868683818110610bf757fe5b905060200201356001600160a01b03166001600160a01b031614610ccf5781602001516001600160a01b03166397ccdc60610c318a61171c565b888885818110610c3d57fe5b905060200201356001600160a01b0316878786818110610c5957fe5b905060200201356040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015610cb657600080fd5b505af1158015610cca573d6000803e3d6000fd5b505050505b600101610be1565b506000806000610cec8b8b8b8b8b8b8b611a9a565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610d69578181015183820152602001610d51565b50505050905090810190601f168015610d965780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610db757600080fd5b505af1158015610dcb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610df457600080fd5b8101908080516040519392919084640100000000821115610e1457600080fd5b908301906020820185811115610e2957600080fd5b8251640100000000811182820188101715610e4357600080fd5b82525081516020918201929091019080838360005b83811015610e70578181015183820152602001610e58565b50505050905090810190601f168015610e9d5780820380516001836020036101000a031916815260200191505b5060405250505050610f348460a0015185604001516001600160a01b03166370a0823187602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f0257600080fd5b505afa158015610f16573d6000803e3d6000fd5b505050506040513d6020811015610f2c57600080fd5b505190611b77565b6080850152610f4284611bd4565b83600001516001600160a01b031684602001516001600160a01b03167fe5ca6288535c5c6c2462c912b4033eade15b80926717896a2d58a2defdeb912886604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b6004546001600160a01b031681565b60026020526000908152604090205460ff1681565b604080516002808252606080830184529260009291906020830190803683370190505090506706f05b59d3b200008160008151811061101b57fe5b6020026020010181815250506706f05b59d3b200008160018151811061103d57fe5b602090810291909101015292915050565b60408051600280825260608083018452926000929190602083019080368337019050509050826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156110ac57600080fd5b505afa1580156110c0573d6000803e3d6000fd5b505050506040513d60208110156110d657600080fd5b5051815182906000906110e557fe5b60200260200101906001600160a01b031690816001600160a01b031681525050826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561113e57600080fd5b505afa158015611152573d6000803e3d6000fd5b505050506040513d602081101561116857600080fd5b505181518290600190811061117957fe5b6001600160a01b03909216602092830291909101909101529050919050565b60606000836001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111d557600080fd5b505afa1580156111e9573d6000803e3d6000fd5b505050506040513d60208110156111ff57600080fd5b50516040805160028082526060820183529293506000929091602083019080368337019050509050611331662386f26fc10000670de0b6b3a76400000361132b84611325888a6001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561127d57600080fd5b505afa158015611291573d6000803e3d6000fd5b505050506040513d60208110156112a757600080fd5b5051604080516370a0823160e01b81526001600160a01b038e81166004830152915191909216916370a08231916024808301926020929190829003018186803b1580156112f357600080fd5b505afa158015611307573d6000803e3d6000fd5b505050506040513d602081101561131d57600080fd5b505190611c96565b90611cf6565b90611d5d565b8160008151811061133e57fe5b6020026020010181815250506113a0662386f26fc10000670de0b6b3a76400000361132b84611325888a6001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561127d57600080fd5b816001815181106113ad57fe5b6020908102919091010152949350505050565b6000546001600160a01b031681565b600080826001600160a01b031663ba9a7a566040518163ffffffff1660e01b815260040160206040518083038186803b15801561140b57600080fd5b505afa15801561141f573d6000803e3d6000fd5b505050506040513d602081101561143557600080fd5b50511192915050565b611446611f8b565b61144e611f8b565b6001600160a01b0389166020808301829052604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b892600480840193919291829003018186803b1580156114ac57600080fd5b505afa1580156114c0573d6000803e3d6000fd5b505050506040513d60208110156114d657600080fd5b50516001600160a01b0390811682528816604080830182905280517f18160ddd00000000000000000000000000000000000000000000000000000000815290516318160ddd91600480820192602092909190829003018186803b15801561153c57600080fd5b505afa158015611550573d6000803e3d6000fd5b505050506040513d602081101561156657600080fd5b50516060820152604080516370a0823160e01b81526001600160a01b038b811660048301529151918a16916370a0823191602480820192602092909190829003018186803b1580156115b757600080fd5b505afa1580156115cb573d6000803e3d6000fd5b505050506040513d60208110156115e157600080fd5b505160a0820152608081018790526040805160208581028281018201909352858252909186918691829185019084908082843760009201919091525050505060c082015298975050505050505050565b61163e81604001516113cf565b61168f576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b60008160800151116116d25760405162461bcd60e51b815260040180806020018281038252602e815260200180612036602e913960400191505060405180910390fd5b80608001518160a0015110156117195760405162461bcd60e51b815260040180806020018281038252602d815260200180612090602d913960400191505060405180910390fd5b50565b506004546001600160a01b031690565b600080606060028614611786576040805162461bcd60e51b815260206004820152601360248201527f54776f20746f6b656e7320726571756972656400000000000000000000000000604482015290519081900360640190fd5b600284146117db576040805162461bcd60e51b815260206004820152601460248201527f54776f20616d6f756e7473207265717569726564000000000000000000000000604482015290519081900360640190fd5b6000878760008181106117ea57fe5b905060200201356001600160a01b03168888600181811061180757fe5b905060200201356001600160a01b03168a8888600081811061182557fe5b905060200201358989600181811061183957fe5b905060200201358f6118777f000000000000000000000000000000000000000000000000000000000000000060ff1642611d7590919063ffffffff16565b604080516001600160a01b03988916602482015296881660448801526064870195909552608486019390935260a4850191909152841660c484015260e4808401919091528151808403909101815261010490920190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fbaa2abde000000000000000000000000000000000000000000000000000000001790526004549091169450600093509150509750975097945050505050565b80608001518160a001510381604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561199157600080fd5b505afa1580156119a5573d6000803e3d6000fd5b505050506040513d60208110156119bb57600080fd5b5051146117195760405162461bcd60e51b815260040180806020018281038252602b8152602001806120bd602b913960400191505060405180910390fd5b611a0681604001516113cf565b611a57576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b60008160800151116117195760405162461bcd60e51b8152600401808060200182810382526031815260200180611fe46031913960400191505060405180910390fd5b600080606060028614611af4576040805162461bcd60e51b815260206004820152601360248201527f54776f20746f6b656e7320726571756972656400000000000000000000000000604482015290519081900360640190fd5b60028414611b49576040805162461bcd60e51b815260206004820152601460248201527f54776f20616d6f756e7473207265717569726564000000000000000000000000604482015290519081900360640190fd5b6004546001600160a01b03166000611b648c8a8a8a8a611dcf565b9250925092509750975097945050505050565b600082821115611bce576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b8060a0015181604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611c2e57600080fd5b505afa158015611c42573d6000803e3d6000fd5b505050506040513d6020811015611c5857600080fd5b5051116117195760405162461bcd60e51b815260040180806020018281038252602c815260200180612064602c913960400191505060405180910390fd5b600082611ca55750600061067a565b82820282848281611cb257fe5b0414611cef5760405162461bcd60e51b81526004018080602001828103825260218152602001806120156021913960400191505060405180910390fd5b9392505050565b6000808211611d4c576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611d5557fe5b049392505050565b6000611cef670de0b6b3a76400006113258585611c96565b600082820183811015611cef576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b606084846000818110611dde57fe5b905060200201356001600160a01b031685856001818110611dfb57fe5b905060200201356001600160a01b031684846000818110611e1857fe5b9050602002013585856001818110611e2c57fe5b90506020020135611e85611e63662386f26fc1000089896000818110611e4e57fe5b90506020020135611d5d90919063ffffffff16565b88886000818110611e7057fe5b90506020020135611b7790919063ffffffff16565b611ead611ea0662386f26fc100008a8a6001818110611e4e57fe5b89896001818110611e7057fe5b8b611edb4260ff7f000000000000000000000000000000000000000000000000000000000000000016611d75565b604080516001600160a01b03998a16602482015297891660448901526064880196909652608487019490945260a486019290925260c485015290931660e4830152610104808301939093528051808303909301835261012490910190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fe8e3370000000000000000000000000000000000000000000000000000000000179052905095945050505050565b6040518060e0016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160608152509056fe4d696e20706f6f6c20746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77506f6f6c20746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520737472617465677920646964206e6f7420726563656976652074686520706f6f6c20746f6b656e7354686520737472617465677920646f6573206e6f74206861766520656e6f75676820706f6f6c20746f6b656e7354686520737472617465677920646964206e6f742072657475726e2074686520706f6f6c20746f6b656e73a2646970667358221220ef14c445014ea40c2c2bf6333096f30e2e5a364ee3180f8cdb74cf8d3432f3f764736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063708a34761161008c578063bd9d8ad911610066578063bd9d8ad91461042c578063ca4f2803146104a2578063f5e39325146104c8578063f77c4791146104f4576100ea565b8063708a34761461031c578063a0e47bf6146103fe578063b10198fb14610406576100ea565b80633cd5bd95116100c85780633cd5bd95146101925780633fc8cef3146101da5780635b16ebb7146101fe57806362cc395a14610238576100ea565b806306fdde03146100ef57806317d7de7c1461016c57806330adee6514610174575b600080fd5b6100f76104fc565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610131578181015183820152602001610119565b50505050905090810190601f16801561015e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100f7610589565b61017c61061e565b6040805160ff9092168252519081900360200190f35b6101c8600480360360608110156101a857600080fd5b506001600160a01b03813581169160208101359091169060400135610642565b60408051918252519081900360200190f35b6101e261064b565b604080516001600160a01b039092168252519081900360200190f35b6102246004803603602081101561021457600080fd5b50356001600160a01b031661066f565b604080519115158252519081900360200190f35b61031a600480360360a081101561024e57600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561028957600080fd5b82018360208201111561029b57600080fd5b803590602001918460208302840111640100000000831117156102bd57600080fd5b9193909290916020810190356401000000008111156102db57600080fd5b8201836020820111156102ed57600080fd5b8035906020019184602083028401116401000000008311171561030f57600080fd5b509092509050610680565b005b61031a600480360360a081101561033257600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561036d57600080fd5b82018360208201111561037f57600080fd5b803590602001918460208302840111640100000000831117156103a157600080fd5b9193909290916020810190356401000000008111156103bf57600080fd5b8201836020820111156103d157600080fd5b803590602001918460208302840111640100000000831117156103f357600080fd5b509092509050610a9d565b6101e2610fbc565b6102246004803603602081101561041c57600080fd5b50356001600160a01b0316610fcb565b6104526004803603602081101561044257600080fd5b50356001600160a01b0316610fe0565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561048e578181015183820152602001610476565b505050509050019250505060405180910390f35b610452600480360360208110156104b857600080fd5b50356001600160a01b031661104e565b610452600480360360408110156104de57600080fd5b506001600160a01b038135169060200135611198565b6101e26113c0565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105815780601f1061055657610100808354040283529160200191610581565b820191906000526020600020905b81548152906001019060200180831161056457829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156106145780601f106105e957610100808354040283529160200191610614565b820191906000526020600020905b8154815290600101906020018083116105f757829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b60019392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061067a826113cf565b92915050565b600260035414156106d8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b15801561072857600080fd5b505afa15801561073c573d6000803e3d6000fd5b505050506040513d602081101561075257600080fd5b50516107a5576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b60006107b68888888888888861143e565b90506107c181611631565b80602001516001600160a01b03166397ccdc606107dd8961171c565b89896040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561083557600080fd5b505af1158015610849573d6000803e3d6000fd5b5050505060008060006108618b8b8b8b8b8b8b61172c565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156108de5781810151838201526020016108c6565b50505050905090810190601f16801561090b5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561092c57600080fd5b505af1158015610940573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561096957600080fd5b810190808051604051939291908464010000000082111561098957600080fd5b90830190602082018581111561099e57600080fd5b82516401000000008111828201881017156109b857600080fd5b82525081516020918201929091019080838360005b838110156109e55781810151838201526020016109cd565b50505050905090810190601f168015610a125780820380516001836020036101000a031916815260200191505b5060405250505050610a2384611931565b83600001516001600160a01b031684602001516001600160a01b03167f7659e40cf608296ce5aa9eff9c80adc7a49cb481173fc4e302e3983827b042df86604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b60026003541415610af5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b158015610b4557600080fd5b505afa158015610b59573d6000803e3d6000fd5b505050506040513d6020811015610b6f57600080fd5b5051610bc2576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b6000610bd38888888888888861143e565b9050610bde816119f9565b60005b84811015610cd7576000868683818110610bf757fe5b905060200201356001600160a01b03166001600160a01b031614610ccf5781602001516001600160a01b03166397ccdc60610c318a61171c565b888885818110610c3d57fe5b905060200201356001600160a01b0316878786818110610c5957fe5b905060200201356040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015610cb657600080fd5b505af1158015610cca573d6000803e3d6000fd5b505050505b600101610be1565b506000806000610cec8b8b8b8b8b8b8b611a9a565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610d69578181015183820152602001610d51565b50505050905090810190601f168015610d965780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610db757600080fd5b505af1158015610dcb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610df457600080fd5b8101908080516040519392919084640100000000821115610e1457600080fd5b908301906020820185811115610e2957600080fd5b8251640100000000811182820188101715610e4357600080fd5b82525081516020918201929091019080838360005b83811015610e70578181015183820152602001610e58565b50505050905090810190601f168015610e9d5780820380516001836020036101000a031916815260200191505b5060405250505050610f348460a0015185604001516001600160a01b03166370a0823187602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f0257600080fd5b505afa158015610f16573d6000803e3d6000fd5b505050506040513d6020811015610f2c57600080fd5b505190611b77565b6080850152610f4284611bd4565b83600001516001600160a01b031684602001516001600160a01b03167fe5ca6288535c5c6c2462c912b4033eade15b80926717896a2d58a2defdeb912886604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b6004546001600160a01b031681565b60026020526000908152604090205460ff1681565b604080516002808252606080830184529260009291906020830190803683370190505090506706f05b59d3b200008160008151811061101b57fe5b6020026020010181815250506706f05b59d3b200008160018151811061103d57fe5b602090810291909101015292915050565b60408051600280825260608083018452926000929190602083019080368337019050509050826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156110ac57600080fd5b505afa1580156110c0573d6000803e3d6000fd5b505050506040513d60208110156110d657600080fd5b5051815182906000906110e557fe5b60200260200101906001600160a01b031690816001600160a01b031681525050826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561113e57600080fd5b505afa158015611152573d6000803e3d6000fd5b505050506040513d602081101561116857600080fd5b505181518290600190811061117957fe5b6001600160a01b03909216602092830291909101909101529050919050565b60606000836001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111d557600080fd5b505afa1580156111e9573d6000803e3d6000fd5b505050506040513d60208110156111ff57600080fd5b50516040805160028082526060820183529293506000929091602083019080368337019050509050611331662386f26fc10000670de0b6b3a76400000361132b84611325888a6001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561127d57600080fd5b505afa158015611291573d6000803e3d6000fd5b505050506040513d60208110156112a757600080fd5b5051604080516370a0823160e01b81526001600160a01b038e81166004830152915191909216916370a08231916024808301926020929190829003018186803b1580156112f357600080fd5b505afa158015611307573d6000803e3d6000fd5b505050506040513d602081101561131d57600080fd5b505190611c96565b90611cf6565b90611d5d565b8160008151811061133e57fe5b6020026020010181815250506113a0662386f26fc10000670de0b6b3a76400000361132b84611325888a6001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561127d57600080fd5b816001815181106113ad57fe5b6020908102919091010152949350505050565b6000546001600160a01b031681565b600080826001600160a01b031663ba9a7a566040518163ffffffff1660e01b815260040160206040518083038186803b15801561140b57600080fd5b505afa15801561141f573d6000803e3d6000fd5b505050506040513d602081101561143557600080fd5b50511192915050565b611446611f8b565b61144e611f8b565b6001600160a01b0389166020808301829052604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b892600480840193919291829003018186803b1580156114ac57600080fd5b505afa1580156114c0573d6000803e3d6000fd5b505050506040513d60208110156114d657600080fd5b50516001600160a01b0390811682528816604080830182905280517f18160ddd00000000000000000000000000000000000000000000000000000000815290516318160ddd91600480820192602092909190829003018186803b15801561153c57600080fd5b505afa158015611550573d6000803e3d6000fd5b505050506040513d602081101561156657600080fd5b50516060820152604080516370a0823160e01b81526001600160a01b038b811660048301529151918a16916370a0823191602480820192602092909190829003018186803b1580156115b757600080fd5b505afa1580156115cb573d6000803e3d6000fd5b505050506040513d60208110156115e157600080fd5b505160a0820152608081018790526040805160208581028281018201909352858252909186918691829185019084908082843760009201919091525050505060c082015298975050505050505050565b61163e81604001516113cf565b61168f576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b60008160800151116116d25760405162461bcd60e51b815260040180806020018281038252602e815260200180612036602e913960400191505060405180910390fd5b80608001518160a0015110156117195760405162461bcd60e51b815260040180806020018281038252602d815260200180612090602d913960400191505060405180910390fd5b50565b506004546001600160a01b031690565b600080606060028614611786576040805162461bcd60e51b815260206004820152601360248201527f54776f20746f6b656e7320726571756972656400000000000000000000000000604482015290519081900360640190fd5b600284146117db576040805162461bcd60e51b815260206004820152601460248201527f54776f20616d6f756e7473207265717569726564000000000000000000000000604482015290519081900360640190fd5b6000878760008181106117ea57fe5b905060200201356001600160a01b03168888600181811061180757fe5b905060200201356001600160a01b03168a8888600081811061182557fe5b905060200201358989600181811061183957fe5b905060200201358f6118777f000000000000000000000000000000000000000000000000000000000000000060ff1642611d7590919063ffffffff16565b604080516001600160a01b03988916602482015296881660448801526064870195909552608486019390935260a4850191909152841660c484015260e4808401919091528151808403909101815261010490920190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fbaa2abde000000000000000000000000000000000000000000000000000000001790526004549091169450600093509150509750975097945050505050565b80608001518160a001510381604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561199157600080fd5b505afa1580156119a5573d6000803e3d6000fd5b505050506040513d60208110156119bb57600080fd5b5051146117195760405162461bcd60e51b815260040180806020018281038252602b8152602001806120bd602b913960400191505060405180910390fd5b611a0681604001516113cf565b611a57576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b60008160800151116117195760405162461bcd60e51b8152600401808060200182810382526031815260200180611fe46031913960400191505060405180910390fd5b600080606060028614611af4576040805162461bcd60e51b815260206004820152601360248201527f54776f20746f6b656e7320726571756972656400000000000000000000000000604482015290519081900360640190fd5b60028414611b49576040805162461bcd60e51b815260206004820152601460248201527f54776f20616d6f756e7473207265717569726564000000000000000000000000604482015290519081900360640190fd5b6004546001600160a01b03166000611b648c8a8a8a8a611dcf565b9250925092509750975097945050505050565b600082821115611bce576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b8060a0015181604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611c2e57600080fd5b505afa158015611c42573d6000803e3d6000fd5b505050506040513d6020811015611c5857600080fd5b5051116117195760405162461bcd60e51b815260040180806020018281038252602c815260200180612064602c913960400191505060405180910390fd5b600082611ca55750600061067a565b82820282848281611cb257fe5b0414611cef5760405162461bcd60e51b81526004018080602001828103825260218152602001806120156021913960400191505060405180910390fd5b9392505050565b6000808211611d4c576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611d5557fe5b049392505050565b6000611cef670de0b6b3a76400006113258585611c96565b600082820183811015611cef576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b606084846000818110611dde57fe5b905060200201356001600160a01b031685856001818110611dfb57fe5b905060200201356001600160a01b031684846000818110611e1857fe5b9050602002013585856001818110611e2c57fe5b90506020020135611e85611e63662386f26fc1000089896000818110611e4e57fe5b90506020020135611d5d90919063ffffffff16565b88886000818110611e7057fe5b90506020020135611b7790919063ffffffff16565b611ead611ea0662386f26fc100008a8a6001818110611e4e57fe5b89896001818110611e7057fe5b8b611edb4260ff7f000000000000000000000000000000000000000000000000000000000000000016611d75565b604080516001600160a01b03998a16602482015297891660448901526064880196909652608487019490945260a486019290925260c485015290931660e4830152610104808301939093528051808303909301835261012490910190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fe8e3370000000000000000000000000000000000000000000000000000000000179052905095945050505050565b6040518060e0016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160608152509056fe4d696e20706f6f6c20746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77506f6f6c20746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520737472617465677920646964206e6f7420726563656976652074686520706f6f6c20746f6b656e7354686520737472617465677920646f6573206e6f74206861766520656e6f75676820706f6f6c20746f6b656e7354686520737472617465677920646964206e6f742072657475726e2074686520706f6f6c20746f6b656e73a2646970667358221220ef14c445014ea40c2c2bf6333096f30e2e5a364ee3180f8cdb74cf8d3432f3f764736f6c63430007060033", "devdoc": { "author": "Babylon Finance Protocol Sushiswap Protocol pool integration", "kind": "dev", @@ -448,7 +448,7 @@ "storageLayout": { "storage": [ { - "astId": 18742, + "astId": 17657, "contract": "contracts/integrations/pool/SushiswapPoolIntegration.sol:SushiswapPoolIntegration", "label": "controller", "offset": 0, @@ -456,7 +456,7 @@ "type": "t_address" }, { - "astId": 18746, + "astId": 17661, "contract": "contracts/integrations/pool/SushiswapPoolIntegration.sol:SushiswapPoolIntegration", "label": "name", "offset": 0, @@ -464,7 +464,7 @@ "type": "t_string_storage" }, { - "astId": 18750, + "astId": 17665, "contract": "contracts/integrations/pool/SushiswapPoolIntegration.sol:SushiswapPoolIntegration", "label": "initializedByGarden", "offset": 0, @@ -472,7 +472,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 7995, + "astId": 5603, "contract": "contracts/integrations/pool/SushiswapPoolIntegration.sol:SushiswapPoolIntegration", "label": "_status", "offset": 0, @@ -480,12 +480,12 @@ "type": "t_uint256" }, { - "astId": 22153, + "astId": 21058, "contract": "contracts/integrations/pool/SushiswapPoolIntegration.sol:SushiswapPoolIntegration", "label": "uniRouter", "offset": 0, "slot": "4", - "type": "t_contract(IUniswapV2Router)26981" + "type": "t_contract(IUniswapV2Router)26084" } ], "types": { @@ -499,7 +499,7 @@ "label": "bool", "numberOfBytes": "1" }, - "t_contract(IUniswapV2Router)26981": { + "t_contract(IUniswapV2Router)26084": { "encoding": "inplace", "label": "contract IUniswapV2Router", "numberOfBytes": "20" diff --git a/deployments/artifacts/mainnet/TimeLockRegistry.json b/deployments/artifacts/mainnet/TimeLockRegistry.json index b04a5021e..60888598c 100644 --- a/deployments/artifacts/mainnet/TimeLockRegistry.json +++ b/deployments/artifacts/mainnet/TimeLockRegistry.json @@ -1,5 +1,5 @@ { - "address": "0x5E8ff9EA9356Eb21B69610b35de7E7692b0E0dd6", + "address": "0xe7f0A49905A58BEb69F13d72C5672988ee54a94a", "abi": [ { "inputs": [ @@ -198,6 +198,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "getRegistrations", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "owner", @@ -235,13 +248,42 @@ } ], "name": "register", - "outputs": [ + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "components": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "distribution", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "investorType", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "vestingStartingDate", + "type": "uint256" + } + ], + "internalType": "struct TimeLockRegistry.Registration[]", + "name": "_registrations", + "type": "tuple[]" } ], + "name": "registerBatch", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -264,6 +306,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "registrations", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "renounceOwnership", @@ -323,6 +384,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "totalTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -356,44 +430,44 @@ "type": "function" } ], - "transactionHash": "0x7a36312fd5c0560179429a2e97739a42a92d1afee4a669954716008a321caadc", + "transactionHash": "0x93b6bca4b510919c8c62010251672daecf23c0b66dc49a370de4bbd8ae30593e", "receipt": { "to": null, - "from": "0x311FEE0d859FA936FaEd456758dCD8047C4fFEd7", - "contractAddress": "0xF4d1B324956675BbBde8D7f1611146EB82c0a1C2", - "transactionIndex": 13, - "gasUsed": "1277826", - "logsBloom": "0x00000000000000000000000800000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000800000000400000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002020000004000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x489105d3d73c52b095830782ca2c9ccfc49218f8684790c4aa75ba0a6410282f", - "transactionHash": "0x7a36312fd5c0560179429a2e97739a42a92d1afee4a669954716008a321caadc", + "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", + "contractAddress": "0xe7f0A49905A58BEb69F13d72C5672988ee54a94a", + "transactionIndex": 121, + "gasUsed": "1714484", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000004000000008000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000020000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000004000000020000010000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xe63b1e310bf899a5a2fa25f5cc8c852960d19f3211f47adffd4d36dce5723c35", + "transactionHash": "0x93b6bca4b510919c8c62010251672daecf23c0b66dc49a370de4bbd8ae30593e", "logs": [ { - "transactionIndex": 13, - "blockNumber": 8516139, - "transactionHash": "0x7a36312fd5c0560179429a2e97739a42a92d1afee4a669954716008a321caadc", - "address": "0xF4d1B324956675BbBde8D7f1611146EB82c0a1C2", + "transactionIndex": 121, + "blockNumber": 12451149, + "transactionHash": "0x93b6bca4b510919c8c62010251672daecf23c0b66dc49a370de4bbd8ae30593e", + "address": "0xe7f0A49905A58BEb69F13d72C5672988ee54a94a", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000311fee0d859fa936faed456758dcd8047c4ffed7" + "0x000000000000000000000000040cc3af8455f3c34d1df1d2a305e047a062bebf" ], "data": "0x", - "logIndex": 17, - "blockHash": "0x489105d3d73c52b095830782ca2c9ccfc49218f8684790c4aa75ba0a6410282f" + "logIndex": 142, + "blockHash": "0xe63b1e310bf899a5a2fa25f5cc8c852960d19f3211f47adffd4d36dce5723c35" } ], - "blockNumber": 8516139, - "cumulativeGasUsed": "6430325", + "blockNumber": 12451149, + "cumulativeGasUsed": "8156886", "status": 1, "byzantium": true }, "args": [ - "0x8b7C579dFF83Adb1eC6E5DAF5f84b9425C4Bf0E4" + "0x927761829796FdE7fb3581Ee4FdDe35f371a1926" ], - "solcInputHash": "1cde26e1be086ba932a8865ced5ceef3", - "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract TimeLockedToken\",\"name\":\"_token\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"distribution\",\"type\":\"uint256\"}],\"name\":\"Cancel\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"distribution\",\"type\":\"uint256\"}],\"name\":\"Claim\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"distribution\",\"type\":\"uint256\"}],\"name\":\"Register\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"cancelDeliveredTokens\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"cancelRegistration\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"address_\",\"type\":\"address\"}],\"name\":\"checkRegisteredDistribution\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"address_\",\"type\":\"address\"}],\"name\":\"checkVesting\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"team\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"last\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_receiver\",\"type\":\"address\"}],\"name\":\"claim\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"distribution\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"investorType\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"vestingStartingDate\",\"type\":\"uint256\"}],\"name\":\"register\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"registeredDistributions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract TimeLockedToken\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenVested\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"team\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"cliff\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"vestingBegin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"vestingEnd\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastClaim\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferToOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance\",\"details\":\"This contract allows owner to register distributions for a TimeLockedToken To register a distribution, register method should be called by the owner. claim() should be called only by the BABL Token smartcontract (modifier onlyBABLToken) when any account registered to receive tokens make its own claim If case of a mistake, owner can cancel registration before the claim is done by the account Note this contract address must be setup in the TimeLockedToken's contract pointing to interact with (e.g. setTimeLockRegistry() function)\",\"kind\":\"dev\",\"methods\":{\"cancelDeliveredTokens(address)\":{\"details\":\"An automatic override allowance is granted during the claim process\",\"params\":{\"account\":\"Address that should have it's distribution removed\"},\"returns\":{\"_0\":\"Whether or not it succeeded\"}},\"cancelRegistration(address)\":{\"details\":\"A claim has not to be done earlier\",\"params\":{\"receiver\":\"Address that should have it's distribution removed\"},\"returns\":{\"_0\":\"Whether or not it succeeded\"}},\"claim(address)\":{\"details\":\"Claim is done by the user in the TimeLocked contract and the contract is the only allowed to call this function on behalf of the user to make the claim\",\"returns\":{\"_0\":\"The amount of tokens registered and delivered after the claim\"}},\"constructor\":{\"params\":{\"_token\":\"TimeLockedToken contract to use in this registry\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"register(address,uint256,bool,uint256)\":{\"params\":{\"distribution\":\"Tokens amount that receiver is due to get\",\"receiver\":\"Address belonging vesting conditions\"},\"returns\":{\"_0\":\"Whether or not the registration succeeded\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"transferToOwner(uint256)\":{\"params\":{\"amount\":\"Amount to be recovered by the owner of the Time Lock Registry smartcontract from its balance\"},\"returns\":{\"_0\":\"Whether or not it succeeded\"}}},\"title\":\"TimeLockRegistry\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"cancelDeliveredTokens(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Cancel distribution registration in case of mistake and before a claim is doneCancel already delivered tokens. It might only apply when non-completion of vesting period of Team members or Advisors\"},\"cancelRegistration(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Cancel distribution registration in case of mistake and before a claim is doneCancel distribution registration\"},\"claim(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Claim locked tokens by the registered accountClaim tokens due amount.\"},\"constructor\":{\"notice\":\"Construct a new Time Lock Registry and gives ownership to sender\"},\"register(address,uint256,bool,uint256)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Register new account under vesting conditions (Team, Advisors, Investors e.g. SAFT purchaser)Register new account under vesting conditions (Team, Advisors, Investors e.g. SAFT purchaser)\"},\"tokenVested(address)\":{\"notice\":\"A record of token owners under vesting conditions for each account, by index\"},\"transferToOwner(uint256)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Recover tokens in Time Lock Registry smartcontract address by the ownerSend tokens from smartcontract address to the owner. It might only apply after a cancellation of vested tokens\"}},\"notice\":\"Register Lockups for TimeLocked ERC20 Token BABL (e.g. vesting)\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/token/TimeLockRegistry.sol\":\"TimeLockRegistry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () internal {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.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 using SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n // solhint-disable-next-line max-line-length\\n require((value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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 * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 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. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\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 { size := extcodesize(account) }\\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, \\\"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, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityMinimum(uint256 _minRiskyPairLiquidityEth) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minRiskyPairLiquidityEth() external view returns (uint256);\\n\\n function getUniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0x57cf4ece98219f805a416e8c24728d30d9b37c4126d66785d2617b97e35ffae6\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function nftAddress() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategy(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function reenableEthForStrategies() external;\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x5e460136e0b45024ea1c1f32cde607f3ce75dd5b14cee34007d6bbd08beabc82\",\"license\":\"Apache License\"},\"contracts/interfaces/IRewardsDistributor.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IRewardsDistributor\\n * @author Babylon Finance\\n *\\n * Interface for the distribute rewards of the BABL Mining Program.\\n */\\n\\ninterface IRewardsDistributor {\\n // Structs\\n struct PrincipalPerTimestamp {\\n uint256 principal;\\n uint256 time;\\n uint256 timeListPointer;\\n }\\n\\n function protocolPrincipal() external view returns (uint256);\\n\\n function pid() external view returns (uint256);\\n\\n // solhint-disable-next-line\\n function EPOCH_DURATION() external pure returns (uint256);\\n\\n // solhint-disable-next-line\\n function START_TIME() external view returns (uint256);\\n\\n // solhint-disable-next-line\\n function Q1_REWARDS() external pure returns (uint256);\\n\\n // solhint-disable-next-line\\n function DECAY_RATE() external pure returns (uint256);\\n\\n function addProtocolPrincipal(uint256 _capital) external;\\n\\n function substractProtocolPrincipal(uint256 _capital) external;\\n\\n function getStrategyRewards(address _strategy) external returns (uint96);\\n\\n function sendTokensToContributor(address _to, uint96 _amount) external;\\n\\n function getRewards(\\n address _garden,\\n address _contributor,\\n address[] calldata _finalizedStrategies\\n ) external view returns (uint256, uint96);\\n\\n function getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) external view returns (uint256);\\n\\n /**\\n function getContributor(address _garden, address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256[] memory,\\n uint256\\n );\\n */\\n function updateGardenPower(address _garden, uint256 _pid) external;\\n\\n function setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw,\\n uint256 _pid\\n ) external;\\n\\n function tokenSupplyPerQuarter(uint256 quarter) external view returns (uint96);\\n\\n function checkProtocol(uint256 _time)\\n external\\n view\\n returns (\\n uint256 principal,\\n uint256 time,\\n uint256 quarterBelonging,\\n uint256 timeListPointer,\\n uint256 power\\n );\\n\\n function checkQuarter(uint256 _num)\\n external\\n view\\n returns (\\n uint256 quarterPrincipal,\\n uint256 quarterNumber,\\n uint256 quarterPower,\\n uint96 supplyPerQuarter\\n );\\n}\\n\",\"keccak256\":\"0xc68eb7826b0174d4f6dff50320abb2cd958a978d4537c57867dd828dc2798662\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital,\\n address _strategyNft\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function strategyNft() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x4396906e436eb68c96715e0a53ae1656ac5d7934ebdaeb58ec3c33953465bc39\",\"license\":\"Apache License\"},\"contracts/interfaces/IVoteToken.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface IVoteToken {\\n function delegate(address delegatee) external;\\n\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n function getCurrentVotes(address account) external view returns (uint96);\\n\\n function getPriorVotes(address account, uint256 blockNumber) external view returns (uint96);\\n\\n function getMyDelegatee() external view returns (address);\\n\\n function getDelegatee(address account) external view returns (address);\\n\\n function getCheckpoints(address account, uint32 id) external view returns (uint32 fromBlock, uint96 votes);\\n\\n function getNumberOfCheckpoints(address account) external view returns (uint32);\\n}\\n\\ninterface IVoteTokenWithERC20 is IVoteToken, IERC20 {}\\n\",\"keccak256\":\"0xd3d6174f81ce2c1678a536b2a486179f9a5a694849b334556aeb155b9b13f777\",\"license\":\"Apache License\"},\"contracts/lib/BabylonErrors.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n// solhint-disable\\n\\n/**\\n * @notice Forked from https://github.com/balancer-labs/balancer-core-v2/blob/master/contracts/lib/helpers/BalancerErrors.sol\\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 // 'BAB#{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 \\\"BAB#\\\" part is a known constant\\n // (0x42414223): 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(0x42414223000000, 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 // Max deposit limit needs to be under the limit\\n uint256 internal constant MAX_DEPOSIT_LIMIT = 0;\\n // Creator needs to deposit\\n uint256 internal constant MIN_CONTRIBUTION = 1;\\n // Min Garden token supply >= 0\\n uint256 internal constant MIN_TOKEN_SUPPLY = 2;\\n // Deposit hardlock needs to be at least 1 block\\n uint256 internal constant DEPOSIT_HARDLOCK = 3;\\n // Needs to be at least the minimum\\n uint256 internal constant MIN_LIQUIDITY = 4;\\n // _reserveAssetQuantity is not equal to msg.value\\n uint256 internal constant MSG_VALUE_DO_NOT_MATCH = 5;\\n // Withdrawal amount has to be equal or less than msg.sender balance\\n uint256 internal constant MSG_SENDER_TOKENS_DO_NOT_MATCH = 6;\\n // Tokens are staked\\n uint256 internal constant TOKENS_STAKED = 7;\\n // Balance too low\\n uint256 internal constant BALANCE_TOO_LOW = 8;\\n // msg.sender doesn't have enough tokens\\n uint256 internal constant MSG_SENDER_TOKENS_TOO_LOW = 9;\\n // There is an open redemption window already\\n uint256 internal constant REDEMPTION_OPENED_ALREADY = 10;\\n // Cannot request twice in the same window\\n uint256 internal constant ALREADY_REQUESTED = 11;\\n // Rewards and profits already claimed\\n uint256 internal constant ALREADY_CLAIMED = 12;\\n // Value have to be greater than zero\\n uint256 internal constant GREATER_THAN_ZERO = 13;\\n // Must be reserve asset\\n uint256 internal constant MUST_BE_RESERVE_ASSET = 14;\\n // Only contributors allowed\\n uint256 internal constant ONLY_CONTRIBUTOR = 15;\\n // Only controller allowed\\n uint256 internal constant ONLY_CONTROLLER = 16;\\n // Only creator allowed\\n uint256 internal constant ONLY_CREATOR = 17;\\n // Only keeper allowed\\n uint256 internal constant ONLY_KEEPER = 18;\\n // Fee is too high\\n uint256 internal constant FEE_TOO_HIGH = 19;\\n // Only strategy allowed\\n uint256 internal constant ONLY_STRATEGY = 20;\\n // Only active allowed\\n uint256 internal constant ONLY_ACTIVE = 21;\\n // Only inactive allowed\\n uint256 internal constant ONLY_INACTIVE = 22;\\n // Address should be not zero address\\n uint256 internal constant ADDRESS_IS_ZERO = 23;\\n // Not within range\\n uint256 internal constant NOT_IN_RANGE = 24;\\n // Value is too low\\n uint256 internal constant VALUE_TOO_LOW = 25;\\n // Value is too high\\n uint256 internal constant VALUE_TOO_HIGH = 26;\\n // Only strategy or protocol allowed\\n uint256 internal constant ONLY_STRATEGY_OR_CONTROLLER = 27;\\n // Normal withdraw possible\\n uint256 internal constant NORMAL_WITHDRAWAL_POSSIBLE = 28;\\n // User does not have permissions to join garden\\n uint256 internal constant USER_CANNOT_JOIN = 29;\\n // User does not have permissions to add strategies in garden\\n uint256 internal constant USER_CANNOT_ADD_STRATEGIES = 30;\\n // Only Protocol or garden\\n uint256 internal constant ONLY_PROTOCOL_OR_GARDEN = 31;\\n // Only Strategist\\n uint256 internal constant ONLY_STRATEGIST = 32;\\n // Only Integration\\n uint256 internal constant ONLY_INTEGRATION = 33;\\n // Only garden and data not set\\n uint256 internal constant ONLY_GARDEN_AND_DATA_NOT_SET = 34;\\n // Only active garden\\n uint256 internal constant ONLY_ACTIVE_GARDEN = 35;\\n // Contract is not a garden\\n uint256 internal constant NOT_A_GARDEN = 36;\\n // Not enough tokens\\n uint256 internal constant STRATEGIST_TOKENS_TOO_LOW = 37;\\n // Stake is too low\\n uint256 internal constant STAKE_HAS_TO_AT_LEAST_ONE = 38;\\n // Duration must be in range\\n uint256 internal constant DURATION_MUST_BE_IN_RANGE = 39;\\n // Max Capital Requested\\n uint256 internal constant MAX_CAPITAL_REQUESTED = 41;\\n // Votes are already resolved\\n uint256 internal constant VOTES_ALREADY_RESOLVED = 42;\\n // Voting window is closed\\n uint256 internal constant VOTING_WINDOW_IS_OVER = 43;\\n // Strategy needs to be active\\n uint256 internal constant STRATEGY_NEEDS_TO_BE_ACTIVE = 44;\\n // Max capital reached\\n uint256 internal constant MAX_CAPITAL_REACHED = 45;\\n // Capital is less then rebalance\\n uint256 internal constant CAPITAL_IS_LESS_THAN_REBALANCE = 46;\\n // Strategy is in cooldown period\\n uint256 internal constant STRATEGY_IN_COOLDOWN = 47;\\n // Strategy is not executed\\n uint256 internal constant STRATEGY_IS_NOT_EXECUTED = 48;\\n // Strategy is not over yet\\n uint256 internal constant STRATEGY_IS_NOT_OVER_YET = 49;\\n // Strategy is already finalized\\n uint256 internal constant STRATEGY_IS_ALREADY_FINALIZED = 50;\\n // No capital to unwind\\n uint256 internal constant STRATEGY_NO_CAPITAL_TO_UNWIND = 51;\\n // Strategy needs to be inactive\\n uint256 internal constant STRATEGY_NEEDS_TO_BE_INACTIVE = 52;\\n // Duration needs to be less\\n uint256 internal constant DURATION_NEEDS_TO_BE_LESS = 53;\\n // Can't sweep reserve asset\\n uint256 internal constant CANNOT_SWEEP_RESERVE_ASSET = 54;\\n // Voting window is opened\\n uint256 internal constant VOTING_WINDOW_IS_OPENED = 55;\\n // Strategy is executed\\n uint256 internal constant STRATEGY_IS_EXECUTED = 56;\\n // Min Rebalance Capital\\n uint256 internal constant MIN_REBALANCE_CAPITAL = 57;\\n // Not a valid strategy NFT\\n uint256 internal constant NOT_STRATEGY_NFT = 58;\\n // Garden Transfers Disabled\\n uint256 internal constant GARDEN_TRANSFERS_DISABLED = 59;\\n // Tokens are hardlocked\\n uint256 internal constant TOKENS_HARDLOCKED = 60;\\n // Max contributors reached\\n uint256 internal constant MAX_CONTRIBUTORS = 61;\\n // BABL Transfers Disabled\\n uint256 internal constant BABL_TRANSFERS_DISABLED = 62;\\n // Strategy duration range error\\n uint256 internal constant DURATION_RANGE = 63;\\n // Checks the min amount of voters\\n uint256 internal constant MIN_VOTERS_CHECK = 64;\\n // Ge contributor power error\\n uint256 internal constant GET_CONTRIBUTOR_POWER = 65;\\n // Not enough ETH set aside\\n uint256 internal constant NOT_ENOUGH_ETH = 66;\\n // Garden is already public\\n uint256 internal constant GARDEN_ALREADY_PUBLIC = 67;\\n // Withdrawal with penalty\\n uint256 internal constant WITHDRAWAL_WITH_PENALTY = 68;\\n // Withdrawal with penalty\\n uint256 internal constant ONLY_MINING_ACTIVE = 69;\\n // Overflow in supply\\n uint256 internal constant OVERFLOW_IN_SUPPLY = 70;\\n // Overflow in power\\n uint256 internal constant OVERFLOW_IN_POWER = 71;\\n // Not a system contract\\n uint256 internal constant NOT_A_SYSTEM_CONTRACT = 72;\\n // Strategy vs Garden mismatch\\n uint256 internal constant STRATEGY_GARDEN_MISMATCH = 73;\\n // Minimum quarters is 1\\n uint256 internal constant QUARTERS_MIN_1 = 74;\\n // Too many strategy operations\\n uint256 internal constant TOO_MANY_OPS = 75;\\n // Only operations\\n uint256 internal constant ONLY_OPERATION = 76;\\n // Strat params wrong length\\n uint256 internal constant STRAT_PARAMS_LENGTH = 77;\\n // Garden params wrong length\\n uint256 internal constant GARDEN_PARAMS_LENGTH = 78;\\n}\\n\",\"keccak256\":\"0xdbb485a596718830e08a89b785cddc69d0dc7f3f43a1a8a19268336f8d925067\",\"license\":\"Apache License\"},\"contracts/lib/Math.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n// Libraries\\nimport './SafeDecimalMath.sol';\\n\\n// https://docs.synthetix.io/contracts/source/libraries/math\\nlibrary Math {\\n using SafeMath for uint256;\\n using SafeDecimalMath for uint256;\\n\\n /**\\n * @dev Uses \\\"exponentiation by squaring\\\" algorithm where cost is 0(logN)\\n * vs 0(N) for naive repeated multiplication.\\n * Calculates x^n with x as fixed-point and n as regular unsigned int.\\n * Calculates to 18 digits of precision with SafeDecimalMath.unit()\\n */\\n function powDecimal(uint256 x, uint256 n) internal pure returns (uint256) {\\n // https://mpark.github.io/programming/2014/08/18/exponentiation-by-squaring/\\n\\n uint256 result = SafeDecimalMath.unit();\\n while (n > 0) {\\n if (n % 2 != 0) {\\n result = result.multiplyDecimal(x);\\n }\\n x = x.multiplyDecimal(x);\\n n /= 2;\\n }\\n return result;\\n }\\n\\n function abs(int256 x) internal pure returns (int256) {\\n return x >= 0 ? x : -x;\\n }\\n}\\n\",\"keccak256\":\"0xc2ff8055f98dd7253df98838d870391067d9c622a68f263c942616ca8122bd93\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"contracts/lib/Safe3296.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nlibrary Safe3296 {\\n using SafeMath for uint256;\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint32\\n *\\n * @dev internal function to convert from uint256 to uint32\\n */\\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\\n require(n < 2**32, errorMessage);\\n return uint32(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint96\\n *\\n * @dev internal function to convert from uint256 to uint96\\n */\\n function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) {\\n require(n < 2**96, errorMessage);\\n return uint96(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to add two uint96 numbers\\n *\\n * @dev internal safe math function to add two uint96 numbers\\n */\\n function add96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n uint96 c = a + b;\\n require(c >= a, errorMessage);\\n return c;\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to subtract two uint96 numbers\\n *\\n * @dev internal safe math function to subtract two uint96 numbers\\n */\\n function sub96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n}\\n\",\"keccak256\":\"0x9ebf0856ab07500c9a8250d1be4b578a3e0ff454da7de67e3ab5632a7e6903c3\",\"license\":\"Apache License\"},\"contracts/lib/SafeDecimalMath.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nlibrary SafeDecimalMath {\\n using SafeMath for uint256;\\n\\n /* Number of decimal places in the representations. */\\n uint8 public constant decimals = 18;\\n uint8 public constant highPrecisionDecimals = 27;\\n\\n /* The number representing 1.0. */\\n uint256 public constant UNIT = 10**uint256(decimals);\\n\\n /* The number representing 1.0 for higher fidelity numbers. */\\n uint256 public constant PRECISE_UNIT = 10**uint256(highPrecisionDecimals);\\n uint256 private constant UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR = 10**uint256(highPrecisionDecimals - decimals);\\n\\n /**\\n * @return Provides an interface to UNIT.\\n */\\n function unit() external pure returns (uint256) {\\n return UNIT;\\n }\\n\\n /**\\n * @return Provides an interface to PRECISE_UNIT.\\n */\\n function preciseUnit() external pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @return The result of multiplying x and y, interpreting the operands as fixed-point\\n * decimals.\\n *\\n * @dev A unit factor is divided out after the product of x and y is evaluated,\\n * so that product must be less than 2**256. As this is an integer division,\\n * the internal division always rounds down. This helps save on gas. Rounding\\n * is more expensive on gas.\\n */\\n function multiplyDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\\n /* Divide by UNIT to remove the extra factor introduced by the product. */\\n return x.mul(y) / UNIT;\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of the specified precision unit.\\n *\\n * @dev The operands should be in the form of a the specified unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function _multiplyDecimalRound(\\n uint256 x,\\n uint256 y,\\n uint256 precisionUnit\\n ) private pure returns (uint256) {\\n /* Divide by UNIT to remove the extra factor introduced by the product. */\\n uint256 quotientTimesTen = x.mul(y) / (precisionUnit / 10);\\n\\n if (quotientTimesTen % 10 >= 5) {\\n quotientTimesTen += 10;\\n }\\n\\n return quotientTimesTen / 10;\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of a precise unit.\\n *\\n * @dev The operands should be in the precise unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function multiplyDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _multiplyDecimalRound(x, y, PRECISE_UNIT);\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of a standard unit.\\n *\\n * @dev The operands should be in the standard unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function multiplyDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _multiplyDecimalRound(x, y, UNIT);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is a high\\n * precision decimal.\\n *\\n * @dev y is divided after the product of x and the standard precision unit\\n * is evaluated, so the product of x and UNIT must be less than 2**256. As\\n * this is an integer division, the result is always rounded down.\\n * This helps save on gas. Rounding is more expensive on gas.\\n */\\n function divideDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\\n /* Reintroduce the UNIT factor that will be divided out by y. */\\n return x.mul(UNIT).div(y);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * decimal in the precision unit specified in the parameter.\\n *\\n * @dev y is divided after the product of x and the specified precision unit\\n * is evaluated, so the product of x and the specified precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function _divideDecimalRound(\\n uint256 x,\\n uint256 y,\\n uint256 precisionUnit\\n ) private pure returns (uint256) {\\n uint256 resultTimesTen = x.mul(precisionUnit * 10).div(y);\\n\\n if (resultTimesTen % 10 >= 5) {\\n resultTimesTen += 10;\\n }\\n\\n return resultTimesTen / 10;\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * standard precision decimal.\\n *\\n * @dev y is divided after the product of x and the standard precision unit\\n * is evaluated, so the product of x and the standard precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function divideDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _divideDecimalRound(x, y, UNIT);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * high precision decimal.\\n *\\n * @dev y is divided after the product of x and the high precision unit\\n * is evaluated, so the product of x and the high precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function divideDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _divideDecimalRound(x, y, PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Convert a standard decimal representation to a high precision one.\\n */\\n function decimalToPreciseDecimal(uint256 i) internal pure returns (uint256) {\\n return i.mul(UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR);\\n }\\n\\n /**\\n * @dev Convert a high precision decimal to a standard decimal representation.\\n */\\n function preciseDecimalToDecimal(uint256 i) internal pure returns (uint256) {\\n uint256 quotientTimesTen = i / (UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR / 10);\\n\\n if (quotientTimesTen % 10 >= 5) {\\n quotientTimesTen += 10;\\n }\\n\\n return quotientTimesTen / 10;\\n }\\n}\\n\",\"keccak256\":\"0x1372be4fa0c5813417396f128f5aa45da1cd7679e2d247a8e17d1ba5f0141253\",\"license\":\"Apache License\"},\"contracts/token/RewardsDistributor.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {TimeLockedToken} from './TimeLockedToken.sol';\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\nimport {SafeDecimalMath} from '../lib/SafeDecimalMath.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\nimport {Math} from '../lib/Math.sol';\\nimport {Safe3296} from '../lib/Safe3296.sol';\\nimport {Errors, _require} from '../lib/BabylonErrors.sol';\\n\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {TimeLockedToken} from './TimeLockedToken.sol';\\nimport {IRewardsDistributor} from '../interfaces/IRewardsDistributor.sol';\\n\\n/**\\n * @title Rewards Distributor implementing the BABL Mining Program and other Rewards to Strategists and Stewards\\n * @author Babylon Finance\\n * Rewards Distributor contract is a smart contract used to calculate and distribute all the BABL rewards of the BABL Mining Program\\n * along the time reserved for executed strategies. It implements a supply curve to distribute 500K BABL along the time.\\n * The supply curve is designed to optimize the long-term sustainability of the protocol.\\n * The rewards are front-loaded but they last for more than 10 years, slowly decreasing quarter by quarter.\\n * For that, it houses the state of the protocol power along the time as each strategy power is compared to the whole protocol usage.\\n * Rewards Distributor also is responsible for the calculation and delivery of other rewards as bonuses to specific profiles\\n * which are actively contributing to the protocol growth and their communities (Garden creators, Strategists and Stewards).\\n */\\ncontract RewardsDistributor is Ownable, IRewardsDistributor {\\n using SafeMath for uint256;\\n using SafeMath for int256;\\n using PreciseUnitMath for uint256;\\n using PreciseUnitMath for int256;\\n using SafeDecimalMath for uint256;\\n using SafeDecimalMath for int256;\\n using Math for uint256;\\n using Math for int256;\\n using Safe3296 for uint256;\\n using Safe3296 for int256;\\n using Safe3296 for uint96;\\n using Safe3296 for uint32;\\n\\n /* ========== Events ========== */\\n\\n /* ============ Modifiers ============ */\\n /**\\n * Throws if the call is not from a valid strategy\\n */\\n modifier onlyStrategy {\\n _require(controller.isSystemContract(address(IStrategy(msg.sender).garden())), Errors.ONLY_STRATEGY);\\n _;\\n }\\n /**\\n * Throws if the call is not from a valid active garden\\n */\\n modifier onlyActiveGarden(address _garden, uint256 _pid) {\\n if (_pid != 0 || gardenPid[address(_garden)] > 1) {\\n // Enable deploying flow with security restrictions\\n _require(IBabController(controller).isSystemContract(address(_garden)), Errors.NOT_A_SYSTEM_CONTRACT);\\n _require(IBabController(controller).isGarden(address(_garden)), Errors.ONLY_ACTIVE_GARDEN);\\n }\\n _require(msg.sender == address(_garden), Errors.ONLY_ACTIVE_GARDEN);\\n _require(IGarden(_garden).active(), Errors.ONLY_ACTIVE_GARDEN);\\n _;\\n }\\n\\n /**\\n * Throws if the BABL Rewards mining program is not active\\n */\\n modifier onlyMiningActive() {\\n _require(IBabController(controller).bablMiningProgramEnabled(), Errors.ONLY_MINING_ACTIVE);\\n _;\\n }\\n /**\\n * Throws if the sender is not the controller\\n */\\n modifier onlyController() {\\n _require(IBabController(controller).isSystemContract(msg.sender), Errors.NOT_A_SYSTEM_CONTRACT);\\n _require(address(controller) == msg.sender, Errors.ONLY_CONTROLLER);\\n _;\\n }\\n\\n /* ============ Constants ============ */\\n // 500K BABL allocated to this BABL Mining Program, the first quarter is Q1_REWARDS\\n // and the following quarters will follow the supply curve using a decay rate\\n uint256 public constant override Q1_REWARDS = 53_571_428_571_428_600e6; // First quarter (epoch) BABL rewards\\n // 12% quarterly decay rate (each 90 days)\\n // (Rewards on Q1 = 1,12 * Rewards on Q2) being Q1= Quarter 1, Q2 = Quarter 2\\n uint256 public constant override DECAY_RATE = 12e16;\\n // Duration of its EPOCH in days // BABL & profits split from the protocol\\n uint256 public constant override EPOCH_DURATION = 90 days;\\n\\n // solhint-disable-next-line\\n uint256 public override START_TIME; // Starting time of the rewards distribution\\n\\n // solhint-disable-next-line\\n uint256 public immutable BABL_STRATEGIST_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable BABL_STEWARD_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable BABL_LP_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_STRATEGIST_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_STEWARD_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_LP_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_PROTOCOL_FEE;\\n // solhint-disable-next-line\\n uint256 public immutable CREATOR_BONUS;\\n\\n /* ============ Structs ============ */\\n\\n struct ProtocolPerTimestamp {\\n // Protocol allocation checkpoints per timestamp along the time\\n uint256 principal; // Protocol principal allocation\\n uint256 time; // Time of the checkpoint\\n uint256 quarterBelonging; // # Quarter checkpoint belonging since START_TIME\\n uint256 timeListPointer; // Pointer to the array of timestamps to enable the possibility of struct iteration\\n uint256 power; // Protocol power checkpoint (power is proportional to = principal * duration)\\n }\\n\\n struct ProtocolPerQuarter {\\n // Protocol allocation checkpoints per timestamp per each quarter along the time\\n uint256 quarterPrincipal; // Checkpoint to keep track on accumulated protocol principal per quarter\\n uint256 quarterNumber; // # Quarter since START_TIME\\n uint256 quarterPower; // Accumulated Protocol power for each quarter\\n uint96 supplyPerQuarter; // Supply per quarter\\n }\\n\\n struct GardenPowerByTimestamp {\\n // Garden allocation checkpoints per timestamp per each garden\\n uint256 principal; // Checkpoint to keep track on garden allocation\\n uint256 timestamp; // Checkpoint timestamps\\n uint256 power; // Garden power checkpoint (power is proportional to = principal * duration)\\n }\\n struct ContributorPerGarden {\\n // Checkpoints to keep track on the evolution of each contributor vs. each garden\\n uint256 lastDepositAt; // Last deposit timestamp of each contributor in each garden\\n uint256 initialDepositAt; // Checkpoint of the initial deposit\\n uint256[] timeListPointer; // Array of timestamps for each user in each garden\\n uint256 pid; // Garden contributor checkpoints counter to enable iteration\\n mapping(uint256 => TimestampContribution) tsContributions; // Sub-mapping all the contributor checkpoints\\n }\\n\\n struct TimestampContribution {\\n // Sub-mapping with all checkpoints for deposits and withdrawals of garden users\\n uint256 principal; // Principal of user in each garden\\n uint256 timestamp; // Checkpoint time\\n uint256 timePointer; // Pointer\\n uint256 power; // Contributor power per checkpoint\\n }\\n struct Checkpoints {\\n // Checkpoints for contributor power calculations where a certain window (from -> to) is queried\\n uint256 fromDepositAt; // First contributor checkpoint within the provided window\\n uint256 lastDepositAt; // Last contributor checkpoint within the provided window\\n uint256 gardenFromDepositAt; // First contributor checkpoint within the provided window\\n uint256 gardenLastDepositAt; // Last garden checkpoint within the provided window\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Instance of the Controller contract\\n IBabController public controller;\\n\\n // BABL Token contract\\n TimeLockedToken public babltoken;\\n\\n // Protocol total allocation points. Must be the sum of all allocation points (strategyPrincipal) in all strategy pools.\\n uint256 public override protocolPrincipal;\\n mapping(uint256 => ProtocolPerTimestamp) public protocolPerTimestamp; // Mapping of all protocol checkpoints\\n uint256[] public timeList; // Array of all protocol checkpoints\\n uint256 public override pid; // Initialization of the ID assigning timeListPointer to the checkpoint number\\n\\n mapping(uint256 => ProtocolPerQuarter) public protocolPerQuarter; // Mapping of the accumulated protocol per each active quarter\\n mapping(uint256 => bool) public isProtocolPerQuarter; // Check if the protocol per quarter data has been initialized\\n\\n // Strategy overhead control. Only used if each strategy has power overhead due to changes overtime\\n mapping(address => mapping(uint256 => uint256)) public rewardsPowerOverhead; // Overhead control to enable high level accuracy calculations for strategy rewards\\n // Contributor power control\\n mapping(address => mapping(address => ContributorPerGarden)) public contributorPerGarden; // Enable high level accuracy calculations\\n mapping(address => mapping(address => Checkpoints)) private checkpoints;\\n // Garden power control\\n mapping(address => mapping(uint256 => GardenPowerByTimestamp)) public gardenPowerByTimestamp;\\n mapping(address => uint256[]) public gardenTimelist;\\n mapping(address => uint256) public gardenPid;\\n\\n /* ============ Constructor ============ */\\n\\n constructor(TimeLockedToken _bablToken, IBabController _controller) {\\n require(address(_bablToken) != address(0), 'Token needs to exist');\\n require(address(_controller) != address(0), 'Controller needs to exist');\\n babltoken = _bablToken;\\n controller = _controller;\\n\\n (BABL_STRATEGIST_SHARE, BABL_STEWARD_SHARE, BABL_LP_SHARE, CREATOR_BONUS) = controller.getBABLSharing();\\n (PROFIT_STRATEGIST_SHARE, PROFIT_STEWARD_SHARE, PROFIT_LP_SHARE) = controller.getProfitSharing();\\n PROFIT_PROTOCOL_FEE = controller.protocolPerformanceFee();\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Function that adds the capital received to the total principal of the protocol per timestamp\\n * @param _capital Amount of capital in WETH\\n */\\n function addProtocolPrincipal(uint256 _capital) external override onlyStrategy onlyMiningActive {\\n IStrategy strategy = IStrategy(msg.sender);\\n if (strategy.enteredAt() >= START_TIME) {\\n // onlyMiningActive control, it does not create a checkpoint if the strategy is not part of the Mining Program\\n _updateProtocolPrincipal(address(strategy), _capital, true);\\n }\\n }\\n\\n /**\\n * Function that removes the capital received to the total principal of the protocol per timestamp\\n * @param _capital Amount of capital in WETH\\n */\\n function substractProtocolPrincipal(uint256 _capital) external override onlyStrategy onlyMiningActive {\\n IStrategy strategy = IStrategy(msg.sender);\\n if (strategy.enteredAt() >= START_TIME) {\\n // onlyMiningActive control, it does not create a checkpoint if the strategy is not part of the Mining Program\\n _updateProtocolPrincipal(address(strategy), _capital, false);\\n }\\n }\\n\\n /**\\n * Gets the total amount of rewards for a given strategy\\n * @param _strategy Strategy to check\\n */\\n function getStrategyRewards(address _strategy) external view override returns (uint96) {\\n IStrategy strategy = IStrategy(_strategy);\\n _require(strategy.exitedAt() != 0, Errors.STRATEGY_IS_NOT_OVER_YET);\\n if ((strategy.enteredAt() >= START_TIME) && (START_TIME != 0)) {\\n // We avoid gas consuming once a strategy got its BABL rewards during its finalization\\n uint256 rewards = strategy.strategyRewards();\\n if (rewards != 0) {\\n return Safe3296.safe96(rewards, 'overflow 96 bits');\\n }\\n // If the calculation was not done earlier we go for it\\n (uint256 numQuarters, uint256 startingQuarter) =\\n _getRewardsWindow(strategy.executedAt(), strategy.exitedAt());\\n uint256 bablRewards = 0;\\n if (numQuarters <= 1) {\\n bablRewards = _getStrategyRewardsOneQuarter(_strategy, startingQuarter); // Proportional supply till that moment within the same epoch\\n _require(\\n bablRewards <= protocolPerQuarter[startingQuarter].supplyPerQuarter,\\n Errors.OVERFLOW_IN_SUPPLY\\n );\\n _require(\\n strategy.capitalAllocated().mul(strategy.exitedAt().sub(strategy.executedAt())).sub(\\n strategy.rewardsTotalOverhead()\\n ) <= protocolPerQuarter[startingQuarter].quarterPower,\\n Errors.OVERFLOW_IN_POWER\\n );\\n } else {\\n // The strategy takes longer than one quarter / epoch\\n // We need to calculate the strategy vs. protocol power ratio per each quarter\\n uint256[] memory strategyPower = new uint256[](numQuarters); // Strategy power in each Epoch\\n uint256[] memory protocolPower = new uint256[](numQuarters); // Protocol power in each Epoch\\n for (uint256 i = 0; i <= numQuarters.sub(1); i++) {\\n uint256 slotEnding = START_TIME.add(startingQuarter.add(i).mul(EPOCH_DURATION)); // Initialization timestamp at the end of the first slot where the strategy starts its execution\\n\\n // We iterate all the quarters where the strategy was active\\n uint256 percentage = 1e18;\\n if (strategy.executedAt().add(EPOCH_DURATION) > slotEnding) {\\n // We are in the first quarter of the strategy\\n\\n strategyPower[i] = strategy.capitalAllocated().mul(slotEnding.sub(strategy.executedAt())).sub(\\n rewardsPowerOverhead[address(strategy)][_getQuarter(strategy.executedAt())]\\n );\\n } else if (\\n strategy.executedAt() < slotEnding.sub(EPOCH_DURATION) && slotEnding < strategy.exitedAt()\\n ) {\\n // We are in an intermediate quarter different from starting or ending quarters\\n strategyPower[i] = strategy\\n .capitalAllocated()\\n .mul(slotEnding.sub(slotEnding.sub(EPOCH_DURATION)))\\n .sub(rewardsPowerOverhead[address(strategy)][_getQuarter(slotEnding.sub(45 days))]);\\n } else {\\n // We are in the last quarter of the strategy\\n percentage = block.timestamp.sub(slotEnding.sub(EPOCH_DURATION)).preciseDiv(\\n slotEnding.sub(slotEnding.sub(EPOCH_DURATION))\\n );\\n\\n strategyPower[i] = strategy\\n .capitalAllocated()\\n .mul(strategy.exitedAt().sub(slotEnding.sub(EPOCH_DURATION)))\\n .sub(rewardsPowerOverhead[address(strategy)][_getQuarter(strategy.exitedAt())]);\\n }\\n protocolPower[i] = protocolPerQuarter[startingQuarter.add(i)].quarterPower;\\n\\n _require(strategyPower[i] <= protocolPower[i], Errors.OVERFLOW_IN_POWER);\\n\\n bablRewards = bablRewards.add(\\n strategyPower[i]\\n .preciseDiv(protocolPower[i])\\n .preciseMul(uint256(protocolPerQuarter[startingQuarter.add(i)].supplyPerQuarter))\\n .preciseMul(percentage)\\n );\\n }\\n }\\n\\n // Babl rewards will be proportional to the total return (profit) with a max cap of x2\\n uint256 percentageMul = strategy.capitalReturned().preciseDiv(strategy.capitalAllocated());\\n if (percentageMul > 2e18) percentageMul = 2e18;\\n bablRewards = bablRewards.preciseMul(percentageMul);\\n return Safe3296.safe96(bablRewards, 'overflow 96 bits');\\n } else {\\n return 0;\\n }\\n }\\n\\n /**\\n * Sends BABL tokens rewards to a contributor after a claim is requested to the protocol.\\n * @param _to Address to send the tokens to\\n * @param _amount Amount of tokens to send the address to\\n */\\n function sendTokensToContributor(address _to, uint96 _amount) external override onlyMiningActive {\\n _require(controller.isSystemContract(msg.sender), Errors.NOT_A_SYSTEM_CONTRACT);\\n _safeBABLTransfer(_to, _amount);\\n }\\n\\n /**\\n * Starts BABL Rewards Mining Program from the controller.\\n */\\n function startBABLRewards() external onlyController {\\n if (START_TIME == 0) {\\n // It can only be activated once to avoid overriding START_TIME\\n START_TIME = block.timestamp;\\n }\\n }\\n\\n /**\\n * Calculates the profits and BABL that a contributor should receive from a series of finalized strategies\\n * @param _garden Garden to which the strategies and the user must belong to\\n * @param _contributor Address of the contributor to check\\n * @param _finalizedStrategies List of addresses of the finalized strategies to check\\n */\\n function getRewards(\\n address _garden,\\n address _contributor,\\n address[] calldata _finalizedStrategies\\n ) external view override returns (uint256, uint96) {\\n uint256 contributorTotalProfits = 0;\\n uint256 bablTotalRewards = 0;\\n for (uint256 i = 0; i < _finalizedStrategies.length; i++) {\\n (uint256 strategyProfits, uint256 strategyBABL) =\\n _getStrategyProfitsAndBABL(_garden, _finalizedStrategies[i], _contributor);\\n contributorTotalProfits = contributorTotalProfits.add(strategyProfits);\\n bablTotalRewards = bablTotalRewards.add(strategyBABL);\\n }\\n\\n return (contributorTotalProfits, Safe3296.safe96(bablTotalRewards, 'R28'));\\n }\\n\\n /* ========== View functions ========== */\\n\\n /**\\n * Gets the contributor power from one timestamp to the other\\n * @param _garden Address of the garden where the contributor belongs to\\n * @param _contributor Address if the contributor\\n * @param _from Initial timestamp\\n * @param _to End timestamp\\n * @return uint256 Contributor power during that period\\n */\\n function getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) external view override returns (uint256) {\\n return _getContributorPower(_garden, _contributor, _from, _to);\\n }\\n\\n function updateGardenPower(address _garden, uint256 _pid) external override onlyActiveGarden(_garden, _pid) {\\n _updateGardenPower(_garden);\\n }\\n\\n function setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw,\\n uint256 _pid\\n ) external override onlyActiveGarden(_garden, _pid) {\\n _setContributorTimestampParams(_garden, _contributor, _previousBalance, _depositOrWithdraw);\\n }\\n\\n function tokenSupplyPerQuarter(uint256 quarter) external pure override returns (uint96) {\\n return _tokenSupplyPerQuarter(quarter);\\n }\\n\\n function checkProtocol(uint256 _time)\\n external\\n view\\n override\\n returns (\\n uint256 principal,\\n uint256 time,\\n uint256 quarterBelonging,\\n uint256 timeListPointer,\\n uint256 power\\n )\\n {\\n return (\\n protocolPerTimestamp[_time].principal,\\n protocolPerTimestamp[_time].time,\\n protocolPerTimestamp[_time].quarterBelonging,\\n protocolPerTimestamp[_time].timeListPointer,\\n protocolPerTimestamp[_time].power\\n );\\n }\\n\\n function checkQuarter(uint256 _num)\\n external\\n view\\n override\\n returns (\\n uint256 quarterPrincipal,\\n uint256 quarterNumber,\\n uint256 quarterPower,\\n uint96 supplyPerQuarter\\n )\\n {\\n return (\\n protocolPerQuarter[_num].quarterPrincipal,\\n protocolPerQuarter[_num].quarterNumber,\\n protocolPerQuarter[_num].quarterPower,\\n protocolPerQuarter[_num].supplyPerQuarter\\n );\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n function _updateProtocolPrincipal(\\n address _strategy,\\n uint256 _capital,\\n bool _addOrSubstract\\n ) internal {\\n IStrategy strategy = IStrategy(_strategy);\\n ProtocolPerTimestamp storage protocolCheckpoint = protocolPerTimestamp[block.timestamp];\\n if (_addOrSubstract == false) {\\n // Substract\\n protocolPrincipal = protocolPrincipal.sub(_capital);\\n } else {\\n protocolPrincipal = protocolPrincipal.add(_capital);\\n }\\n protocolCheckpoint.principal = protocolPrincipal;\\n protocolCheckpoint.time = block.timestamp;\\n protocolCheckpoint.quarterBelonging = _getQuarter(block.timestamp);\\n protocolCheckpoint.timeListPointer = pid;\\n if (pid == 0) {\\n // The very first strategy of all strategies in the mining program\\n protocolCheckpoint.power = 0;\\n } else {\\n // Any other strategy different from the very first one (will have an antecesor)\\n protocolCheckpoint.power = protocolPerTimestamp[timeList[pid.sub(1)]].power.add(\\n protocolCheckpoint.time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time).mul(\\n protocolPerTimestamp[timeList[pid.sub(1)]].principal\\n )\\n );\\n }\\n timeList.push(block.timestamp); // Register of added strategies timestamps in the array for iteration\\n // Here we control the accumulated protocol power per each quarter\\n // Create the quarter checkpoint in case the checkpoint is the first in the epoch\\n _addProtocolPerQuarter(block.timestamp);\\n // We update the rewards overhead if any\\n _updatePowerOverhead(strategy, _capital);\\n pid++;\\n }\\n\\n function _getStrategyProfitsAndBABL(\\n address _garden,\\n address _strategy,\\n address _contributor\\n ) private view returns (uint256, uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n _require(address(strategy.garden()) == _garden, Errors.STRATEGY_GARDEN_MISMATCH);\\n uint256 contributorProfits = 0;\\n uint256 contributorBABL = 0;\\n // We get the state of the strategy in terms of profit and distance from expected to accurately calculate profits and rewards\\n (bool profit, uint256 profitValue, bool distance, uint256 distanceValue) =\\n _getStrategyRewardsContext(address(strategy));\\n\\n (, uint256 initialDepositAt, uint256 claimedAt, , , ) = IGarden(_garden).getContributor(_contributor);\\n // Positive strategies not yet claimed\\n if (\\n strategy.exitedAt() > claimedAt &&\\n strategy.executedAt() >= initialDepositAt &&\\n address(strategy.garden()) == _garden\\n ) {\\n uint256 contributorPower =\\n _getContributorPower(address(_garden), _contributor, strategy.executedAt(), strategy.exitedAt());\\n // If strategy returned money we give out the profits\\n if (profit == true) {\\n // We reserve 5% of profits for performance fees\\n profitValue = profitValue.sub(profitValue.multiplyDecimal(PROFIT_PROTOCOL_FEE));\\n }\\n // Get strategist rewards in case the contributor is also the strategist of the strategy\\n contributorBABL = contributorBABL.add(\\n _getStrategyStrategistBabl(\\n address(strategy),\\n _contributor,\\n profit,\\n profitValue,\\n distance,\\n distanceValue\\n )\\n );\\n\\n contributorProfits = contributorProfits.add(\\n _getStrategyStrategistProfits(address(strategy), _contributor, profit, profitValue)\\n );\\n\\n // Get steward rewards\\n contributorBABL = contributorBABL.add(\\n _getStrategyStewardBabl(address(strategy), _contributor, profit, profitValue, distance, distanceValue)\\n );\\n\\n contributorProfits = contributorProfits.add(\\n _getStrategyStewardProfits(\\n address(strategy),\\n _contributor,\\n profit,\\n profitValue,\\n distance,\\n distanceValue\\n )\\n );\\n\\n // Get LP rewards\\n\\n contributorBABL = contributorBABL.add(\\n uint256(strategy.strategyRewards()).multiplyDecimal(BABL_LP_SHARE).preciseMul(\\n contributorPower.preciseDiv(strategy.capitalAllocated())\\n )\\n );\\n\\n // Get a multiplier bonus in case the contributor is the garden creator\\n if (_contributor == IGarden(_garden).creator()) {\\n contributorBABL = contributorBABL.add(contributorBABL.multiplyDecimal(CREATOR_BONUS));\\n }\\n }\\n return (contributorProfits, contributorBABL);\\n }\\n\\n function _getStrategyRewardsContext(address _strategy)\\n private\\n view\\n returns (\\n bool,\\n uint256,\\n bool,\\n uint256\\n )\\n {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 returned = strategy.capitalReturned();\\n uint256 expected =\\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\\n uint256 allocated = strategy.capitalAllocated();\\n bool profit;\\n bool distance;\\n uint256 profitValue;\\n uint256 distanceValue;\\n if (returned > allocated && returned >= expected) {\\n // The strategy went equal or above expectations\\n profit = true; // positive\\n distance = true; // positive\\n profitValue = returned.sub(allocated);\\n distanceValue = returned.sub(expected);\\n } else if (returned >= allocated && returned < expected) {\\n // The strategy went worse than expected but with some profits\\n profit = true; // positive or zero profits\\n distance = false; // negative vs expected return (got less than expected)\\n profitValue = returned.sub(allocated);\\n distanceValue = expected.sub(returned);\\n } else if (returned < allocated && returned < expected) {\\n // Negative profits - bad investments has penalties\\n profit = false; // negative - loosing capital\\n distance = false; // negative vs expected return (got less than expected)\\n profitValue = allocated.sub(returned); // Negative number, there were no profits at all\\n distanceValue = expected.sub(returned);\\n }\\n\\n return (profit, profitValue, distance, distanceValue);\\n }\\n\\n function _getStrategyStewardBabl(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256, /* _profitValue */\\n bool _distance,\\n uint256 _distanceValue\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 strategyRewards = strategy.strategyRewards();\\n int256 userVotes = strategy.getUserVotes(_contributor);\\n uint256 bablCap;\\n uint256 expected =\\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\\n\\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\\n uint256 babl = 0;\\n if (userVotes > 0 && _profit == true && _distance == true) {\\n // Voting in favor of the execution of the strategy with profits and positive distance\\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\\n uint256(userVotes).preciseDiv(strategy.totalPositiveVotes())\\n );\\n } else if (userVotes > 0 && _profit == true && _distance == false) {\\n // Voting in favor positive profits but below expected return\\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\\n uint256(userVotes).preciseDiv(strategy.totalPositiveVotes())\\n );\\n babl = babl.sub(babl.preciseMul(_distanceValue.preciseDiv(expected))); // We discount the error of expected return vs real returns\\n } else if (userVotes > 0 && _profit == false) {\\n // Voting in favor of a non profitable strategy get nothing\\n babl = 0;\\n } else if (userVotes < 0 && _distance == false) {\\n // Voting against a strategy that got results below expected return provides rewards to the voter (helping the protocol to only have good strategies)\\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\\n uint256(Math.abs(userVotes)).preciseDiv(strategy.totalNegativeVotes())\\n );\\n\\n bablCap = babl.mul(2); // Max cap\\n babl = babl.add(babl.preciseMul(_distanceValue.preciseDiv(expected))); // We add a bonus inverse to the error of expected return vs real returns\\n\\n if (babl > bablCap) babl = bablCap; // We limit 2x by a Cap\\n } else if (userVotes < 0 && _distance == true) {\\n babl = 0;\\n }\\n return babl;\\n }\\n\\n function _getStrategyStewardProfits(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256 _profitValue,\\n bool _distance,\\n uint256 /* _distanceValue */\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\\n uint256 profits = 0;\\n int256 userVotes = strategy.getUserVotes(_contributor);\\n if (_profit == true) {\\n if (userVotes > 0) {\\n profits = _profitValue.multiplyDecimal(PROFIT_STEWARD_SHARE).preciseMul(uint256(userVotes)).preciseDiv(\\n strategy.totalPositiveVotes()\\n );\\n } else if ((userVotes < 0) && _distance == false) {\\n profits = _profitValue\\n .multiplyDecimal(PROFIT_STEWARD_SHARE)\\n .preciseMul(uint256(Math.abs(userVotes)))\\n .preciseDiv(strategy.totalNegativeVotes());\\n } else if ((userVotes < 0) && _distance == true) {\\n // Voted against a very profit strategy above expected returns, get no profit at all\\n profits = 0;\\n }\\n } else profits = 0; // No profits at all\\n\\n return profits;\\n }\\n\\n function _getStrategyStrategistBabl(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256, /* _profitValue */\\n bool _distance,\\n uint256 /* _distanceValue */\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 strategyRewards = strategy.strategyRewards();\\n uint256 babl;\\n uint256 bablCap;\\n uint256 expected =\\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\\n if (strategy.strategist() == _contributor) {\\n babl = strategyRewards.multiplyDecimal(BABL_STRATEGIST_SHARE); // Standard calculation to be ponderated\\n if (_profit == true && _distance == true) {\\n // Strategy with equal or higher profits than expected\\n bablCap = babl.mul(2); // Max cap\\n // The more the results are close to the expected the more bonus will get (limited by a x2 cap)\\n babl = babl.add(babl.preciseMul(expected.preciseDiv(strategy.capitalReturned())));\\n if (babl > bablCap) babl = bablCap; // We limit 2x by a Cap\\n } else if (_profit == true && _distance == false) {\\n //under expectations\\n // The more the results are close to the expected the less penalization it might have\\n babl = babl.sub(babl.sub(babl.preciseMul(strategy.capitalReturned().preciseDiv(expected))));\\n } else {\\n // No positive profit\\n return 0;\\n }\\n } else {\\n return 0;\\n }\\n\\n return babl;\\n }\\n\\n function _getStrategyStrategistProfits(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256 _profitValue\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\\n uint256 profits;\\n if (_profit == true) {\\n if (strategy.strategist() == _contributor) {\\n // If the contributor was the strategist of the strategy\\n profits = _profitValue.multiplyDecimal(PROFIT_STRATEGIST_SHARE);\\n }\\n } else profits = 0; // No profits at all\\n\\n return profits;\\n }\\n\\n function _addProtocolPerQuarter(uint256 _time) private onlyMiningActive {\\n ProtocolPerQuarter storage protocolCheckpoint = protocolPerQuarter[_getQuarter(_time)];\\n\\n if (!isProtocolPerQuarter[_getQuarter(_time).sub(1)]) {\\n // The quarter is not yet initialized then we create it\\n protocolCheckpoint.quarterNumber = _getQuarter(_time);\\n if (pid == 0) {\\n // The first strategy added in the first epoch\\n protocolCheckpoint.quarterPower = 0;\\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\\n } else {\\n // Each time a new epoch starts with either a new strategy execution or finalization\\n // We just take the proportional power for this quarter from previous checkpoint\\n uint256 powerToSplit =\\n protocolPerTimestamp[_time].power.sub(protocolPerTimestamp[timeList[pid.sub(1)]].power);\\n if (protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging == _getQuarter(_time).sub(1)) {\\n // There were no intermediate epochs without checkpoints\\n // We re-initialize the protocol power counting for this new quarter\\n protocolCheckpoint.quarterPower = powerToSplit\\n .mul(_time.sub(START_TIME.add(_getQuarter(_time).mul(EPOCH_DURATION).sub(EPOCH_DURATION))))\\n .div(_time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time));\\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\\n\\n protocolPerQuarter[_getQuarter(_time).sub(1)].quarterPower = protocolPerQuarter[\\n _getQuarter(_time).sub(1)\\n ]\\n .quarterPower\\n .add(powerToSplit.sub(protocolCheckpoint.quarterPower));\\n } else {\\n // There were intermediate epochs without checkpoints - we need to create their protocolPerQuarter's and update the last one\\n // We have to update all the quarters including where the previous checkpoint is and the one were we are now\\n for (\\n uint256 i = 0;\\n i <= _getQuarter(_time).sub(protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging);\\n i++\\n ) {\\n ProtocolPerQuarter storage newCheckpoint =\\n protocolPerQuarter[protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i)];\\n uint256 slotEnding =\\n START_TIME.add(\\n protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i).mul(EPOCH_DURATION)\\n );\\n if (i == 0) {\\n // We are in the first quarter to update, we add the corresponding part\\n\\n newCheckpoint.quarterPower = newCheckpoint.quarterPower.add(\\n powerToSplit.mul(slotEnding.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)).div(\\n _time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)\\n )\\n );\\n newCheckpoint.quarterPrincipal = protocolPerTimestamp[timeList[pid.sub(1)]].principal;\\n } else if (\\n i < _getQuarter(_time).sub(protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging)\\n ) {\\n // We are in an intermediate quarter\\n newCheckpoint.quarterPower = powerToSplit.mul(EPOCH_DURATION).div(\\n _time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)\\n );\\n newCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(\\n protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i)\\n );\\n newCheckpoint.quarterNumber = protocolPerTimestamp[timeList[pid.sub(1)]]\\n .quarterBelonging\\n .add(i);\\n newCheckpoint.quarterPrincipal = protocolPerTimestamp[timeList[pid.sub(1)]].principal;\\n } else {\\n // We are in the last quarter of the strategy\\n protocolCheckpoint.quarterPower = powerToSplit\\n .mul(\\n _time.sub(START_TIME.add(_getQuarter(_time).mul(EPOCH_DURATION).sub(EPOCH_DURATION)))\\n )\\n .div(_time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time));\\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\\n protocolCheckpoint.quarterNumber = _getQuarter(_time);\\n protocolCheckpoint.quarterPrincipal = protocolPrincipal;\\n }\\n }\\n }\\n }\\n isProtocolPerQuarter[_getQuarter(_time).sub(1)] = true;\\n } else {\\n // Quarter checkpoint already created, it must have been filled with general info\\n // We update the power of the quarter by adding the new difference between last quarter checkpoint and this checkpoint\\n protocolCheckpoint.quarterPower = protocolCheckpoint.quarterPower.add(\\n protocolPerTimestamp[_time].power.sub(protocolPerTimestamp[timeList[pid.sub(1)]].power)\\n );\\n }\\n protocolCheckpoint.quarterPrincipal = protocolPrincipal;\\n }\\n\\n function _updatePowerOverhead(IStrategy _strategy, uint256 _capital) private onlyMiningActive {\\n if (_strategy.updatedAt() != 0) {\\n // There will be overhead after the first execution not before\\n if (_getQuarter(block.timestamp) == _getQuarter(_strategy.updatedAt())) {\\n // The overhead will remain within the same epoch\\n rewardsPowerOverhead[address(_strategy)][_getQuarter(block.timestamp)] = rewardsPowerOverhead[\\n address(_strategy)\\n ][_getQuarter(block.timestamp)]\\n .add(_capital.mul(block.timestamp.sub(_strategy.updatedAt())));\\n } else {\\n // We need to iterate since last update of the strategy capital\\n (uint256 numQuarters, uint256 startingQuarter) =\\n _getRewardsWindow(_strategy.updatedAt(), block.timestamp);\\n uint256 overheadPerQuarter = _capital.mul(block.timestamp.sub(_strategy.updatedAt())).div(numQuarters);\\n for (uint256 i = 0; i <= numQuarters.sub(1); i++) {\\n rewardsPowerOverhead[address(_strategy)][startingQuarter.add(i)] = rewardsPowerOverhead[\\n address(_strategy)\\n ][startingQuarter.add(i)]\\n .add(overheadPerQuarter);\\n }\\n }\\n }\\n }\\n\\n function _getStrategyRewardsOneQuarter(address _strategy, uint256 _startingQuarter)\\n private\\n view\\n onlyMiningActive\\n returns (uint256)\\n {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 strategyOverTime =\\n strategy.capitalAllocated().mul(strategy.exitedAt().sub(strategy.executedAt())).sub(\\n strategy.rewardsTotalOverhead()\\n );\\n return\\n strategyOverTime\\n .preciseDiv(protocolPerQuarter[_startingQuarter].quarterPower)\\n .preciseMul(uint256(protocolPerQuarter[_startingQuarter].supplyPerQuarter))\\n .mul(strategy.exitedAt().sub(_startingQuarter))\\n .div(block.timestamp.sub(_startingQuarter));\\n }\\n\\n // Safe BABL transfer function, just in case if rounding error causes DistributorRewards to not have enough BABL.\\n function _safeBABLTransfer(address _to, uint96 _amount) private onlyMiningActive {\\n uint256 bablBal = babltoken.balanceOf(address(this));\\n if (_amount > bablBal) {\\n SafeERC20.safeTransfer(babltoken, _to, bablBal);\\n } else {\\n SafeERC20.safeTransfer(babltoken, _to, _amount);\\n }\\n }\\n\\n /**\\n * Gets the contributor power from one timestamp to the other\\n * @param _contributor Address if the contributor\\n * @param _from Initial timestamp\\n * @param _to End timestamp\\n * @return uint256 Contributor power during that period\\n */\\n\\n function _getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) private view returns (uint256) {\\n _require(_to >= IGarden(_garden).gardenInitializedAt() && _to >= _from, Errors.GET_CONTRIBUTOR_POWER);\\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][address(_contributor)];\\n Checkpoints memory powerCheckpoints = checkpoints[address(_garden)][address(_contributor)];\\n\\n if (contributor.initialDepositAt == 0 || contributor.initialDepositAt > _to) {\\n return 0;\\n } else {\\n if (_from <= IGarden(_garden).gardenInitializedAt()) {\\n // Avoid division by zero in case of _from parameter is not passed\\n _from = IGarden(_garden).gardenInitializedAt();\\n }\\n // Find closest point to _from and _to either contributor and garden checkpoints at their left\\n\\n (powerCheckpoints.fromDepositAt, powerCheckpoints.lastDepositAt) = _locateCheckpointsContributor(\\n _garden,\\n _contributor,\\n _from,\\n _to\\n );\\n (powerCheckpoints.gardenFromDepositAt, powerCheckpoints.gardenLastDepositAt) = _locateCheckpointsGarden(\\n _garden,\\n _from,\\n _to\\n );\\n\\n _require(\\n powerCheckpoints.fromDepositAt <= powerCheckpoints.lastDepositAt &&\\n powerCheckpoints.gardenFromDepositAt <= powerCheckpoints.gardenLastDepositAt,\\n Errors.GET_CONTRIBUTOR_POWER\\n );\\n uint256 contributorPower;\\n uint256 gardenPower;\\n\\n // \\\"FROM power calculations\\\" PART\\n // Avoid underflows\\n\\n if (_from < powerCheckpoints.fromDepositAt) {\\n // Contributor still has no power but _from is later than the start of the garden\\n contributorPower = 0;\\n } else if (_from > powerCheckpoints.fromDepositAt) {\\n contributorPower = contributor.tsContributions[powerCheckpoints.fromDepositAt].power.add(\\n (_from.sub(powerCheckpoints.fromDepositAt)).mul(\\n contributor.tsContributions[powerCheckpoints.fromDepositAt].principal\\n )\\n );\\n } else {\\n // _from == fromDepositAt\\n contributorPower = contributor.tsContributions[powerCheckpoints.fromDepositAt].power;\\n }\\n gardenPower = gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenFromDepositAt].power.add(\\n (_from.sub(powerCheckpoints.gardenFromDepositAt)).mul(\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenFromDepositAt].principal\\n )\\n );\\n // \\\"TO power calculations\\\" PART\\n // We go for accurate power calculations avoiding overflows\\n _require(contributorPower <= gardenPower, Errors.GET_CONTRIBUTOR_POWER);\\n if (_from == _to) {\\n // Requested a specific checkpoint calculation (no slot)\\n if (gardenPower == 0) {\\n return 0;\\n } else {\\n return contributorPower.preciseDiv(gardenPower);\\n }\\n // Not a checkpoint anymore but a slot\\n } else if (_to < powerCheckpoints.lastDepositAt) {\\n // contributor has not deposited yet\\n return 0;\\n } else if (\\n _to == powerCheckpoints.lastDepositAt &&\\n powerCheckpoints.fromDepositAt == powerCheckpoints.lastDepositAt\\n ) {\\n // no more contributor checkpoints in the slot\\n gardenPower = (\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].power.add(\\n (_to.sub(powerCheckpoints.gardenLastDepositAt)).mul(\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].principal\\n )\\n )\\n )\\n .sub(gardenPower);\\n _require(contributorPower <= gardenPower, Errors.GET_CONTRIBUTOR_POWER);\\n return contributorPower.preciseDiv(gardenPower);\\n } else {\\n contributorPower = (\\n contributor.tsContributions[powerCheckpoints.lastDepositAt].power.add(\\n (_to.sub(powerCheckpoints.lastDepositAt)).mul(\\n contributor.tsContributions[powerCheckpoints.lastDepositAt].principal\\n )\\n )\\n )\\n .sub(contributorPower);\\n\\n gardenPower = (\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].power.add(\\n (_to.sub(powerCheckpoints.gardenLastDepositAt)).mul(\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].principal\\n )\\n )\\n )\\n .sub(gardenPower);\\n _require(contributorPower <= gardenPower, Errors.GET_CONTRIBUTOR_POWER);\\n\\n return contributorPower.preciseDiv(gardenPower);\\n }\\n }\\n }\\n\\n function _locateCheckpointsContributor(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) private view returns (uint256, uint256) {\\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][address(_contributor)];\\n\\n uint256 lastDepositAt = contributor.timeListPointer[contributor.timeListPointer.length.sub(1)]; // Initialized with lastDeposit\\n uint256 fromDepositAt = contributor.timeListPointer[0]; // Initialized with initialDeposit\\n\\n if (lastDepositAt > _to || fromDepositAt < _from) {\\n // We go to find the closest deposits of the contributor to _from and _to\\n for (uint256 i = 0; i <= contributor.timeListPointer.length.sub(1); i++) {\\n if (contributor.timeListPointer[i] <= _to) {\\n lastDepositAt = contributor.timeListPointer[i];\\n }\\n if (contributor.timeListPointer[i] <= _from) {\\n fromDepositAt = contributor.timeListPointer[i];\\n }\\n }\\n }\\n return (fromDepositAt, lastDepositAt);\\n }\\n\\n function _locateCheckpointsGarden(\\n address _garden,\\n uint256 _from,\\n uint256 _to\\n ) private view returns (uint256, uint256) {\\n uint256 gardenLastCheckpoint = gardenTimelist[address(_garden)].length.sub(1);\\n uint256 gardenLastDepositAt = gardenTimelist[address(_garden)][gardenLastCheckpoint]; // Initialized to the last garden checkpoint\\n uint256 gardenFromDepositAt = gardenTimelist[address(_garden)][0]; // Initialized to the first garden checkpoint\\n\\n if (gardenLastDepositAt > _to || gardenFromDepositAt < _from) {\\n // We go for the closest timestamp of garden to _to and _from\\n for (uint256 i = 0; i <= gardenLastCheckpoint; i++) {\\n uint256 gardenTime = gardenTimelist[address(_garden)][i];\\n if (gardenTime <= _to) {\\n gardenLastDepositAt = gardenTime;\\n }\\n if (gardenTime <= _from) {\\n gardenFromDepositAt = gardenTime;\\n }\\n }\\n }\\n return (gardenFromDepositAt, gardenLastDepositAt);\\n }\\n\\n /**\\n * Function that keeps checkpoints of the garden power (deposits and withdrawals) per timestamp\\n */\\n function _updateGardenPower(address _garden) private {\\n IGarden garden = IGarden(_garden);\\n GardenPowerByTimestamp storage gardenTimestamp = gardenPowerByTimestamp[address(garden)][block.timestamp];\\n gardenTimestamp.principal = IERC20(address(IGarden(_garden))).totalSupply();\\n\\n gardenTimestamp.timestamp = block.timestamp;\\n\\n if (gardenPid[address(_garden)] == 0) {\\n // The very first deposit of all contributors in the mining program\\n gardenTimestamp.power = 0;\\n } else {\\n // Any other deposit different from the very first one (will have an antecesor)\\n gardenTimestamp.power = gardenPowerByTimestamp[address(garden)][\\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\\n ]\\n .power\\n .add(\\n gardenTimestamp\\n .timestamp\\n .sub(\\n gardenPowerByTimestamp[address(garden)][\\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\\n ]\\n .timestamp\\n )\\n .mul(\\n gardenPowerByTimestamp[address(garden)][\\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\\n ]\\n .principal\\n )\\n );\\n }\\n\\n gardenTimelist[address(garden)].push(block.timestamp); // Register of deposit timestamps in the array for iteration\\n gardenPid[address(garden)]++;\\n }\\n\\n /**\\n * Updates contributor timestamps params\\n */\\n function _setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw\\n ) private {\\n // We make checkpoints around contributor deposits to avoid fast loans and give the right rewards afterwards\\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][_contributor];\\n\\n contributor.tsContributions[block.timestamp].principal = IERC20(address(IGarden(_garden))).balanceOf(\\n address(_contributor)\\n );\\n\\n contributor.tsContributions[block.timestamp].timestamp = block.timestamp;\\n\\n contributor.tsContributions[block.timestamp].timePointer = contributor.pid;\\n\\n if (contributor.pid == 0) {\\n // The very first deposit\\n contributor.tsContributions[block.timestamp].power = 0;\\n } else {\\n // Any other deposits or withdrawals different from the very first one (will have an antecesor)\\n contributor.tsContributions[block.timestamp].power = contributor.tsContributions[contributor.lastDepositAt]\\n .power\\n .add(\\n (block.timestamp.sub(contributor.lastDepositAt)).mul(\\n contributor.tsContributions[contributor.lastDepositAt].principal\\n )\\n );\\n }\\n if (_depositOrWithdraw == true) {\\n // Deposit\\n if (_previousBalance == 0 || contributor.initialDepositAt == 0) {\\n contributor.initialDepositAt = block.timestamp;\\n }\\n contributor.lastDepositAt = block.timestamp;\\n } else {\\n // Withdrawals\\n if (IERC20(address(IGarden(_garden))).balanceOf(address(_contributor)) == 0) {\\n contributor.lastDepositAt = 0;\\n contributor.initialDepositAt = 0;\\n delete contributor.timeListPointer;\\n }\\n }\\n\\n contributor.timeListPointer.push(block.timestamp);\\n contributor.pid++;\\n }\\n\\n function _tokenSupplyPerQuarter(uint256 quarter) internal pure returns (uint96) {\\n _require(quarter >= 1, Errors.QUARTERS_MIN_1);\\n if (quarter >= 513) {\\n return 0;\\n } else {\\n uint256 firstFactor = (SafeDecimalMath.unit().add(DECAY_RATE)).powDecimal(quarter.sub(1));\\n uint256 supplyForQuarter = Q1_REWARDS.divideDecimal(firstFactor);\\n return Safe3296.safe96(supplyForQuarter, 'overflow 96 bits');\\n }\\n }\\n\\n function _getQuarter(uint256 _now) internal view returns (uint256) {\\n uint256 quarter = (_now.sub(START_TIME).preciseDivCeil(EPOCH_DURATION)).div(1e18);\\n return quarter.add(1);\\n }\\n\\n function _getRewardsWindow(uint256 _from, uint256 _to) internal view returns (uint256, uint256) {\\n uint256 quarters = (_to.sub(_from).preciseDivCeil(EPOCH_DURATION)).div(1e18);\\n uint256 startingQuarter = (_from.sub(START_TIME).preciseDivCeil(EPOCH_DURATION)).div(1e18);\\n return (quarters.add(1), startingQuarter.add(1));\\n }\\n}\\n\",\"keccak256\":\"0xdc467d640df88763a8c4eefbdb54b636673a9f663751902bd9517152f855b001\",\"license\":\"Apache License\"},\"contracts/token/TimeLockRegistry.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\nimport {TimeLockedToken} from './TimeLockedToken.sol';\\n\\n/**\\n * @title TimeLockRegistry\\n * @notice Register Lockups for TimeLocked ERC20 Token BABL (e.g. vesting)\\n * @author Babylon Finance\\n * @dev This contract allows owner to register distributions for a TimeLockedToken\\n *\\n * To register a distribution, register method should be called by the owner.\\n * claim() should be called only by the BABL Token smartcontract (modifier onlyBABLToken)\\n * when any account registered to receive tokens make its own claim\\n * If case of a mistake, owner can cancel registration before the claim is done by the account\\n *\\n * Note this contract address must be setup in the TimeLockedToken's contract pointing\\n * to interact with (e.g. setTimeLockRegistry() function)\\n */\\n\\ncontract TimeLockRegistry is Ownable {\\n using SafeMath for uint256;\\n using Address for address;\\n\\n /* ============ Events ============ */\\n\\n event Register(address receiver, uint256 distribution);\\n event Cancel(address receiver, uint256 distribution);\\n event Claim(address account, uint256 distribution);\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlyBABLToken() {\\n require(msg.sender == address(token), 'only BABL Token');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // time locked token\\n TimeLockedToken public token;\\n\\n /// @notice The profile of each token owner under vesting conditions and its special conditions\\n /**\\n * @param team Indicates whether or not is a Team member (true = team member / advisor, false = private investor)\\n * @param vestingBegin When the vesting begins for such token owner\\n * @param vestingEnd When the vesting ends for such token owner\\n * @param lastClaim When the last claim was done\\n */\\n struct TokenVested {\\n bool team;\\n bool cliff;\\n uint256 vestingBegin;\\n uint256 vestingEnd;\\n uint256 lastClaim;\\n }\\n\\n /// @notice A record of token owners under vesting conditions for each account, by index\\n mapping(address => TokenVested) public tokenVested;\\n\\n // mapping from token owners under vesting conditions to BABL due amount (e.g. SAFT addresses, team members, advisors)\\n mapping(address => uint256) public registeredDistributions;\\n\\n // vesting for Team Members\\n uint256 private teamVesting = 365 days * 4;\\n\\n // vesting for Investors and Advisors\\n uint256 private investorVesting = 365 days * 3;\\n\\n /* ============ Functions ============ */\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * @notice Construct a new Time Lock Registry and gives ownership to sender\\n * @param _token TimeLockedToken contract to use in this registry\\n */\\n constructor(TimeLockedToken _token) {\\n token = _token;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /* =========== Token related Gov Functions ====== */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Register new account under vesting conditions (Team, Advisors, Investors e.g. SAFT purchaser)\\n *\\n * @notice Register new account under vesting conditions (Team, Advisors, Investors e.g. SAFT purchaser)\\n * @param receiver Address belonging vesting conditions\\n * @param distribution Tokens amount that receiver is due to get\\n * @return Whether or not the registration succeeded\\n */\\n function register(\\n address receiver,\\n uint256 distribution,\\n bool investorType,\\n uint256 vestingStartingDate\\n ) external onlyOwner returns (bool) {\\n require(receiver != address(0), 'TimeLockRegistry::register: cannot register the zero address');\\n require(\\n receiver != address(this),\\n 'TimeLockRegistry::register: Time Lock Registry contract cannot be an investor'\\n );\\n require(distribution != 0, 'TimeLockRegistry::register: Distribution = 0');\\n require(\\n registeredDistributions[receiver] == 0,\\n 'TimeLockRegistry::register:Distribution for this address is already registered'\\n );\\n require(block.timestamp >= 1614553200, 'Cannot register earlier than March 2021'); // 1614553200 is UNIX TIME of 2021 March the 1st\\n\\n // register distribution\\n registeredDistributions[receiver] = distribution;\\n\\n // register token vested conditions\\n TokenVested storage newTokenVested = tokenVested[receiver];\\n newTokenVested.team = investorType;\\n newTokenVested.vestingBegin = vestingStartingDate;\\n\\n if (newTokenVested.team == true) {\\n newTokenVested.vestingEnd = vestingStartingDate.add(teamVesting);\\n } else {\\n newTokenVested.vestingEnd = vestingStartingDate.add(investorVesting);\\n }\\n newTokenVested.lastClaim = vestingStartingDate;\\n\\n tokenVested[receiver] = newTokenVested;\\n // TODO CHECK IF ALLOWANCE AS OF TODAY IS THE FINAL MODEL\\n // IN CASE OF A DIRECT MINT TO TIME LOCK REGISTRY ADDRESS THE TOKEN TRANSFER MIGHT BE UPDATED\\n // transfer tokens from owner who might have enough allowance of tokens by BABL Token owner\\n SafeERC20.safeTransferFrom(token, msg.sender, address(this), distribution);\\n\\n // emit register event\\n emit Register(receiver, distribution);\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel distribution registration in case of mistake and before a claim is done\\n *\\n * @notice Cancel distribution registration\\n * @dev A claim has not to be done earlier\\n * @param receiver Address that should have it's distribution removed\\n * @return Whether or not it succeeded\\n */\\n function cancelRegistration(address receiver) external onlyOwner returns (bool) {\\n require(registeredDistributions[receiver] != 0, 'Not registered');\\n\\n // get amount from distributions\\n uint256 amount = registeredDistributions[receiver];\\n\\n // set distribution mapping to 0\\n delete registeredDistributions[receiver];\\n\\n // set tokenVested mapping to 0\\n delete tokenVested[receiver];\\n\\n // TODO CHECK THE PROCESS ADDRESS(THIS) VS. OWNER\\n // transfer tokens back to owner\\n SafeERC20.safeTransfer(token, msg.sender, amount);\\n\\n // emit cancel event\\n emit Cancel(receiver, amount);\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel distribution registration in case of mistake and before a claim is done\\n *\\n * @notice Cancel already delivered tokens. It might only apply when non-completion of vesting period of Team members or Advisors\\n * @dev An automatic override allowance is granted during the claim process\\n * @param account Address that should have it's distribution removed\\n * @return Whether or not it succeeded\\n */\\n function cancelDeliveredTokens(address account) external onlyOwner returns (bool) {\\n uint256 loosingAmount = token.cancelVestedTokens(account);\\n\\n // emit cancel event\\n emit Cancel(account, loosingAmount);\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Recover tokens in Time Lock Registry smartcontract address by the owner\\n *\\n * @notice Send tokens from smartcontract address to the owner.\\n * It might only apply after a cancellation of vested tokens\\n * @param amount Amount to be recovered by the owner of the Time Lock Registry smartcontract from its balance\\n * @return Whether or not it succeeded\\n */\\n function transferToOwner(uint256 amount) external onlyOwner returns (bool) {\\n SafeERC20.safeTransfer(token, msg.sender, amount);\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Claim locked tokens by the registered account\\n *\\n * @notice Claim tokens due amount.\\n * @dev Claim is done by the user in the TimeLocked contract and the contract is the only allowed to call\\n * this function on behalf of the user to make the claim\\n * @return The amount of tokens registered and delivered after the claim\\n */\\n function claim(address _receiver) external onlyBABLToken returns (uint256) {\\n require(registeredDistributions[_receiver] != 0, 'Not registered');\\n\\n // get amount from distributions\\n uint256 amount = registeredDistributions[_receiver];\\n tokenVested[_receiver].lastClaim = block.timestamp;\\n\\n // set distribution mapping to 0\\n delete registeredDistributions[_receiver];\\n\\n // register lockup in TimeLockedToken\\n\\n // this will transfer funds from this contract and lock them for sender\\n token.registerLockup(\\n _receiver,\\n amount,\\n tokenVested[_receiver].team,\\n tokenVested[_receiver].vestingBegin,\\n tokenVested[_receiver].vestingEnd,\\n tokenVested[_receiver].lastClaim\\n );\\n\\n // set tokenVested mapping to 0\\n delete tokenVested[_receiver];\\n\\n // emit claim event\\n emit Claim(_receiver, amount);\\n\\n return amount;\\n }\\n\\n /* ============ Getter Functions ============ */\\n\\n function checkVesting(address address_)\\n external\\n view\\n returns (\\n bool team,\\n uint256 start,\\n uint256 end,\\n uint256 last\\n )\\n {\\n return (\\n tokenVested[address_].team,\\n tokenVested[address_].vestingBegin,\\n tokenVested[address_].vestingEnd,\\n tokenVested[address_].lastClaim\\n );\\n }\\n\\n function checkRegisteredDistribution(address address_) external view returns (uint256 amount) {\\n return registeredDistributions[address_];\\n }\\n}\\n\",\"keccak256\":\"0x97084d9e4d2804b0234c06e6e9e07343477d726ca8af07f2e3d91fba2ccbda76\",\"license\":\"Apache License\"},\"contracts/token/TimeLockedToken.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {TimeLockRegistry} from './TimeLockRegistry.sol';\\nimport {RewardsDistributor} from './RewardsDistributor.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {VoteToken} from './VoteToken.sol';\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {Errors, _require} from '../lib/BabylonErrors.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\n\\n/**\\n * @title TimeLockedToken\\n * @notice Time Locked ERC20 Token\\n * @author Babylon Finance\\n * @dev Contract which gives the ability to time-lock tokens specially for vesting purposes usage\\n *\\n * By overriding the balanceOf() and transfer() functions in ERC20,\\n * an account can show its full, post-distribution balance and use it for voting power\\n * but only transfer or spend up to an allowed amount\\n *\\n * A portion of previously non-spendable tokens are allowed to be transferred\\n * along the time depending on each vesting conditions, and after all epochs have passed, the full\\n * account balance is unlocked. In case on non-completion vesting period, only the Time Lock Registry can cancel\\n * the delivery of the pending tokens and only can cancel the remaining locked ones.\\n */\\n\\nabstract contract TimeLockedToken is VoteToken {\\n using SafeMath for uint256;\\n\\n /* ============ Events ============ */\\n\\n /// @notice An event that emitted when a new lockout ocurr\\n event NewLockout(\\n address account,\\n uint256 tokenslocked,\\n bool isTeamOrAdvisor,\\n uint256 startingVesting,\\n uint256 endingVesting\\n );\\n\\n /// @notice An event that emitted when a new Time Lock is registered\\n event NewTimeLockRegistration(address previousAddress, address newAddress);\\n\\n /// @notice An event that emitted when a new Rewards Distributor is registered\\n event NewRewardsDistributorRegistration(address previousAddress, address newAddress);\\n\\n /// @notice An event that emitted when a cancellation of Lock tokens is registered\\n event Cancel(address account, uint256 amount);\\n\\n /// @notice An event that emitted when a claim of tokens are registered\\n event Claim(address _receiver, uint256 amount);\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlyTimeLockRegistry() {\\n require(\\n msg.sender == address(timeLockRegistry),\\n 'TimeLockedToken:: onlyTimeLockRegistry: can only be executed by TimeLockRegistry'\\n );\\n _;\\n }\\n\\n modifier onlyTimeLockOwner() {\\n if (address(timeLockRegistry) != address(0)) {\\n require(\\n msg.sender == Ownable(timeLockRegistry).owner(),\\n 'TimeLockedToken:: onlyTimeLockOwner: can only be executed by the owner of TimeLockRegistry'\\n );\\n }\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // represents total distribution for locked balances\\n mapping(address => uint256) distribution;\\n\\n /// @notice The profile of each token owner under its particular vesting conditions\\n /**\\n * @param team Indicates whether or not is a Team member or Advisor (true = team member/advisor, false = private investor)\\n * @param vestingBegin When the vesting begins for such token owner\\n * @param vestingEnd When the vesting ends for such token owner\\n * @param lastClaim When the last claim was done\\n */\\n struct VestedToken {\\n bool teamOrAdvisor;\\n uint256 vestingBegin;\\n uint256 vestingEnd;\\n uint256 lastClaim;\\n }\\n\\n /// @notice A record of token owners under vesting conditions for each account, by index\\n mapping(address => VestedToken) public vestedToken;\\n\\n // vesting Cliff for Team Members and Advisors\\n uint256 private vestingCliff = 365 days;\\n\\n // vesting duration for Team Members and Advisors\\n uint256 private teamVesting = 365 days * 4;\\n\\n // vesting duration for Investors\\n uint256 private investorVesting = 365 days * 3;\\n\\n // address of Time Lock Registry contract\\n IBabController public controller;\\n\\n // address of Time Lock Registry contract\\n TimeLockRegistry public timeLockRegistry;\\n\\n // address of Rewards Distriburor contract\\n RewardsDistributor public rewardsDistributor;\\n\\n // Enable Transfer of ERC20 BABL Tokens\\n // Only Minting or transfers from/to TimeLockRegistry and Rewards Distributor can transfer tokens until the protocol is fully decentralized\\n bool private tokenTransfersEnabled;\\n bool private tokenTransfersWereDisabled;\\n\\n /* ============ Functions ============ */\\n\\n /* ============ Constructor ============ */\\n\\n constructor(string memory _name, string memory _symbol) VoteToken(_name, _symbol) {\\n tokenTransfersEnabled = true;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /* =========== Token related Gov Functions ====== */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Disables transfers of ERC20 BABL Tokens\\n */\\n function disableTokensTransfers() external onlyOwner {\\n require(!tokenTransfersWereDisabled, 'BABL must flow');\\n tokenTransfersEnabled = false;\\n tokenTransfersWereDisabled = true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows transfers of ERC20 BABL Tokens\\n * Can only happen after the protocol is fully decentralized.\\n */\\n function enableTokensTransfers() external onlyOwner {\\n tokenTransfersEnabled = true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Set the Time Lock Registry contract to control token vesting conditions\\n *\\n * @notice Set the Time Lock Registry contract to control token vesting conditions\\n * @param newTimeLockRegistry Address of TimeLockRegistry contract\\n */\\n function setTimeLockRegistry(TimeLockRegistry newTimeLockRegistry) external onlyTimeLockOwner returns (bool) {\\n require(address(newTimeLockRegistry) != address(0), 'cannot be zero address');\\n require(address(newTimeLockRegistry) != address(this), 'cannot be this contract');\\n require(address(newTimeLockRegistry) != address(timeLockRegistry), 'must be new TimeLockRegistry');\\n emit NewTimeLockRegistration(address(timeLockRegistry), address(newTimeLockRegistry));\\n\\n timeLockRegistry = newTimeLockRegistry;\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Set the Rewards Distributor contract to control either BABL Mining or profit rewards\\n *\\n * @notice Set the Rewards Distriburor contract to control both types of rewards (profit and BABL Mining program)\\n * @param newRewardsDistributor Address of Rewards Distributor contract\\n */\\n function setRewardsDistributor(RewardsDistributor newRewardsDistributor) external onlyOwner returns (bool) {\\n require(address(newRewardsDistributor) != address(0), 'cannot be zero address');\\n require(address(newRewardsDistributor) != address(this), 'cannot be this contract');\\n require(address(newRewardsDistributor) != address(rewardsDistributor), 'must be new Rewards Distributor');\\n emit NewRewardsDistributorRegistration(address(rewardsDistributor), address(newRewardsDistributor));\\n\\n rewardsDistributor = newRewardsDistributor;\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Register new token lockup conditions for vested tokens defined only by Time Lock Registry\\n *\\n * @notice Tokens are completely delivered during the registration however lockup conditions apply for vested tokens\\n * locking them according to the distribution epoch periods and the type of recipient (Team, Advisor, Investor)\\n * Emits a transfer event showing a transfer to the recipient\\n * Only the registry can call this function\\n * @param _receiver Address to receive the tokens\\n * @param _amount Tokens to be transferred\\n * @param _profile True if is a Team Member or Advisor\\n * @param _vestingBegin Unix Time when the vesting for that particular address\\n * @param _vestingEnd Unix Time when the vesting for that particular address\\n * @param _lastClaim Unix Time when the claim was done from that particular address\\n *\\n */\\n function registerLockup(\\n address _receiver,\\n uint256 _amount,\\n bool _profile,\\n uint256 _vestingBegin,\\n uint256 _vestingEnd,\\n uint256 _lastClaim\\n ) external onlyTimeLockRegistry returns (bool) {\\n require(balanceOf(msg.sender) >= _amount, 'insufficient balance');\\n require(_receiver != address(0), 'cannot be zero address');\\n require(_receiver != address(this), 'cannot be this contract');\\n require(_receiver != address(timeLockRegistry), 'cannot be the TimeLockRegistry contract itself');\\n require(_receiver != msg.sender, 'the owner cannot lockup itself');\\n\\n // update amount of locked distribution\\n distribution[_receiver] = distribution[_receiver].add(_amount);\\n\\n VestedToken storage newVestedToken = vestedToken[_receiver];\\n\\n newVestedToken.teamOrAdvisor = _profile;\\n newVestedToken.vestingBegin = _vestingBegin;\\n newVestedToken.vestingEnd = _vestingEnd;\\n newVestedToken.lastClaim = _lastClaim;\\n\\n // transfer tokens to the recipient\\n _transfer(msg.sender, _receiver, _amount);\\n emit NewLockout(_receiver, _amount, _profile, _vestingBegin, _vestingEnd);\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel and remove locked tokens due to non-completion of vesting period\\n * applied only by Time Lock Registry and specifically to Team or Advisors as it does not apply to investors.\\n *\\n * @dev Cancel distribution registration\\n * @param lockedAccount that should have its still locked distribution removed due to non-completion of its vesting period\\n */\\n function cancelVestedTokens(address lockedAccount) external onlyTimeLockRegistry returns (uint256) {\\n return _cancelVestedTokensFromTimeLock(lockedAccount);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Each token owner can claim its own specific tokens with its own specific vesting conditions from the Time Lock Registry\\n *\\n * @dev Claim msg.sender tokens (if any available in the registry)\\n */\\n function claimMyTokens() external {\\n // claim msg.sender tokens from timeLockRegistry\\n uint256 amount = timeLockRegistry.claim(msg.sender);\\n // After a proper claim, locked tokens of Team and Advisors profiles are under restricted special vesting conditions so they automatic grant\\n // rights to the Time Lock Registry to only retire locked tokens if non-compliance vesting conditions take places along the vesting periods.\\n // It does not apply to Investors under vesting (their locked tokens cannot be removed).\\n if (vestedToken[msg.sender].teamOrAdvisor == true) {\\n approve(address(timeLockRegistry), amount);\\n }\\n // emit claim event\\n emit Claim(msg.sender, amount);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Get unlocked balance for an account\\n *\\n * @notice Get unlocked balance for an account\\n * @param account Account to check\\n * @return Amount that is unlocked and available eg. to transfer\\n */\\n function unlockedBalance(address account) public returns (uint256) {\\n // totalBalance - lockedBalance\\n return balanceOf(account).sub(lockedBalance(account));\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. View the locked balance for an account\\n *\\n * @notice View locked balance for an account\\n * @param account Account to check\\n * @return Amount locked in the time of checking\\n */\\n\\n function viewLockedBalance(address account) public view returns (uint256) {\\n // distribution of locked tokens\\n // get amount from distributions\\n\\n uint256 amount = distribution[account];\\n uint256 lockedAmount = amount;\\n\\n // Team and investors cannot transfer tokens in the first year\\n if (vestedToken[account].vestingBegin.add(365 days) > block.timestamp) {\\n return lockedAmount;\\n }\\n\\n // in case of vesting has passed, all tokens are now available\\n if (block.timestamp >= vestedToken[account].vestingEnd) {\\n lockedAmount = 0;\\n } else {\\n // in case of still under vesting period, locked tokens are recalculated\\n lockedAmount = amount.mul(vestedToken[account].vestingEnd - block.timestamp).div(\\n vestedToken[account].vestingEnd - vestedToken[account].vestingBegin\\n );\\n }\\n return lockedAmount;\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Get locked balance for an account\\n *\\n * @notice Get locked balance for an account\\n * @param account Account to check\\n * @return Amount locked in the time of checking\\n */\\n function lockedBalance(address account) public returns (uint256) {\\n // get amount from distributions locked tokens (if any)\\n\\n uint256 lockedAmount = viewLockedBalance(account);\\n\\n // in case of vesting has passed, all tokens are now available so we set mapping to 0\\n if (block.timestamp >= vestedToken[account].vestingEnd && msg.sender == account && lockedAmount == 0) {\\n delete distribution[account];\\n } else if (msg.sender == account) {\\n vestedToken[msg.sender].lastClaim = block.timestamp;\\n }\\n return lockedAmount;\\n }\\n\\n /**\\n * PUBLIC FUNCTION. Get the address of Time Lock Registry\\n *\\n * @notice Get the address of Time Lock Registry\\n * @return Address of the Time Lock Registry\\n */\\n function getTimeLockRegistry() external view returns (address) {\\n return address(timeLockRegistry);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the Approval of allowances of ERC20 with special conditions for vesting\\n *\\n * @notice Override of \\\"Approve\\\" function to allow the `spender` to transfer up to `amount` from `src`\\n * @dev This will overwrite the approval amount for `spender` except in the case of spender is Time Lock Registry\\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\\n * @param spender The address of the account which may transfer tokens\\n * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\\n * @return Whether or not the approval succeeded\\n */\\n function approve(address spender, uint256 rawAmount) public override nonReentrant returns (bool) {\\n require(spender != address(0), 'TimeLockedToken::approve: spender cannot be zero address');\\n require(spender != msg.sender, 'TimeLockedToken::approve: spender cannot be the msg.sender');\\n\\n uint96 amount;\\n if (rawAmount == uint256(-1)) {\\n amount = uint96(-1);\\n } else {\\n amount = safe96(rawAmount, 'TimeLockedToken::approve: amount exceeds 96 bits');\\n }\\n\\n // There is no option to decreaseAllowance to timeLockRegistry in case of vested tokens\\n if ((spender == address(timeLockRegistry)) && (amount < allowance(msg.sender, address(timeLockRegistry)))) {\\n amount = safe96(\\n allowance(msg.sender, address(timeLockRegistry)),\\n 'TimeLockedToken::approve: cannot decrease allowance to timelockregistry'\\n );\\n }\\n _approve(msg.sender, spender, amount);\\n emit Approval(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the Increase of allowances of ERC20 with special conditions for vesting\\n *\\n * @notice Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * @dev This is an override with respect to the fulfillment of vesting conditions along the way\\n * However an user can increase allowance many times, it will never be able to transfer locked tokens during vesting period\\n * @return Whether or not the increaseAllowance succeeded\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public override nonReentrant returns (bool) {\\n require(\\n unlockedBalance(msg.sender) >= addedValue,\\n 'TimeLockedToken::increaseAllowance:Not enough unlocked tokens'\\n );\\n require(spender != address(0), 'TimeLockedToken::increaseAllowance:Spender cannot be zero address');\\n require(spender != msg.sender, 'TimeLockedToken::increaseAllowance:Spender cannot be the msg.sender');\\n _approve(msg.sender, spender, allowance(msg.sender, spender).add(addedValue));\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the decrease of allowances of ERC20 with special conditions for vesting\\n *\\n * @notice Atomically decrease the allowance granted to `spender` by the caller.\\n *\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n * This is an override with respect to the fulfillment of vesting conditions along the way\\n * An user cannot decrease the allowance to the Time Lock Registry who is in charge of vesting conditions\\n * @return Whether or not the decreaseAllowance succeeded\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public override nonReentrant returns (bool) {\\n require(spender != address(0), 'TimeLockedToken::decreaseAllowance:Spender cannot be zero address');\\n require(spender != msg.sender, 'TimeLockedToken::decreaseAllowance:Spender cannot be the msg.sender');\\n require(\\n allowance(msg.sender, spender) >= subtractedValue,\\n 'TimeLockedToken::decreaseAllowance:Underflow condition'\\n );\\n\\n // There is no option to decreaseAllowance to timeLockRegistry in case of vested tokens\\n require(\\n address(spender) != address(timeLockRegistry),\\n 'TimeLockedToken::decreaseAllowance:cannot decrease allowance to timeLockRegistry'\\n );\\n\\n _approve(\\n msg.sender,\\n spender,\\n allowance(msg.sender, spender).sub(subtractedValue, 'ERC20: decreased allowance below zero')\\n );\\n return true;\\n }\\n\\n /* ============ Internal Only Function ============ */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the _transfer of ERC20 BABL tokens only allowing the transfer of unlocked tokens\\n *\\n * @dev Transfer function which includes only unlocked tokens\\n * Locked tokens can always be transfered back to the returns address\\n * Transferring to owner allows re-issuance of funds through registry\\n *\\n * @param _from The address to send tokens from\\n * @param _to The address that will receive the tokens\\n * @param _value The amount of tokens to be transferred\\n */\\n function _transfer(\\n address _from,\\n address _to,\\n uint256 _value\\n ) internal override {\\n require(_from != address(0), 'TimeLockedToken:: _transfer: cannot transfer from the zero address');\\n require(_to != address(0), 'TimeLockedToken:: _transfer: cannot transfer to the zero address');\\n require(\\n _to != address(this),\\n 'TimeLockedToken:: _transfer: do not transfer tokens to the token contract itself'\\n );\\n\\n require(balanceOf(_from) >= _value, 'TimeLockedToken:: _transfer: insufficient balance');\\n\\n // check if enough unlocked balance to transfer\\n require(unlockedBalance(_from) >= _value, 'TimeLockedToken:: _transfer: attempting to transfer locked funds');\\n super._transfer(_from, _to, _value);\\n // voting power\\n _moveDelegates(\\n delegates[_from],\\n delegates[_to],\\n safe96(_value, 'TimeLockedToken:: _transfer: uint96 overflow')\\n );\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Disable BABL token transfer until certain conditions are met\\n *\\n * @dev Override the _beforeTokenTransfer of ERC20 BABL tokens until certain conditions are met:\\n * Only allowing minting or transfers from Time Lock Registry and Rewards Distributor until transfers are allowed in the controller\\n * Transferring to owner allows re-issuance of funds through registry\\n *\\n * @param _from The address to send tokens from\\n * @param _to The address that will receive the tokens\\n * @param _value The amount of tokens to be transferred\\n */\\n\\n // Disable garden token transfers. Allow minting and burning.\\n function _beforeTokenTransfer(\\n address _from,\\n address _to,\\n uint256 _value\\n ) internal virtual override {\\n super._beforeTokenTransfer(_from, _to, _value);\\n _require(\\n _from == address(0) ||\\n _from == address(timeLockRegistry) ||\\n _from == address(rewardsDistributor) ||\\n _to == address(timeLockRegistry) ||\\n tokenTransfersEnabled,\\n Errors.BABL_TRANSFERS_DISABLED\\n );\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel and remove locked tokens due to non-completion of vesting period\\n * applied only by Time Lock Registry and specifically to Team or Advisors\\n *\\n * @dev Cancel distribution registration\\n * @param lockedAccount that should have its still locked distribution removed due to non-completion of its vesting period\\n */\\n function _cancelVestedTokensFromTimeLock(address lockedAccount) internal onlyTimeLockRegistry returns (uint256) {\\n require(distribution[lockedAccount] != 0, 'TimeLockedToken::cancelTokens:Not registered');\\n\\n // get an update on locked amount from distributions at this precise moment\\n uint256 loosingAmount = lockedBalance(lockedAccount);\\n\\n require(loosingAmount > 0, 'TimeLockedToken::cancelTokens:There are no more locked tokens');\\n require(\\n vestedToken[lockedAccount].teamOrAdvisor == true,\\n 'TimeLockedToken::cancelTokens:cannot cancel locked tokens to Investors'\\n );\\n\\n // set distribution mapping to 0\\n delete distribution[lockedAccount];\\n\\n // set tokenVested mapping to 0\\n delete vestedToken[lockedAccount];\\n\\n // transfer only locked tokens back to TimeLockRegistry Owner (msg.sender)\\n require(\\n transferFrom(lockedAccount, address(timeLockRegistry), loosingAmount),\\n 'TimeLockedToken::cancelTokens:Transfer failed'\\n );\\n\\n // emit cancel event\\n emit Cancel(lockedAccount, loosingAmount);\\n\\n return loosingAmount;\\n }\\n}\\n\",\"keccak256\":\"0x2a828aee1f8f7ef1a0b5e982ecca7c92ea79c09a8073777f8bd1096ed0e14ea3\",\"license\":\"Apache License\"},\"contracts/token/VoteToken.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\n\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {IVoteToken} from '../interfaces/IVoteToken.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Context} from '@openzeppelin/contracts/utils/Context.sol';\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\n\\n/**\\n * @title VoteToken\\n * @notice Custom token which tracks voting power for governance\\n * @dev This is an abstraction of a fork of the Compound governance contract\\n * VoteToken is used by BABL to allow tracking voting power\\n * Checkpoints are created every time state is changed which record voting power\\n * Inherits standard ERC20 behavior\\n */\\n\\nabstract contract VoteToken is Context, ERC20, Ownable, IVoteToken, ReentrancyGuard {\\n using SafeMath for uint256;\\n using Address for address;\\n\\n /* ============ Events ============ */\\n\\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\\n event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);\\n\\n /* ============ Modifiers ============ */\\n\\n /* ============ State Variables ============ */\\n\\n /// @notice The EIP-712 typehash for the contract's domain\\n bytes32 public constant DOMAIN_TYPEHASH =\\n keccak256('EIP712Domain(string name,uint256 chainId,address verifyingContract)');\\n\\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\\n bytes32 public constant DELEGATION_TYPEHASH =\\n keccak256('Delegation(address delegatee,uint256 nonce,uint256 expiry)');\\n\\n /// @dev A record of votes checkpoints for each account, by index\\n mapping(address => address) public delegates;\\n\\n /// @notice A checkpoint for marking number of votes from a given block\\n struct Checkpoint {\\n uint32 fromBlock;\\n uint96 votes;\\n }\\n\\n /// @notice A record of votes checkpoints for each account, by index\\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\\n\\n /// @notice The number of checkpoints for each account\\n mapping(address => uint32) public numCheckpoints;\\n\\n /// @notice A record of states for signing / validating signatures\\n mapping(address => uint256) public nonces;\\n\\n /* ============ Functions ============ */\\n\\n /* ============ Constructor ============ */\\n\\n constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {}\\n\\n /* ============ External Functions ============ */\\n\\n /* =========== Token related Gov Functions ====== */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Delegating votes from msg.sender to delegatee\\n *\\n * @notice Delegate votes from `msg.sender` to `delegatee`\\n * @param delegatee The address to delegate votes to\\n */\\n\\n function delegate(address delegatee) external override {\\n return _delegate(msg.sender, delegatee);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Delegate votes using signature to 'delegatee'\\n *\\n * @notice Delegates votes from signatory to `delegatee`\\n * @param delegatee The address to delegate votes to\\n * @param nonce The contract state required to match the signature\\n * @param expiry The time at which to expire the signature\\n * @param v The recovery byte of the signature\\n * @param r Half of the ECDSA signature pair\\n * @param s Half of the ECDSA signature pair\\n */\\n\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external override {\\n bytes32 domainSeparator =\\n keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name())), getChainId(), address(this)));\\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\\n bytes32 digest = keccak256(abi.encodePacked('\\\\x19\\\\x01', domainSeparator, structHash));\\n address signatory = ecrecover(digest, v, r, s);\\n require(signatory != address(0), 'VoteToken::delegateBySig: invalid signature');\\n require(nonce == nonces[signatory] + 1, 'VoteToken::delegateBySig: invalid nonce');\\n nonces[signatory]++;\\n require(block.timestamp <= expiry, 'VoteToken::delegateBySig: signature expired');\\n return _delegate(signatory, delegatee);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Check Delegate votes using signature to 'delegatee'\\n *\\n * @notice Get current voting power for an account\\n * @param account Account to get voting power for\\n * @return Voting power for an account\\n */\\n function getCurrentVotes(address account) external view virtual override returns (uint96) {\\n uint32 nCheckpoints = numCheckpoints[account];\\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Get voting power at a specific block for an account\\n *\\n * @param account Account to get voting power for\\n * @param blockNumber Block to get voting power at\\n * @return Voting power for an account at specific block\\n */\\n function getPriorVotes(address account, uint256 blockNumber) external view virtual override returns (uint96) {\\n require(blockNumber < block.number, 'BABLToken::getPriorVotes: not yet determined');\\n\\n uint32 nCheckpoints = numCheckpoints[account];\\n if (nCheckpoints == 0) {\\n return 0;\\n }\\n\\n // First check most recent balance\\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\\n return checkpoints[account][nCheckpoints - 1].votes;\\n }\\n\\n // Next check implicit zero balance\\n if (checkpoints[account][0].fromBlock > blockNumber) {\\n return 0;\\n }\\n\\n uint32 lower = 0;\\n uint32 upper = nCheckpoints - 1;\\n while (upper > lower) {\\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\\n Checkpoint memory cp = checkpoints[account][center];\\n if (cp.fromBlock == blockNumber) {\\n return cp.votes;\\n } else if (cp.fromBlock < blockNumber) {\\n lower = center;\\n } else {\\n upper = center - 1;\\n }\\n }\\n return checkpoints[account][lower].votes;\\n }\\n\\n function getMyDelegatee() external view override returns (address) {\\n return delegates[msg.sender];\\n }\\n\\n function getDelegatee(address account) external view override returns (address) {\\n return delegates[account];\\n }\\n\\n function getCheckpoints(address account, uint32 id)\\n external\\n view\\n override\\n returns (uint32 fromBlock, uint96 votes)\\n {\\n Checkpoint storage getCheckpoint = checkpoints[account][id];\\n return (getCheckpoint.fromBlock, getCheckpoint.votes);\\n }\\n\\n function getNumberOfCheckpoints(address account) external view override returns (uint32) {\\n return numCheckpoints[account];\\n }\\n\\n /* ============ Internal Only Function ============ */\\n\\n /**\\n * GOVERNANCE FUNCTION. Make a delegation\\n *\\n * @dev Internal function to delegate voting power to an account\\n * @param delegator The address of the account delegating votes from\\n * @param delegatee The address to delegate votes to\\n */\\n\\n function _delegate(address delegator, address delegatee) internal {\\n address currentDelegate = delegates[delegator];\\n uint96 delegatorBalance = safe96(_balanceOf(delegator), 'VoteToken::_delegate: uint96 overflow');\\n delegates[delegator] = delegatee;\\n\\n emit DelegateChanged(delegator, currentDelegate, delegatee);\\n\\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\\n }\\n\\n function _balanceOf(address account) internal view virtual returns (uint256) {\\n return balanceOf(account);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Move the delegates\\n *\\n * @dev Internal function to move delegates between accounts\\n * @param srcRep The address of the account delegating votes from\\n * @param dstRep The address of the account delegating votes to\\n * @param amount The voting power to move\\n */\\n function _moveDelegates(\\n address srcRep,\\n address dstRep,\\n uint96 amount\\n ) internal {\\n if (srcRep != dstRep && amount > 0) {\\n // It must not revert but do nothing in cases of address(0) being part of the move\\n // Sub voting amount to source in case it is not the zero address (e.g. transfers)\\n if (srcRep != address(0)) {\\n uint32 srcRepNum = numCheckpoints[srcRep];\\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\\n uint96 srcRepNew = sub96(srcRepOld, amount, 'VoteToken::_moveDelegates: vote amount underflows');\\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\\n }\\n if (dstRep != address(0)) {\\n // Add it to destination in case it is not the zero address (e.g. any transfer of tokens or delegations except a first mint to a specific address)\\n uint32 dstRepNum = numCheckpoints[dstRep];\\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\\n uint96 dstRepNew = add96(dstRepOld, amount, 'VoteToken::_moveDelegates: vote amount overflows');\\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\\n }\\n }\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Internal function to write a checkpoint for voting power\\n *\\n * @dev internal function to write a checkpoint for voting power\\n * @param delegatee The address of the account delegating votes to\\n * @param nCheckpoints The num checkpoint\\n * @param oldVotes The previous voting power\\n * @param newVotes The new voting power\\n */\\n function _writeCheckpoint(\\n address delegatee,\\n uint32 nCheckpoints,\\n uint96 oldVotes,\\n uint96 newVotes\\n ) internal {\\n uint32 blockNumber = safe32(block.number, 'VoteToken::_writeCheckpoint: block number exceeds 32 bits');\\n\\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\\n } else {\\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\\n numCheckpoints[delegatee] = nCheckpoints + 1;\\n }\\n\\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint32\\n *\\n * @dev internal function to convert from uint256 to uint32\\n */\\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\\n require(n < 2**32, errorMessage);\\n return uint32(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint96\\n *\\n * @dev internal function to convert from uint256 to uint96\\n */\\n function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) {\\n require(n < 2**96, errorMessage);\\n return uint96(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to add two uint96 numbers\\n *\\n * @dev internal safe math function to add two uint96 numbers\\n */\\n function add96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n uint96 c = a + b;\\n require(c >= a, errorMessage);\\n return c;\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to subtract two uint96 numbers\\n *\\n * @dev internal safe math function to subtract two uint96 numbers\\n */\\n function sub96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to get chain ID\\n *\\n * @dev internal function to get chain ID\\n */\\n function getChainId() internal pure returns (uint256) {\\n uint256 chainId;\\n assembly {\\n chainId := chainid()\\n }\\n return chainId;\\n }\\n}\\n\",\"keccak256\":\"0x594b8ba6deb5c071f512773cdfcc892166d1f701d4fcd8c8b4b3517fe8125089\",\"license\":\"Apache License\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6080604052630784ce006004556305a39a8060055534801561002057600080fd5b5060405161154c38038061154c8339818101604052602081101561004357600080fd5b5051600061004f6100be565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b0319166001600160a01b03929092169190911790556100c2565b3390565b61147b806100d16000396000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c80638da5cb5b1161008c578063d86287aa11610066578063d86287aa1461024d578063d8d4ec02146102a0578063f2fde38b146102ee578063fc0c546a14610314576100df565b80638da5cb5b146101dd578063a8b1959a14610201578063c2b3f72f14610227576100df565b8063715018a6116100bd578063715018a61461017c5780638202f4bc1461018657806387c1ed12146101c0576100df565b80631e83409a146100e45780636b904f451461011c5780636bdc06f514610142575b600080fd5b61010a600480360360208110156100fa57600080fd5b50356001600160a01b031661031c565b60408051918252519081900360200190f35b61010a6004803603602081101561013257600080fd5b50356001600160a01b0316610542565b6101686004803603602081101561015857600080fd5b50356001600160a01b031661055d565b604080519115158252519081900360200190f35b6101846106d4565b005b6101686004803603608081101561019c57600080fd5b506001600160a01b038135169060208101359060408101351515906060013561079f565b610168600480360360208110156101d657600080fd5b5035610ab6565b6101e5610b4b565b604080516001600160a01b039092168252519081900360200190f35b6101686004803603602081101561021757600080fd5b50356001600160a01b0316610b5a565b61010a6004803603602081101561023d57600080fd5b50356001600160a01b0316610cb7565b6102736004803603602081101561026357600080fd5b50356001600160a01b0316610cc9565b60408051951515865293151560208601528484019290925260608401526080830152519081900360a00190f35b6102c6600480360360208110156102b657600080fd5b50356001600160a01b0316610cfd565b6040805194151585526020850193909352838301919091526060830152519081900360800190f35b6101846004803603602081101561030457600080fd5b50356001600160a01b0316610d30565b6101e5610e51565b6001546000906001600160a01b0316331461037e576040805162461bcd60e51b815260206004820152600f60248201527f6f6e6c79204241424c20546f6b656e0000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b0382166000908152600360205260409020546103d9576040805162461bcd60e51b815260206004820152600e60248201526d139bdd081c9959da5cdd195c995960921b604482015290519081900360640190fd5b6001600160a01b038281166000818152600360208181526040808420805460028085528387204296810196875592879055600180548454918501549490920154965485517f8cec2923000000000000000000000000000000000000000000000000000000008152600481019a909a5260248a0184905260ff909116151560448a01526064890193909352608488019590955260a4870191909152905190959290921693638cec29239360c480830194928390030190829087803b15801561049f57600080fd5b505af11580156104b3573d6000803e3d6000fd5b505050506040513d60208110156104c957600080fd5b50506001600160a01b0383166000818152600260208181526040808420805461ffff1916815560018101859055928301849055600390920192909255805192835290820183905280517f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d49281900390910190a192915050565b6001600160a01b031660009081526003602052604090205490565b6000610567610e60565b6001600160a01b0316610578610b4b565b6001600160a01b0316146105d3576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03821660009081526003602052604090205461062e576040805162461bcd60e51b815260206004820152600e60248201526d139bdd081c9959da5cdd195c995960921b604482015290519081900360640190fd5b6001600160a01b038083166000908152600360208181526040808420805490859055600292839052908420805461ffff191681556001818101869055928101859055909201929092559054909161068791163383610e64565b604080516001600160a01b03851681526020810183905281517f27f83af92b39768b17fe0c8d6922452702717efb8626d97e7a754e0b27d4f6d2929181900390910190a150600192915050565b6106dc610e60565b6001600160a01b03166106ed610b4b565b6001600160a01b031614610748576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b60006107a9610e60565b6001600160a01b03166107ba610b4b565b6001600160a01b031614610815576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03851661085a5760405162461bcd60e51b815260040180806020018281038252603c8152602001806112a6603c913960400191505060405180910390fd5b6001600160a01b0385163014156108a25760405162461bcd60e51b815260040180806020018281038252604d81526020018061135a604d913960600191505060405180910390fd5b836108de5760405162461bcd60e51b815260040180806020018281038252602c815260200180611308602c913960400191505060405180910390fd5b6001600160a01b038516600090815260036020526040902054156109335760405162461bcd60e51b815260040180806020018281038252604e8152602001806113a7604e913960600191505060405180910390fd5b63603c20704210156109765760405162461bcd60e51b81526004018080602001828103825260278152602001806113f56027913960400191505060405180910390fd5b6001600160a01b038516600090815260036020908152604080832087905560029091529020805460ff191684151517808255600180830185905560ff909116151514156109d5576004546109cb908490610ee9565b60028201556109e9565b6005546109e3908490610ee9565b60028201555b60038181018481556001600160a01b0388811660009081526002602081905260409091208554815460ff191660ff918216151517808355875461ff001990911661010091829004909216151502178155600180870154818301558287015492820192909255925492909301919091559054610a679116333088610f4a565b604080516001600160a01b03881681526020810187905281517e7dc6ab80cc84c043b7b8d4fcafc802187470087f7ea7fccd2e17aecd0256a1929181900390910190a150600195945050505050565b6000610ac0610e60565b6001600160a01b0316610ad1610b4b565b6001600160a01b031614610b2c576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600154610b43906001600160a01b03163384610e64565b506001919050565b6000546001600160a01b031690565b6000610b64610e60565b6001600160a01b0316610b75610b4b565b6001600160a01b031614610bd0576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600154604080517f4f2050870000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015291516000939290921691634f2050879160248082019260209290919082900301818787803b158015610c3b57600080fd5b505af1158015610c4f573d6000803e3d6000fd5b505050506040513d6020811015610c6557600080fd5b5051604080516001600160a01b03861681526020810183905281519293507f27f83af92b39768b17fe0c8d6922452702717efb8626d97e7a754e0b27d4f6d2929081900390910190a150600192915050565b60036020526000908152604090205481565b6002602081905260009182526040909120805460018201549282015460039092015460ff8083169461010090930416929085565b6001600160a01b03166000908152600260208190526040909120805460018201549282015460039092015460ff90911693565b610d38610e60565b6001600160a01b0316610d49610b4b565b6001600160a01b031614610da4576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610de95760405162461bcd60e51b81526004018080602001828103825260268152602001806112e26026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6001546001600160a01b031681565b3390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610ee4908490610fd8565b505050565b600082820183811015610f43576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610fd2908590610fd8565b50505050565b600061102d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166110899092919063ffffffff16565b805190915015610ee45780806020019051602081101561104c57600080fd5b5051610ee45760405162461bcd60e51b815260040180806020018281038252602a81526020018061141c602a913960400191505060405180910390fd5b606061109884846000856110a0565b949350505050565b6060824710156110e15760405162461bcd60e51b81526004018080602001828103825260268152602001806113346026913960400191505060405180910390fd5b6110ea856111fb565b61113b576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106111795780518252601f19909201916020918201910161115a565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146111db576040519150601f19603f3d011682016040523d82523d6000602084013e6111e0565b606091505b50915091506111f0828286611201565b979650505050505050565b3b151590565b60608315611210575081610f43565b8251156112205782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561126a578181015183820152602001611252565b50505050905090810190601f1680156112975780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe54696d654c6f636b52656769737472793a3a72656769737465723a2063616e6e6f7420726567697374657220746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737354696d654c6f636b52656769737472793a3a72656769737465723a20446973747269627574696f6e203d2030416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c54696d654c6f636b52656769737472793a3a72656769737465723a2054696d65204c6f636b20526567697374727920636f6e74726163742063616e6e6f7420626520616e20696e766573746f7254696d654c6f636b52656769737472793a3a72656769737465723a446973747269627574696f6e20666f722074686973206164647265737320697320616c7265616479207265676973746572656443616e6e6f74207265676973746572206561726c696572207468616e204d6172636820323032315361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220a7f1e0da967e43ffe950f5944b422dad742048f491d27b83d5cba68e4737320c64736f6c63430007060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100df5760003560e01c80638da5cb5b1161008c578063d86287aa11610066578063d86287aa1461024d578063d8d4ec02146102a0578063f2fde38b146102ee578063fc0c546a14610314576100df565b80638da5cb5b146101dd578063a8b1959a14610201578063c2b3f72f14610227576100df565b8063715018a6116100bd578063715018a61461017c5780638202f4bc1461018657806387c1ed12146101c0576100df565b80631e83409a146100e45780636b904f451461011c5780636bdc06f514610142575b600080fd5b61010a600480360360208110156100fa57600080fd5b50356001600160a01b031661031c565b60408051918252519081900360200190f35b61010a6004803603602081101561013257600080fd5b50356001600160a01b0316610542565b6101686004803603602081101561015857600080fd5b50356001600160a01b031661055d565b604080519115158252519081900360200190f35b6101846106d4565b005b6101686004803603608081101561019c57600080fd5b506001600160a01b038135169060208101359060408101351515906060013561079f565b610168600480360360208110156101d657600080fd5b5035610ab6565b6101e5610b4b565b604080516001600160a01b039092168252519081900360200190f35b6101686004803603602081101561021757600080fd5b50356001600160a01b0316610b5a565b61010a6004803603602081101561023d57600080fd5b50356001600160a01b0316610cb7565b6102736004803603602081101561026357600080fd5b50356001600160a01b0316610cc9565b60408051951515865293151560208601528484019290925260608401526080830152519081900360a00190f35b6102c6600480360360208110156102b657600080fd5b50356001600160a01b0316610cfd565b6040805194151585526020850193909352838301919091526060830152519081900360800190f35b6101846004803603602081101561030457600080fd5b50356001600160a01b0316610d30565b6101e5610e51565b6001546000906001600160a01b0316331461037e576040805162461bcd60e51b815260206004820152600f60248201527f6f6e6c79204241424c20546f6b656e0000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b0382166000908152600360205260409020546103d9576040805162461bcd60e51b815260206004820152600e60248201526d139bdd081c9959da5cdd195c995960921b604482015290519081900360640190fd5b6001600160a01b038281166000818152600360208181526040808420805460028085528387204296810196875592879055600180548454918501549490920154965485517f8cec2923000000000000000000000000000000000000000000000000000000008152600481019a909a5260248a0184905260ff909116151560448a01526064890193909352608488019590955260a4870191909152905190959290921693638cec29239360c480830194928390030190829087803b15801561049f57600080fd5b505af11580156104b3573d6000803e3d6000fd5b505050506040513d60208110156104c957600080fd5b50506001600160a01b0383166000818152600260208181526040808420805461ffff1916815560018101859055928301849055600390920192909255805192835290820183905280517f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d49281900390910190a192915050565b6001600160a01b031660009081526003602052604090205490565b6000610567610e60565b6001600160a01b0316610578610b4b565b6001600160a01b0316146105d3576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03821660009081526003602052604090205461062e576040805162461bcd60e51b815260206004820152600e60248201526d139bdd081c9959da5cdd195c995960921b604482015290519081900360640190fd5b6001600160a01b038083166000908152600360208181526040808420805490859055600292839052908420805461ffff191681556001818101869055928101859055909201929092559054909161068791163383610e64565b604080516001600160a01b03851681526020810183905281517f27f83af92b39768b17fe0c8d6922452702717efb8626d97e7a754e0b27d4f6d2929181900390910190a150600192915050565b6106dc610e60565b6001600160a01b03166106ed610b4b565b6001600160a01b031614610748576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b60006107a9610e60565b6001600160a01b03166107ba610b4b565b6001600160a01b031614610815576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03851661085a5760405162461bcd60e51b815260040180806020018281038252603c8152602001806112a6603c913960400191505060405180910390fd5b6001600160a01b0385163014156108a25760405162461bcd60e51b815260040180806020018281038252604d81526020018061135a604d913960600191505060405180910390fd5b836108de5760405162461bcd60e51b815260040180806020018281038252602c815260200180611308602c913960400191505060405180910390fd5b6001600160a01b038516600090815260036020526040902054156109335760405162461bcd60e51b815260040180806020018281038252604e8152602001806113a7604e913960600191505060405180910390fd5b63603c20704210156109765760405162461bcd60e51b81526004018080602001828103825260278152602001806113f56027913960400191505060405180910390fd5b6001600160a01b038516600090815260036020908152604080832087905560029091529020805460ff191684151517808255600180830185905560ff909116151514156109d5576004546109cb908490610ee9565b60028201556109e9565b6005546109e3908490610ee9565b60028201555b60038181018481556001600160a01b0388811660009081526002602081905260409091208554815460ff191660ff918216151517808355875461ff001990911661010091829004909216151502178155600180870154818301558287015492820192909255925492909301919091559054610a679116333088610f4a565b604080516001600160a01b03881681526020810187905281517e7dc6ab80cc84c043b7b8d4fcafc802187470087f7ea7fccd2e17aecd0256a1929181900390910190a150600195945050505050565b6000610ac0610e60565b6001600160a01b0316610ad1610b4b565b6001600160a01b031614610b2c576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600154610b43906001600160a01b03163384610e64565b506001919050565b6000546001600160a01b031690565b6000610b64610e60565b6001600160a01b0316610b75610b4b565b6001600160a01b031614610bd0576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600154604080517f4f2050870000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015291516000939290921691634f2050879160248082019260209290919082900301818787803b158015610c3b57600080fd5b505af1158015610c4f573d6000803e3d6000fd5b505050506040513d6020811015610c6557600080fd5b5051604080516001600160a01b03861681526020810183905281519293507f27f83af92b39768b17fe0c8d6922452702717efb8626d97e7a754e0b27d4f6d2929081900390910190a150600192915050565b60036020526000908152604090205481565b6002602081905260009182526040909120805460018201549282015460039092015460ff8083169461010090930416929085565b6001600160a01b03166000908152600260208190526040909120805460018201549282015460039092015460ff90911693565b610d38610e60565b6001600160a01b0316610d49610b4b565b6001600160a01b031614610da4576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610de95760405162461bcd60e51b81526004018080602001828103825260268152602001806112e26026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6001546001600160a01b031681565b3390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610ee4908490610fd8565b505050565b600082820183811015610f43576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610fd2908590610fd8565b50505050565b600061102d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166110899092919063ffffffff16565b805190915015610ee45780806020019051602081101561104c57600080fd5b5051610ee45760405162461bcd60e51b815260040180806020018281038252602a81526020018061141c602a913960400191505060405180910390fd5b606061109884846000856110a0565b949350505050565b6060824710156110e15760405162461bcd60e51b81526004018080602001828103825260268152602001806113346026913960400191505060405180910390fd5b6110ea856111fb565b61113b576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106111795780518252601f19909201916020918201910161115a565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146111db576040519150601f19603f3d011682016040523d82523d6000602084013e6111e0565b606091505b50915091506111f0828286611201565b979650505050505050565b3b151590565b60608315611210575081610f43565b8251156112205782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561126a578181015183820152602001611252565b50505050905090810190601f1680156112975780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe54696d654c6f636b52656769737472793a3a72656769737465723a2063616e6e6f7420726567697374657220746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737354696d654c6f636b52656769737472793a3a72656769737465723a20446973747269627574696f6e203d2030416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c54696d654c6f636b52656769737472793a3a72656769737465723a2054696d65204c6f636b20526567697374727920636f6e74726163742063616e6e6f7420626520616e20696e766573746f7254696d654c6f636b52656769737472793a3a72656769737465723a446973747269627574696f6e20666f722074686973206164647265737320697320616c7265616479207265676973746572656443616e6e6f74207265676973746572206561726c696572207468616e204d6172636820323032315361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220a7f1e0da967e43ffe950f5944b422dad742048f491d27b83d5cba68e4737320c64736f6c63430007060033", + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract TimeLockedToken\",\"name\":\"_token\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"distribution\",\"type\":\"uint256\"}],\"name\":\"Cancel\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"distribution\",\"type\":\"uint256\"}],\"name\":\"Claim\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"distribution\",\"type\":\"uint256\"}],\"name\":\"Register\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"cancelDeliveredTokens\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"cancelRegistration\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"address_\",\"type\":\"address\"}],\"name\":\"checkRegisteredDistribution\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"address_\",\"type\":\"address\"}],\"name\":\"checkVesting\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"team\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"last\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_receiver\",\"type\":\"address\"}],\"name\":\"claim\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRegistrations\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"distribution\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"investorType\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"vestingStartingDate\",\"type\":\"uint256\"}],\"name\":\"register\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"distribution\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"investorType\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"vestingStartingDate\",\"type\":\"uint256\"}],\"internalType\":\"struct TimeLockRegistry.Registration[]\",\"name\":\"_registrations\",\"type\":\"tuple[]\"}],\"name\":\"registerBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"registeredDistributions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"registrations\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract TimeLockedToken\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenVested\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"team\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"cliff\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"vestingBegin\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"vestingEnd\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastClaim\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalTokens\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferToOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance\",\"details\":\"This contract allows owner to register distributions for a TimeLockedToken To register a distribution, register method should be called by the owner. claim() should be called only by the BABL Token smartcontract (modifier onlyBABLToken) when any account registered to receive tokens make its own claim If case of a mistake, owner can cancel registration before the claim is done by the account Note this contract address must be setup in the TimeLockedToken's contract pointing to interact with (e.g. setTimeLockRegistry() function)\",\"kind\":\"dev\",\"methods\":{\"cancelDeliveredTokens(address)\":{\"details\":\"An automatic override allowance is granted during the claim process\",\"params\":{\"account\":\"Address that should have it's distribution removed\"},\"returns\":{\"_0\":\"Whether or not it succeeded\"}},\"cancelRegistration(address)\":{\"details\":\"A claim has not to be done earlier\",\"params\":{\"receiver\":\"Address that should have it's distribution removed\"},\"returns\":{\"_0\":\"Whether or not it succeeded\"}},\"claim(address)\":{\"details\":\"Claim is done by the user in the TimeLocked contract and the contract is the only allowed to call this function on behalf of the user to make the claim\",\"returns\":{\"_0\":\"The amount of tokens registered and delivered after the claim\"}},\"constructor\":{\"params\":{\"_token\":\"TimeLockedToken contract to use in this registry\"}},\"getRegistrations()\":{\"returns\":{\"_0\":\"address[] Returns list of registrations\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"register(address,uint256,bool,uint256)\":{\"params\":{\"distribution\":\"Tokens amount that receiver is due to get\",\"receiver\":\"Address belonging vesting conditions\"}},\"registerBatch((address,uint256,bool,uint256)[])\":{\"params\":{\"_registrations\":\"Registrations to process\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"transferToOwner(uint256)\":{\"params\":{\"amount\":\"Amount to be recovered by the owner of the Time Lock Registry smartcontract from its balance\"},\"returns\":{\"_0\":\"Whether or not it succeeded\"}}},\"title\":\"TimeLockRegistry\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"cancelDeliveredTokens(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Cancel distribution registration in case of mistake and before a claim is doneCancel already delivered tokens. It might only apply when non-completion of vesting period of Team members or Advisors\"},\"cancelRegistration(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Cancel distribution registration in case of mistake and before a claim is doneCancel distribution registration\"},\"claim(address)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Claim locked tokens by the registered accountClaim tokens due amount.\"},\"constructor\":{\"notice\":\"Construct a new Time Lock Registry and gives ownership to sender\"},\"getRegistrations()\":{\"notice\":\"Gets registrations\"},\"register(address,uint256,bool,uint256)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTIONRegister new account under vesting conditions (Team, Advisors, Investors e.g. SAFT purchaser)\"},\"registerBatch((address,uint256,bool,uint256)[])\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTIONRegister multiple investors/team in a batch\"},\"tokenVested(address)\":{\"notice\":\"A record of token owners under vesting conditions for each account, by index\"},\"transferToOwner(uint256)\":{\"notice\":\"PRIVILEGED GOVERNANCE FUNCTION. Recover tokens in Time Lock Registry smartcontract address by the ownerSend tokens from smartcontract address to the owner. It might only apply after a cancellation of vested tokens\"}},\"notice\":\"Register Lockups for TimeLocked ERC20 Token BABL (e.g. vesting)\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/token/TimeLockRegistry.sol\":\"TimeLockRegistry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () internal {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.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 using SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n // solhint-disable-next-line max-line-length\\n require((value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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 * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 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. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\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 { size := extcodesize(account) }\\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, \\\"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, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editGardenNFT(address _newGardenNFT) external;\\n\\n function editStrategyNFT(address _newStrategyNFT) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function editUniswapFactory(address _newUniswapFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\\n\\n function maxContributorsPerGarden() external view returns (uint256);\\n\\n function gardenCreationIsOpen() external view returns (bool);\\n\\n function openPublicGardenCreation() external;\\n\\n function setMaxContributorsPerGarden(uint256 _newMax) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function gardenNFT() external view returns (address);\\n\\n function strategyNFT() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\\n\\n function uniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0xdee5a27301c24f507d312f32249487fa9b0a756062a7e479405a1d1ee9ee7bb8\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function isGardenStrategy(address _strategy) external view returns (bool);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategyActiveInGarden(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to,\\n bool _withPenalty\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x88f1786ffee23e386aaa1735177912e1b5a7cdd440dafe52fb139fe50fd621b4\",\"license\":\"Apache License\"},\"contracts/interfaces/IPriceOracle.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol IPriceOracle)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPriceOracle\\n * @author Babylon Finance\\n *\\n * Interface for interacting with PriceOracle\\n */\\ninterface IPriceOracle {\\n /* ============ Functions ============ */\\n\\n function getPrice(address _assetOne, address _assetTwo) external view returns (uint256);\\n\\n function updateAdapters(address _assetOne, address _assetTwo) external;\\n}\\n\",\"keccak256\":\"0xa22e0e5e166f6f6714553b736ee921b916c37bc5b557042bf6042cc010d2a041\",\"license\":\"Apache License\"},\"contracts/interfaces/IRewardsDistributor.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IRewardsDistributor\\n * @author Babylon Finance\\n *\\n * Interface for the distribute rewards of the BABL Mining Program.\\n */\\n\\ninterface IRewardsDistributor {\\n // Structs\\n struct PrincipalPerTimestamp {\\n uint256 principal;\\n uint256 time;\\n uint256 timeListPointer;\\n }\\n\\n function protocolPrincipal() external view returns (uint256);\\n\\n function pid() external view returns (uint256);\\n\\n // solhint-disable-next-line\\n function EPOCH_DURATION() external pure returns (uint256);\\n\\n // solhint-disable-next-line\\n function START_TIME() external view returns (uint256);\\n\\n // solhint-disable-next-line\\n function Q1_REWARDS() external pure returns (uint256);\\n\\n // solhint-disable-next-line\\n function DECAY_RATE() external pure returns (uint256);\\n\\n function addProtocolPrincipal(uint256 _capital) external;\\n\\n function substractProtocolPrincipal(uint256 _capital) external;\\n\\n function getStrategyRewards(address _strategy) external returns (uint96);\\n\\n function sendTokensToContributor(address _to, uint96 _amount) external;\\n\\n function getRewards(\\n address _garden,\\n address _contributor,\\n address[] calldata _finalizedStrategies\\n ) external view returns (uint256, uint96);\\n\\n function getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) external view returns (uint256);\\n\\n /**\\n function getContributor(address _garden, address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256[] memory,\\n uint256\\n );\\n */\\n function updateGardenPower(address _garden, uint256 _pid) external;\\n\\n function setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw,\\n uint256 _pid\\n ) external;\\n\\n function tokenSupplyPerQuarter(uint256 quarter) external view returns (uint96);\\n\\n function checkProtocol(uint256 _time)\\n external\\n view\\n returns (\\n uint256 principal,\\n uint256 time,\\n uint256 quarterBelonging,\\n uint256 timeListPointer,\\n uint256 power\\n );\\n\\n function checkQuarter(uint256 _num)\\n external\\n view\\n returns (\\n uint256 quarterPrincipal,\\n uint256 quarterNumber,\\n uint256 quarterPower,\\n uint96 supplyPerQuarter\\n );\\n}\\n\",\"keccak256\":\"0xc68eb7826b0174d4f6dff50320abb2cd958a978d4537c57867dd828dc2798662\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n address,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x850597ec9a68eb86f31f13b6b77d3b31350b4ed3d0019dedfbd3550ad1a1d9e2\",\"license\":\"Apache License\"},\"contracts/interfaces/IVoteToken.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface IVoteToken {\\n function delegate(address delegatee) external;\\n\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n function getCurrentVotes(address account) external view returns (uint96);\\n\\n function getPriorVotes(address account, uint256 blockNumber) external view returns (uint96);\\n\\n function getMyDelegatee() external view returns (address);\\n\\n function getDelegatee(address account) external view returns (address);\\n\\n function getCheckpoints(address account, uint32 id) external view returns (uint32 fromBlock, uint96 votes);\\n\\n function getNumberOfCheckpoints(address account) external view returns (uint32);\\n}\\n\\ninterface IVoteTokenWithERC20 is IVoteToken, IERC20 {}\\n\",\"keccak256\":\"0xd3d6174f81ce2c1678a536b2a486179f9a5a694849b334556aeb155b9b13f777\",\"license\":\"Apache License\"},\"contracts/lib/AddressArrayUtils.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n/**\\n * @title AddressArrayUtils\\n * @author Set Protocol\\n *\\n * Utility functions to handle Address Arrays\\n */\\nlibrary AddressArrayUtils {\\n /**\\n * Finds the index of the first occurrence of the given element.\\n * @param A The input array to search\\n * @param a The value to find\\n * @return Returns (index and isIn) for the first occurrence starting from index 0\\n */\\n function indexOf(address[] memory A, address a) internal pure returns (uint256, bool) {\\n uint256 length = A.length;\\n for (uint256 i = 0; i < length; i++) {\\n if (A[i] == a) {\\n return (i, true);\\n }\\n }\\n return (uint256(-1), false);\\n }\\n\\n /**\\n * Returns true if the value is present in the list. Uses indexOf internally.\\n * @param A The input array to search\\n * @param a The value to find\\n * @return Returns isIn for the first occurrence starting from index 0\\n */\\n function contains(address[] memory A, address a) internal pure returns (bool) {\\n (, bool isIn) = indexOf(A, a);\\n return isIn;\\n }\\n\\n /**\\n * Returns true if there are 2 elements that are the same in an array\\n * @param A The input array to search\\n * @return Returns boolean for the first occurrence of a duplicate\\n */\\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\\n require(A.length > 0, 'A is empty');\\n\\n for (uint256 i = 0; i < A.length - 1; i++) {\\n address current = A[i];\\n for (uint256 j = i + 1; j < A.length; j++) {\\n if (current == A[j]) {\\n return true;\\n }\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * @param A The input array to search\\n * @param a The address to remove\\n * @return Returns the array with the object removed.\\n */\\n function remove(address[] memory A, address a) internal pure returns (address[] memory) {\\n (uint256 index, bool isIn) = indexOf(A, a);\\n if (!isIn) {\\n revert('Address not in array.');\\n } else {\\n (address[] memory _A, ) = pop(A, index);\\n return _A;\\n }\\n }\\n\\n /**\\n * Removes specified index from array\\n * @param A The input array to search\\n * @param index The index to remove\\n * @return Returns the new array and the removed entry\\n */\\n function pop(address[] memory A, uint256 index) internal pure returns (address[] memory, address) {\\n uint256 length = A.length;\\n require(index < A.length, 'Index must be < A length');\\n address[] memory newAddresses = new address[](length - 1);\\n for (uint256 i = 0; i < index; i++) {\\n newAddresses[i] = A[i];\\n }\\n for (uint256 j = index + 1; j < length; j++) {\\n newAddresses[j - 1] = A[j];\\n }\\n return (newAddresses, A[index]);\\n }\\n\\n /**\\n * Returns the combination of the two arrays\\n * @param A The first array\\n * @param B The second array\\n * @return Returns A extended by B\\n */\\n function extend(address[] memory A, address[] memory B) internal pure returns (address[] memory) {\\n uint256 aLength = A.length;\\n uint256 bLength = B.length;\\n address[] memory newAddresses = new address[](aLength + bLength);\\n for (uint256 i = 0; i < aLength; i++) {\\n newAddresses[i] = A[i];\\n }\\n for (uint256 j = 0; j < bLength; j++) {\\n newAddresses[aLength + j] = B[j];\\n }\\n return newAddresses;\\n }\\n}\\n\",\"keccak256\":\"0x409127cd8cadb573e5de48fd992efbd8b0f1e243d235abc3c5f2fa873195c16a\",\"license\":\"Apache License\"},\"contracts/lib/BabylonErrors.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n// solhint-disable\\n\\n/**\\n * @notice Forked from https://github.com/balancer-labs/balancer-core-v2/blob/master/contracts/lib/helpers/BalancerErrors.sol\\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 // 'BAB#{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 \\\"BAB#\\\" part is a known constant\\n // (0x42414223): 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(0x42414223000000, 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 // Max deposit limit needs to be under the limit\\n uint256 internal constant MAX_DEPOSIT_LIMIT = 0;\\n // Creator needs to deposit\\n uint256 internal constant MIN_CONTRIBUTION = 1;\\n // Min Garden token supply >= 0\\n uint256 internal constant MIN_TOKEN_SUPPLY = 2;\\n // Deposit hardlock needs to be at least 1 block\\n uint256 internal constant DEPOSIT_HARDLOCK = 3;\\n // Needs to be at least the minimum\\n uint256 internal constant MIN_LIQUIDITY = 4;\\n // _reserveAssetQuantity is not equal to msg.value\\n uint256 internal constant MSG_VALUE_DO_NOT_MATCH = 5;\\n // Withdrawal amount has to be equal or less than msg.sender balance\\n uint256 internal constant MSG_SENDER_TOKENS_DO_NOT_MATCH = 6;\\n // Tokens are staked\\n uint256 internal constant TOKENS_STAKED = 7;\\n // Balance too low\\n uint256 internal constant BALANCE_TOO_LOW = 8;\\n // msg.sender doesn't have enough tokens\\n uint256 internal constant MSG_SENDER_TOKENS_TOO_LOW = 9;\\n // There is an open redemption window already\\n uint256 internal constant REDEMPTION_OPENED_ALREADY = 10;\\n // Cannot request twice in the same window\\n uint256 internal constant ALREADY_REQUESTED = 11;\\n // Rewards and profits already claimed\\n uint256 internal constant ALREADY_CLAIMED = 12;\\n // Value have to be greater than zero\\n uint256 internal constant GREATER_THAN_ZERO = 13;\\n // Must be reserve asset\\n uint256 internal constant MUST_BE_RESERVE_ASSET = 14;\\n // Only contributors allowed\\n uint256 internal constant ONLY_CONTRIBUTOR = 15;\\n // Only controller allowed\\n uint256 internal constant ONLY_CONTROLLER = 16;\\n // Only creator allowed\\n uint256 internal constant ONLY_CREATOR = 17;\\n // Only keeper allowed\\n uint256 internal constant ONLY_KEEPER = 18;\\n // Fee is too high\\n uint256 internal constant FEE_TOO_HIGH = 19;\\n // Only strategy allowed\\n uint256 internal constant ONLY_STRATEGY = 20;\\n // Only active allowed\\n uint256 internal constant ONLY_ACTIVE = 21;\\n // Only inactive allowed\\n uint256 internal constant ONLY_INACTIVE = 22;\\n // Address should be not zero address\\n uint256 internal constant ADDRESS_IS_ZERO = 23;\\n // Not within range\\n uint256 internal constant NOT_IN_RANGE = 24;\\n // Value is too low\\n uint256 internal constant VALUE_TOO_LOW = 25;\\n // Value is too high\\n uint256 internal constant VALUE_TOO_HIGH = 26;\\n // Only strategy or protocol allowed\\n uint256 internal constant ONLY_STRATEGY_OR_CONTROLLER = 27;\\n // Normal withdraw possible\\n uint256 internal constant NORMAL_WITHDRAWAL_POSSIBLE = 28;\\n // User does not have permissions to join garden\\n uint256 internal constant USER_CANNOT_JOIN = 29;\\n // User does not have permissions to add strategies in garden\\n uint256 internal constant USER_CANNOT_ADD_STRATEGIES = 30;\\n // Only Protocol or garden\\n uint256 internal constant ONLY_PROTOCOL_OR_GARDEN = 31;\\n // Only Strategist\\n uint256 internal constant ONLY_STRATEGIST = 32;\\n // Only Integration\\n uint256 internal constant ONLY_INTEGRATION = 33;\\n // Only garden and data not set\\n uint256 internal constant ONLY_GARDEN_AND_DATA_NOT_SET = 34;\\n // Only active garden\\n uint256 internal constant ONLY_ACTIVE_GARDEN = 35;\\n // Contract is not a garden\\n uint256 internal constant NOT_A_GARDEN = 36;\\n // Not enough tokens\\n uint256 internal constant STRATEGIST_TOKENS_TOO_LOW = 37;\\n // Stake is too low\\n uint256 internal constant STAKE_HAS_TO_AT_LEAST_ONE = 38;\\n // Duration must be in range\\n uint256 internal constant DURATION_MUST_BE_IN_RANGE = 39;\\n // Max Capital Requested\\n uint256 internal constant MAX_CAPITAL_REQUESTED = 41;\\n // Votes are already resolved\\n uint256 internal constant VOTES_ALREADY_RESOLVED = 42;\\n // Voting window is closed\\n uint256 internal constant VOTING_WINDOW_IS_OVER = 43;\\n // Strategy needs to be active\\n uint256 internal constant STRATEGY_NEEDS_TO_BE_ACTIVE = 44;\\n // Max capital reached\\n uint256 internal constant MAX_CAPITAL_REACHED = 45;\\n // Capital is less then rebalance\\n uint256 internal constant CAPITAL_IS_LESS_THAN_REBALANCE = 46;\\n // Strategy is in cooldown period\\n uint256 internal constant STRATEGY_IN_COOLDOWN = 47;\\n // Strategy is not executed\\n uint256 internal constant STRATEGY_IS_NOT_EXECUTED = 48;\\n // Strategy is not over yet\\n uint256 internal constant STRATEGY_IS_NOT_OVER_YET = 49;\\n // Strategy is already finalized\\n uint256 internal constant STRATEGY_IS_ALREADY_FINALIZED = 50;\\n // No capital to unwind\\n uint256 internal constant STRATEGY_NO_CAPITAL_TO_UNWIND = 51;\\n // Strategy needs to be inactive\\n uint256 internal constant STRATEGY_NEEDS_TO_BE_INACTIVE = 52;\\n // Duration needs to be less\\n uint256 internal constant DURATION_NEEDS_TO_BE_LESS = 53;\\n // Can't sweep reserve asset\\n uint256 internal constant CANNOT_SWEEP_RESERVE_ASSET = 54;\\n // Voting window is opened\\n uint256 internal constant VOTING_WINDOW_IS_OPENED = 55;\\n // Strategy is executed\\n uint256 internal constant STRATEGY_IS_EXECUTED = 56;\\n // Min Rebalance Capital\\n uint256 internal constant MIN_REBALANCE_CAPITAL = 57;\\n // Not a valid strategy NFT\\n uint256 internal constant NOT_STRATEGY_NFT = 58;\\n // Garden Transfers Disabled\\n uint256 internal constant GARDEN_TRANSFERS_DISABLED = 59;\\n // Tokens are hardlocked\\n uint256 internal constant TOKENS_HARDLOCKED = 60;\\n // Max contributors reached\\n uint256 internal constant MAX_CONTRIBUTORS = 61;\\n // BABL Transfers Disabled\\n uint256 internal constant BABL_TRANSFERS_DISABLED = 62;\\n // Strategy duration range error\\n uint256 internal constant DURATION_RANGE = 63;\\n // Checks the min amount of voters\\n uint256 internal constant MIN_VOTERS_CHECK = 64;\\n // Ge contributor power error\\n uint256 internal constant CONTRIBUTOR_POWER_CHECK_WINDOW = 65;\\n // Not enough reserve set aside\\n uint256 internal constant NOT_ENOUGH_RESERVE = 66;\\n // Garden is already public\\n uint256 internal constant GARDEN_ALREADY_PUBLIC = 67;\\n // Withdrawal with penalty\\n uint256 internal constant WITHDRAWAL_WITH_PENALTY = 68;\\n // Withdrawal with penalty\\n uint256 internal constant ONLY_MINING_ACTIVE = 69;\\n // Overflow in supply\\n uint256 internal constant OVERFLOW_IN_SUPPLY = 70;\\n // Overflow in power\\n uint256 internal constant OVERFLOW_IN_POWER = 71;\\n // Not a system contract\\n uint256 internal constant NOT_A_SYSTEM_CONTRACT = 72;\\n // Strategy vs Garden mismatch\\n uint256 internal constant STRATEGY_GARDEN_MISMATCH = 73;\\n // Minimum quarters is 1\\n uint256 internal constant QUARTERS_MIN_1 = 74;\\n // Too many strategy operations\\n uint256 internal constant TOO_MANY_OPS = 75;\\n // Only operations\\n uint256 internal constant ONLY_OPERATION = 76;\\n // Strat params wrong length\\n uint256 internal constant STRAT_PARAMS_LENGTH = 77;\\n // Garden params wrong length\\n uint256 internal constant GARDEN_PARAMS_LENGTH = 78;\\n // Token names too long\\n uint256 internal constant NAME_TOO_LONG = 79;\\n // Contributor power overflows over garden power\\n uint256 internal constant CONTRIBUTOR_POWER_OVERFLOW = 80;\\n // Contributor power window out of bounds\\n uint256 internal constant CONTRIBUTOR_POWER_CHECK_DEPOSITS = 81;\\n}\\n\",\"keccak256\":\"0x9c9c2ea9026fe9033762f7221e2d5a91ed6b5f64cc14558b89fbd975cfb2d7b7\",\"license\":\"Apache License\"},\"contracts/lib/Math.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\n// Libraries\\nimport './SafeDecimalMath.sol';\\n\\n// https://docs.synthetix.io/contracts/source/libraries/math\\nlibrary Math {\\n using SafeMath for uint256;\\n using SafeDecimalMath for uint256;\\n\\n /**\\n * @dev Uses \\\"exponentiation by squaring\\\" algorithm where cost is 0(logN)\\n * vs 0(N) for naive repeated multiplication.\\n * Calculates x^n with x as fixed-point and n as regular unsigned int.\\n * Calculates to 18 digits of precision with SafeDecimalMath.unit()\\n */\\n function powDecimal(uint256 x, uint256 n) internal pure returns (uint256) {\\n // https://mpark.github.io/programming/2014/08/18/exponentiation-by-squaring/\\n\\n uint256 result = SafeDecimalMath.unit();\\n while (n > 0) {\\n if (n % 2 != 0) {\\n result = result.multiplyDecimal(x);\\n }\\n x = x.multiplyDecimal(x);\\n n /= 2;\\n }\\n return result;\\n }\\n\\n function abs(int256 x) internal pure returns (int256) {\\n return x >= 0 ? x : -x;\\n }\\n}\\n\",\"keccak256\":\"0xc2ff8055f98dd7253df98838d870391067d9c622a68f263c942616ca8122bd93\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"contracts/lib/Safe3296.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nlibrary Safe3296 {\\n using SafeMath for uint256;\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint32\\n *\\n * @dev internal function to convert from uint256 to uint32\\n */\\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\\n require(n < 2**32, errorMessage);\\n return uint32(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint96\\n *\\n * @dev internal function to convert from uint256 to uint96\\n */\\n function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) {\\n require(n < 2**96, errorMessage);\\n return uint96(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to add two uint96 numbers\\n *\\n * @dev internal safe math function to add two uint96 numbers\\n */\\n function add96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n uint96 c = a + b;\\n require(c >= a, errorMessage);\\n return c;\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to subtract two uint96 numbers\\n *\\n * @dev internal safe math function to subtract two uint96 numbers\\n */\\n function sub96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n}\\n\",\"keccak256\":\"0x9ebf0856ab07500c9a8250d1be4b578a3e0ff454da7de67e3ab5632a7e6903c3\",\"license\":\"Apache License\"},\"contracts/lib/SafeDecimalMath.sol\":{\"content\":\"/*\\n Original version by Synthetix.io\\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\\n\\n Adapted by Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nlibrary SafeDecimalMath {\\n using SafeMath for uint256;\\n\\n /* Number of decimal places in the representations. */\\n uint8 public constant decimals = 18;\\n uint8 public constant highPrecisionDecimals = 27;\\n\\n /* The number representing 1.0. */\\n uint256 public constant UNIT = 10**uint256(decimals);\\n\\n /* The number representing 1.0 for higher fidelity numbers. */\\n uint256 public constant PRECISE_UNIT = 10**uint256(highPrecisionDecimals);\\n uint256 private constant UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR = 10**uint256(highPrecisionDecimals - decimals);\\n\\n /**\\n * @return Provides an interface to UNIT.\\n */\\n function unit() external pure returns (uint256) {\\n return UNIT;\\n }\\n\\n /**\\n * @return Provides an interface to PRECISE_UNIT.\\n */\\n function preciseUnit() external pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @return The result of multiplying x and y, interpreting the operands as fixed-point\\n * decimals.\\n *\\n * @dev A unit factor is divided out after the product of x and y is evaluated,\\n * so that product must be less than 2**256. As this is an integer division,\\n * the internal division always rounds down. This helps save on gas. Rounding\\n * is more expensive on gas.\\n */\\n function multiplyDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\\n /* Divide by UNIT to remove the extra factor introduced by the product. */\\n return x.mul(y) / UNIT;\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of the specified precision unit.\\n *\\n * @dev The operands should be in the form of a the specified unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function _multiplyDecimalRound(\\n uint256 x,\\n uint256 y,\\n uint256 precisionUnit\\n ) private pure returns (uint256) {\\n /* Divide by UNIT to remove the extra factor introduced by the product. */\\n uint256 quotientTimesTen = x.mul(y) / (precisionUnit / 10);\\n\\n if (quotientTimesTen % 10 >= 5) {\\n quotientTimesTen += 10;\\n }\\n\\n return quotientTimesTen / 10;\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of a precise unit.\\n *\\n * @dev The operands should be in the precise unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function multiplyDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _multiplyDecimalRound(x, y, PRECISE_UNIT);\\n }\\n\\n /**\\n * @return The result of safely multiplying x and y, interpreting the operands\\n * as fixed-point decimals of a standard unit.\\n *\\n * @dev The operands should be in the standard unit factor which will be\\n * divided out after the product of x and y is evaluated, so that product must be\\n * less than 2**256.\\n *\\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\\n * Rounding is useful when you need to retain fidelity for small decimal numbers\\n * (eg. small fractions or percentages).\\n */\\n function multiplyDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _multiplyDecimalRound(x, y, UNIT);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is a high\\n * precision decimal.\\n *\\n * @dev y is divided after the product of x and the standard precision unit\\n * is evaluated, so the product of x and UNIT must be less than 2**256. As\\n * this is an integer division, the result is always rounded down.\\n * This helps save on gas. Rounding is more expensive on gas.\\n */\\n function divideDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\\n /* Reintroduce the UNIT factor that will be divided out by y. */\\n return x.mul(UNIT).div(y);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * decimal in the precision unit specified in the parameter.\\n *\\n * @dev y is divided after the product of x and the specified precision unit\\n * is evaluated, so the product of x and the specified precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function _divideDecimalRound(\\n uint256 x,\\n uint256 y,\\n uint256 precisionUnit\\n ) private pure returns (uint256) {\\n uint256 resultTimesTen = x.mul(precisionUnit * 10).div(y);\\n\\n if (resultTimesTen % 10 >= 5) {\\n resultTimesTen += 10;\\n }\\n\\n return resultTimesTen / 10;\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * standard precision decimal.\\n *\\n * @dev y is divided after the product of x and the standard precision unit\\n * is evaluated, so the product of x and the standard precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function divideDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _divideDecimalRound(x, y, UNIT);\\n }\\n\\n /**\\n * @return The result of safely dividing x and y. The return value is as a rounded\\n * high precision decimal.\\n *\\n * @dev y is divided after the product of x and the high precision unit\\n * is evaluated, so the product of x and the high precision unit must\\n * be less than 2**256. The result is rounded to the nearest increment.\\n */\\n function divideDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\\n return _divideDecimalRound(x, y, PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Convert a standard decimal representation to a high precision one.\\n */\\n function decimalToPreciseDecimal(uint256 i) internal pure returns (uint256) {\\n return i.mul(UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR);\\n }\\n\\n /**\\n * @dev Convert a high precision decimal to a standard decimal representation.\\n */\\n function preciseDecimalToDecimal(uint256 i) internal pure returns (uint256) {\\n uint256 quotientTimesTen = i / (UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR / 10);\\n\\n if (quotientTimesTen % 10 >= 5) {\\n quotientTimesTen += 10;\\n }\\n\\n return quotientTimesTen / 10;\\n }\\n}\\n\",\"keccak256\":\"0x1372be4fa0c5813417396f128f5aa45da1cd7679e2d247a8e17d1ba5f0141253\",\"license\":\"Apache License\"},\"contracts/token/RewardsDistributor.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {TimeLockedToken} from './TimeLockedToken.sol';\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\nimport {SafeDecimalMath} from '../lib/SafeDecimalMath.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\nimport {Math} from '../lib/Math.sol';\\nimport {Safe3296} from '../lib/Safe3296.sol';\\nimport {Errors, _require} from '../lib/BabylonErrors.sol';\\n\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {TimeLockedToken} from './TimeLockedToken.sol';\\nimport {IRewardsDistributor} from '../interfaces/IRewardsDistributor.sol';\\nimport {IPriceOracle} from '../interfaces/IPriceOracle.sol';\\n\\n/**\\n * @title Rewards Distributor implementing the BABL Mining Program and other Rewards to Strategists and Stewards\\n * @author Babylon Finance\\n * Rewards Distributor contract is a smart contract used to calculate and distribute all the BABL rewards of the BABL Mining Program\\n * along the time reserved for executed strategies. It implements a supply curve to distribute 500K BABL along the time.\\n * The supply curve is designed to optimize the long-term sustainability of the protocol.\\n * The rewards are front-loaded but they last for more than 10 years, slowly decreasing quarter by quarter.\\n * For that, it houses the state of the protocol power along the time as each strategy power is compared to the whole protocol usage.\\n * Rewards Distributor also is responsible for the calculation and delivery of other rewards as bonuses to specific profiles\\n * which are actively contributing to the protocol growth and their communities (Garden creators, Strategists and Stewards).\\n */\\ncontract RewardsDistributor is Ownable, IRewardsDistributor {\\n using SafeMath for uint256;\\n using SafeMath for int256;\\n using PreciseUnitMath for uint256;\\n using PreciseUnitMath for int256;\\n using SafeDecimalMath for uint256;\\n using SafeDecimalMath for int256;\\n using Math for uint256;\\n using Math for int256;\\n using Safe3296 for uint256;\\n using Safe3296 for int256;\\n using Safe3296 for uint96;\\n using Safe3296 for uint32;\\n\\n /* ========== Events ========== */\\n\\n /* ============ Modifiers ============ */\\n /**\\n * Throws if the call is not from a valid strategy\\n */\\n modifier onlyStrategy {\\n _require(controller.isSystemContract(address(IStrategy(msg.sender).garden())), Errors.ONLY_STRATEGY);\\n _;\\n }\\n /**\\n * Throws if the call is not from a valid active garden\\n */\\n modifier onlyActiveGarden(address _garden, uint256 _pid) {\\n if (_pid != 0 || gardenPid[address(_garden)] > 1) {\\n // Enable deploying flow with security restrictions\\n _require(IBabController(controller).isSystemContract(address(_garden)), Errors.NOT_A_SYSTEM_CONTRACT);\\n _require(IBabController(controller).isGarden(address(_garden)), Errors.ONLY_ACTIVE_GARDEN);\\n }\\n _require(msg.sender == address(_garden), Errors.ONLY_ACTIVE_GARDEN);\\n _require(IGarden(_garden).active(), Errors.ONLY_ACTIVE_GARDEN);\\n _;\\n }\\n\\n /**\\n * Throws if the BABL Rewards mining program is not active\\n */\\n modifier onlyMiningActive() {\\n _require(IBabController(controller).bablMiningProgramEnabled(), Errors.ONLY_MINING_ACTIVE);\\n _;\\n }\\n /**\\n * Throws if the sender is not the controller\\n */\\n modifier onlyController() {\\n _require(IBabController(controller).isSystemContract(msg.sender), Errors.NOT_A_SYSTEM_CONTRACT);\\n _require(address(controller) == msg.sender, Errors.ONLY_CONTROLLER);\\n _;\\n }\\n\\n /* ============ Constants ============ */\\n // 500K BABL allocated to this BABL Mining Program, the first quarter is Q1_REWARDS\\n // and the following quarters will follow the supply curve using a decay rate\\n uint256 public constant override Q1_REWARDS = 53_571_428_571_428_600e6; // First quarter (epoch) BABL rewards\\n // 12% quarterly decay rate (each 90 days)\\n // (Rewards on Q1 = 1,12 * Rewards on Q2) being Q1= Quarter 1, Q2 = Quarter 2\\n uint256 public constant override DECAY_RATE = 12e16;\\n // Duration of its EPOCH in days // BABL & profits split from the protocol\\n uint256 public constant override EPOCH_DURATION = 90 days;\\n\\n // solhint-disable-next-line\\n uint256 public override START_TIME; // Starting time of the rewards distribution\\n\\n // solhint-disable-next-line\\n uint256 public immutable BABL_STRATEGIST_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable BABL_STEWARD_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable BABL_LP_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_STRATEGIST_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_STEWARD_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_LP_SHARE;\\n // solhint-disable-next-line\\n uint256 public immutable PROFIT_PROTOCOL_FEE;\\n // solhint-disable-next-line\\n uint256 public immutable CREATOR_BONUS;\\n\\n // DAI normalize asset\\n address private constant DAI = 0x6B175474E89094C44Da98b954EedeAC495271d0F;\\n\\n /* ============ Structs ============ */\\n\\n struct ProtocolPerTimestamp {\\n // Protocol allocation checkpoints per timestamp along the time\\n uint256 principal; // Protocol principal allocation in normalized asset (DAI)\\n uint256 time; // Time of the checkpoint\\n uint256 quarterBelonging; // # Quarter checkpoint belonging since START_TIME\\n uint256 timeListPointer; // Pointer to the array of timestamps to enable the possibility of struct iteration\\n uint256 power; // Protocol power checkpoint (power is proportional to = principal * duration)\\n }\\n\\n struct ProtocolPerQuarter {\\n // Protocol allocation checkpoints per timestamp per each quarter along the time\\n uint256 quarterPrincipal; // Checkpoint to keep track on accumulated protocol principal per quarter in normalized asset (DAI)\\n uint256 quarterNumber; // # Quarter since START_TIME\\n uint256 quarterPower; // Accumulated Protocol power for each quarter\\n uint96 supplyPerQuarter; // Supply per quarter\\n }\\n\\n struct GardenPowerByTimestamp {\\n // Garden allocation checkpoints per timestamp per each garden\\n uint256 supply; // Checkpoint to keep track on garden supply\\n uint256 timestamp; // Checkpoint timestamps\\n uint256 power; // Garden power checkpoint (power is proportional to = principal * duration)\\n }\\n struct ContributorPerGarden {\\n // Checkpoints to keep track on the evolution of each contributor vs. each garden\\n uint256 lastDepositAt; // Last deposit timestamp of each contributor in each garden\\n uint256 initialDepositAt; // Checkpoint of the initial deposit\\n uint256[] timeListPointer; // Array of timestamps for each user in each garden\\n uint256 pid; // Garden contributor checkpoints counter to enable iteration\\n mapping(uint256 => TimestampContribution) tsContributions; // Sub-mapping all the contributor checkpoints\\n }\\n\\n struct TimestampContribution {\\n // Sub-mapping with all checkpoints for deposits and withdrawals of garden users\\n uint256 supply; // Garden token balance of user in each garden along the time\\n uint256 timestamp; // Checkpoint time\\n uint256 timePointer; // Pointer\\n uint256 power; // Contributor power per checkpoint\\n }\\n struct Checkpoints {\\n // Checkpoints for contributor power calculations where a certain window (from -> to) is queried\\n uint256 fromDepositAt; // First contributor checkpoint within the provided window\\n uint256 lastDepositAt; // Last contributor checkpoint within the provided window\\n uint256 gardenFromDepositAt; // First contributor checkpoint within the provided window\\n uint256 gardenLastDepositAt; // Last garden checkpoint within the provided window\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Instance of the Controller contract\\n IBabController public controller;\\n\\n // BABL Token contract\\n TimeLockedToken public babltoken;\\n\\n // Protocol total allocation points. Must be the sum of all allocation points (strategyPrincipal) in all strategy pools.\\n uint256 public override protocolPrincipal;\\n mapping(uint256 => ProtocolPerTimestamp) public protocolPerTimestamp; // Mapping of all protocol checkpoints\\n uint256[] public timeList; // Array of all protocol checkpoints\\n uint256 public override pid; // Initialization of the ID assigning timeListPointer to the checkpoint number\\n\\n mapping(uint256 => ProtocolPerQuarter) public protocolPerQuarter; // Mapping of the accumulated protocol per each active quarter\\n mapping(uint256 => bool) public isProtocolPerQuarter; // Check if the protocol per quarter data has been initialized\\n\\n // Strategy overhead control. Only used if each strategy has power overhead due to changes overtime\\n mapping(address => mapping(uint256 => uint256)) public rewardsPowerOverhead; // Overhead control to enable high level accuracy calculations for strategy rewards\\n // Contributor power control\\n mapping(address => mapping(address => ContributorPerGarden)) public contributorPerGarden; // Enable high level accuracy calculations\\n mapping(address => mapping(address => Checkpoints)) private checkpoints;\\n // Garden power control\\n mapping(address => mapping(uint256 => GardenPowerByTimestamp)) public gardenPowerByTimestamp;\\n mapping(address => uint256[]) public gardenTimelist;\\n mapping(address => uint256) public gardenPid;\\n\\n /* ============ Constructor ============ */\\n\\n constructor(TimeLockedToken _bablToken, IBabController _controller) {\\n require(address(_bablToken) != address(0), 'Token needs to exist');\\n require(address(_controller) != address(0), 'Controller needs to exist');\\n babltoken = _bablToken;\\n controller = _controller;\\n\\n (BABL_STRATEGIST_SHARE, BABL_STEWARD_SHARE, BABL_LP_SHARE, CREATOR_BONUS) = controller.getBABLSharing();\\n (PROFIT_STRATEGIST_SHARE, PROFIT_STEWARD_SHARE, PROFIT_LP_SHARE) = controller.getProfitSharing();\\n PROFIT_PROTOCOL_FEE = controller.protocolPerformanceFee();\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Function that adds the capital received to the total principal of the protocol per timestamp\\n * @param _capital Amount of capital in any type of asset to be normalized into DAI\\n */\\n function addProtocolPrincipal(uint256 _capital) external override onlyStrategy onlyMiningActive {\\n IStrategy strategy = IStrategy(msg.sender);\\n if (strategy.enteredAt() >= START_TIME) {\\n // onlyMiningActive control, it does not create a checkpoint if the strategy is not part of the Mining Program\\n _updateProtocolPrincipal(address(strategy), _capital, true);\\n }\\n }\\n\\n /**\\n * Function that removes the capital received to the total principal of the protocol per timestamp\\n * @param _capital Amount of capital in any type of asset to be normalized into DAI\\n */\\n function substractProtocolPrincipal(uint256 _capital) external override onlyStrategy onlyMiningActive {\\n IStrategy strategy = IStrategy(msg.sender);\\n if (strategy.enteredAt() >= START_TIME) {\\n // onlyMiningActive control, it does not create a checkpoint if the strategy is not part of the Mining Program\\n _updateProtocolPrincipal(address(strategy), _capital, false);\\n }\\n }\\n\\n /**\\n * Gets the total amount of rewards for a given strategy\\n * @param _strategy Strategy to check\\n */\\n function getStrategyRewards(address _strategy) external view override returns (uint96) {\\n IStrategy strategy = IStrategy(_strategy);\\n _require(strategy.exitedAt() != 0, Errors.STRATEGY_IS_NOT_OVER_YET);\\n IPriceOracle oracle = IPriceOracle(IBabController(controller).priceOracle());\\n uint256 pricePerTokenUnit = oracle.getPrice(IGarden(strategy.garden()).reserveAsset(), DAI);\\n uint256 allocated = strategy.capitalAllocated().preciseMul(pricePerTokenUnit);\\n uint256 returned = strategy.capitalReturned().preciseMul(pricePerTokenUnit);\\n if ((strategy.enteredAt() >= START_TIME) && (START_TIME != 0)) {\\n // We avoid gas consuming once a strategy got its BABL rewards during its finalization\\n uint256 rewards = strategy.strategyRewards();\\n if (rewards != 0) {\\n return Safe3296.safe96(rewards, 'overflow 96 bits');\\n }\\n // If the calculation was not done earlier we go for it\\n (uint256 numQuarters, uint256 startingQuarter) =\\n _getRewardsWindow(strategy.executedAt(), strategy.exitedAt());\\n uint256 bablRewards = 0;\\n if (numQuarters <= 1) {\\n bablRewards = _getStrategyRewardsOneQuarter(_strategy, allocated, startingQuarter); // Proportional supply till that moment within the same epoch\\n _require(\\n bablRewards <= protocolPerQuarter[startingQuarter].supplyPerQuarter,\\n Errors.OVERFLOW_IN_SUPPLY\\n );\\n _require(\\n allocated.mul(strategy.exitedAt().sub(strategy.executedAt())).sub(\\n strategy.rewardsTotalOverhead()\\n ) <= protocolPerQuarter[startingQuarter].quarterPower,\\n Errors.OVERFLOW_IN_POWER\\n );\\n } else {\\n bablRewards = _getStrategyRewardsSomeQuarters(_strategy, allocated, startingQuarter, numQuarters);\\n }\\n\\n // Babl rewards will be proportional to the total return (profit) with a max cap of x2\\n uint256 percentageMul = returned.preciseDiv(allocated);\\n if (percentageMul > 2e18) percentageMul = 2e18;\\n bablRewards = bablRewards.preciseMul(percentageMul);\\n return Safe3296.safe96(bablRewards, 'overflow 96 bits');\\n } else {\\n return 0;\\n }\\n }\\n\\n /**\\n * Sends BABL tokens rewards to a contributor after a claim is requested to the protocol.\\n * @param _to Address to send the tokens to\\n * @param _amount Amount of tokens to send the address to\\n */\\n function sendTokensToContributor(address _to, uint96 _amount) external override onlyMiningActive {\\n _require(controller.isSystemContract(msg.sender), Errors.NOT_A_SYSTEM_CONTRACT);\\n _safeBABLTransfer(_to, _amount);\\n }\\n\\n /**\\n * Starts BABL Rewards Mining Program from the controller.\\n */\\n function startBABLRewards() external onlyController {\\n if (START_TIME == 0) {\\n // It can only be activated once to avoid overriding START_TIME\\n START_TIME = block.timestamp;\\n }\\n }\\n\\n /**\\n * Function that set each contributor timestamp per garden\\n * @param _garden Address of the garden the contributor belongs to\\n * @param _contributor Address of the contributor\\n * @param _previousBalance Previous balance of the contributor\\n * @param _depositOrWithdraw If the timestamp is a deposit (true) or a withdraw (false)\\n * @param _pid The pid # of the Garden timestamps\\n */\\n function setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw,\\n uint256 _pid\\n ) external override onlyActiveGarden(_garden, _pid) {\\n _setContributorTimestampParams(_garden, _contributor, _previousBalance, _depositOrWithdraw);\\n }\\n\\n /**\\n * Function that set each garden timestamp\\n * @param _garden Address of the garden\\n * @param _pid The pid # of the Garden timestamp\\n */\\n function updateGardenPower(address _garden, uint256 _pid) external override onlyActiveGarden(_garden, _pid) {\\n _updateGardenPower(_garden);\\n }\\n\\n /* ========== View functions ========== */\\n\\n /**\\n * Calculates the profits and BABL that a contributor should receive from a series of finalized strategies\\n * @param _garden Garden to which the strategies and the user must belong to\\n * @param _contributor Address of the contributor to check\\n * @param _finalizedStrategies List of addresses of the finalized strategies to check\\n */\\n function getRewards(\\n address _garden,\\n address _contributor,\\n address[] calldata _finalizedStrategies\\n ) external view override returns (uint256, uint96) {\\n uint256 contributorTotalProfits = 0;\\n uint256 bablTotalRewards = 0;\\n _require(IBabController(controller).isGarden(address(_garden)), Errors.ONLY_ACTIVE_GARDEN);\\n for (uint256 i = 0; i < _finalizedStrategies.length; i++) {\\n (uint256 strategyProfits, uint256 strategyBABL) =\\n _getStrategyProfitsAndBABL(_garden, _finalizedStrategies[i], _contributor);\\n contributorTotalProfits = contributorTotalProfits.add(strategyProfits);\\n bablTotalRewards = bablTotalRewards.add(strategyBABL);\\n }\\n\\n return (contributorTotalProfits, Safe3296.safe96(bablTotalRewards, 'R28'));\\n }\\n\\n /**\\n * Gets the contributor power from one timestamp to the other\\n * @param _garden Address of the garden where the contributor belongs to\\n * @param _contributor Address if the contributor\\n * @param _from Initial timestamp\\n * @param _to End timestamp\\n * @return uint256 Contributor power during that period\\n */\\n function getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) external view override returns (uint256) {\\n return _getContributorPower(_garden, _contributor, _from, _to);\\n }\\n\\n /**\\n * Calculates the BABL rewards supply for each quarter\\n * @param _quarter Number of the epoch (quarter)\\n */\\n function tokenSupplyPerQuarter(uint256 _quarter) external pure override returns (uint96) {\\n return _tokenSupplyPerQuarter(_quarter);\\n }\\n\\n /**\\n * Check the protocol state in a certain timestamp\\n * @param time Timestamp\\n */\\n function checkProtocol(uint256 _time)\\n external\\n view\\n override\\n returns (\\n uint256 principal,\\n uint256 time,\\n uint256 quarterBelonging,\\n uint256 timeListPointer,\\n uint256 power\\n )\\n {\\n return (\\n protocolPerTimestamp[_time].principal,\\n protocolPerTimestamp[_time].time,\\n protocolPerTimestamp[_time].quarterBelonging,\\n protocolPerTimestamp[_time].timeListPointer,\\n protocolPerTimestamp[_time].power\\n );\\n }\\n\\n /**\\n * Check the quarter state for a specific quarter\\n * @param _num Number of quarter\\n */\\n function checkQuarter(uint256 _num)\\n external\\n view\\n override\\n returns (\\n uint256 quarterPrincipal,\\n uint256 quarterNumber,\\n uint256 quarterPower,\\n uint96 supplyPerQuarter\\n )\\n {\\n return (\\n protocolPerQuarter[_num].quarterPrincipal,\\n protocolPerQuarter[_num].quarterNumber,\\n protocolPerQuarter[_num].quarterPower,\\n protocolPerQuarter[_num].supplyPerQuarter\\n );\\n }\\n\\n /* ============ Internal Functions ============ */\\n /**\\n * Update the protocol principal checkpoints\\n * @param _strategy Strategy which is adding/removing principal\\n * @param _capital Capital to update\\n * @param _addOrSubstract Adding (true) or removing (false)\\n */\\n\\n function _updateProtocolPrincipal(\\n address _strategy,\\n uint256 _capital,\\n bool _addOrSubstract\\n ) internal {\\n IStrategy strategy = IStrategy(_strategy);\\n // Normalizing into DAI\\n IPriceOracle oracle = IPriceOracle(IBabController(controller).priceOracle());\\n uint256 pricePerTokenUnit = oracle.getPrice(IGarden(strategy.garden()).reserveAsset(), DAI);\\n _capital = _capital.preciseMul(pricePerTokenUnit);\\n ProtocolPerTimestamp storage protocolCheckpoint = protocolPerTimestamp[block.timestamp];\\n if (_addOrSubstract == false) {\\n // Substract\\n protocolPrincipal = protocolPrincipal.sub(_capital);\\n } else {\\n protocolPrincipal = protocolPrincipal.add(_capital);\\n }\\n protocolCheckpoint.principal = protocolPrincipal;\\n protocolCheckpoint.time = block.timestamp;\\n protocolCheckpoint.quarterBelonging = _getQuarter(block.timestamp);\\n protocolCheckpoint.timeListPointer = pid;\\n if (pid == 0) {\\n // The very first strategy of all strategies in the mining program\\n protocolCheckpoint.power = 0;\\n } else {\\n // Any other strategy different from the very first one (will have an antecesor)\\n protocolCheckpoint.power = protocolPerTimestamp[timeList[pid.sub(1)]].power.add(\\n protocolCheckpoint.time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time).mul(\\n protocolPerTimestamp[timeList[pid.sub(1)]].principal\\n )\\n );\\n }\\n timeList.push(block.timestamp); // Register of added strategies timestamps in the array for iteration\\n // Here we control the accumulated protocol power per each quarter\\n // Create the quarter checkpoint in case the checkpoint is the first in the epoch\\n _addProtocolPerQuarter(block.timestamp);\\n // We update the rewards overhead if any in normalized DAI\\n _updatePowerOverhead(strategy, _capital);\\n pid++;\\n }\\n\\n /**\\n * Get the rewards for a specific contributor activately contributing in strategies of a specific garden\\n * @param _garden Garden address responsible of the strategies to calculate rewards\\n * @param _strategy Strategy address\\n * @param _contributor Contributor address\\n */\\n function _getStrategyProfitsAndBABL(\\n address _garden,\\n address _strategy,\\n address _contributor\\n ) private view returns (uint256, uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n _require(address(strategy.garden()) == _garden, Errors.STRATEGY_GARDEN_MISMATCH);\\n _require(IGarden(_garden).isGardenStrategy(_strategy), Errors.STRATEGY_GARDEN_MISMATCH);\\n uint256 contributorProfits = 0;\\n uint256 contributorBABL = 0;\\n // We get the state of the strategy in terms of profit and distance from expected to accurately calculate profits and rewards\\n (bool profit, uint256 profitValue, bool distance, uint256 distanceValue) =\\n _getStrategyRewardsContext(address(strategy));\\n\\n (, uint256 initialDepositAt, uint256 claimedAt, , , ) = IGarden(_garden).getContributor(_contributor);\\n // Positive strategies not yet claimed\\n if (\\n strategy.exitedAt() > claimedAt &&\\n strategy.executedAt() >= initialDepositAt &&\\n address(strategy.garden()) == _garden\\n ) {\\n uint256 contributorPower =\\n _getContributorPower(address(_garden), _contributor, strategy.executedAt(), strategy.exitedAt());\\n // If strategy returned money we give out the profits\\n if (profit == true) {\\n // We reserve 5% of profits for performance fees\\n profitValue = profitValue.sub(profitValue.multiplyDecimal(PROFIT_PROTOCOL_FEE));\\n }\\n // Get strategist rewards in case the contributor is also the strategist of the strategy\\n contributorBABL = contributorBABL.add(\\n _getStrategyStrategistBabl(\\n address(strategy),\\n _contributor,\\n profit,\\n profitValue,\\n distance,\\n distanceValue\\n )\\n );\\n\\n contributorProfits = contributorProfits.add(\\n _getStrategyStrategistProfits(address(strategy), _contributor, profit, profitValue)\\n );\\n\\n // Get steward rewards\\n contributorBABL = contributorBABL.add(\\n _getStrategyStewardBabl(address(strategy), _contributor, profit, profitValue, distance, distanceValue)\\n );\\n\\n contributorProfits = contributorProfits.add(\\n _getStrategyStewardProfits(\\n address(strategy),\\n _contributor,\\n profit,\\n profitValue,\\n distance,\\n distanceValue\\n )\\n );\\n\\n // Get LP rewards\\n\\n contributorBABL = contributorBABL.add(\\n uint256(strategy.strategyRewards()).multiplyDecimal(BABL_LP_SHARE).preciseMul(\\n contributorPower.preciseDiv(strategy.capitalAllocated())\\n )\\n );\\n\\n // Get a multiplier bonus in case the contributor is the garden creator\\n if (_contributor == IGarden(_garden).creator()) {\\n contributorBABL = contributorBABL.add(contributorBABL.multiplyDecimal(CREATOR_BONUS));\\n }\\n }\\n return (contributorProfits, contributorBABL);\\n }\\n\\n /**\\n * Get the context of a specific address depending on their expected returns, capital allocated and capital returned\\n * @param _strategy Strategy address\\n */\\n function _getStrategyRewardsContext(address _strategy)\\n private\\n view\\n returns (\\n bool,\\n uint256,\\n bool,\\n uint256\\n )\\n {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 returned = strategy.capitalReturned();\\n uint256 expected =\\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\\n uint256 allocated = strategy.capitalAllocated();\\n bool profit;\\n bool distance;\\n uint256 profitValue;\\n uint256 distanceValue;\\n if (returned > allocated && returned >= expected) {\\n // The strategy went equal or above expectations\\n profit = true; // positive\\n distance = true; // positive\\n profitValue = returned.sub(allocated);\\n distanceValue = returned.sub(expected);\\n } else if (returned >= allocated && returned < expected) {\\n // The strategy went worse than expected but with some profits\\n profit = true; // positive or zero profits\\n distance = false; // negative vs expected return (got less than expected)\\n profitValue = returned.sub(allocated);\\n distanceValue = expected.sub(returned);\\n } else if (returned < allocated && returned < expected) {\\n // Negative profits - bad investments has penalties\\n profit = false; // negative - loosing capital\\n distance = false; // negative vs expected return (got less than expected)\\n profitValue = allocated.sub(returned); // Negative number, there were no profits at all\\n distanceValue = expected.sub(returned);\\n }\\n\\n return (profit, profitValue, distance, distanceValue);\\n }\\n\\n /**\\n * Get the BABL rewards (Mining program) for a Steward profile\\n * @param _strategy Strategy address\\n * @param _contributor Contributor address\\n * @param _profit Whether or not the strategy had profits\\n * @param _distance If true the results were above expected returns, false means opposite\\n * @param _distanceValue The distance from/to expected returns for capital returned\\n */\\n function _getStrategyStewardBabl(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256, /* _profitValue */\\n bool _distance,\\n uint256 _distanceValue\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 strategyRewards = strategy.strategyRewards();\\n int256 userVotes = strategy.getUserVotes(_contributor);\\n uint256 bablCap;\\n uint256 expected =\\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\\n\\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\\n uint256 babl = 0;\\n if (userVotes > 0 && _profit == true && _distance == true) {\\n // Voting in favor of the execution of the strategy with profits and positive distance\\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\\n uint256(userVotes).preciseDiv(strategy.totalPositiveVotes())\\n );\\n } else if (userVotes > 0 && _profit == true && _distance == false) {\\n // Voting in favor positive profits but below expected return\\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\\n uint256(userVotes).preciseDiv(strategy.totalPositiveVotes())\\n );\\n babl = babl.sub(babl.preciseMul(_distanceValue.preciseDiv(expected))); // We discount the error of expected return vs real returns\\n } else if (userVotes > 0 && _profit == false) {\\n // Voting in favor of a non profitable strategy get nothing\\n babl = 0;\\n } else if (userVotes < 0 && _distance == false) {\\n // Voting against a strategy that got results below expected return provides rewards to the voter (helping the protocol to only have good strategies)\\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\\n uint256(Math.abs(userVotes)).preciseDiv(strategy.totalNegativeVotes())\\n );\\n\\n bablCap = babl.mul(2); // Max cap\\n babl = babl.add(babl.preciseMul(_distanceValue.preciseDiv(expected))); // We add a bonus inverse to the error of expected return vs real returns\\n\\n if (babl > bablCap) babl = bablCap; // We limit 2x by a Cap\\n } else if (userVotes < 0 && _distance == true) {\\n babl = 0;\\n }\\n return babl;\\n }\\n\\n /**\\n * Get the rewards for a Steward profile\\n * @param _strategy Strategy address\\n * @param _contributor Contributor address\\n * @param _profit Whether or not the strategy had profits\\n * @param _profitValue The value of profits\\n * @param _distance If true the results were above expected returns, false means opposite\\n */\\n function _getStrategyStewardProfits(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256 _profitValue,\\n bool _distance,\\n uint256 /* _distanceValue */\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\\n uint256 profits = 0;\\n int256 userVotes = strategy.getUserVotes(_contributor);\\n if (_profit == true) {\\n if (userVotes > 0) {\\n profits = _profitValue.multiplyDecimal(PROFIT_STEWARD_SHARE).preciseMul(uint256(userVotes)).preciseDiv(\\n strategy.totalPositiveVotes()\\n );\\n } else if ((userVotes < 0) && _distance == false) {\\n profits = _profitValue\\n .multiplyDecimal(PROFIT_STEWARD_SHARE)\\n .preciseMul(uint256(Math.abs(userVotes)))\\n .preciseDiv(strategy.totalNegativeVotes());\\n } else if ((userVotes < 0) && _distance == true) {\\n // Voted against a very profit strategy above expected returns, get no profit at all\\n profits = 0;\\n }\\n } else profits = 0; // No profits at all\\n\\n return profits;\\n }\\n\\n /**\\n * Get the BABL rewards (Mining program) for a Strategist profile\\n * @param _strategy Strategy address\\n * @param _contributor Contributor address\\n * @param _profit Whether or not the strategy had profits\\n * @param _distance If true the results were above expected returns, false means opposite\\n */\\n function _getStrategyStrategistBabl(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256, /* _profitValue */\\n bool _distance,\\n uint256 /* _distanceValue */\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 strategyRewards = strategy.strategyRewards();\\n uint256 babl;\\n uint256 bablCap;\\n uint256 expected =\\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\\n if (strategy.strategist() == _contributor) {\\n babl = strategyRewards.multiplyDecimal(BABL_STRATEGIST_SHARE); // Standard calculation to be ponderated\\n if (_profit == true && _distance == true) {\\n // Strategy with equal or higher profits than expected\\n bablCap = babl.mul(2); // Max cap\\n // The more the results are close to the expected the more bonus will get (limited by a x2 cap)\\n babl = babl.add(babl.preciseMul(expected.preciseDiv(strategy.capitalReturned())));\\n if (babl > bablCap) babl = bablCap; // We limit 2x by a Cap\\n } else if (_profit == true && _distance == false) {\\n //under expectations\\n // The more the results are close to the expected the less penalization it might have\\n babl = babl.sub(babl.sub(babl.preciseMul(strategy.capitalReturned().preciseDiv(expected))));\\n } else {\\n // No positive profit\\n return 0;\\n }\\n } else {\\n return 0;\\n }\\n return babl;\\n }\\n\\n /**\\n * Get the rewards for a Strategist profile\\n * @param _strategy Strategy address\\n * @param _contributor Contributor address\\n * @param _profit Whether or not the strategy had profits\\n * @param _profitValue The value of profits\\n */\\n function _getStrategyStrategistProfits(\\n address _strategy,\\n address _contributor,\\n bool _profit,\\n uint256 _profitValue\\n ) private view returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\\n uint256 profits;\\n if (_profit == true) {\\n if (strategy.strategist() == _contributor) {\\n // If the contributor was the strategist of the strategy\\n profits = _profitValue.multiplyDecimal(PROFIT_STRATEGIST_SHARE);\\n }\\n } else profits = 0; // No profits at all\\n\\n return profits;\\n }\\n\\n /**\\n * Add protocol power timestamps for each quarter\\n * @param _time Timestamp\\n */\\n function _addProtocolPerQuarter(uint256 _time) private onlyMiningActive {\\n ProtocolPerQuarter storage protocolCheckpoint = protocolPerQuarter[_getQuarter(_time)];\\n\\n if (!isProtocolPerQuarter[_getQuarter(_time).sub(1)]) {\\n // The quarter is not yet initialized then we create it\\n protocolCheckpoint.quarterNumber = _getQuarter(_time);\\n if (pid == 0) {\\n // The first strategy added in the first epoch\\n protocolCheckpoint.quarterPower = 0;\\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\\n } else {\\n // Each time a new epoch starts with either a new strategy execution or finalization\\n // We just take the proportional power for this quarter from previous checkpoint\\n uint256 powerToSplit =\\n protocolPerTimestamp[_time].power.sub(protocolPerTimestamp[timeList[pid.sub(1)]].power);\\n if (protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging == _getQuarter(_time).sub(1)) {\\n // There were no intermediate epochs without checkpoints\\n // We re-initialize the protocol power counting for this new quarter\\n protocolCheckpoint.quarterPower = powerToSplit\\n .mul(_time.sub(START_TIME.add(_getQuarter(_time).mul(EPOCH_DURATION).sub(EPOCH_DURATION))))\\n .div(_time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time));\\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\\n\\n protocolPerQuarter[_getQuarter(_time).sub(1)].quarterPower = protocolPerQuarter[\\n _getQuarter(_time).sub(1)\\n ]\\n .quarterPower\\n .add(powerToSplit.sub(protocolCheckpoint.quarterPower));\\n } else {\\n // There were intermediate epochs without checkpoints - we need to create their protocolPerQuarter's and update the last one\\n // We have to update all the quarters including where the previous checkpoint is and the one were we are now\\n for (\\n uint256 i = 0;\\n i <= _getQuarter(_time).sub(protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging);\\n i++\\n ) {\\n ProtocolPerQuarter storage newCheckpoint =\\n protocolPerQuarter[protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i)];\\n uint256 slotEnding =\\n START_TIME.add(\\n protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i).mul(EPOCH_DURATION)\\n );\\n if (i == 0) {\\n // We are in the first quarter to update, we add the corresponding part\\n\\n newCheckpoint.quarterPower = newCheckpoint.quarterPower.add(\\n powerToSplit.mul(slotEnding.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)).div(\\n _time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)\\n )\\n );\\n newCheckpoint.quarterPrincipal = protocolPerTimestamp[timeList[pid.sub(1)]].principal;\\n } else if (\\n i < _getQuarter(_time).sub(protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging)\\n ) {\\n // We are in an intermediate quarter\\n newCheckpoint.quarterPower = powerToSplit.mul(EPOCH_DURATION).div(\\n _time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)\\n );\\n newCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(\\n protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i)\\n );\\n newCheckpoint.quarterNumber = protocolPerTimestamp[timeList[pid.sub(1)]]\\n .quarterBelonging\\n .add(i);\\n newCheckpoint.quarterPrincipal = protocolPerTimestamp[timeList[pid.sub(1)]].principal;\\n } else {\\n // We are in the last quarter of the strategy\\n protocolCheckpoint.quarterPower = powerToSplit\\n .mul(\\n _time.sub(START_TIME.add(_getQuarter(_time).mul(EPOCH_DURATION).sub(EPOCH_DURATION)))\\n )\\n .div(_time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time));\\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\\n protocolCheckpoint.quarterNumber = _getQuarter(_time);\\n protocolCheckpoint.quarterPrincipal = protocolPrincipal;\\n }\\n }\\n }\\n }\\n isProtocolPerQuarter[_getQuarter(_time).sub(1)] = true;\\n } else {\\n // Quarter checkpoint already created, it must have been filled with general info\\n // We update the power of the quarter by adding the new difference between last quarter checkpoint and this checkpoint\\n protocolCheckpoint.quarterPower = protocolCheckpoint.quarterPower.add(\\n protocolPerTimestamp[_time].power.sub(protocolPerTimestamp[timeList[pid.sub(1)]].power)\\n );\\n }\\n protocolCheckpoint.quarterPrincipal = protocolPrincipal;\\n }\\n\\n /**\\n * Updates the strategy power overhead for rewards calculations of each strategy out of the whole protocol\\n * @param _strategy Strategy\\n * @param _capital New capital normalized in DAI\\n */\\n function _updatePowerOverhead(IStrategy _strategy, uint256 _capital) private onlyMiningActive {\\n if (_strategy.updatedAt() != 0) {\\n // There will be overhead after the first execution not before\\n if (_getQuarter(block.timestamp) == _getQuarter(_strategy.updatedAt())) {\\n // The overhead will remain within the same epoch\\n rewardsPowerOverhead[address(_strategy)][_getQuarter(block.timestamp)] = rewardsPowerOverhead[\\n address(_strategy)\\n ][_getQuarter(block.timestamp)]\\n .add(_capital.mul(block.timestamp.sub(_strategy.updatedAt())));\\n } else {\\n // We need to iterate since last update of the strategy capital\\n (uint256 numQuarters, uint256 startingQuarter) =\\n _getRewardsWindow(_strategy.updatedAt(), block.timestamp);\\n uint256 overheadPerQuarter = _capital.mul(block.timestamp.sub(_strategy.updatedAt())).div(numQuarters);\\n for (uint256 i = 0; i <= numQuarters.sub(1); i++) {\\n rewardsPowerOverhead[address(_strategy)][startingQuarter.add(i)] = rewardsPowerOverhead[\\n address(_strategy)\\n ][startingQuarter.add(i)]\\n .add(overheadPerQuarter);\\n }\\n }\\n }\\n }\\n\\n /**\\n * Check the strategy rewards for strategies starting and ending in the same quarter\\n * @param _strategy Strategy\\n * @param _startingQuarter Starting quarter\\n */\\n function _getStrategyRewardsOneQuarter(\\n address _strategy,\\n uint256 _allocated,\\n uint256 _startingQuarter\\n ) private view onlyMiningActive returns (uint256) {\\n IStrategy strategy = IStrategy(_strategy);\\n uint256 strategyOverTime =\\n _allocated.mul(strategy.exitedAt().sub(strategy.executedAt())).sub(strategy.rewardsTotalOverhead());\\n return\\n strategyOverTime\\n .preciseDiv(protocolPerQuarter[_startingQuarter].quarterPower)\\n .preciseMul(uint256(protocolPerQuarter[_startingQuarter].supplyPerQuarter))\\n .mul(strategy.exitedAt().sub(_startingQuarter))\\n .div(block.timestamp.sub(_startingQuarter));\\n }\\n\\n /**\\n * Check the strategy rewards for strategies starting and ending in different quarters and/or more quarters\\n * @param _strategy Strategy\\n * @param _allocated Normalized allocated in DAI\\n * @param _startingQuarter Starting quarter\\n * @param _numQuarters Num of Quarters (in epochs)\\n */\\n function _getStrategyRewardsSomeQuarters(\\n address _strategy,\\n uint256 _allocated,\\n uint256 _startingQuarter,\\n uint256 _numQuarters\\n ) private view onlyMiningActive returns (uint256) {\\n // The strategy takes longer than one quarter / epoch\\n uint256 bablRewards;\\n for (uint256 i = 0; i <= _numQuarters.sub(1); i++) {\\n uint256 slotEnding = START_TIME.add(_startingQuarter.add(i).mul(EPOCH_DURATION)); // Initialization timestamp at the end of the first slot where the strategy starts its execution\\n uint256 powerRatioInQuarter =\\n _getStrategyRewardsPerQuarter(_strategy, _allocated, _startingQuarter, i, slotEnding);\\n bablRewards = bablRewards.add(powerRatioInQuarter);\\n }\\n return bablRewards;\\n }\\n\\n /**\\n * Check the strategy rewards for a specific quarter when strategies starting and ending in different quarters and/or more quarters\\n * @param _strategy Strategy\\n * @param _allocated Normalized allocated in DAI\\n * @param _startingQuarter Starting quarter\\n * @param _id Epoch number\\n * @param _slotEnding Ending slot timestamp of current slot (epoch)\\n */\\n function _getStrategyRewardsPerQuarter(\\n address _strategy,\\n uint256 _allocated,\\n uint256 _startingQuarter,\\n uint256 _id,\\n uint256 _slotEnding\\n ) private view onlyMiningActive returns (uint256) {\\n // The strategy takes longer than one quarter / epoch\\n // We need to calculate the strategy vs. protocol power ratio per each quarter\\n uint256 strategyPower; // Strategy power in each Epoch\\n uint256 protocolPower; // Protocol power in each Epoch\\n\\n // We iterate all the quarters where the strategy was active\\n uint256 percentage = 1e18;\\n if (IStrategy(_strategy).executedAt().add(EPOCH_DURATION) > _slotEnding) {\\n // We are in the first quarter of the strategy\\n\\n strategyPower = _allocated.mul(_slotEnding.sub(IStrategy(_strategy).executedAt())).sub(\\n rewardsPowerOverhead[address(_strategy)][_getQuarter(IStrategy(_strategy).executedAt())]\\n );\\n } else if (\\n IStrategy(_strategy).executedAt() < _slotEnding.sub(EPOCH_DURATION) &&\\n _slotEnding < IStrategy(_strategy).exitedAt()\\n ) {\\n // We are in an intermediate quarter different from starting or ending quarters\\n strategyPower = _allocated.mul(_slotEnding.sub(_slotEnding.sub(EPOCH_DURATION))).sub(\\n rewardsPowerOverhead[address(_strategy)][_getQuarter(_slotEnding.sub(45 days))]\\n );\\n } else {\\n // We are in the last quarter of the strategy\\n percentage = block.timestamp.sub(_slotEnding.sub(EPOCH_DURATION)).preciseDiv(\\n _slotEnding.sub(_slotEnding.sub(EPOCH_DURATION))\\n );\\n\\n strategyPower = _allocated.mul(IStrategy(_strategy).exitedAt().sub(_slotEnding.sub(EPOCH_DURATION))).sub(\\n rewardsPowerOverhead[address(_strategy)][_getQuarter(IStrategy(_strategy).exitedAt())]\\n );\\n }\\n protocolPower = protocolPerQuarter[_startingQuarter.add(_id)].quarterPower;\\n\\n _require(strategyPower <= protocolPower, Errors.OVERFLOW_IN_POWER);\\n\\n return\\n strategyPower\\n .preciseDiv(protocolPower)\\n .preciseMul(uint256(protocolPerQuarter[_startingQuarter.add(_id)].supplyPerQuarter))\\n .preciseMul(percentage);\\n }\\n\\n /**\\n * Safe BABL rewards (Mining program) token transfer.\\n * It handle cases when in case of rounding errors, RewardsDistributor might not have enough BABL.\\n * @param _to The receiver address of the contributor to send\\n * @param _amount The amount of BABL tokens to be rewarded during this claim\\n */\\n function _safeBABLTransfer(address _to, uint96 _amount) private onlyMiningActive {\\n uint256 bablBal = babltoken.balanceOf(address(this));\\n if (_amount > bablBal) {\\n SafeERC20.safeTransfer(babltoken, _to, bablBal);\\n } else {\\n SafeERC20.safeTransfer(babltoken, _to, _amount);\\n }\\n }\\n\\n /**\\n * Gets the contributor power from a timestamp to a specific timestamp within a garden\\n * @param _garden Address of the garden\\n * @param _contributor Address if the contributor\\n * @param _from Initial timestamp\\n * @param _to End timestamp\\n * @return uint256 Contributor power during that period\\n */\\n function _getContributorPower(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) private view returns (uint256) {\\n // Out of bounds\\n _require(_to >= IGarden(_garden).gardenInitializedAt() && _to >= _from, Errors.CONTRIBUTOR_POWER_CHECK_WINDOW);\\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][address(_contributor)];\\n Checkpoints memory powerCheckpoints = checkpoints[address(_garden)][address(_contributor)];\\n\\n if (contributor.initialDepositAt == 0 || contributor.initialDepositAt > _to) {\\n return 0;\\n } else {\\n if (_from <= IGarden(_garden).gardenInitializedAt()) {\\n // Avoid division by zero in case of _from parameter is not passed\\n _from = IGarden(_garden).gardenInitializedAt();\\n }\\n // Find closest point to _from and _to either contributor and garden checkpoints at their left\\n (powerCheckpoints.fromDepositAt, powerCheckpoints.lastDepositAt) = _locateCheckpointsContributor(\\n _garden,\\n _contributor,\\n _from,\\n _to\\n );\\n (powerCheckpoints.gardenFromDepositAt, powerCheckpoints.gardenLastDepositAt) = _locateCheckpointsGarden(\\n _garden,\\n _from,\\n _to\\n );\\n\\n // origin must be less than end window\\n _require(\\n powerCheckpoints.fromDepositAt <= powerCheckpoints.lastDepositAt &&\\n powerCheckpoints.gardenFromDepositAt <= powerCheckpoints.gardenLastDepositAt,\\n Errors.CONTRIBUTOR_POWER_CHECK_DEPOSITS\\n );\\n uint256 contributorPower;\\n uint256 gardenPower;\\n\\n // \\\"FROM power calculations\\\" PART\\n // Avoid underflows\\n\\n if (_from < powerCheckpoints.fromDepositAt) {\\n // Contributor still has no power but _from is later than the start of the garden\\n contributorPower = 0;\\n } else if (_from > powerCheckpoints.fromDepositAt) {\\n contributorPower = contributor.tsContributions[powerCheckpoints.fromDepositAt].power.add(\\n (_from.sub(powerCheckpoints.fromDepositAt)).mul(\\n contributor.tsContributions[powerCheckpoints.fromDepositAt].supply\\n )\\n );\\n } else {\\n // _from == fromDepositAt\\n contributorPower = contributor.tsContributions[powerCheckpoints.fromDepositAt].power;\\n }\\n gardenPower = gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenFromDepositAt].power.add(\\n (_from.sub(powerCheckpoints.gardenFromDepositAt)).mul(\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenFromDepositAt].supply\\n )\\n );\\n // \\\"TO power calculations\\\" PART\\n // We go for accurate power calculations avoiding overflows\\n // contributor power overflow\\n _require(contributorPower <= gardenPower, Errors.CONTRIBUTOR_POWER_OVERFLOW);\\n if (_from == _to) {\\n // Requested a specific checkpoint calculation (no slot)\\n if (gardenPower == 0) {\\n return 0;\\n } else {\\n return contributorPower.preciseDiv(gardenPower);\\n }\\n // Not a checkpoint anymore but a slot\\n } else if (_to < powerCheckpoints.lastDepositAt) {\\n // contributor has not deposited yet\\n return 0;\\n } else if (\\n _to == powerCheckpoints.lastDepositAt &&\\n powerCheckpoints.fromDepositAt == powerCheckpoints.lastDepositAt\\n ) {\\n // no more contributor checkpoints in the slot\\n gardenPower = (\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].power.add(\\n (_to.sub(powerCheckpoints.gardenLastDepositAt)).mul(\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].supply\\n )\\n )\\n )\\n .sub(gardenPower);\\n _require(contributorPower <= gardenPower, Errors.CONTRIBUTOR_POWER_OVERFLOW);\\n return contributorPower.preciseDiv(gardenPower);\\n } else {\\n contributorPower = (\\n contributor.tsContributions[powerCheckpoints.lastDepositAt].power.add(\\n (_to.sub(powerCheckpoints.lastDepositAt)).mul(\\n contributor.tsContributions[powerCheckpoints.lastDepositAt].supply\\n )\\n )\\n )\\n .sub(contributorPower);\\n\\n gardenPower = (\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].power.add(\\n (_to.sub(powerCheckpoints.gardenLastDepositAt)).mul(\\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].supply\\n )\\n )\\n )\\n .sub(gardenPower);\\n _require(contributorPower <= gardenPower, Errors.CONTRIBUTOR_POWER_OVERFLOW);\\n\\n return contributorPower.preciseDiv(gardenPower);\\n }\\n }\\n }\\n\\n /**\\n * Gets the earlier and closest (deposit/withdrawal) checkpoints of a contributor in a specific range\\n * @param _garden Address of the garden\\n * @param _contributor Address if the contributor\\n * @param _from Initial timestamp\\n * @param _to End timestamp\\n * @return uint256 Contributor power during that period\\n */\\n function _locateCheckpointsContributor(\\n address _garden,\\n address _contributor,\\n uint256 _from,\\n uint256 _to\\n ) private view returns (uint256, uint256) {\\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][address(_contributor)];\\n\\n uint256 lastDepositAt = contributor.timeListPointer[contributor.timeListPointer.length.sub(1)]; // Initialized with lastDeposit\\n uint256 fromDepositAt = contributor.timeListPointer[0]; // Initialized with initialDeposit\\n\\n if (lastDepositAt > _to || fromDepositAt < _from) {\\n // We go to find the closest deposits of the contributor to _from and _to\\n for (uint256 i = 0; i <= contributor.timeListPointer.length.sub(1); i++) {\\n if (contributor.timeListPointer[i] <= _to) {\\n lastDepositAt = contributor.timeListPointer[i];\\n }\\n if (contributor.timeListPointer[i] <= _from) {\\n fromDepositAt = contributor.timeListPointer[i];\\n }\\n }\\n }\\n return (fromDepositAt, lastDepositAt);\\n }\\n\\n /**\\n * Gets the earlier and closest (deposit/withdrawal) checkpoints of a garden in a specific range\\n * @param _garden Address of the garden\\n * @param _from Initial timestamp\\n * @param _to End timestamp\\n * @return uint256 Contributor power during that period\\n */\\n function _locateCheckpointsGarden(\\n address _garden,\\n uint256 _from,\\n uint256 _to\\n ) private view returns (uint256, uint256) {\\n uint256 gardenLastCheckpoint = gardenTimelist[address(_garden)].length.sub(1);\\n uint256 gardenLastDepositAt = gardenTimelist[address(_garden)][gardenLastCheckpoint]; // Initialized to the last garden checkpoint\\n uint256 gardenFromDepositAt = gardenTimelist[address(_garden)][0]; // Initialized to the first garden checkpoint\\n\\n if (gardenLastDepositAt > _to || gardenFromDepositAt < _from) {\\n // We go for the closest timestamp of garden to _to and _from\\n for (uint256 i = 0; i <= gardenLastCheckpoint; i++) {\\n uint256 gardenTime = gardenTimelist[address(_garden)][i];\\n if (gardenTime <= _to) {\\n gardenLastDepositAt = gardenTime;\\n }\\n if (gardenTime <= _from) {\\n gardenFromDepositAt = gardenTime;\\n }\\n }\\n }\\n return (gardenFromDepositAt, gardenLastDepositAt);\\n }\\n\\n /**\\n * Function that keeps checkpoints of the garden power (deposits and withdrawals) per timestamp\\n * @param _garden Garden address\\n */\\n function _updateGardenPower(address _garden) private {\\n IGarden garden = IGarden(_garden);\\n GardenPowerByTimestamp storage gardenTimestamp = gardenPowerByTimestamp[address(garden)][block.timestamp];\\n gardenTimestamp.supply = IERC20(address(IGarden(_garden))).totalSupply();\\n\\n gardenTimestamp.timestamp = block.timestamp;\\n\\n if (gardenPid[address(_garden)] == 0) {\\n // The very first deposit of all contributors in the mining program\\n gardenTimestamp.power = 0;\\n } else {\\n // Any other deposit different from the very first one (will have an antecesor)\\n gardenTimestamp.power = gardenPowerByTimestamp[address(garden)][\\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\\n ]\\n .power\\n .add(\\n gardenTimestamp\\n .timestamp\\n .sub(\\n gardenPowerByTimestamp[address(garden)][\\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\\n ]\\n .timestamp\\n )\\n .mul(\\n gardenPowerByTimestamp[address(garden)][\\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\\n ]\\n .supply\\n )\\n );\\n }\\n\\n gardenTimelist[address(garden)].push(block.timestamp); // Register of deposit timestamps in the array for iteration\\n gardenPid[address(garden)]++;\\n }\\n\\n /**\\n * Updates contributor timestamps params\\n * @param _garden Garden address\\n * @param _contributor Contributor address\\n * @param _previousBalance Previous balance\\n * @param _depositOrWithdraw Whether it is a deposit or a withdraw\\n */\\n function _setContributorTimestampParams(\\n address _garden,\\n address _contributor,\\n uint256 _previousBalance,\\n bool _depositOrWithdraw\\n ) private {\\n // We make checkpoints around contributor deposits to avoid fast loans and give the right rewards afterwards\\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][_contributor];\\n\\n contributor.tsContributions[block.timestamp].supply = IERC20(address(IGarden(_garden))).balanceOf(\\n address(_contributor)\\n );\\n\\n contributor.tsContributions[block.timestamp].timestamp = block.timestamp;\\n\\n contributor.tsContributions[block.timestamp].timePointer = contributor.pid;\\n\\n if (contributor.pid == 0) {\\n // The very first deposit\\n contributor.tsContributions[block.timestamp].power = 0;\\n } else {\\n // Any other deposits or withdrawals different from the very first one (will have an antecesor)\\n contributor.tsContributions[block.timestamp].power = contributor.tsContributions[contributor.lastDepositAt]\\n .power\\n .add(\\n (block.timestamp.sub(contributor.lastDepositAt)).mul(\\n contributor.tsContributions[contributor.lastDepositAt].supply\\n )\\n );\\n }\\n if (_depositOrWithdraw == true) {\\n // Deposit\\n if (_previousBalance == 0 || contributor.initialDepositAt == 0) {\\n contributor.initialDepositAt = block.timestamp;\\n }\\n contributor.lastDepositAt = block.timestamp;\\n } else {\\n // Withdrawals\\n if (IERC20(address(IGarden(_garden))).balanceOf(address(_contributor)) == 0) {\\n contributor.lastDepositAt = 0;\\n contributor.initialDepositAt = 0;\\n delete contributor.timeListPointer;\\n }\\n }\\n\\n contributor.timeListPointer.push(block.timestamp);\\n contributor.pid++;\\n }\\n\\n /**\\n * Calculates the BABL rewards supply for each quarter\\n * @param _quarter Number of the epoch (quarter)\\n */\\n function _tokenSupplyPerQuarter(uint256 _quarter) internal pure returns (uint96) {\\n _require(_quarter >= 1, Errors.QUARTERS_MIN_1);\\n if (_quarter >= 513) {\\n return 0;\\n } else {\\n uint256 firstFactor = (SafeDecimalMath.unit().add(DECAY_RATE)).powDecimal(_quarter.sub(1));\\n uint256 supplyForQuarter = Q1_REWARDS.divideDecimal(firstFactor);\\n return Safe3296.safe96(supplyForQuarter, 'overflow 96 bits');\\n }\\n }\\n\\n /**\\n * Calculates the quarter number for a specific time since START_TIME\\n * @param _now Timestamp to calculate its quarter\\n */\\n function _getQuarter(uint256 _now) internal view returns (uint256) {\\n uint256 quarter = (_now.sub(START_TIME).preciseDivCeil(EPOCH_DURATION)).div(1e18);\\n return quarter.add(1);\\n }\\n\\n /**\\n * Calculates the range (starting quarter and ending quarter since START_TIME)\\n * @param _from Starting timestamp\\n * @param _to Ending timestamp\\n */\\n function _getRewardsWindow(uint256 _from, uint256 _to) internal view returns (uint256, uint256) {\\n uint256 quarters = (_to.sub(_from).preciseDivCeil(EPOCH_DURATION)).div(1e18);\\n uint256 startingQuarter = (_from.sub(START_TIME).preciseDivCeil(EPOCH_DURATION)).div(1e18);\\n return (quarters.add(1), startingQuarter.add(1));\\n }\\n}\\n\",\"keccak256\":\"0xfc441c92c5baa279ff5037f9c7649f501a244641d504b90fd8c64c25aac755b6\",\"license\":\"Apache License\"},\"contracts/token/TimeLockRegistry.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\npragma experimental ABIEncoderV2;\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\nimport {TimeLockedToken} from './TimeLockedToken.sol';\\nimport {AddressArrayUtils} from '../lib/AddressArrayUtils.sol';\\n\\n/**\\n * @title TimeLockRegistry\\n * @notice Register Lockups for TimeLocked ERC20 Token BABL (e.g. vesting)\\n * @author Babylon Finance\\n * @dev This contract allows owner to register distributions for a TimeLockedToken\\n *\\n * To register a distribution, register method should be called by the owner.\\n * claim() should be called only by the BABL Token smartcontract (modifier onlyBABLToken)\\n * when any account registered to receive tokens make its own claim\\n * If case of a mistake, owner can cancel registration before the claim is done by the account\\n *\\n * Note this contract address must be setup in the TimeLockedToken's contract pointing\\n * to interact with (e.g. setTimeLockRegistry() function)\\n */\\n\\ncontract TimeLockRegistry is Ownable {\\n using SafeMath for uint256;\\n using Address for address;\\n using AddressArrayUtils for address[];\\n\\n /* ============ Events ============ */\\n\\n event Register(address receiver, uint256 distribution);\\n event Cancel(address receiver, uint256 distribution);\\n event Claim(address account, uint256 distribution);\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlyBABLToken() {\\n require(msg.sender == address(token), 'only BABL Token');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // time locked token\\n TimeLockedToken public token;\\n\\n /**\\n * @notice The profile of each token owner under vesting conditions and its special conditions\\n * @param receiver Account being registered\\n * @param investorType Indicates whether or not is a Team member (true = team member / advisor, false = private investor)\\n * @param vestingStarting Date When the vesting begins for such token owner\\n * @param distribution Tokens amount that receiver is due to get\\n */\\n struct Registration {\\n address receiver;\\n uint256 distribution;\\n bool investorType;\\n uint256 vestingStartingDate;\\n }\\n\\n /**\\n * @notice The profile of each token owner under vesting conditions and its special conditions\\n * @param team Indicates whether or not is a Team member (true = team member / advisor, false = private investor)\\n * @param vestingBegin When the vesting begins for such token owner\\n * @param vestingEnd When the vesting ends for such token owner\\n * @param lastClaim When the last claim was done\\n */\\n struct TokenVested {\\n bool team;\\n bool cliff;\\n uint256 vestingBegin;\\n uint256 vestingEnd;\\n uint256 lastClaim;\\n }\\n\\n /// @notice A record of token owners under vesting conditions for each account, by index\\n mapping(address => TokenVested) public tokenVested;\\n\\n // mapping from token owners under vesting conditions to BABL due amount (e.g. SAFT addresses, team members, advisors)\\n mapping(address => uint256) public registeredDistributions;\\n\\n // array of all registrations\\n address[] public registrations;\\n\\n // total amount of tokens registered\\n uint256 public totalTokens;\\n\\n // vesting for Team Members\\n uint256 private teamVesting = 365 days * 4;\\n\\n // vesting for Investors and Advisors\\n uint256 private investorVesting = 365 days * 3;\\n\\n /* ============ Functions ============ */\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * @notice Construct a new Time Lock Registry and gives ownership to sender\\n * @param _token TimeLockedToken contract to use in this registry\\n */\\n constructor(TimeLockedToken _token) {\\n token = _token;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /* ============ External Getter Functions ============ */\\n\\n /**\\n * Gets registrations\\n *\\n * @return address[] Returns list of registrations\\n */\\n\\n function getRegistrations() external view returns (address[] memory) {\\n return registrations;\\n }\\n\\n /* =========== Token related Gov Functions ====== */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION\\n *\\n * @notice Register multiple investors/team in a batch\\n * @param _registrations Registrations to process\\n */\\n function registerBatch(Registration[] memory _registrations) external onlyOwner {\\n for (uint256 i = 0; i < _registrations.length; i++) {\\n register(\\n _registrations[i].receiver,\\n _registrations[i].distribution,\\n _registrations[i].investorType,\\n _registrations[i].vestingStartingDate\\n );\\n }\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION\\n *\\n * @notice Register new account under vesting conditions (Team, Advisors, Investors e.g. SAFT purchaser)\\n * @param receiver Address belonging vesting conditions\\n * @param distribution Tokens amount that receiver is due to get\\n */\\n function register(\\n address receiver,\\n uint256 distribution,\\n bool investorType,\\n uint256 vestingStartingDate\\n ) public onlyOwner {\\n require(receiver != address(0), 'TimeLockRegistry::register: cannot register the zero address');\\n require(\\n receiver != address(this),\\n 'TimeLockRegistry::register: Time Lock Registry contract cannot be an investor'\\n );\\n require(distribution != 0, 'TimeLockRegistry::register: Distribution = 0');\\n require(\\n registeredDistributions[receiver] == 0,\\n 'TimeLockRegistry::register:Distribution for this address is already registered'\\n );\\n require(block.timestamp >= 1614553200, 'Cannot register earlier than March 2021'); // 1614553200 is UNIX TIME of 2021 March the 1st\\n require(totalTokens.add(distribution) <= IERC20(token).balanceOf(address(this)), 'Not enough tokens');\\n\\n totalTokens = totalTokens.add(distribution);\\n // register distribution\\n registeredDistributions[receiver] = distribution;\\n registrations.push(receiver);\\n\\n // register token vested conditions\\n TokenVested storage newTokenVested = tokenVested[receiver];\\n newTokenVested.team = investorType;\\n newTokenVested.vestingBegin = vestingStartingDate;\\n\\n if (newTokenVested.team == true) {\\n newTokenVested.vestingEnd = vestingStartingDate.add(teamVesting);\\n } else {\\n newTokenVested.vestingEnd = vestingStartingDate.add(investorVesting);\\n }\\n newTokenVested.lastClaim = vestingStartingDate;\\n\\n tokenVested[receiver] = newTokenVested;\\n\\n // emit register event\\n emit Register(receiver, distribution);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel distribution registration in case of mistake and before a claim is done\\n *\\n * @notice Cancel distribution registration\\n * @dev A claim has not to be done earlier\\n * @param receiver Address that should have it's distribution removed\\n * @return Whether or not it succeeded\\n */\\n function cancelRegistration(address receiver) external onlyOwner returns (bool) {\\n require(registeredDistributions[receiver] != 0, 'Not registered');\\n\\n // get amount from distributions\\n uint256 amount = registeredDistributions[receiver];\\n\\n // set distribution mapping to 0\\n delete registeredDistributions[receiver];\\n\\n // set tokenVested mapping to 0\\n delete tokenVested[receiver];\\n\\n // remove from the list of all registrations\\n registrations.remove(receiver);\\n\\n // decrease total tokens\\n totalTokens = totalTokens.sub(amount);\\n\\n // emit cancel event\\n emit Cancel(receiver, amount);\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel distribution registration in case of mistake and before a claim is done\\n *\\n * @notice Cancel already delivered tokens. It might only apply when non-completion of vesting period of Team members or Advisors\\n * @dev An automatic override allowance is granted during the claim process\\n * @param account Address that should have it's distribution removed\\n * @return Whether or not it succeeded\\n */\\n function cancelDeliveredTokens(address account) external onlyOwner returns (bool) {\\n uint256 loosingAmount = token.cancelVestedTokens(account);\\n\\n // emit cancel event\\n emit Cancel(account, loosingAmount);\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Recover tokens in Time Lock Registry smartcontract address by the owner\\n *\\n * @notice Send tokens from smartcontract address to the owner.\\n * It might only apply after a cancellation of vested tokens\\n * @param amount Amount to be recovered by the owner of the Time Lock Registry smartcontract from its balance\\n * @return Whether or not it succeeded\\n */\\n function transferToOwner(uint256 amount) external onlyOwner returns (bool) {\\n SafeERC20.safeTransfer(token, msg.sender, amount);\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Claim locked tokens by the registered account\\n *\\n * @notice Claim tokens due amount.\\n * @dev Claim is done by the user in the TimeLocked contract and the contract is the only allowed to call\\n * this function on behalf of the user to make the claim\\n * @return The amount of tokens registered and delivered after the claim\\n */\\n function claim(address _receiver) external onlyBABLToken returns (uint256) {\\n require(registeredDistributions[_receiver] != 0, 'Not registered');\\n\\n // get amount from distributions\\n uint256 amount = registeredDistributions[_receiver];\\n tokenVested[_receiver].lastClaim = block.timestamp;\\n\\n // set distribution mapping to 0\\n delete registeredDistributions[_receiver];\\n\\n // decrease total tokens\\n totalTokens = totalTokens.sub(amount);\\n\\n // register lockup in TimeLockedToken\\n // this will transfer funds from this contract and lock them for sender\\n token.registerLockup(\\n _receiver,\\n amount,\\n tokenVested[_receiver].team,\\n tokenVested[_receiver].vestingBegin,\\n tokenVested[_receiver].vestingEnd,\\n tokenVested[_receiver].lastClaim\\n );\\n\\n // set tokenVested mapping to 0\\n delete tokenVested[_receiver];\\n\\n // emit claim event\\n emit Claim(_receiver, amount);\\n\\n return amount;\\n }\\n\\n /* ============ Getter Functions ============ */\\n\\n function checkVesting(address address_)\\n external\\n view\\n returns (\\n bool team,\\n uint256 start,\\n uint256 end,\\n uint256 last\\n )\\n {\\n return (\\n tokenVested[address_].team,\\n tokenVested[address_].vestingBegin,\\n tokenVested[address_].vestingEnd,\\n tokenVested[address_].lastClaim\\n );\\n }\\n\\n function checkRegisteredDistribution(address address_) external view returns (uint256 amount) {\\n return registeredDistributions[address_];\\n }\\n}\\n\",\"keccak256\":\"0x5a2812398ff49dac4f10d03763768340a5de4e0f75fd2d00e18b5922051d094d\",\"license\":\"Apache License\"},\"contracts/token/TimeLockedToken.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {TimeLockRegistry} from './TimeLockRegistry.sol';\\nimport {RewardsDistributor} from './RewardsDistributor.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {VoteToken} from './VoteToken.sol';\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {Errors, _require} from '../lib/BabylonErrors.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\n\\n/**\\n * @title TimeLockedToken\\n * @notice Time Locked ERC20 Token\\n * @author Babylon Finance\\n * @dev Contract which gives the ability to time-lock tokens specially for vesting purposes usage\\n *\\n * By overriding the balanceOf() and transfer() functions in ERC20,\\n * an account can show its full, post-distribution balance and use it for voting power\\n * but only transfer or spend up to an allowed amount\\n *\\n * A portion of previously non-spendable tokens are allowed to be transferred\\n * along the time depending on each vesting conditions, and after all epochs have passed, the full\\n * account balance is unlocked. In case on non-completion vesting period, only the Time Lock Registry can cancel\\n * the delivery of the pending tokens and only can cancel the remaining locked ones.\\n */\\n\\nabstract contract TimeLockedToken is VoteToken {\\n using SafeMath for uint256;\\n\\n /* ============ Events ============ */\\n\\n /// @notice An event that emitted when a new lockout ocurr\\n event NewLockout(\\n address account,\\n uint256 tokenslocked,\\n bool isTeamOrAdvisor,\\n uint256 startingVesting,\\n uint256 endingVesting\\n );\\n\\n /// @notice An event that emitted when a new Time Lock is registered\\n event NewTimeLockRegistration(address previousAddress, address newAddress);\\n\\n /// @notice An event that emitted when a new Rewards Distributor is registered\\n event NewRewardsDistributorRegistration(address previousAddress, address newAddress);\\n\\n /// @notice An event that emitted when a cancellation of Lock tokens is registered\\n event Cancel(address account, uint256 amount);\\n\\n /// @notice An event that emitted when a claim of tokens are registered\\n event Claim(address _receiver, uint256 amount);\\n\\n /// @notice An event that emitted when a lockedBalance query is done\\n event LockedBalance(address _account, uint256 amount);\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlyTimeLockRegistry() {\\n require(\\n msg.sender == address(timeLockRegistry),\\n 'TimeLockedToken:: onlyTimeLockRegistry: can only be executed by TimeLockRegistry'\\n );\\n _;\\n }\\n\\n modifier onlyTimeLockOwner() {\\n if (address(timeLockRegistry) != address(0)) {\\n require(\\n msg.sender == Ownable(timeLockRegistry).owner(),\\n 'TimeLockedToken:: onlyTimeLockOwner: can only be executed by the owner of TimeLockRegistry'\\n );\\n }\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // represents total distribution for locked balances\\n mapping(address => uint256) distribution;\\n\\n /// @notice The profile of each token owner under its particular vesting conditions\\n /**\\n * @param team Indicates whether or not is a Team member or Advisor (true = team member/advisor, false = private investor)\\n * @param vestingBegin When the vesting begins for such token owner\\n * @param vestingEnd When the vesting ends for such token owner\\n * @param lastClaim When the last claim was done\\n */\\n struct VestedToken {\\n bool teamOrAdvisor;\\n uint256 vestingBegin;\\n uint256 vestingEnd;\\n uint256 lastClaim;\\n }\\n\\n /// @notice A record of token owners under vesting conditions for each account, by index\\n mapping(address => VestedToken) public vestedToken;\\n\\n // vesting duration for Team Members and Advisors\\n uint256 private teamVesting = 365 days * 4;\\n\\n // vesting duration for Investors\\n uint256 private investorVesting = 365 days * 3;\\n\\n // address of Time Lock Registry contract\\n IBabController public controller;\\n\\n // address of Time Lock Registry contract\\n TimeLockRegistry public timeLockRegistry;\\n\\n // address of Rewards Distriburor contract\\n RewardsDistributor public rewardsDistributor;\\n\\n // Enable Transfer of ERC20 BABL Tokens\\n // Only Minting or transfers from/to TimeLockRegistry and Rewards Distributor can transfer tokens until the protocol is fully decentralized\\n bool private tokenTransfersEnabled;\\n bool private tokenTransfersWereDisabled;\\n\\n /* ============ Functions ============ */\\n\\n /* ============ Constructor ============ */\\n\\n constructor(string memory _name, string memory _symbol) VoteToken(_name, _symbol) {\\n tokenTransfersEnabled = true;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /* =========== Token related Gov Functions ====== */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Disables transfers of ERC20 BABL Tokens\\n */\\n function disableTokensTransfers() external onlyOwner {\\n require(!tokenTransfersWereDisabled, 'BABL must flow');\\n tokenTransfersEnabled = false;\\n tokenTransfersWereDisabled = true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Allows transfers of ERC20 BABL Tokens\\n * Can only happen after the protocol is fully decentralized.\\n */\\n function enableTokensTransfers() external onlyOwner {\\n tokenTransfersEnabled = true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Set the Time Lock Registry contract to control token vesting conditions\\n *\\n * @notice Set the Time Lock Registry contract to control token vesting conditions\\n * @param newTimeLockRegistry Address of TimeLockRegistry contract\\n */\\n function setTimeLockRegistry(TimeLockRegistry newTimeLockRegistry) external onlyTimeLockOwner returns (bool) {\\n require(address(newTimeLockRegistry) != address(0), 'cannot be zero address');\\n require(address(newTimeLockRegistry) != address(this), 'cannot be this contract');\\n require(address(newTimeLockRegistry) != address(timeLockRegistry), 'must be new TimeLockRegistry');\\n emit NewTimeLockRegistration(address(timeLockRegistry), address(newTimeLockRegistry));\\n\\n timeLockRegistry = newTimeLockRegistry;\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Set the Rewards Distributor contract to control either BABL Mining or profit rewards\\n *\\n * @notice Set the Rewards Distriburor contract to control both types of rewards (profit and BABL Mining program)\\n * @param newRewardsDistributor Address of Rewards Distributor contract\\n */\\n function setRewardsDistributor(RewardsDistributor newRewardsDistributor) external onlyOwner returns (bool) {\\n require(address(newRewardsDistributor) != address(0), 'cannot be zero address');\\n require(address(newRewardsDistributor) != address(this), 'cannot be this contract');\\n require(address(newRewardsDistributor) != address(rewardsDistributor), 'must be new Rewards Distributor');\\n emit NewRewardsDistributorRegistration(address(rewardsDistributor), address(newRewardsDistributor));\\n\\n rewardsDistributor = newRewardsDistributor;\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Register new token lockup conditions for vested tokens defined only by Time Lock Registry\\n *\\n * @notice Tokens are completely delivered during the registration however lockup conditions apply for vested tokens\\n * locking them according to the distribution epoch periods and the type of recipient (Team, Advisor, Investor)\\n * Emits a transfer event showing a transfer to the recipient\\n * Only the registry can call this function\\n * @param _receiver Address to receive the tokens\\n * @param _amount Tokens to be transferred\\n * @param _profile True if is a Team Member or Advisor\\n * @param _vestingBegin Unix Time when the vesting for that particular address\\n * @param _vestingEnd Unix Time when the vesting for that particular address\\n * @param _lastClaim Unix Time when the claim was done from that particular address\\n *\\n */\\n function registerLockup(\\n address _receiver,\\n uint256 _amount,\\n bool _profile,\\n uint256 _vestingBegin,\\n uint256 _vestingEnd,\\n uint256 _lastClaim\\n ) external onlyTimeLockRegistry returns (bool) {\\n require(balanceOf(msg.sender) >= _amount, 'insufficient balance');\\n require(_receiver != address(0), 'cannot be zero address');\\n require(_receiver != address(this), 'cannot be this contract');\\n require(_receiver != address(timeLockRegistry), 'cannot be the TimeLockRegistry contract itself');\\n require(_receiver != msg.sender, 'the owner cannot lockup itself');\\n\\n // update amount of locked distribution\\n distribution[_receiver] = distribution[_receiver].add(_amount);\\n\\n VestedToken storage newVestedToken = vestedToken[_receiver];\\n\\n newVestedToken.teamOrAdvisor = _profile;\\n newVestedToken.vestingBegin = _vestingBegin;\\n newVestedToken.vestingEnd = _vestingEnd;\\n newVestedToken.lastClaim = _lastClaim;\\n\\n // transfer tokens to the recipient\\n _transfer(msg.sender, _receiver, _amount);\\n emit NewLockout(_receiver, _amount, _profile, _vestingBegin, _vestingEnd);\\n\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel and remove locked tokens due to non-completion of vesting period\\n * applied only by Time Lock Registry and specifically to Team or Advisors as it does not apply to investors.\\n *\\n * @dev Cancel distribution registration\\n * @param lockedAccount that should have its still locked distribution removed due to non-completion of its vesting period\\n */\\n function cancelVestedTokens(address lockedAccount) external onlyTimeLockRegistry returns (uint256) {\\n return _cancelVestedTokensFromTimeLock(lockedAccount);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Each token owner can claim its own specific tokens with its own specific vesting conditions from the Time Lock Registry\\n *\\n * @dev Claim msg.sender tokens (if any available in the registry)\\n */\\n function claimMyTokens() external {\\n // claim msg.sender tokens from timeLockRegistry\\n uint256 amount = timeLockRegistry.claim(msg.sender);\\n // After a proper claim, locked tokens of Team and Advisors profiles are under restricted special vesting conditions so they automatic grant\\n // rights to the Time Lock Registry to only retire locked tokens if non-compliance vesting conditions take places along the vesting periods.\\n // It does not apply to Investors under vesting (their locked tokens cannot be removed).\\n if (vestedToken[msg.sender].teamOrAdvisor == true) {\\n approve(address(timeLockRegistry), amount);\\n }\\n // emit claim event\\n emit Claim(msg.sender, amount);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Get unlocked balance for an account\\n *\\n * @notice Get unlocked balance for an account\\n * @param account Account to check\\n * @return Amount that is unlocked and available eg. to transfer\\n */\\n function unlockedBalance(address account) public returns (uint256) {\\n // totalBalance - lockedBalance\\n return balanceOf(account).sub(lockedBalance(account));\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. View the locked balance for an account\\n *\\n * @notice View locked balance for an account\\n * @param account Account to check\\n * @return Amount locked in the time of checking\\n */\\n\\n function viewLockedBalance(address account) public view returns (uint256) {\\n // distribution of locked tokens\\n // get amount from distributions\\n\\n uint256 amount = distribution[account];\\n uint256 lockedAmount = amount;\\n\\n // Team and investors cannot transfer tokens in the first year\\n if (vestedToken[account].vestingBegin.add(365 days) > block.timestamp && amount != 0) {\\n return lockedAmount;\\n }\\n\\n // in case of vesting has passed, all tokens are now available, if no vesting lock is 0 as well\\n if (block.timestamp >= vestedToken[account].vestingEnd || amount == 0) {\\n lockedAmount = 0;\\n } else if (amount != 0) {\\n // in case of still under vesting period, locked tokens are recalculated\\n lockedAmount = amount.mul(vestedToken[account].vestingEnd.sub(block.timestamp)).div(\\n vestedToken[account].vestingEnd.sub(vestedToken[account].vestingBegin)\\n );\\n }\\n return lockedAmount;\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Get locked balance for an account\\n *\\n * @notice Get locked balance for an account\\n * @param account Account to check\\n * @return Amount locked in the time of checking\\n */\\n function lockedBalance(address account) public returns (uint256) {\\n // get amount from distributions locked tokens (if any)\\n uint256 lockedAmount = viewLockedBalance(account);\\n // in case of vesting has passed, all tokens are now available so we set mapping to 0 only for accounts under vesting\\n if (\\n block.timestamp >= vestedToken[account].vestingEnd &&\\n msg.sender == account &&\\n lockedAmount == 0 &&\\n vestedToken[account].vestingEnd != 0\\n ) {\\n delete distribution[account];\\n }\\n emit LockedBalance(account, lockedAmount);\\n return lockedAmount;\\n }\\n\\n /**\\n * PUBLIC FUNCTION. Get the address of Time Lock Registry\\n *\\n * @notice Get the address of Time Lock Registry\\n * @return Address of the Time Lock Registry\\n */\\n function getTimeLockRegistry() external view returns (address) {\\n return address(timeLockRegistry);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the Approval of allowances of ERC20 with special conditions for vesting\\n *\\n * @notice Override of \\\"Approve\\\" function to allow the `spender` to transfer up to `amount` from `src`\\n * @dev This will overwrite the approval amount for `spender` except in the case of spender is Time Lock Registry\\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\\n * @param spender The address of the account which may transfer tokens\\n * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\\n * @return Whether or not the approval succeeded\\n */\\n function approve(address spender, uint256 rawAmount) public override nonReentrant returns (bool) {\\n require(spender != address(0), 'TimeLockedToken::approve: spender cannot be zero address');\\n require(spender != msg.sender, 'TimeLockedToken::approve: spender cannot be the msg.sender');\\n\\n uint96 amount;\\n if (rawAmount == uint256(-1)) {\\n amount = uint96(-1);\\n } else {\\n amount = safe96(rawAmount, 'TimeLockedToken::approve: amount exceeds 96 bits');\\n }\\n\\n // There is no option to decreaseAllowance to timeLockRegistry in case of vested tokens\\n if ((spender == address(timeLockRegistry)) && (amount < allowance(msg.sender, address(timeLockRegistry)))) {\\n amount = safe96(\\n allowance(msg.sender, address(timeLockRegistry)),\\n 'TimeLockedToken::approve: cannot decrease allowance to timelockregistry'\\n );\\n }\\n _approve(msg.sender, spender, amount);\\n emit Approval(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the Increase of allowances of ERC20 with special conditions for vesting\\n *\\n * @notice Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * @dev This is an override with respect to the fulfillment of vesting conditions along the way\\n * However an user can increase allowance many times, it will never be able to transfer locked tokens during vesting period\\n * @return Whether or not the increaseAllowance succeeded\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public override nonReentrant returns (bool) {\\n require(\\n unlockedBalance(msg.sender) >= allowance(msg.sender, spender).add(addedValue) ||\\n spender == address(timeLockRegistry),\\n 'TimeLockedToken::increaseAllowance:Not enough unlocked tokens'\\n );\\n require(spender != address(0), 'TimeLockedToken::increaseAllowance:Spender cannot be zero address');\\n require(spender != msg.sender, 'TimeLockedToken::increaseAllowance:Spender cannot be the msg.sender');\\n _approve(msg.sender, spender, allowance(msg.sender, spender).add(addedValue));\\n return true;\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the decrease of allowances of ERC20 with special conditions for vesting\\n *\\n * @notice Atomically decrease the allowance granted to `spender` by the caller.\\n *\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n * This is an override with respect to the fulfillment of vesting conditions along the way\\n * An user cannot decrease the allowance to the Time Lock Registry who is in charge of vesting conditions\\n * @return Whether or not the decreaseAllowance succeeded\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public override nonReentrant returns (bool) {\\n require(spender != address(0), 'TimeLockedToken::decreaseAllowance:Spender cannot be zero address');\\n require(spender != msg.sender, 'TimeLockedToken::decreaseAllowance:Spender cannot be the msg.sender');\\n require(\\n allowance(msg.sender, spender) >= subtractedValue,\\n 'TimeLockedToken::decreaseAllowance:Underflow condition'\\n );\\n\\n // There is no option to decreaseAllowance to timeLockRegistry in case of vested tokens\\n require(\\n address(spender) != address(timeLockRegistry),\\n 'TimeLockedToken::decreaseAllowance:cannot decrease allowance to timeLockRegistry'\\n );\\n\\n _approve(\\n msg.sender,\\n spender,\\n allowance(msg.sender, spender).sub(subtractedValue, 'ERC20: decreased allowance below zero')\\n );\\n return true;\\n }\\n\\n /* ============ Internal Only Function ============ */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Override the _transfer of ERC20 BABL tokens only allowing the transfer of unlocked tokens\\n *\\n * @dev Transfer function which includes only unlocked tokens\\n * Locked tokens can always be transfered back to the returns address\\n * Transferring to owner allows re-issuance of funds through registry\\n *\\n * @param _from The address to send tokens from\\n * @param _to The address that will receive the tokens\\n * @param _value The amount of tokens to be transferred\\n */\\n function _transfer(\\n address _from,\\n address _to,\\n uint256 _value\\n ) internal override {\\n require(_from != address(0), 'TimeLockedToken:: _transfer: cannot transfer from the zero address');\\n require(_to != address(0), 'TimeLockedToken:: _transfer: cannot transfer to the zero address');\\n require(\\n _to != address(this),\\n 'TimeLockedToken:: _transfer: do not transfer tokens to the token contract itself'\\n );\\n\\n require(balanceOf(_from) >= _value, 'TimeLockedToken:: _transfer: insufficient balance');\\n\\n // check if enough unlocked balance to transfer\\n require(unlockedBalance(_from) >= _value, 'TimeLockedToken:: _transfer: attempting to transfer locked funds');\\n super._transfer(_from, _to, _value);\\n // voting power\\n _moveDelegates(\\n delegates[_from],\\n delegates[_to],\\n safe96(_value, 'TimeLockedToken:: _transfer: uint96 overflow')\\n );\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Disable BABL token transfer until certain conditions are met\\n *\\n * @dev Override the _beforeTokenTransfer of ERC20 BABL tokens until certain conditions are met:\\n * Only allowing minting or transfers from Time Lock Registry and Rewards Distributor until transfers are allowed in the controller\\n * Transferring to owner allows re-issuance of funds through registry\\n *\\n * @param _from The address to send tokens from\\n * @param _to The address that will receive the tokens\\n * @param _value The amount of tokens to be transferred\\n */\\n\\n // Disable garden token transfers. Allow minting and burning.\\n function _beforeTokenTransfer(\\n address _from,\\n address _to,\\n uint256 _value\\n ) internal virtual override {\\n super._beforeTokenTransfer(_from, _to, _value);\\n _require(\\n _from == address(0) ||\\n _from == address(timeLockRegistry) ||\\n _from == address(rewardsDistributor) ||\\n _to == address(timeLockRegistry) ||\\n tokenTransfersEnabled,\\n Errors.BABL_TRANSFERS_DISABLED\\n );\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel and remove locked tokens due to non-completion of vesting period\\n * applied only by Time Lock Registry and specifically to Team or Advisors\\n *\\n * @dev Cancel distribution registration\\n * @param lockedAccount that should have its still locked distribution removed due to non-completion of its vesting period\\n */\\n function _cancelVestedTokensFromTimeLock(address lockedAccount) internal onlyTimeLockRegistry returns (uint256) {\\n require(distribution[lockedAccount] != 0, 'TimeLockedToken::cancelTokens:Not registered');\\n\\n // get an update on locked amount from distributions at this precise moment\\n uint256 loosingAmount = lockedBalance(lockedAccount);\\n\\n require(loosingAmount > 0, 'TimeLockedToken::cancelTokens:There are no more locked tokens');\\n require(\\n vestedToken[lockedAccount].teamOrAdvisor == true,\\n 'TimeLockedToken::cancelTokens:cannot cancel locked tokens to Investors'\\n );\\n\\n // set distribution mapping to 0\\n delete distribution[lockedAccount];\\n\\n // set tokenVested mapping to 0\\n delete vestedToken[lockedAccount];\\n\\n // transfer only locked tokens back to TimeLockRegistry Owner (msg.sender)\\n require(\\n transferFrom(lockedAccount, address(timeLockRegistry), loosingAmount),\\n 'TimeLockedToken::cancelTokens:Transfer failed'\\n );\\n\\n // emit cancel event\\n emit Cancel(lockedAccount, loosingAmount);\\n\\n return loosingAmount;\\n }\\n}\\n\",\"keccak256\":\"0xad214a3aa8fcc15e51df9d4f4523c54f2c3149c47765cc8c44b6f4f9510bec4c\",\"license\":\"Apache License\"},\"contracts/token/VoteToken.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {IVoteToken} from '../interfaces/IVoteToken.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {Context} from '@openzeppelin/contracts/utils/Context.sol';\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\n\\n/**\\n * @title VoteToken\\n * @notice Custom token which tracks voting power for governance\\n * @dev This is an abstraction of a fork of the Compound governance contract\\n * VoteToken is used by BABL to allow tracking voting power\\n * Checkpoints are created every time state is changed which record voting power\\n * Inherits standard ERC20 behavior\\n */\\n\\nabstract contract VoteToken is Context, ERC20, Ownable, IVoteToken, ReentrancyGuard {\\n using SafeMath for uint256;\\n using Address for address;\\n\\n /* ============ Events ============ */\\n\\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\\n event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);\\n\\n /* ============ Modifiers ============ */\\n\\n /* ============ State Variables ============ */\\n\\n /// @notice The EIP-712 typehash for the contract's domain\\n bytes32 public constant DOMAIN_TYPEHASH =\\n keccak256('EIP712Domain(string name,uint256 chainId,address verifyingContract)');\\n\\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\\n bytes32 public constant DELEGATION_TYPEHASH =\\n keccak256('Delegation(address delegatee,uint256 nonce,uint256 expiry)');\\n\\n /// @dev A record of votes checkpoints for each account, by index\\n mapping(address => address) public delegates;\\n\\n /// @notice A checkpoint for marking number of votes from a given block\\n struct Checkpoint {\\n uint32 fromBlock;\\n uint96 votes;\\n }\\n\\n /// @notice A record of votes checkpoints for each account, by index\\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\\n\\n /// @notice The number of checkpoints for each account\\n mapping(address => uint32) public numCheckpoints;\\n\\n /// @notice A record of states for signing / validating signatures\\n mapping(address => uint256) public nonces;\\n\\n /* ============ Functions ============ */\\n\\n /* ============ Constructor ============ */\\n\\n constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {}\\n\\n /* ============ External Functions ============ */\\n\\n /* =========== Token related Gov Functions ====== */\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Delegating votes from msg.sender to delegatee\\n *\\n * @notice Delegate votes from `msg.sender` to `delegatee`\\n * @param delegatee The address to delegate votes to\\n */\\n\\n function delegate(address delegatee) external override {\\n return _delegate(msg.sender, delegatee);\\n }\\n\\n /**\\n * PRIVILEGED GOVERNANCE FUNCTION. Delegate votes using signature to 'delegatee'\\n *\\n * @notice Delegates votes from signatory to `delegatee`\\n * @param delegatee The address to delegate votes to\\n * @param nonce The contract state required to match the signature\\n * @param expiry The time at which to expire the signature\\n * @param v The recovery byte of the signature\\n * @param r Half of the ECDSA signature pair\\n * @param s Half of the ECDSA signature pair\\n */\\n\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external override {\\n bytes32 domainSeparator =\\n keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name())), getChainId(), address(this)));\\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\\n bytes32 digest = keccak256(abi.encodePacked('\\\\x19\\\\x01', domainSeparator, structHash));\\n address signatory = ecrecover(digest, v, r, s);\\n require(signatory != address(0), 'VoteToken::delegateBySig: invalid signature');\\n require(nonce == nonces[signatory].add(1), 'VoteToken::delegateBySig: invalid nonce');\\n nonces[signatory]++;\\n require(block.timestamp <= expiry, 'VoteToken::delegateBySig: signature expired');\\n return _delegate(signatory, delegatee);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Check Delegate votes using signature to 'delegatee'\\n *\\n * @notice Get current voting power for an account\\n * @param account Account to get voting power for\\n * @return Voting power for an account\\n */\\n function getCurrentVotes(address account) external view virtual override returns (uint96) {\\n uint32 nCheckpoints = numCheckpoints[account];\\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Get voting power at a specific block for an account\\n *\\n * @param account Account to get voting power for\\n * @param blockNumber Block to get voting power at\\n * @return Voting power for an account at specific block\\n */\\n function getPriorVotes(address account, uint256 blockNumber) external view virtual override returns (uint96) {\\n require(blockNumber < block.number, 'BABLToken::getPriorVotes: not yet determined');\\n\\n uint32 nCheckpoints = numCheckpoints[account];\\n if (nCheckpoints == 0) {\\n return 0;\\n }\\n\\n // First check most recent balance\\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\\n return checkpoints[account][nCheckpoints - 1].votes;\\n }\\n\\n // Next check implicit zero balance\\n if (checkpoints[account][0].fromBlock > blockNumber) {\\n return 0;\\n }\\n\\n uint32 lower = 0;\\n uint32 upper = nCheckpoints - 1;\\n while (upper > lower) {\\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\\n Checkpoint memory cp = checkpoints[account][center];\\n if (cp.fromBlock == blockNumber) {\\n return cp.votes;\\n } else if (cp.fromBlock < blockNumber) {\\n lower = center;\\n } else {\\n upper = center - 1;\\n }\\n }\\n return checkpoints[account][lower].votes;\\n }\\n\\n function getMyDelegatee() external view override returns (address) {\\n return delegates[msg.sender];\\n }\\n\\n function getDelegatee(address account) external view override returns (address) {\\n return delegates[account];\\n }\\n\\n function getCheckpoints(address account, uint32 id)\\n external\\n view\\n override\\n returns (uint32 fromBlock, uint96 votes)\\n {\\n Checkpoint storage getCheckpoint = checkpoints[account][id];\\n return (getCheckpoint.fromBlock, getCheckpoint.votes);\\n }\\n\\n function getNumberOfCheckpoints(address account) external view override returns (uint32) {\\n return numCheckpoints[account];\\n }\\n\\n /* ============ Internal Only Function ============ */\\n\\n /**\\n * GOVERNANCE FUNCTION. Make a delegation\\n *\\n * @dev Internal function to delegate voting power to an account\\n * @param delegator The address of the account delegating votes from\\n * @param delegatee The address to delegate votes to\\n */\\n\\n function _delegate(address delegator, address delegatee) internal {\\n address currentDelegate = delegates[delegator];\\n uint96 delegatorBalance = safe96(_balanceOf(delegator), 'VoteToken::_delegate: uint96 overflow');\\n delegates[delegator] = delegatee;\\n\\n emit DelegateChanged(delegator, currentDelegate, delegatee);\\n\\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\\n }\\n\\n function _balanceOf(address account) internal view virtual returns (uint256) {\\n return balanceOf(account);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Move the delegates\\n *\\n * @dev Internal function to move delegates between accounts\\n * @param srcRep The address of the account delegating votes from\\n * @param dstRep The address of the account delegating votes to\\n * @param amount The voting power to move\\n */\\n function _moveDelegates(\\n address srcRep,\\n address dstRep,\\n uint96 amount\\n ) internal {\\n if (srcRep != dstRep && amount > 0) {\\n // It must not revert but do nothing in cases of address(0) being part of the move\\n // Sub voting amount to source in case it is not the zero address (e.g. transfers)\\n if (srcRep != address(0)) {\\n uint32 srcRepNum = numCheckpoints[srcRep];\\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\\n uint96 srcRepNew = sub96(srcRepOld, amount, 'VoteToken::_moveDelegates: vote amount underflows');\\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\\n }\\n if (dstRep != address(0)) {\\n // Add it to destination in case it is not the zero address (e.g. any transfer of tokens or delegations except a first mint to a specific address)\\n uint32 dstRepNum = numCheckpoints[dstRep];\\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\\n uint96 dstRepNew = add96(dstRepOld, amount, 'VoteToken::_moveDelegates: vote amount overflows');\\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\\n }\\n }\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION. Internal function to write a checkpoint for voting power\\n *\\n * @dev internal function to write a checkpoint for voting power\\n * @param delegatee The address of the account delegating votes to\\n * @param nCheckpoints The num checkpoint\\n * @param oldVotes The previous voting power\\n * @param newVotes The new voting power\\n */\\n function _writeCheckpoint(\\n address delegatee,\\n uint32 nCheckpoints,\\n uint96 oldVotes,\\n uint96 newVotes\\n ) internal {\\n uint32 blockNumber = safe32(block.number, 'VoteToken::_writeCheckpoint: block number exceeds 32 bits');\\n\\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\\n } else {\\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\\n numCheckpoints[delegatee] = nCheckpoints + 1;\\n }\\n\\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint32\\n *\\n * @dev internal function to convert from uint256 to uint32\\n */\\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\\n require(n < 2**32, errorMessage);\\n return uint32(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint96\\n *\\n * @dev internal function to convert from uint256 to uint96\\n */\\n function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) {\\n require(n < 2**96, errorMessage);\\n return uint96(n);\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to add two uint96 numbers\\n *\\n * @dev internal safe math function to add two uint96 numbers\\n */\\n function add96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n uint96 c = a + b;\\n require(c >= a, errorMessage);\\n return c;\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to subtract two uint96 numbers\\n *\\n * @dev internal safe math function to subtract two uint96 numbers\\n */\\n function sub96(\\n uint96 a,\\n uint96 b,\\n string memory errorMessage\\n ) internal pure returns (uint96) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * INTERNAL FUNCTION. Internal function to get chain ID\\n *\\n * @dev internal function to get chain ID\\n */\\n function getChainId() internal pure returns (uint256) {\\n uint256 chainId;\\n assembly {\\n chainId := chainid()\\n }\\n return chainId;\\n }\\n}\\n\",\"keccak256\":\"0xca174dc6b9b5f780aaaf9c832961b7f552b8cd0b6b6f36e8691fa7226de49457\",\"license\":\"Apache License\"}},\"version\":1}", + "bytecode": "0x6080604052630784ce006006556305a39a8060075534801561002057600080fd5b5060405162001d6038038062001d60833981016040819052610041916100be565b600061004b6100ba565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b0319166001600160a01b03929092169190911790556100ec565b3390565b6000602082840312156100cf578081fd5b81516001600160a01b03811681146100e5578182fd5b9392505050565b611c6480620000fc6000396000f3fe608060405234801561001057600080fd5b506004361061011b5760003560e01c80638da5cb5b116100b2578063d86287aa11610081578063f2fde38b11610066578063f2fde38b1461025e578063f4ddb5be14610271578063fc0c546a146102845761011b565b8063d86287aa14610217578063d8d4ec021461023b5761011b565b80638da5cb5b146101c7578063a8b1959a146101dc578063c2b3f72f146101ef578063d1e8076a146102025761011b565b80637e1c0c09116100ee5780637e1c0c09146101865780638202f4bc1461018e5780638713a48f146101a157806387c1ed12146101b45761011b565b80631e83409a146101205780636b904f45146101495780636bdc06f51461015c578063715018a61461017c575b600080fd5b61013361012e366004611619565b61028c565b6040516101409190611b7a565b60405180910390f35b610133610157366004611619565b61047d565b61016f61016a366004611619565b610498565b604051610140919061186b565b610184610647565b005b610133610712565b61018461019c366004611633565b610718565b6101846101af366004611678565b610a90565b61016f6101c236600461178e565b610b84565b6101cf610c19565b60405161014091906117be565b61016f6101ea366004611619565b610c28565b6101336101fd366004611619565b610d6d565b61020a610d7f565b604051610140919061181e565b61022a610225366004611619565b610de1565b604051610140959493929190611876565b61024e610249366004611619565b610e15565b604051610140949392919061189b565b61018461026c366004611619565b610e48565b6101cf61027f36600461178e565b610f69565b6101cf610f93565b6001546000906001600160a01b031633146102c25760405162461bcd60e51b81526004016102b9906118b8565b60405180910390fd5b6001600160a01b0382166000908152600360205260409020546102f75760405162461bcd60e51b81526004016102b99061194c565b6001600160a01b03821660009081526003602081815260408084208054600284529185204290850155929091529190556005546103349082610fa2565b600555600180546001600160a01b038581166000908152600260208190526040918290208054958101549181015460039091015492517f8cec29230000000000000000000000000000000000000000000000000000000081529390941694638cec2923946103b0948a94899460ff9094169392916004016117eb565b602060405180830381600087803b1580156103ca57600080fd5b505af11580156103de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104029190611772565b506001600160a01b0383166000908152600260208190526040808320805461ffff1916815560018101849055918201839055600390910191909155517f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d49061046d90859084906117d2565b60405180910390a190505b919050565b6001600160a01b031660009081526003602052604090205490565b60006104a2611004565b6001600160a01b03166104b3610c19565b6001600160a01b03161461050e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0382166000908152600360205260409020546105435760405162461bcd60e51b81526004016102b99061194c565b6001600160a01b03821660009081526003602081815260408084208054908590556002808452828620805461ffff1916815560018101879055908101869055909301939093556004805484518184028101840190955280855292936105f39387939192918301828280156105e057602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116105c2575b505050505061100890919063ffffffff16565b506005546106019082610fa2565b6005556040517f27f83af92b39768b17fe0c8d6922452702717efb8626d97e7a754e0b27d4f6d29061063690859084906117d2565b60405180910390a150600192915050565b61064f611004565b6001600160a01b0316610660610c19565b6001600160a01b0316146106bb576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b60055481565b610720611004565b6001600160a01b0316610731610c19565b6001600160a01b03161461078c576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0384166107b25760405162461bcd60e51b81526004016102b9906118ef565b6001600160a01b0384163014156107db5760405162461bcd60e51b81526004016102b9906119e0565b826107f85760405162461bcd60e51b81526004016102b990611983565b6001600160a01b0384166000908152600360205260409020541561082e5760405162461bcd60e51b81526004016102b990611a63565b63603c20704210156108525760405162461bcd60e51b81526004016102b990611ae6565b6001546040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906370a082319061089b9030906004016117be565b60206040518083038186803b1580156108b357600080fd5b505afa1580156108c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108eb91906117a6565b6005546108f89085611085565b11156109165760405162461bcd60e51b81526004016102b990611b43565b6005546109239084611085565b6005556001600160a01b03841660008181526003602090815260408083208790556004805460018082019092557f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b01805473ffffffffffffffffffffffffffffffffffffffff191690951790945560029091529020805460ff191684151517808255818301849055909160ff909116151514156109d2576006546109c8908390611085565b60028201556109e6565b6007546109e0908390611085565b60028201555b60038181018381556001600160a01b0387166000908152600260208190526040918290208554815460ff191660ff918216151517808355875461ff00199091166101009182900490921615150217815560018087015490820155818601549181019190915591549190920155517e7dc6ab80cc84c043b7b8d4fcafc802187470087f7ea7fccd2e17aecd0256a190610a8190879087906117d2565b60405180910390a15050505050565b610a98611004565b6001600160a01b0316610aa9610c19565b6001600160a01b031614610b04576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60005b8151811015610b8057610b78828281518110610b1f57fe5b602002602001015160000151838381518110610b3757fe5b602002602001015160200151848481518110610b4f57fe5b602002602001015160400151858581518110610b6757fe5b602002602001015160600151610718565b600101610b07565b5050565b6000610b8e611004565b6001600160a01b0316610b9f610c19565b6001600160a01b031614610bfa576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600154610c11906001600160a01b031633846110e6565b506001919050565b6000546001600160a01b031690565b6000610c32611004565b6001600160a01b0316610c43610c19565b6001600160a01b031614610c9e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001546040517f4f2050870000000000000000000000000000000000000000000000000000000081526000916001600160a01b031690634f20508790610ce89086906004016117be565b602060405180830381600087803b158015610d0257600080fd5b505af1158015610d16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3a91906117a6565b90507f27f83af92b39768b17fe0c8d6922452702717efb8626d97e7a754e0b27d4f6d283826040516106369291906117d2565b60036020526000908152604090205481565b60606004805480602002602001604051908101604052809291908181526020018280548015610dd757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610db9575b5050505050905090565b6002602081905260009182526040909120805460018201549282015460039092015460ff8083169461010090930416929085565b6001600160a01b03166000908152600260208190526040909120805460018201549282015460039092015460ff90911693565b610e50611004565b6001600160a01b0316610e61610c19565b6001600160a01b031614610ebc576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610f015760405162461bcd60e51b8152600401808060200182810382526026815260200180611bb96026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60048181548110610f7957600080fd5b6000918252602090912001546001600160a01b0316905081565b6001546001600160a01b031681565b600082821115610ff9576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b508082035b92915050565b3390565b6060600080611017858561116b565b915091508061106d576040805162461bcd60e51b815260206004820152601560248201527f41646472657373206e6f7420696e2061727261792e0000000000000000000000604482015290519081900360640190fd5b600061107986846111d1565b509350610ffe92505050565b6000828201838110156110df576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611166908490611335565b505050565b81516000908190815b818110156111be57846001600160a01b031686828151811061119257fe5b60200260200101516001600160a01b031614156111b6579250600191506111ca9050565b600101611174565b50600019600092509250505b9250929050565b815160609060009080841061122d576040805162461bcd60e51b815260206004820152601860248201527f496e646578206d757374206265203c2041206c656e6774680000000000000000604482015290519081900360640190fd5b60006001820367ffffffffffffffff8111801561124957600080fd5b50604051908082528060200260200182016040528015611273578160200160208202803683370190505b50905060005b858110156112c15786818151811061128d57fe5b60200260200101518282815181106112a157fe5b6001600160a01b0390921660209283029190910190910152600101611279565b50600185015b82811015611312578681815181106112db57fe5b60200260200101518260018303815181106112f257fe5b6001600160a01b03909216602092830291909101909101526001016112c7565b508086868151811061132057fe5b60200260200101519350935050509250929050565b600061138a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113e69092919063ffffffff16565b805190915015611166578080602001905160208110156113a957600080fd5b50516111665760405162461bcd60e51b815260040180806020018281038252602a815260200180611c05602a913960400191505060405180910390fd5b60606113f584846000856113fd565b949350505050565b60608247101561143e5760405162461bcd60e51b8152600401808060200182810382526026815260200180611bdf6026913960400191505060405180910390fd5b61144785611558565b611498576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106114d65780518252601f1990920191602091820191016114b7565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611538576040519150601f19603f3d011682016040523d82523d6000602084013e61153d565b606091505b509150915061154d82828661155e565b979650505050505050565b3b151590565b6060831561156d5750816110df565b82511561157d5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156115c75781810151838201526020016115af565b50505050905090810190601f1680156115f45780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b80356001600160a01b038116811461047857600080fd5b60006020828403121561162a578081fd5b6110df82611602565b60008060008060808587031215611648578283fd5b61165185611602565b935060208501359250604085013561166881611ba7565b9396929550929360600135925050565b6000602080838503121561168a578182fd5b823567ffffffffffffffff808211156116a1578384fd5b818501915085601f8301126116b4578384fd5b8135818111156116c057fe5b6116cd8485830201611b83565b818152848101908486016080808502870188018b10156116eb578889fd5b8896505b848710156117635780828c031215611705578889fd5b60408051828101818110898211171561171a57fe5b825261172584611602565b8152898401358a8201528184013561173c81611ba7565b918101919091526060838101359082015284526001969096019592870192908101906116ef565b50909998505050505050505050565b600060208284031215611783578081fd5b81516110df81611ba7565b60006020828403121561179f578081fd5b5035919050565b6000602082840312156117b7578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b03969096168652602086019490945291151560408501526060840152608083015260a082015260c00190565b6020808252825182820181905260009190848201906040850190845b8181101561185f5783516001600160a01b03168352928401929184019160010161183a565b50909695505050505050565b901515815260200190565b9415158552921515602085015260408401919091526060830152608082015260a00190565b931515845260208401929092526040830152606082015260800190565b6020808252600f908201527f6f6e6c79204241424c20546f6b656e0000000000000000000000000000000000604082015260600190565b6020808252603c908201527f54696d654c6f636b52656769737472793a3a72656769737465723a2063616e6e60408201527f6f7420726567697374657220746865207a65726f206164647265737300000000606082015260800190565b6020808252600e908201527f4e6f742072656769737465726564000000000000000000000000000000000000604082015260600190565b6020808252602c908201527f54696d654c6f636b52656769737472793a3a72656769737465723a204469737460408201527f7269627574696f6e203d20300000000000000000000000000000000000000000606082015260800190565b6020808252604d908201527f54696d654c6f636b52656769737472793a3a72656769737465723a2054696d6560408201527f204c6f636b20526567697374727920636f6e74726163742063616e6e6f74206260608201527f6520616e20696e766573746f7200000000000000000000000000000000000000608082015260a00190565b6020808252604e908201527f54696d654c6f636b52656769737472793a3a72656769737465723a446973747260408201527f69627574696f6e20666f722074686973206164647265737320697320616c726560608201527f6164792072656769737465726564000000000000000000000000000000000000608082015260a00190565b60208082526027908201527f43616e6e6f74207265676973746572206561726c696572207468616e204d617260408201527f6368203230323100000000000000000000000000000000000000000000000000606082015260800190565b60208082526011908201527f4e6f7420656e6f75676820746f6b656e73000000000000000000000000000000604082015260600190565b90815260200190565b60405181810167ffffffffffffffff81118282101715611b9f57fe5b604052919050565b8015158114611bb557600080fd5b5056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122096798d55c986d57d18a5475c61c8dc79b9f20e76d7daa2d77dd514ee58a1241564736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061011b5760003560e01c80638da5cb5b116100b2578063d86287aa11610081578063f2fde38b11610066578063f2fde38b1461025e578063f4ddb5be14610271578063fc0c546a146102845761011b565b8063d86287aa14610217578063d8d4ec021461023b5761011b565b80638da5cb5b146101c7578063a8b1959a146101dc578063c2b3f72f146101ef578063d1e8076a146102025761011b565b80637e1c0c09116100ee5780637e1c0c09146101865780638202f4bc1461018e5780638713a48f146101a157806387c1ed12146101b45761011b565b80631e83409a146101205780636b904f45146101495780636bdc06f51461015c578063715018a61461017c575b600080fd5b61013361012e366004611619565b61028c565b6040516101409190611b7a565b60405180910390f35b610133610157366004611619565b61047d565b61016f61016a366004611619565b610498565b604051610140919061186b565b610184610647565b005b610133610712565b61018461019c366004611633565b610718565b6101846101af366004611678565b610a90565b61016f6101c236600461178e565b610b84565b6101cf610c19565b60405161014091906117be565b61016f6101ea366004611619565b610c28565b6101336101fd366004611619565b610d6d565b61020a610d7f565b604051610140919061181e565b61022a610225366004611619565b610de1565b604051610140959493929190611876565b61024e610249366004611619565b610e15565b604051610140949392919061189b565b61018461026c366004611619565b610e48565b6101cf61027f36600461178e565b610f69565b6101cf610f93565b6001546000906001600160a01b031633146102c25760405162461bcd60e51b81526004016102b9906118b8565b60405180910390fd5b6001600160a01b0382166000908152600360205260409020546102f75760405162461bcd60e51b81526004016102b99061194c565b6001600160a01b03821660009081526003602081815260408084208054600284529185204290850155929091529190556005546103349082610fa2565b600555600180546001600160a01b038581166000908152600260208190526040918290208054958101549181015460039091015492517f8cec29230000000000000000000000000000000000000000000000000000000081529390941694638cec2923946103b0948a94899460ff9094169392916004016117eb565b602060405180830381600087803b1580156103ca57600080fd5b505af11580156103de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104029190611772565b506001600160a01b0383166000908152600260208190526040808320805461ffff1916815560018101849055918201839055600390910191909155517f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d49061046d90859084906117d2565b60405180910390a190505b919050565b6001600160a01b031660009081526003602052604090205490565b60006104a2611004565b6001600160a01b03166104b3610c19565b6001600160a01b03161461050e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0382166000908152600360205260409020546105435760405162461bcd60e51b81526004016102b99061194c565b6001600160a01b03821660009081526003602081815260408084208054908590556002808452828620805461ffff1916815560018101879055908101869055909301939093556004805484518184028101840190955280855292936105f39387939192918301828280156105e057602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116105c2575b505050505061100890919063ffffffff16565b506005546106019082610fa2565b6005556040517f27f83af92b39768b17fe0c8d6922452702717efb8626d97e7a754e0b27d4f6d29061063690859084906117d2565b60405180910390a150600192915050565b61064f611004565b6001600160a01b0316610660610c19565b6001600160a01b0316146106bb576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b60055481565b610720611004565b6001600160a01b0316610731610c19565b6001600160a01b03161461078c576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0384166107b25760405162461bcd60e51b81526004016102b9906118ef565b6001600160a01b0384163014156107db5760405162461bcd60e51b81526004016102b9906119e0565b826107f85760405162461bcd60e51b81526004016102b990611983565b6001600160a01b0384166000908152600360205260409020541561082e5760405162461bcd60e51b81526004016102b990611a63565b63603c20704210156108525760405162461bcd60e51b81526004016102b990611ae6565b6001546040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906370a082319061089b9030906004016117be565b60206040518083038186803b1580156108b357600080fd5b505afa1580156108c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108eb91906117a6565b6005546108f89085611085565b11156109165760405162461bcd60e51b81526004016102b990611b43565b6005546109239084611085565b6005556001600160a01b03841660008181526003602090815260408083208790556004805460018082019092557f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b01805473ffffffffffffffffffffffffffffffffffffffff191690951790945560029091529020805460ff191684151517808255818301849055909160ff909116151514156109d2576006546109c8908390611085565b60028201556109e6565b6007546109e0908390611085565b60028201555b60038181018381556001600160a01b0387166000908152600260208190526040918290208554815460ff191660ff918216151517808355875461ff00199091166101009182900490921615150217815560018087015490820155818601549181019190915591549190920155517e7dc6ab80cc84c043b7b8d4fcafc802187470087f7ea7fccd2e17aecd0256a190610a8190879087906117d2565b60405180910390a15050505050565b610a98611004565b6001600160a01b0316610aa9610c19565b6001600160a01b031614610b04576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60005b8151811015610b8057610b78828281518110610b1f57fe5b602002602001015160000151838381518110610b3757fe5b602002602001015160200151848481518110610b4f57fe5b602002602001015160400151858581518110610b6757fe5b602002602001015160600151610718565b600101610b07565b5050565b6000610b8e611004565b6001600160a01b0316610b9f610c19565b6001600160a01b031614610bfa576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600154610c11906001600160a01b031633846110e6565b506001919050565b6000546001600160a01b031690565b6000610c32611004565b6001600160a01b0316610c43610c19565b6001600160a01b031614610c9e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001546040517f4f2050870000000000000000000000000000000000000000000000000000000081526000916001600160a01b031690634f20508790610ce89086906004016117be565b602060405180830381600087803b158015610d0257600080fd5b505af1158015610d16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3a91906117a6565b90507f27f83af92b39768b17fe0c8d6922452702717efb8626d97e7a754e0b27d4f6d283826040516106369291906117d2565b60036020526000908152604090205481565b60606004805480602002602001604051908101604052809291908181526020018280548015610dd757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610db9575b5050505050905090565b6002602081905260009182526040909120805460018201549282015460039092015460ff8083169461010090930416929085565b6001600160a01b03166000908152600260208190526040909120805460018201549282015460039092015460ff90911693565b610e50611004565b6001600160a01b0316610e61610c19565b6001600160a01b031614610ebc576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610f015760405162461bcd60e51b8152600401808060200182810382526026815260200180611bb96026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60048181548110610f7957600080fd5b6000918252602090912001546001600160a01b0316905081565b6001546001600160a01b031681565b600082821115610ff9576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b508082035b92915050565b3390565b6060600080611017858561116b565b915091508061106d576040805162461bcd60e51b815260206004820152601560248201527f41646472657373206e6f7420696e2061727261792e0000000000000000000000604482015290519081900360640190fd5b600061107986846111d1565b509350610ffe92505050565b6000828201838110156110df576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611166908490611335565b505050565b81516000908190815b818110156111be57846001600160a01b031686828151811061119257fe5b60200260200101516001600160a01b031614156111b6579250600191506111ca9050565b600101611174565b50600019600092509250505b9250929050565b815160609060009080841061122d576040805162461bcd60e51b815260206004820152601860248201527f496e646578206d757374206265203c2041206c656e6774680000000000000000604482015290519081900360640190fd5b60006001820367ffffffffffffffff8111801561124957600080fd5b50604051908082528060200260200182016040528015611273578160200160208202803683370190505b50905060005b858110156112c15786818151811061128d57fe5b60200260200101518282815181106112a157fe5b6001600160a01b0390921660209283029190910190910152600101611279565b50600185015b82811015611312578681815181106112db57fe5b60200260200101518260018303815181106112f257fe5b6001600160a01b03909216602092830291909101909101526001016112c7565b508086868151811061132057fe5b60200260200101519350935050509250929050565b600061138a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113e69092919063ffffffff16565b805190915015611166578080602001905160208110156113a957600080fd5b50516111665760405162461bcd60e51b815260040180806020018281038252602a815260200180611c05602a913960400191505060405180910390fd5b60606113f584846000856113fd565b949350505050565b60608247101561143e5760405162461bcd60e51b8152600401808060200182810382526026815260200180611bdf6026913960400191505060405180910390fd5b61144785611558565b611498576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106114d65780518252601f1990920191602091820191016114b7565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611538576040519150601f19603f3d011682016040523d82523d6000602084013e61153d565b606091505b509150915061154d82828661155e565b979650505050505050565b3b151590565b6060831561156d5750816110df565b82511561157d5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156115c75781810151838201526020016115af565b50505050905090810190601f1680156115f45780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b80356001600160a01b038116811461047857600080fd5b60006020828403121561162a578081fd5b6110df82611602565b60008060008060808587031215611648578283fd5b61165185611602565b935060208501359250604085013561166881611ba7565b9396929550929360600135925050565b6000602080838503121561168a578182fd5b823567ffffffffffffffff808211156116a1578384fd5b818501915085601f8301126116b4578384fd5b8135818111156116c057fe5b6116cd8485830201611b83565b818152848101908486016080808502870188018b10156116eb578889fd5b8896505b848710156117635780828c031215611705578889fd5b60408051828101818110898211171561171a57fe5b825261172584611602565b8152898401358a8201528184013561173c81611ba7565b918101919091526060838101359082015284526001969096019592870192908101906116ef565b50909998505050505050505050565b600060208284031215611783578081fd5b81516110df81611ba7565b60006020828403121561179f578081fd5b5035919050565b6000602082840312156117b7578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b03969096168652602086019490945291151560408501526060840152608083015260a082015260c00190565b6020808252825182820181905260009190848201906040850190845b8181101561185f5783516001600160a01b03168352928401929184019160010161183a565b50909695505050505050565b901515815260200190565b9415158552921515602085015260408401919091526060830152608082015260a00190565b931515845260208401929092526040830152606082015260800190565b6020808252600f908201527f6f6e6c79204241424c20546f6b656e0000000000000000000000000000000000604082015260600190565b6020808252603c908201527f54696d654c6f636b52656769737472793a3a72656769737465723a2063616e6e60408201527f6f7420726567697374657220746865207a65726f206164647265737300000000606082015260800190565b6020808252600e908201527f4e6f742072656769737465726564000000000000000000000000000000000000604082015260600190565b6020808252602c908201527f54696d654c6f636b52656769737472793a3a72656769737465723a204469737460408201527f7269627574696f6e203d20300000000000000000000000000000000000000000606082015260800190565b6020808252604d908201527f54696d654c6f636b52656769737472793a3a72656769737465723a2054696d6560408201527f204c6f636b20526567697374727920636f6e74726163742063616e6e6f74206260608201527f6520616e20696e766573746f7200000000000000000000000000000000000000608082015260a00190565b6020808252604e908201527f54696d654c6f636b52656769737472793a3a72656769737465723a446973747260408201527f69627574696f6e20666f722074686973206164647265737320697320616c726560608201527f6164792072656769737465726564000000000000000000000000000000000000608082015260a00190565b60208082526027908201527f43616e6e6f74207265676973746572206561726c696572207468616e204d617260408201527f6368203230323100000000000000000000000000000000000000000000000000606082015260800190565b60208082526011908201527f4e6f7420656e6f75676820746f6b656e73000000000000000000000000000000604082015260600190565b90815260200190565b60405181810167ffffffffffffffff81118282101715611b9f57fe5b604052919050565b8015158114611bb557600080fd5b5056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122096798d55c986d57d18a5475c61c8dc79b9f20e76d7daa2d77dd514ee58a1241564736f6c63430007060033", "devdoc": { "author": "Babylon Finance", "details": "This contract allows owner to register distributions for a TimeLockedToken To register a distribution, register method should be called by the owner. claim() should be called only by the BABL Token smartcontract (modifier onlyBABLToken) when any account registered to receive tokens make its own claim If case of a mistake, owner can cancel registration before the claim is done by the account Note this contract address must be setup in the TimeLockedToken's contract pointing to interact with (e.g. setTimeLockRegistry() function)", @@ -428,6 +502,11 @@ "_token": "TimeLockedToken contract to use in this registry" } }, + "getRegistrations()": { + "returns": { + "_0": "address[] Returns list of registrations" + } + }, "owner()": { "details": "Returns the address of the current owner." }, @@ -435,9 +514,11 @@ "params": { "distribution": "Tokens amount that receiver is due to get", "receiver": "Address belonging vesting conditions" - }, - "returns": { - "_0": "Whether or not the registration succeeded" + } + }, + "registerBatch((address,uint256,bool,uint256)[])": { + "params": { + "_registrations": "Registrations to process" } }, "renounceOwnership()": { @@ -473,8 +554,14 @@ "constructor": { "notice": "Construct a new Time Lock Registry and gives ownership to sender" }, + "getRegistrations()": { + "notice": "Gets registrations" + }, "register(address,uint256,bool,uint256)": { - "notice": "PRIVILEGED GOVERNANCE FUNCTION. Register new account under vesting conditions (Team, Advisors, Investors e.g. SAFT purchaser)Register new account under vesting conditions (Team, Advisors, Investors e.g. SAFT purchaser)" + "notice": "PRIVILEGED GOVERNANCE FUNCTIONRegister new account under vesting conditions (Team, Advisors, Investors e.g. SAFT purchaser)" + }, + "registerBatch((address,uint256,bool,uint256)[])": { + "notice": "PRIVILEGED GOVERNANCE FUNCTIONRegister multiple investors/team in a batch" }, "tokenVested(address)": { "notice": "A record of token owners under vesting conditions for each account, by index" @@ -489,7 +576,7 @@ "storageLayout": { "storage": [ { - "astId": 3848, + "astId": 1456, "contract": "contracts/token/TimeLockRegistry.sol:TimeLockRegistry", "label": "_owner", "offset": 0, @@ -497,23 +584,23 @@ "type": "t_address" }, { - "astId": 38122, + "astId": 37877, "contract": "contracts/token/TimeLockRegistry.sol:TimeLockRegistry", "label": "token", "offset": 0, "slot": "1", - "type": "t_contract(TimeLockedToken)39641" + "type": "t_contract(TimeLockedToken)39515" }, { - "astId": 38138, + "astId": 37902, "contract": "contracts/token/TimeLockRegistry.sol:TimeLockRegistry", "label": "tokenVested", "offset": 0, "slot": "2", - "type": "t_mapping(t_address,t_struct(TokenVested)38133_storage)" + "type": "t_mapping(t_address,t_struct(TokenVested)37897_storage)" }, { - "astId": 38142, + "astId": 37906, "contract": "contracts/token/TimeLockRegistry.sol:TimeLockRegistry", "label": "registeredDistributions", "offset": 0, @@ -521,19 +608,35 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 38147, + "astId": 37909, "contract": "contracts/token/TimeLockRegistry.sol:TimeLockRegistry", - "label": "teamVesting", + "label": "registrations", "offset": 0, "slot": "4", + "type": "t_array(t_address)dyn_storage" + }, + { + "astId": 37911, + "contract": "contracts/token/TimeLockRegistry.sol:TimeLockRegistry", + "label": "totalTokens", + "offset": 0, + "slot": "5", "type": "t_uint256" }, { - "astId": 38152, + "astId": 37916, + "contract": "contracts/token/TimeLockRegistry.sol:TimeLockRegistry", + "label": "teamVesting", + "offset": 0, + "slot": "6", + "type": "t_uint256" + }, + { + "astId": 37921, "contract": "contracts/token/TimeLockRegistry.sol:TimeLockRegistry", "label": "investorVesting", "offset": 0, - "slot": "5", + "slot": "7", "type": "t_uint256" } ], @@ -543,22 +646,28 @@ "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_contract(TimeLockedToken)39641": { + "t_contract(TimeLockedToken)39515": { "encoding": "inplace", "label": "contract TimeLockedToken", "numberOfBytes": "20" }, - "t_mapping(t_address,t_struct(TokenVested)38133_storage)": { + "t_mapping(t_address,t_struct(TokenVested)37897_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct TimeLockRegistry.TokenVested)", "numberOfBytes": "32", - "value": "t_struct(TokenVested)38133_storage" + "value": "t_struct(TokenVested)37897_storage" }, "t_mapping(t_address,t_uint256)": { "encoding": "mapping", @@ -567,12 +676,12 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_struct(TokenVested)38133_storage": { + "t_struct(TokenVested)37897_storage": { "encoding": "inplace", "label": "struct TimeLockRegistry.TokenVested", "members": [ { - "astId": 38124, + "astId": 37888, "contract": "contracts/token/TimeLockRegistry.sol:TimeLockRegistry", "label": "team", "offset": 0, @@ -580,7 +689,7 @@ "type": "t_bool" }, { - "astId": 38126, + "astId": 37890, "contract": "contracts/token/TimeLockRegistry.sol:TimeLockRegistry", "label": "cliff", "offset": 1, @@ -588,7 +697,7 @@ "type": "t_bool" }, { - "astId": 38128, + "astId": 37892, "contract": "contracts/token/TimeLockRegistry.sol:TimeLockRegistry", "label": "vestingBegin", "offset": 0, @@ -596,7 +705,7 @@ "type": "t_uint256" }, { - "astId": 38130, + "astId": 37894, "contract": "contracts/token/TimeLockRegistry.sol:TimeLockRegistry", "label": "vestingEnd", "offset": 0, @@ -604,7 +713,7 @@ "type": "t_uint256" }, { - "astId": 38132, + "astId": 37896, "contract": "contracts/token/TimeLockRegistry.sol:TimeLockRegistry", "label": "lastClaim", "offset": 0, diff --git a/deployments/artifacts/mainnet/Treasury.json b/deployments/artifacts/mainnet/Treasury.json index 96017446c..10c906170 100644 --- a/deployments/artifacts/mainnet/Treasury.json +++ b/deployments/artifacts/mainnet/Treasury.json @@ -1,5 +1,5 @@ { - "address": "0xC5cbEB6a7f79C027611b58Cc192769035c79De35", + "address": "0xEaBF7dcbc3069cAe0a250a3FAEf217ae8e689454", "abi": [ { "inputs": [ @@ -148,44 +148,44 @@ "type": "receive" } ], - "transactionHash": "0x146cbff50785722aac122fb52b915fdff3f3c6cca010e59307f435d53c832cc9", + "transactionHash": "0xd1e88ec7290b2904e0b34e866538379cc8d8c95a3f8986b3dd746640727baaca", "receipt": { "to": null, - "from": "0x311FEE0d859FA936FaEd456758dCD8047C4fFEd7", - "contractAddress": "0x84C17BAdBe4Ed12492B1d57A25030d74A0ee7504", - "transactionIndex": 12, - "gasUsed": "753656", - "logsBloom": "0x00000000000000000000000000000000000000001000000000800000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000001000000400000000000000000000000000000020000000000000000000800000000000000000000000800000000400000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000004000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x8993f051dadde4dd752b2be0189fffab5750872a098243aca9ca529c98ffa678", - "transactionHash": "0x146cbff50785722aac122fb52b915fdff3f3c6cca010e59307f435d53c832cc9", + "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", + "contractAddress": "0xEaBF7dcbc3069cAe0a250a3FAEf217ae8e689454", + "transactionIndex": 172, + "gasUsed": "817756", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000008000000400000000000000000000001000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000004000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x4565eb773a03f5f15f9cf57d168354c11ee63ef5a5e9fa0739d96072b1226279", + "transactionHash": "0xd1e88ec7290b2904e0b34e866538379cc8d8c95a3f8986b3dd746640727baaca", "logs": [ { - "transactionIndex": 12, - "blockNumber": 8516142, - "transactionHash": "0x146cbff50785722aac122fb52b915fdff3f3c6cca010e59307f435d53c832cc9", - "address": "0x84C17BAdBe4Ed12492B1d57A25030d74A0ee7504", + "transactionIndex": 172, + "blockNumber": 12451166, + "transactionHash": "0xd1e88ec7290b2904e0b34e866538379cc8d8c95a3f8986b3dd746640727baaca", + "address": "0xEaBF7dcbc3069cAe0a250a3FAEf217ae8e689454", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000311fee0d859fa936faed456758dcd8047c4ffed7" + "0x000000000000000000000000040cc3af8455f3c34d1df1d2a305e047a062bebf" ], "data": "0x", - "logIndex": 15, - "blockHash": "0x8993f051dadde4dd752b2be0189fffab5750872a098243aca9ca529c98ffa678" + "logIndex": 233, + "blockHash": "0x4565eb773a03f5f15f9cf57d168354c11ee63ef5a5e9fa0739d96072b1226279" } ], - "blockNumber": 8516142, - "cumulativeGasUsed": "8213142", + "blockNumber": 12451166, + "cumulativeGasUsed": "10584053", "status": 1, "byzantium": true }, "args": [ - "0x26E44AD5b46C6A8C167815B7D180F6a5eD91D7bc" + "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F" ], - "solcInputHash": "1cde26e1be086ba932a8865ced5ceef3", - "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBabController\",\"name\":\"_controller\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"TreasuryFundsSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"contract IBabController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"sendTreasuryETH\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"sendTreasuryFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"author\":\"Babylon Finance Contract that will receive the fees earned by the protocol. Governance will be able to send funds from the treasury.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of controller contract\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"sendTreasuryETH(uint256,address)\":{\"params\":{\"_amount\":\"Amount to send of the asset\",\"_to\":\"Address to send the assets to\"}},\"sendTreasuryFunds(address,uint256,address)\":{\"params\":{\"_amount\":\"Amount to send of the asset\",\"_asset\":\"Address of the asset to send\",\"_to\":\"Address to send the assets to\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"title\":\"Treasury\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Sets the protocol controller\"},\"sendTreasuryETH(uint256,address)\":{\"notice\":\"GOVERNANCE FUNCTION: Send an ETH amount to an address\"},\"sendTreasuryFunds(address,uint256,address)\":{\"notice\":\"GOVERNANCE FUNCTION: Send an asset amount to an address\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Treasury.sol\":\"Treasury\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () internal {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.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 using SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n // solhint-disable-next-line max-line-length\\n require((value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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 * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 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. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\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 { size := extcodesize(account) }\\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, \\\"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, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"contracts/Treasury.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol SetValuer)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport {IBabController} from './interfaces/IBabController.sol';\\n\\n/**\\n * @title Treasury\\n * @author Babylon Finance\\n *\\n * Contract that will receive the fees earned by the protocol.\\n * Governance will be able to send funds from the treasury.\\n */\\ncontract Treasury is Ownable {\\n using SafeERC20 for IERC20;\\n using Address for address;\\n /* ============ Events ============ */\\n\\n event TreasuryFundsSent(address _asset, uint256 _amount, address _to);\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the Controller contract\\n IBabController public controller;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Sets the protocol controller\\n *\\n * @param _controller Address of controller contract\\n */\\n constructor(IBabController _controller) {\\n require(address(_controller) != address(0), 'Controller must exist');\\n controller = _controller;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * GOVERNANCE FUNCTION: Send an asset amount to an address\\n *\\n * @param _asset Address of the asset to send\\n * @param _amount Amount to send of the asset\\n * @param _to Address to send the assets to\\n */\\n function sendTreasuryFunds(\\n address _asset,\\n uint256 _amount,\\n address _to\\n ) external onlyOwner {\\n require(_asset != address(0), 'Asset must exist');\\n require(_to != address(0), 'Target address must exist');\\n IERC20(_asset).safeTransferFrom(address(this), _to, _amount);\\n emit TreasuryFundsSent(_asset, _amount, _to);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION: Send an ETH amount to an address\\n *\\n * @param _amount Amount to send of the asset\\n * @param _to Address to send the assets to\\n */\\n function sendTreasuryETH(uint256 _amount, address payable _to) external onlyOwner {\\n require(_to != address(0), 'Target address must exist');\\n require(address(this).balance >= _amount, 'Not enough funds in treasury');\\n Address.sendValue(_to, _amount);\\n emit TreasuryFundsSent(address(0), _amount, _to);\\n }\\n\\n // Can receive ETH\\n // solhint-disable-next-line\\n receive() external payable {}\\n}\\n\",\"keccak256\":\"0x8142a88b9059f324aa29dd50889f34e40c8b25fa8978f8fd21e84022d56eda3c\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityMinimum(uint256 _minRiskyPairLiquidityEth) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minRiskyPairLiquidityEth() external view returns (uint256);\\n\\n function getUniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0x57cf4ece98219f805a416e8c24728d30d9b37c4126d66785d2617b97e35ffae6\",\"license\":\"Apache License\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50604051610ce1380380610ce18339818101604052602081101561003357600080fd5b5051600061003f610109565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600160a01b0381166100e4576040805162461bcd60e51b815260206004820152601560248201527f436f6e74726f6c6c6572206d7573742065786973740000000000000000000000604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b039290921691909117905561010d565b3390565b610bc58061011c6000396000f3fe6080604052600436106100695760003560e01c8063af2bfe5f11610043578063af2bfe5f146100f6578063f2fde38b14610139578063f77c47911461016c57610070565b80632f0fd4c714610075578063715018a6146100b05780638da5cb5b146100c557610070565b3661007057005b600080fd5b34801561008157600080fd5b506100ae6004803603604081101561009857600080fd5b50803590602001356001600160a01b0316610181565b005b3480156100bc57600080fd5b506100ae6102fc565b3480156100d157600080fd5b506100da6103c7565b604080516001600160a01b039092168252519081900360200190f35b34801561010257600080fd5b506100ae6004803603606081101561011957600080fd5b506001600160a01b038135811691602081013591604090910135166103d6565b34801561014557600080fd5b506100ae6004803603602081101561015c57600080fd5b50356001600160a01b0316610564565b34801561017857600080fd5b506100da610685565b610189610694565b6001600160a01b031661019a6103c7565b6001600160a01b0316146101f5576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610250576040805162461bcd60e51b815260206004820152601960248201527f5461726765742061646472657373206d75737420657869737400000000000000604482015290519081900360640190fd5b814710156102a5576040805162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f7567682066756e647320696e20747265617375727900000000604482015290519081900360640190fd5b6102af8183610698565b6040805160008152602081018490526001600160a01b0383168183015290517ff2d6edacca58c9bf829859afa33a724a6e5cd7b8e9f2bb729b5e90e0f274affc9181900360600190a15050565b610304610694565b6001600160a01b03166103156103c7565b6001600160a01b031614610370576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000546001600160a01b031690565b6103de610694565b6001600160a01b03166103ef6103c7565b6001600160a01b03161461044a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0383166104a5576040805162461bcd60e51b815260206004820152601060248201527f4173736574206d75737420657869737400000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116610500576040805162461bcd60e51b815260206004820152601960248201527f5461726765742061646472657373206d75737420657869737400000000000000604482015290519081900360640190fd5b6105156001600160a01b038416308385610782565b604080516001600160a01b0380861682526020820185905283168183015290517ff2d6edacca58c9bf829859afa33a724a6e5cd7b8e9f2bb729b5e90e0f274affc9181900360600190a1505050565b61056c610694565b6001600160a01b031661057d6103c7565b6001600160a01b0316146105d8576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03811661061d5760405162461bcd60e51b8152600401808060200182810382526026815260200180610ae06026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6001546001600160a01b031681565b3390565b804710156106ed576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015290519081900360640190fd5b6040516000906001600160a01b0384169083908381818185875af1925050503d8060008114610738576040519150601f19603f3d011682016040523d82523d6000602084013e61073d565b606091505b505090508061077d5760405162461bcd60e51b815260040180806020018281038252603a815260200180610b06603a913960400191505060405180910390fd5b505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017905261080a908590610810565b50505050565b6000610865826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166108c19092919063ffffffff16565b80519091501561077d5780806020019051602081101561088457600080fd5b505161077d5760405162461bcd60e51b815260040180806020018281038252602a815260200180610b66602a913960400191505060405180910390fd5b60606108d084846000856108da565b90505b9392505050565b60608247101561091b5760405162461bcd60e51b8152600401808060200182810382526026815260200180610b406026913960400191505060405180910390fd5b61092485610a35565b610975576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106109b35780518252601f199092019160209182019101610994565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610a15576040519150601f19603f3d011682016040523d82523d6000602084013e610a1a565b606091505b5091509150610a2a828286610a3b565b979650505050505050565b3b151590565b60608315610a4a5750816108d3565b825115610a5a5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610aa4578181015183820152602001610a8c565b50505050905090810190601f168015610ad15780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122047b6991842ded57d3e60d943d86e03d67080199b7510e087157ebf0e3c1ee6cb64736f6c63430007060033", - "deployedBytecode": "0x6080604052600436106100695760003560e01c8063af2bfe5f11610043578063af2bfe5f146100f6578063f2fde38b14610139578063f77c47911461016c57610070565b80632f0fd4c714610075578063715018a6146100b05780638da5cb5b146100c557610070565b3661007057005b600080fd5b34801561008157600080fd5b506100ae6004803603604081101561009857600080fd5b50803590602001356001600160a01b0316610181565b005b3480156100bc57600080fd5b506100ae6102fc565b3480156100d157600080fd5b506100da6103c7565b604080516001600160a01b039092168252519081900360200190f35b34801561010257600080fd5b506100ae6004803603606081101561011957600080fd5b506001600160a01b038135811691602081013591604090910135166103d6565b34801561014557600080fd5b506100ae6004803603602081101561015c57600080fd5b50356001600160a01b0316610564565b34801561017857600080fd5b506100da610685565b610189610694565b6001600160a01b031661019a6103c7565b6001600160a01b0316146101f5576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610250576040805162461bcd60e51b815260206004820152601960248201527f5461726765742061646472657373206d75737420657869737400000000000000604482015290519081900360640190fd5b814710156102a5576040805162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f7567682066756e647320696e20747265617375727900000000604482015290519081900360640190fd5b6102af8183610698565b6040805160008152602081018490526001600160a01b0383168183015290517ff2d6edacca58c9bf829859afa33a724a6e5cd7b8e9f2bb729b5e90e0f274affc9181900360600190a15050565b610304610694565b6001600160a01b03166103156103c7565b6001600160a01b031614610370576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000546001600160a01b031690565b6103de610694565b6001600160a01b03166103ef6103c7565b6001600160a01b03161461044a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0383166104a5576040805162461bcd60e51b815260206004820152601060248201527f4173736574206d75737420657869737400000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b038116610500576040805162461bcd60e51b815260206004820152601960248201527f5461726765742061646472657373206d75737420657869737400000000000000604482015290519081900360640190fd5b6105156001600160a01b038416308385610782565b604080516001600160a01b0380861682526020820185905283168183015290517ff2d6edacca58c9bf829859afa33a724a6e5cd7b8e9f2bb729b5e90e0f274affc9181900360600190a1505050565b61056c610694565b6001600160a01b031661057d6103c7565b6001600160a01b0316146105d8576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03811661061d5760405162461bcd60e51b8152600401808060200182810382526026815260200180610ae06026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6001546001600160a01b031681565b3390565b804710156106ed576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015290519081900360640190fd5b6040516000906001600160a01b0384169083908381818185875af1925050503d8060008114610738576040519150601f19603f3d011682016040523d82523d6000602084013e61073d565b606091505b505090508061077d5760405162461bcd60e51b815260040180806020018281038252603a815260200180610b06603a913960400191505060405180910390fd5b505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017905261080a908590610810565b50505050565b6000610865826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166108c19092919063ffffffff16565b80519091501561077d5780806020019051602081101561088457600080fd5b505161077d5760405162461bcd60e51b815260040180806020018281038252602a815260200180610b66602a913960400191505060405180910390fd5b60606108d084846000856108da565b90505b9392505050565b60608247101561091b5760405162461bcd60e51b8152600401808060200182810382526026815260200180610b406026913960400191505060405180910390fd5b61092485610a35565b610975576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106109b35780518252601f199092019160209182019101610994565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610a15576040519150601f19603f3d011682016040523d82523d6000602084013e610a1a565b606091505b5091509150610a2a828286610a3b565b979650505050505050565b3b151590565b60608315610a4a5750816108d3565b825115610a5a5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610aa4578181015183820152602001610a8c565b50505050905090810190601f168015610ad15780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122047b6991842ded57d3e60d943d86e03d67080199b7510e087157ebf0e3c1ee6cb64736f6c63430007060033", + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBabController\",\"name\":\"_controller\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"TreasuryFundsSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"contract IBabController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"sendTreasuryETH\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"}],\"name\":\"sendTreasuryFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"author\":\"Babylon Finance Contract that will receive the fees earned by the protocol. Governance will be able to send funds from the treasury.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of controller contract\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"sendTreasuryETH(uint256,address)\":{\"params\":{\"_amount\":\"Amount to send of the asset\",\"_to\":\"Address to send the assets to\"}},\"sendTreasuryFunds(address,uint256,address)\":{\"params\":{\"_amount\":\"Amount to send of the asset\",\"_asset\":\"Address of the asset to send\",\"_to\":\"Address to send the assets to\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"title\":\"Treasury\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Sets the protocol controller\"},\"sendTreasuryETH(uint256,address)\":{\"notice\":\"GOVERNANCE FUNCTION: Send an ETH amount to an address\"},\"sendTreasuryFunds(address,uint256,address)\":{\"notice\":\"GOVERNANCE FUNCTION: Send an asset amount to an address\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Treasury.sol\":\"Treasury\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () internal {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/SafeMath.sol\\\";\\nimport \\\"../../utils/Address.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 using SafeMath for uint256;\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n // solhint-disable-next-line max-line-length\\n require((value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\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 * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 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. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.2 <0.8.0;\\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 { size := extcodesize(account) }\\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, \\\"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, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"contracts/Treasury.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol SetValuer)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\nimport {IBabController} from './interfaces/IBabController.sol';\\n\\n/**\\n * @title Treasury\\n * @author Babylon Finance\\n *\\n * Contract that will receive the fees earned by the protocol.\\n * Governance will be able to send funds from the treasury.\\n */\\ncontract Treasury is Ownable, ReentrancyGuard {\\n using SafeERC20 for IERC20;\\n using Address for address;\\n /* ============ Events ============ */\\n\\n event TreasuryFundsSent(address _asset, uint256 _amount, address _to);\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the Controller contract\\n IBabController public controller;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Sets the protocol controller\\n *\\n * @param _controller Address of controller contract\\n */\\n constructor(IBabController _controller) {\\n require(address(_controller) != address(0), 'Controller must exist');\\n controller = _controller;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * GOVERNANCE FUNCTION: Send an asset amount to an address\\n *\\n * @param _asset Address of the asset to send\\n * @param _amount Amount to send of the asset\\n * @param _to Address to send the assets to\\n */\\n function sendTreasuryFunds(\\n address _asset,\\n uint256 _amount,\\n address _to\\n ) external onlyOwner nonReentrant {\\n require(_asset != address(0), 'Asset must exist');\\n require(_to != address(0), 'Target address must exist');\\n IERC20(_asset).safeTransferFrom(address(this), _to, _amount);\\n emit TreasuryFundsSent(_asset, _amount, _to);\\n }\\n\\n /**\\n * GOVERNANCE FUNCTION: Send an ETH amount to an address\\n *\\n * @param _amount Amount to send of the asset\\n * @param _to Address to send the assets to\\n */\\n function sendTreasuryETH(uint256 _amount, address payable _to) external onlyOwner nonReentrant {\\n require(_to != address(0), 'Target address must exist');\\n require(address(this).balance >= _amount, 'Not enough funds in treasury');\\n Address.sendValue(_to, _amount);\\n emit TreasuryFundsSent(address(0), _amount, _to);\\n }\\n\\n // Can receive ETH\\n // solhint-disable-next-line\\n receive() external payable {}\\n}\\n\",\"keccak256\":\"0xa26edc6075a47d7b82bc6651229c36485cf349ad61fcfc1ef09662c9e6843389\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editGardenNFT(address _newGardenNFT) external;\\n\\n function editStrategyNFT(address _newStrategyNFT) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function editUniswapFactory(address _newUniswapFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\\n\\n function maxContributorsPerGarden() external view returns (uint256);\\n\\n function gardenCreationIsOpen() external view returns (bool);\\n\\n function openPublicGardenCreation() external;\\n\\n function setMaxContributorsPerGarden(uint256 _newMax) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function gardenNFT() external view returns (address);\\n\\n function strategyNFT() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\\n\\n function uniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0xdee5a27301c24f507d312f32249487fa9b0a756062a7e479405a1d1ee9ee7bb8\",\"license\":\"Apache License\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50604051610da7380380610da78339818101604052602081101561003357600080fd5b5051600061003f61010d565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180556001600160a01b0381166100e8576040805162461bcd60e51b815260206004820152601560248201527f436f6e74726f6c6c6572206d7573742065786973740000000000000000000000604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055610111565b3390565b610c87806101206000396000f3fe6080604052600436106100695760003560e01c8063af2bfe5f11610043578063af2bfe5f146100f6578063f2fde38b14610139578063f77c47911461016c57610070565b80632f0fd4c714610075578063715018a6146100b05780638da5cb5b146100c557610070565b3661007057005b600080fd5b34801561008157600080fd5b506100ae6004803603604081101561009857600080fd5b50803590602001356001600160a01b0316610181565b005b3480156100bc57600080fd5b506100ae61035d565b3480156100d157600080fd5b506100da610428565b604080516001600160a01b039092168252519081900360200190f35b34801561010257600080fd5b506100ae6004803603606081101561011957600080fd5b506001600160a01b03813581169160208101359160409091013516610437565b34801561014557600080fd5b506100ae6004803603602081101561015c57600080fd5b50356001600160a01b0316610626565b34801561017857600080fd5b506100da610747565b610189610756565b6001600160a01b031661019a610428565b6001600160a01b0316146101f5576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6002600154141561024d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026001556001600160a01b0381166102ad576040805162461bcd60e51b815260206004820152601960248201527f5461726765742061646472657373206d75737420657869737400000000000000604482015290519081900360640190fd5b81471015610302576040805162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f7567682066756e647320696e20747265617375727900000000604482015290519081900360640190fd5b61030c818361075a565b6040805160008152602081018490526001600160a01b0383168183015290517ff2d6edacca58c9bf829859afa33a724a6e5cd7b8e9f2bb729b5e90e0f274affc9181900360600190a1505060018055565b610365610756565b6001600160a01b0316610376610428565b6001600160a01b0316146103d1576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000546001600160a01b031690565b61043f610756565b6001600160a01b0316610450610428565b6001600160a01b0316146104ab576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60026001541415610503576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026001556001600160a01b038316610563576040805162461bcd60e51b815260206004820152601060248201527f4173736574206d75737420657869737400000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b0381166105be576040805162461bcd60e51b815260206004820152601960248201527f5461726765742061646472657373206d75737420657869737400000000000000604482015290519081900360640190fd5b6105d36001600160a01b038416308385610844565b604080516001600160a01b0380861682526020820185905283168183015290517ff2d6edacca58c9bf829859afa33a724a6e5cd7b8e9f2bb729b5e90e0f274affc9181900360600190a150506001805550565b61062e610756565b6001600160a01b031661063f610428565b6001600160a01b03161461069a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166106df5760405162461bcd60e51b8152600401808060200182810382526026815260200180610ba26026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6002546001600160a01b031681565b3390565b804710156107af576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015290519081900360640190fd5b6040516000906001600160a01b0384169083908381818185875af1925050503d80600081146107fa576040519150601f19603f3d011682016040523d82523d6000602084013e6107ff565b606091505b505090508061083f5760405162461bcd60e51b815260040180806020018281038252603a815260200180610bc8603a913960400191505060405180910390fd5b505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526108cc9085906108d2565b50505050565b6000610927826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166109839092919063ffffffff16565b80519091501561083f5780806020019051602081101561094657600080fd5b505161083f5760405162461bcd60e51b815260040180806020018281038252602a815260200180610c28602a913960400191505060405180910390fd5b6060610992848460008561099c565b90505b9392505050565b6060824710156109dd5760405162461bcd60e51b8152600401808060200182810382526026815260200180610c026026913960400191505060405180910390fd5b6109e685610af7565b610a37576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b60208310610a755780518252601f199092019160209182019101610a56565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610ad7576040519150601f19603f3d011682016040523d82523d6000602084013e610adc565b606091505b5091509150610aec828286610afd565b979650505050505050565b3b151590565b60608315610b0c575081610995565b825115610b1c5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610b66578181015183820152602001610b4e565b50505050905090810190601f168015610b935780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220e9cf54cce3ef9dbcf90fa22262401e929df3b187cffa071539be9e52fa8e96ae64736f6c63430007060033", + "deployedBytecode": "0x6080604052600436106100695760003560e01c8063af2bfe5f11610043578063af2bfe5f146100f6578063f2fde38b14610139578063f77c47911461016c57610070565b80632f0fd4c714610075578063715018a6146100b05780638da5cb5b146100c557610070565b3661007057005b600080fd5b34801561008157600080fd5b506100ae6004803603604081101561009857600080fd5b50803590602001356001600160a01b0316610181565b005b3480156100bc57600080fd5b506100ae61035d565b3480156100d157600080fd5b506100da610428565b604080516001600160a01b039092168252519081900360200190f35b34801561010257600080fd5b506100ae6004803603606081101561011957600080fd5b506001600160a01b03813581169160208101359160409091013516610437565b34801561014557600080fd5b506100ae6004803603602081101561015c57600080fd5b50356001600160a01b0316610626565b34801561017857600080fd5b506100da610747565b610189610756565b6001600160a01b031661019a610428565b6001600160a01b0316146101f5576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6002600154141561024d576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026001556001600160a01b0381166102ad576040805162461bcd60e51b815260206004820152601960248201527f5461726765742061646472657373206d75737420657869737400000000000000604482015290519081900360640190fd5b81471015610302576040805162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f7567682066756e647320696e20747265617375727900000000604482015290519081900360640190fd5b61030c818361075a565b6040805160008152602081018490526001600160a01b0383168183015290517ff2d6edacca58c9bf829859afa33a724a6e5cd7b8e9f2bb729b5e90e0f274affc9181900360600190a1505060018055565b610365610756565b6001600160a01b0316610376610428565b6001600160a01b0316146103d1576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000546001600160a01b031690565b61043f610756565b6001600160a01b0316610450610428565b6001600160a01b0316146104ab576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60026001541415610503576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026001556001600160a01b038316610563576040805162461bcd60e51b815260206004820152601060248201527f4173736574206d75737420657869737400000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b0381166105be576040805162461bcd60e51b815260206004820152601960248201527f5461726765742061646472657373206d75737420657869737400000000000000604482015290519081900360640190fd5b6105d36001600160a01b038416308385610844565b604080516001600160a01b0380861682526020820185905283168183015290517ff2d6edacca58c9bf829859afa33a724a6e5cd7b8e9f2bb729b5e90e0f274affc9181900360600190a150506001805550565b61062e610756565b6001600160a01b031661063f610428565b6001600160a01b03161461069a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166106df5760405162461bcd60e51b8152600401808060200182810382526026815260200180610ba26026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6002546001600160a01b031681565b3390565b804710156107af576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015290519081900360640190fd5b6040516000906001600160a01b0384169083908381818185875af1925050503d80600081146107fa576040519150601f19603f3d011682016040523d82523d6000602084013e6107ff565b606091505b505090508061083f5760405162461bcd60e51b815260040180806020018281038252603a815260200180610bc8603a913960400191505060405180910390fd5b505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526108cc9085906108d2565b50505050565b6000610927826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166109839092919063ffffffff16565b80519091501561083f5780806020019051602081101561094657600080fd5b505161083f5760405162461bcd60e51b815260040180806020018281038252602a815260200180610c28602a913960400191505060405180910390fd5b6060610992848460008561099c565b90505b9392505050565b6060824710156109dd5760405162461bcd60e51b8152600401808060200182810382526026815260200180610c026026913960400191505060405180910390fd5b6109e685610af7565b610a37576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b60208310610a755780518252601f199092019160209182019101610a56565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610ad7576040519150601f19603f3d011682016040523d82523d6000602084013e610adc565b606091505b5091509150610aec828286610afd565b979650505050505050565b3b151590565b60608315610b0c575081610995565b825115610b1c5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610b66578181015183820152602001610b4e565b50505050905090810190601f168015610b935780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220e9cf54cce3ef9dbcf90fa22262401e929df3b187cffa071539be9e52fa8e96ae64736f6c63430007060033", "devdoc": { "author": "Babylon Finance Contract that will receive the fees earned by the protocol. Governance will be able to send funds from the treasury.", "kind": "dev", @@ -239,7 +239,7 @@ "storageLayout": { "storage": [ { - "astId": 3848, + "astId": 1456, "contract": "contracts/Treasury.sol:Treasury", "label": "_owner", "offset": 0, @@ -247,12 +247,20 @@ "type": "t_address" }, { - "astId": 13613, + "astId": 5603, "contract": "contracts/Treasury.sol:Treasury", - "label": "controller", + "label": "_status", "offset": 0, "slot": "1", - "type": "t_contract(IBabController)23675" + "type": "t_uint256" + }, + { + "astId": 12640, + "contract": "contracts/Treasury.sol:Treasury", + "label": "controller", + "offset": 0, + "slot": "2", + "type": "t_contract(IBabController)22767" } ], "types": { @@ -261,10 +269,15 @@ "label": "address", "numberOfBytes": "20" }, - "t_contract(IBabController)23675": { + "t_contract(IBabController)22767": { "encoding": "inplace", "label": "contract IBabController", "numberOfBytes": "20" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" } } } diff --git a/deployments/artifacts/mainnet/UniswapPoolIntegration.json b/deployments/artifacts/mainnet/UniswapPoolIntegration.json index 72b719d1b..777dd5553 100644 --- a/deployments/artifacts/mainnet/UniswapPoolIntegration.json +++ b/deployments/artifacts/mainnet/UniswapPoolIntegration.json @@ -1,5 +1,5 @@ { - "address": "0x7BeAce58e885f9bD5FEE24d6699AF683Ac4166cE", + "address": "0xe6aE8D5201EF6d38ADc5f9Dc673e04D5521A11d9", "abi": [ { "inputs": [ @@ -358,31 +358,31 @@ "type": "function" } ], - "transactionHash": "0xc37926f9d837f40c78a5260ffc8790169c6cd71ce6e7f93c1c46475b1e5549f0", + "transactionHash": "0xd952b72c7ca86a56fc1b4d935a1f5a10b129c2f3e200409c6bc8a158dbcf48dc", "receipt": { "to": null, "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", - "contractAddress": "0x7BeAce58e885f9bD5FEE24d6699AF683Ac4166cE", - "transactionIndex": 46, - "gasUsed": "1977285", + "contractAddress": "0xe6aE8D5201EF6d38ADc5f9Dc673e04D5521A11d9", + "transactionIndex": 58, + "gasUsed": "1977297", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x673d0d29589c82033e33556654850fbf34bb8e439a675961055c5ab32df75fde", - "transactionHash": "0xc37926f9d837f40c78a5260ffc8790169c6cd71ce6e7f93c1c46475b1e5549f0", + "blockHash": "0xe5935f11bf618645f095fd14eb3faea35e328cfb581afb97d37a880ee58441ae", + "transactionHash": "0xd952b72c7ca86a56fc1b4d935a1f5a10b129c2f3e200409c6bc8a158dbcf48dc", "logs": [], - "blockNumber": 12360960, - "cumulativeGasUsed": "4597517", + "blockNumber": 12451285, + "cumulativeGasUsed": "7233604", "status": 1, "byzantium": true }, "args": [ - "0xffe7c30daDb1B132b86aB7bbede496615d54c8Ac", + "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F", "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D" ], - "solcInputHash": "a02a2075cf667a20c416d2d0a5e8f337", - "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_weth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_uniswapRouterAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_pool\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_poolTokensOut\",\"type\":\"uint256\"}],\"name\":\"PoolEntered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_pool\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_poolTokensIn\",\"type\":\"uint256\"}],\"name\":\"PoolExited\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MAX_DELTA_BLOCKS\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_poolTokensIn\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"_tokensOut\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_minAmountsOut\",\"type\":\"uint256[]\"}],\"name\":\"exitPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_liquidity\",\"type\":\"uint256\"}],\"name\":\"getPoolMinAmountsOut\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_minAmountsOut\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"}],\"name\":\"getPoolTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getPoolTokensOut\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"getPoolWeights\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"initializedByGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"}],\"name\":\"isPool\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_poolTokensOut\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"_tokensIn\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_maxAmountsIn\",\"type\":\"uint256[]\"}],\"name\":\"joinPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"uniRouter\",\"outputs\":[{\"internalType\":\"contract IUniswapV2Router\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Protocol Kyber protocol trade integration\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of the controller\",\"_uniswapRouterAddress\":\"Address of Uniswap router\",\"_weth\":\"Address of the WETH ERC20\"}},\"exitPool(address,address,uint256,address[],uint256[])\":{\"params\":{\"_minAmountsOut\":\"Array of min token quantities to receive from the pool\",\"_poolAddress\":\"Address of the pool token to join\",\"_poolTokensIn\":\"Pool tokens to exchange for the underlying tokens\",\"_strategy\":\"Address of the strategy\",\"_tokensOut\":\"Array of token addresses to withdraw\"}},\"isPool(address)\":{\"params\":{\"_poolAddress\":\"Pool address to check\"},\"returns\":{\"_0\":\"bool True if the address is a pool\"}},\"joinPool(address,address,uint256,address[],uint256[])\":{\"params\":{\"_maxAmountsIn\":\"Array of max token quantities to pull out from the garden\",\"_poolAddress\":\"Address of the pool token to join\",\"_poolTokensOut\":\"Min amount of pool tokens to receive\",\"_strategy\":\"Address of the strategy\",\"_tokensIn\":\"Array of token addresses to deposit\"}}},\"title\":\"BalancerIntegration\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates the integration\"},\"exitPool(address,address,uint256,address[],uint256[])\":{\"notice\":\"Exits a liquidity pool. Accrue protocol fee (if any)\"},\"getName()\":{\"notice\":\"Returns the name of the integration\"},\"isPool(address)\":{\"notice\":\"Checks whether a pool address is valid\"},\"joinPool(address,address,uint256,address[],uint256[])\":{\"notice\":\"Joins a pool\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/integrations/pool/UniswapPoolIntegration.sol\":\"UniswapPoolIntegration\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\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 /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\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, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x7b2b8baa20fd60ab4a328c8e34c64a353651b80ba4b5b157cbb61813f6f85d55\",\"license\":\"MIT\"},\"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol\":{\"content\":\"pragma solidity >=0.5.0;\\n\\ninterface IUniswapV2Pair {\\n event Approval(address indexed owner, address indexed spender, uint value);\\n event Transfer(address indexed from, address indexed to, uint value);\\n\\n function name() external pure returns (string memory);\\n function symbol() external pure returns (string memory);\\n function decimals() external pure returns (uint8);\\n function totalSupply() external view returns (uint);\\n function balanceOf(address owner) external view returns (uint);\\n function allowance(address owner, address spender) external view returns (uint);\\n\\n function approve(address spender, uint value) external returns (bool);\\n function transfer(address to, uint value) external returns (bool);\\n function transferFrom(address from, address to, uint value) external returns (bool);\\n\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n function PERMIT_TYPEHASH() external pure returns (bytes32);\\n function nonces(address owner) external view returns (uint);\\n\\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\\n\\n event Mint(address indexed sender, uint amount0, uint amount1);\\n event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\\n event Swap(\\n address indexed sender,\\n uint amount0In,\\n uint amount1In,\\n uint amount0Out,\\n uint amount1Out,\\n address indexed to\\n );\\n event Sync(uint112 reserve0, uint112 reserve1);\\n\\n function MINIMUM_LIQUIDITY() external pure returns (uint);\\n function factory() external view returns (address);\\n function token0() external view returns (address);\\n function token1() external view returns (address);\\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\\n function price0CumulativeLast() external view returns (uint);\\n function price1CumulativeLast() external view returns (uint);\\n function kLast() external view returns (uint);\\n\\n function mint(address to) external returns (uint liquidity);\\n function burn(address to) external returns (uint amount0, uint amount1);\\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\\n function skim(address to) external;\\n function sync() external;\\n\\n function initialize(address, address) external;\\n}\\n\",\"keccak256\":\"0x7c9bc70e5996c763e02ff38905282bc24fb242b0ef2519a003b36824fc524a4b\"},\"contracts/integrations/BaseIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IIntegration} from '../interfaces/IIntegration.sol';\\nimport {IWETH} from '../interfaces/external/weth/IWETH.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\n\\n/**\\n * @title BaseIntegration\\n * @author Babylon Finance\\n *\\n * Abstract class that houses common Integration-related state and functions.\\n */\\nabstract contract BaseIntegration {\\n using SafeCast for int256;\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlySystemContract() {\\n require(IBabController(controller).isSystemContract(msg.sender), 'Only system can call this');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the controller\\n address public controller;\\n // Wrapped ETH address\\n address public immutable weth;\\n // Name of the integration\\n string public name;\\n mapping(address => bool) public initializedByGarden;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) {\\n require(_controller != address(0), 'Controller must be defined');\\n name = _name;\\n controller = _controller;\\n weth = _weth;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the name of the integration\\n */\\n function getName() external view returns (string memory) {\\n return name;\\n }\\n}\\n\",\"keccak256\":\"0xf15da8b024a5a4f205b363420cb5851fd1c4225970999aed5f00d829bbd4f638\",\"license\":\"Apache License\"},\"contracts/integrations/pool/PoolIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\n\\nimport {IPoolIntegration} from '../../interfaces/IPoolIntegration.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\n\\nimport {BaseIntegration} from '../BaseIntegration.sol';\\n\\n/**\\n * @title PoolIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Base class for integration with trading protocols\\n */\\nabstract contract PoolIntegration is BaseIntegration, ReentrancyGuard, IPoolIntegration {\\n using SafeMath for uint256;\\n using SafeCast for uint256;\\n\\n /* ============ Struct ============ */\\n\\n struct PoolInfo {\\n IGarden garden; // Garden address\\n IStrategy strategy; // Strategy address\\n address pool; // Pool address\\n uint256 totalSupply; // Total Supply of the pool\\n uint256 poolTokensInTransaction; // Pool tokens affected by this transaction\\n uint256 poolTokensInStrategy; // Pool tokens strategy balance\\n uint256[] limitPoolTokenQuantities;\\n }\\n\\n /* ============ Events ============ */\\n\\n event PoolEntered(address indexed _strategy, address indexed _garden, address _pool, uint256 _poolTokensOut);\\n\\n event PoolExited(address indexed _strategy, address indexed _garden, address _pool, uint256 _poolTokensIn);\\n\\n /* ============ Constants ============ */\\n\\n uint256 internal constant SLIPPAGE_ALLOWED = 1e16; // 1%\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) BaseIntegration(_name, _weth, _controller) {}\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Joins a pool\\n *\\n * @param _strategy Address of the strategy\\n * @param _poolAddress Address of the pool token to join\\n * @param _poolTokensOut Min amount of pool tokens to receive\\n * @param _tokensIn Array of token addresses to deposit\\n * @param _maxAmountsIn Array of max token quantities to pull out from the garden\\n */\\n function joinPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensOut,\\n address[] calldata _tokensIn,\\n uint256[] calldata _maxAmountsIn\\n ) external override nonReentrant onlySystemContract {\\n PoolInfo memory poolInfo = _createPoolInfo(_strategy, _poolAddress, _poolTokensOut, _tokensIn, _maxAmountsIn);\\n _validatePreJoinPoolData(poolInfo);\\n // Approve spending of the tokens\\n for (uint256 i = 0; i < _tokensIn.length; i++) {\\n // No need to approve ETH\\n if (_tokensIn[i] != address(0)) {\\n poolInfo.strategy.invokeApprove(_getSpender(_poolAddress), _tokensIn[i], _maxAmountsIn[i]);\\n }\\n }\\n (address targetPool, uint256 callValue, bytes memory methodData) =\\n _getJoinPoolCalldata(_strategy, _poolAddress, _poolTokensOut, _tokensIn, _maxAmountsIn);\\n poolInfo.strategy.invokeFromIntegration(targetPool, callValue, methodData);\\n poolInfo.poolTokensInTransaction = IERC20(poolInfo.pool).balanceOf(address(poolInfo.strategy)).sub(\\n poolInfo.poolTokensInStrategy\\n );\\n _validatePostJoinPoolData(poolInfo);\\n\\n emit PoolEntered(address(poolInfo.strategy), address(poolInfo.garden), poolInfo.pool, _poolTokensOut);\\n }\\n\\n /**\\n * Exits a liquidity pool. Accrue protocol fee (if any)\\n *\\n * @param _strategy Address of the strategy\\n * @param _poolAddress Address of the pool token to join\\n * @param _poolTokensIn Pool tokens to exchange for the underlying tokens\\n * @param _tokensOut Array of token addresses to withdraw\\n * @param _minAmountsOut Array of min token quantities to receive from the pool\\n */\\n function exitPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensIn,\\n address[] calldata _tokensOut,\\n uint256[] calldata _minAmountsOut\\n ) external override nonReentrant onlySystemContract {\\n PoolInfo memory poolInfo = _createPoolInfo(_strategy, _poolAddress, _poolTokensIn, _tokensOut, _minAmountsOut);\\n _validatePreExitPoolData(poolInfo);\\n // Approve spending of the pool token\\n poolInfo.strategy.invokeApprove(_getSpender(_poolAddress), _poolAddress, _poolTokensIn);\\n\\n (address targetPool, uint256 callValue, bytes memory methodData) =\\n _getExitPoolCalldata(_strategy, _poolAddress, _poolTokensIn, _tokensOut, _minAmountsOut);\\n poolInfo.strategy.invokeFromIntegration(targetPool, callValue, methodData);\\n _validatePostExitPoolData(poolInfo);\\n\\n emit PoolExited(address(poolInfo.strategy), address(poolInfo.garden), poolInfo.pool, _poolTokensIn);\\n }\\n\\n /**\\n * Checks whether a pool address is valid\\n *\\n * @param _poolAddress Pool address to check\\n * @return bool True if the address is a pool\\n */\\n function isPool(address _poolAddress) external view override returns (bool) {\\n return _isPool(_poolAddress);\\n }\\n\\n function getPoolTokens(\\n address /* _poolAddress */\\n ) external view virtual override returns (address[] memory);\\n\\n function getPoolWeights(\\n address /*_poolAddress */\\n ) external view virtual override returns (uint256[] memory);\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Create and return PoolInfo struct\\n *\\n * @param _strategy Address of the strategy\\n * @param _pool Address of the pool\\n * @param _poolTokensInTransaction Number of pool tokens involved\\n * hparam _poolTokens Addresseses of the pool tokens\\n * @param _limitPoolTokenQuantities Limit quantity of the pool tokens\\n *\\n * return PoolInfo Struct containing data for pool\\n */\\n function _createPoolInfo(\\n address _strategy,\\n address _pool,\\n uint256 _poolTokensInTransaction,\\n address[] calldata, /* _poolTokens */\\n uint256[] calldata _limitPoolTokenQuantities\\n ) internal view returns (PoolInfo memory) {\\n PoolInfo memory poolInfo;\\n poolInfo.strategy = IStrategy(_strategy);\\n poolInfo.garden = IGarden(poolInfo.strategy.garden());\\n poolInfo.pool = _pool;\\n poolInfo.totalSupply = IERC20(_pool).totalSupply();\\n poolInfo.poolTokensInStrategy = IERC20(_pool).balanceOf(_strategy);\\n poolInfo.poolTokensInTransaction = _poolTokensInTransaction;\\n poolInfo.limitPoolTokenQuantities = _limitPoolTokenQuantities;\\n\\n return poolInfo;\\n }\\n\\n /**\\n * Validate pre pool join data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePreJoinPoolData(PoolInfo memory _poolInfo) internal view {\\n require(_isPool(_poolInfo.pool), 'The pool address is not valid');\\n require(_poolInfo.poolTokensInTransaction > 0, 'Min pool tokens to receive must be greater than 0');\\n }\\n\\n /**\\n * Validate pre pool data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePreExitPoolData(PoolInfo memory _poolInfo) internal view {\\n require(_isPool(_poolInfo.pool), 'The pool address is not valid');\\n require(_poolInfo.poolTokensInTransaction > 0, 'Pool tokens to exchange must be greater than 0');\\n require(\\n _poolInfo.poolTokensInStrategy >= _poolInfo.poolTokensInTransaction,\\n 'The strategy does not have enough pool tokens'\\n );\\n }\\n\\n /**\\n * Validate post join pool data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePostJoinPoolData(PoolInfo memory _poolInfo) internal view {\\n require(\\n (IERC20(_poolInfo.pool).balanceOf(address(_poolInfo.strategy)) > _poolInfo.poolTokensInStrategy),\\n 'The strategy did not receive the pool tokens'\\n );\\n }\\n\\n /**\\n * Validate post exit pool data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePostExitPoolData(PoolInfo memory _poolInfo) internal view {\\n require(\\n IERC20(_poolInfo.pool).balanceOf(address(_poolInfo.strategy)) ==\\n _poolInfo.poolTokensInStrategy - _poolInfo.poolTokensInTransaction,\\n 'The strategy did not return the pool tokens'\\n );\\n // TODO: validate individual tokens received\\n }\\n\\n /**\\n * Return join pool calldata which is already generated from the pool API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * hparam _poolTokensOut Amount of pool tokens to send\\n * hparam _tokensIn Addresses of tokens to send to the pool\\n * hparam _maxAmountsIn Amounts of tokens to send to the pool\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getJoinPoolCalldata(\\n address, /* _strategy */\\n address, /* _poolAddress */\\n uint256, /* _poolTokensOut */\\n address[] calldata, /* _tokensIn */\\n uint256[] calldata /* _maxAmountsIn */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n /**\\n * Return exit pool calldata which is already generated from the pool API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * hparam _poolTokensIn Amount of pool tokens to receive\\n * hparam _tokensOut Addresses of tokens to receive\\n * hparam _minAmountsOut Amounts of pool tokens to receive\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getExitPoolCalldata(\\n address, /* _strategy */\\n address, /* _poolAddress */\\n uint256, /* _poolTokensIn */\\n address[] calldata, /* _tokensOut */\\n uint256[] calldata /* _minAmountsOut */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n function _isPool(\\n address /* _poolAddress */\\n ) internal view virtual returns (bool);\\n\\n function _getSpender(\\n address /* _poolAddress */\\n ) internal view virtual returns (address);\\n}\\n\",\"keccak256\":\"0x0b8b81675c457a05c1a2ab85cf840cd8504bb7a6a1d68c0969d80755b423c3e6\",\"license\":\"Apache License\"},\"contracts/integrations/pool/UniswapPoolIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';\\nimport {PoolIntegration} from './PoolIntegration.sol';\\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\\nimport {IUniswapV2Router} from '../../interfaces/external/uniswap/IUniswapV2Router.sol';\\n\\n/**\\n * @title BalancerIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Kyber protocol trade integration\\n */\\ncontract UniswapPoolIntegration is PoolIntegration {\\n using SafeMath for uint256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ State Variables ============ */\\n\\n // Address of Uniswap V2 Router\\n IUniswapV2Router public uniRouter;\\n\\n /* ============ Constants ============ */\\n\\n uint8 public immutable MAX_DELTA_BLOCKS = 5;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _controller Address of the controller\\n * @param _weth Address of the WETH ERC20\\n * @param _uniswapRouterAddress Address of Uniswap router\\n */\\n constructor(\\n address _controller,\\n address _weth,\\n address _uniswapRouterAddress\\n ) PoolIntegration('uniswap_pool', _weth, _controller) {\\n uniRouter = IUniswapV2Router(_uniswapRouterAddress);\\n }\\n\\n /* ============ External Functions ============ */\\n\\n function getPoolTokens(address _poolAddress) external view override returns (address[] memory) {\\n address[] memory result = new address[](2);\\n result[0] = IUniswapV2Pair(_poolAddress).token0();\\n result[1] = IUniswapV2Pair(_poolAddress).token1();\\n return result;\\n }\\n\\n function getPoolWeights(\\n address /* _poolAddress */\\n ) external pure override returns (uint256[] memory) {\\n uint256[] memory result = new uint256[](2);\\n result[0] = 5e17; // 50%\\n result[1] = 5e17; // 50%\\n return result;\\n }\\n\\n function getPoolTokensOut(\\n address, /* _poolAddress */\\n address, /* _poolToken */\\n uint256 /* _maxAmountsIn */\\n ) external pure override returns (uint256) {\\n // return 1 since _poolTokensOut are not used\\n return 1;\\n }\\n\\n function getPoolMinAmountsOut(address _poolAddress, uint256 _liquidity)\\n external\\n view\\n override\\n returns (uint256[] memory _minAmountsOut)\\n {\\n uint256 totalSupply = IUniswapV2Pair(_poolAddress).totalSupply();\\n uint256[] memory result = new uint256[](2);\\n result[0] = IERC20(IUniswapV2Pair(_poolAddress).token0())\\n .balanceOf(_poolAddress)\\n .mul(_liquidity)\\n .div(totalSupply)\\n .preciseMul(1e18 - SLIPPAGE_ALLOWED);\\n result[1] = IERC20(IUniswapV2Pair(_poolAddress).token1())\\n .balanceOf(_poolAddress)\\n .mul(_liquidity)\\n .div(totalSupply)\\n .preciseMul(1e18 - SLIPPAGE_ALLOWED);\\n return result;\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n function _isPool(address _poolAddress) internal pure override returns (bool) {\\n return IUniswapV2Pair(_poolAddress).MINIMUM_LIQUIDITY() > 0;\\n }\\n\\n function _getSpender(\\n address //_poolAddress\\n ) internal view override returns (address) {\\n return address(uniRouter);\\n }\\n\\n /**\\n * Return join pool calldata which is already generated from the pool API\\n *\\n * @param _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * hparam _poolTokensOut Amount of pool tokens to send\\n * @param _tokensIn Addresses of tokens to send to the pool\\n * @param _maxAmountsIn Amounts of tokens to send to the pool\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getJoinPoolCalldata(\\n address _strategy,\\n address, /* _poolAddress */\\n uint256, /* _poolTokensOut */\\n address[] calldata _tokensIn,\\n uint256[] calldata _maxAmountsIn\\n )\\n internal\\n view\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n // Encode method data for Garden to invoke\\n require(_tokensIn.length == 2, 'Two tokens required');\\n require(_maxAmountsIn.length == 2, 'Two amounts required');\\n return (address(uniRouter), 0, _getMethodData(_strategy, _tokensIn, _maxAmountsIn));\\n }\\n\\n function _getMethodData(\\n address _strategy,\\n address[] calldata _tokensIn,\\n uint256[] calldata _maxAmountsIn\\n ) private view returns (bytes memory) {\\n return\\n abi.encodeWithSignature(\\n 'addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)',\\n _tokensIn[0],\\n _tokensIn[1],\\n _maxAmountsIn[0],\\n _maxAmountsIn[1],\\n _maxAmountsIn[0].sub(_maxAmountsIn[0].preciseMul(SLIPPAGE_ALLOWED)),\\n _maxAmountsIn[1].sub(_maxAmountsIn[1].preciseMul(SLIPPAGE_ALLOWED)),\\n _strategy,\\n block.timestamp.add(MAX_DELTA_BLOCKS)\\n );\\n }\\n\\n /**\\n * Return exit pool calldata which is already generated from the pool API\\n *\\n * @param _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * @param _poolTokensIn Amount of pool tokens to liquidate\\n * @param _tokensOut Addresses of tokens to receive\\n * @param _minAmountsOut Amounts of tokens to receive\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getExitPoolCalldata(\\n address _strategy,\\n address, /* _poolAddress */\\n uint256 _poolTokensIn,\\n address[] calldata _tokensOut,\\n uint256[] calldata _minAmountsOut\\n )\\n internal\\n view\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n require(_tokensOut.length == 2, 'Two tokens required');\\n require(_minAmountsOut.length == 2, 'Two amounts required');\\n // Encode method data for Garden to invoke\\n bytes memory methodData =\\n abi.encodeWithSignature(\\n 'removeLiquidity(address,address,uint256,uint256,uint256,address,uint256)',\\n _tokensOut[0],\\n _tokensOut[1],\\n _poolTokensIn,\\n _minAmountsOut[0],\\n _minAmountsOut[1],\\n _strategy,\\n block.timestamp.add(MAX_DELTA_BLOCKS)\\n );\\n\\n return (address(uniRouter), 0, methodData);\\n }\\n}\\n\",\"keccak256\":\"0xa2fb8569345f5cfdf0243a0c64ddc09e563943e52187385dee005a22b8f505b4\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityMinimum(uint256 _minRiskyPairLiquidityEth) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minRiskyPairLiquidityEth() external view returns (uint256);\\n\\n function getUniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0x57cf4ece98219f805a416e8c24728d30d9b37c4126d66785d2617b97e35ffae6\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function nftAddress() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategy(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function reenableEthForStrategies() external;\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x5e460136e0b45024ea1c1f32cde607f3ce75dd5b14cee34007d6bbd08beabc82\",\"license\":\"Apache License\"},\"contracts/interfaces/IIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIntegration\\n * @author Babylon Finance\\n *\\n * Interface for protocol integrations\\n */\\ninterface IIntegration {\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xee03c9274ddf3257e3bfd2bb229fea3412c9105f178e64174f59efeafd53182c\",\"license\":\"Apache License\"},\"contracts/interfaces/IPoolIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPoolIntegration\\n * @author Babylon Finance\\n *\\n * Interface for liquiditypool protocol integrations\\n */\\ninterface IPoolIntegration {\\n function joinPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensOut,\\n address[] memory _poolTokens,\\n uint256[] memory _maxAmountsIn\\n ) external;\\n\\n function exitPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensIn,\\n address[] memory _poolTokens,\\n uint256[] memory _minAmountsOut\\n ) external;\\n\\n function getPoolTokens(address _poolAddress) external view returns (address[] memory);\\n\\n function getPoolWeights(address _poolAddress) external view returns (uint256[] memory);\\n\\n function getPoolTokensOut(\\n address _poolAdress,\\n address _tokenAddress,\\n uint256 _maxAmountsIn\\n ) external view returns (uint256);\\n\\n function getPoolMinAmountsOut(address _poolAddress, uint256 _poolTokenAmount)\\n external\\n view\\n returns (uint256[] memory _minAmountsOut);\\n\\n function isPool(address _poolAddress) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xee7df0934dad8d729ee6dacf85e1ec327a0c8e17bcabaa2afa7d14d93325f9ac\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital,\\n address _strategyNft\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function strategyNft() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x4396906e436eb68c96715e0a53ae1656ac5d7934ebdaeb58ec3c33953465bc39\",\"license\":\"Apache License\"},\"contracts/interfaces/external/uniswap/IUniswapV2Router.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\ninterface IUniswapV2Router {\\n function factory() external pure returns (address);\\n\\n function WETH() external pure returns (address);\\n\\n function addLiquidity(\\n address tokenA,\\n address tokenB,\\n uint256 amountADesired,\\n uint256 amountBDesired,\\n uint256 amountAMin,\\n uint256 amountBMin,\\n address to,\\n uint256 deadline\\n )\\n external\\n returns (\\n uint256 amountA,\\n uint256 amountB,\\n uint256 liquidity\\n );\\n\\n function addLiquidityETH(\\n address token,\\n uint256 amountTokenDesired,\\n uint256 amountTokenMin,\\n uint256 amountETHMin,\\n address to,\\n uint256 deadline\\n )\\n external\\n payable\\n returns (\\n uint256 amountToken,\\n uint256 amountETH,\\n uint256 liquidity\\n );\\n\\n function removeLiquidity(\\n address tokenA,\\n address tokenB,\\n uint256 liquidity,\\n uint256 amountAMin,\\n uint256 amountBMin,\\n address to,\\n uint256 deadline\\n ) external returns (uint256 amountA, uint256 amountB);\\n\\n function removeLiquidityETH(\\n address token,\\n uint256 liquidity,\\n uint256 amountTokenMin,\\n uint256 amountETHMin,\\n address to,\\n uint256 deadline\\n ) external returns (uint256 amountToken, uint256 amountETH);\\n\\n function removeLiquidityWithPermit(\\n address tokenA,\\n address tokenB,\\n uint256 liquidity,\\n uint256 amountAMin,\\n uint256 amountBMin,\\n address to,\\n uint256 deadline,\\n bool approveMax,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external returns (uint256 amountA, uint256 amountB);\\n\\n function removeLiquidityETHWithPermit(\\n address token,\\n uint256 liquidity,\\n uint256 amountTokenMin,\\n uint256 amountETHMin,\\n address to,\\n uint256 deadline,\\n bool approveMax,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external returns (uint256 amountToken, uint256 amountETH);\\n\\n function swapExactTokensForTokens(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address[] calldata path,\\n address to,\\n uint256 deadline\\n ) external returns (uint256[] memory amounts);\\n\\n function swapTokensForExactTokens(\\n uint256 amountOut,\\n uint256 amountInMax,\\n address[] calldata path,\\n address to,\\n uint256 deadline\\n ) external returns (uint256[] memory amounts);\\n\\n function swapExactETHForTokens(\\n uint256 amountOutMin,\\n address[] calldata path,\\n address to,\\n uint256 deadline\\n ) external payable returns (uint256[] memory amounts);\\n\\n function swapTokensForExactETH(\\n uint256 amountOut,\\n uint256 amountInMax,\\n address[] calldata path,\\n address to,\\n uint256 deadline\\n ) external returns (uint256[] memory amounts);\\n\\n function swapExactTokensForETH(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address[] calldata path,\\n address to,\\n uint256 deadline\\n ) external returns (uint256[] memory amounts);\\n\\n function swapETHForExactTokens(\\n uint256 amountOut,\\n address[] calldata path,\\n address to,\\n uint256 deadline\\n ) external payable returns (uint256[] memory amounts);\\n\\n function quote(\\n uint256 amountA,\\n uint256 reserveA,\\n uint256 reserveB\\n ) external pure returns (uint256 amountB);\\n\\n function getAmountOut(\\n uint256 amountIn,\\n uint256 reserveIn,\\n uint256 reserveOut\\n ) external pure returns (uint256 amountOut);\\n\\n function getAmountIn(\\n uint256 amountOut,\\n uint256 reserveIn,\\n uint256 reserveOut\\n ) external pure returns (uint256 amountIn);\\n\\n function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts);\\n\\n function getAmountsIn(uint256 amountOut, address[] calldata path) external view returns (uint256[] memory amounts);\\n}\\n\",\"keccak256\":\"0x9225efc2274e92f1d4eb00d8c576fa571fd11335087a23cf3d1787167fa00b64\",\"license\":\"Apache License\"},\"contracts/interfaces/external/weth/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface IWETH is IERC20 {\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n}\\n\",\"keccak256\":\"0xacc7980a650b7a753ee51f1bbc0ae4f641e84261bcc02cfdaf87ee8136483684\",\"license\":\"MIT\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c0604052600560f81b60a0523480156200001957600080fd5b506040516200233b3803806200233b833981810160405260608110156200003f57600080fd5b5080516020808301516040938401518451808601909552600c85526b1d5b9a5cddd85c17dc1bdbdb60a21b92850192909252919282848282826001600160a01b038116620000d4576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c6572206d75737420626520646566696e6564000000000000604482015290519081900360640190fd5b8251620000e99060019060208601906200013e565b50600080546001600160a01b03199081166001600160a01b039384161790915560609290921b6001600160601b03191660805260016003556004805490921696169590951790945550620001ea945050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001765760008555620001c1565b82601f106200019157805160ff1916838001178555620001c1565b82800160010185558215620001c1579182015b82811115620001c1578251825591602001919060010190620001a4565b50620001cf929150620001d3565b5090565b5b80821115620001cf5760008155600101620001d4565b60805160601c60a05160f81c61211d6200021e6000398061062052806118465280611eb652508061064d525061211d6000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063708a34761161008c578063bd9d8ad911610066578063bd9d8ad91461042c578063ca4f2803146104a2578063f5e39325146104c8578063f77c4791146104f4576100ea565b8063708a34761461031c578063a0e47bf6146103fe578063b10198fb14610406576100ea565b80633cd5bd95116100c85780633cd5bd95146101925780633fc8cef3146101da5780635b16ebb7146101fe57806362cc395a14610238576100ea565b806306fdde03146100ef57806317d7de7c1461016c57806330adee6514610174575b600080fd5b6100f76104fc565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610131578181015183820152602001610119565b50505050905090810190601f16801561015e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100f7610589565b61017c61061e565b6040805160ff9092168252519081900360200190f35b6101c8600480360360608110156101a857600080fd5b506001600160a01b03813581169160208101359091169060400135610642565b60408051918252519081900360200190f35b6101e261064b565b604080516001600160a01b039092168252519081900360200190f35b6102246004803603602081101561021457600080fd5b50356001600160a01b031661066f565b604080519115158252519081900360200190f35b61031a600480360360a081101561024e57600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561028957600080fd5b82018360208201111561029b57600080fd5b803590602001918460208302840111640100000000831117156102bd57600080fd5b9193909290916020810190356401000000008111156102db57600080fd5b8201836020820111156102ed57600080fd5b8035906020019184602083028401116401000000008311171561030f57600080fd5b509092509050610680565b005b61031a600480360360a081101561033257600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561036d57600080fd5b82018360208201111561037f57600080fd5b803590602001918460208302840111640100000000831117156103a157600080fd5b9193909290916020810190356401000000008111156103bf57600080fd5b8201836020820111156103d157600080fd5b803590602001918460208302840111640100000000831117156103f357600080fd5b509092509050610a9d565b6101e2610fbc565b6102246004803603602081101561041c57600080fd5b50356001600160a01b0316610fcb565b6104526004803603602081101561044257600080fd5b50356001600160a01b0316610fe0565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561048e578181015183820152602001610476565b505050509050019250505060405180910390f35b610452600480360360208110156104b857600080fd5b50356001600160a01b031661104e565b610452600480360360408110156104de57600080fd5b506001600160a01b038135169060200135611198565b6101e26113c0565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105815780601f1061055657610100808354040283529160200191610581565b820191906000526020600020905b81548152906001019060200180831161056457829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156106145780601f106105e957610100808354040283529160200191610614565b820191906000526020600020905b8154815290600101906020018083116105f757829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b60019392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061067a826113cf565b92915050565b600260035414156106d8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b15801561072857600080fd5b505afa15801561073c573d6000803e3d6000fd5b505050506040513d602081101561075257600080fd5b50516107a5576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b60006107b68888888888888861143e565b90506107c181611631565b80602001516001600160a01b03166397ccdc606107dd8961171c565b89896040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561083557600080fd5b505af1158015610849573d6000803e3d6000fd5b5050505060008060006108618b8b8b8b8b8b8b61172c565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156108de5781810151838201526020016108c6565b50505050905090810190601f16801561090b5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561092c57600080fd5b505af1158015610940573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561096957600080fd5b810190808051604051939291908464010000000082111561098957600080fd5b90830190602082018581111561099e57600080fd5b82516401000000008111828201881017156109b857600080fd5b82525081516020918201929091019080838360005b838110156109e55781810151838201526020016109cd565b50505050905090810190601f168015610a125780820380516001836020036101000a031916815260200191505b5060405250505050610a2384611931565b83600001516001600160a01b031684602001516001600160a01b03167f7659e40cf608296ce5aa9eff9c80adc7a49cb481173fc4e302e3983827b042df86604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b60026003541415610af5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b158015610b4557600080fd5b505afa158015610b59573d6000803e3d6000fd5b505050506040513d6020811015610b6f57600080fd5b5051610bc2576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b6000610bd38888888888888861143e565b9050610bde816119f9565b60005b84811015610cd7576000868683818110610bf757fe5b905060200201356001600160a01b03166001600160a01b031614610ccf5781602001516001600160a01b03166397ccdc60610c318a61171c565b888885818110610c3d57fe5b905060200201356001600160a01b0316878786818110610c5957fe5b905060200201356040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015610cb657600080fd5b505af1158015610cca573d6000803e3d6000fd5b505050505b600101610be1565b506000806000610cec8b8b8b8b8b8b8b611a9a565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610d69578181015183820152602001610d51565b50505050905090810190601f168015610d965780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610db757600080fd5b505af1158015610dcb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610df457600080fd5b8101908080516040519392919084640100000000821115610e1457600080fd5b908301906020820185811115610e2957600080fd5b8251640100000000811182820188101715610e4357600080fd5b82525081516020918201929091019080838360005b83811015610e70578181015183820152602001610e58565b50505050905090810190601f168015610e9d5780820380516001836020036101000a031916815260200191505b5060405250505050610f348460a0015185604001516001600160a01b03166370a0823187602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f0257600080fd5b505afa158015610f16573d6000803e3d6000fd5b505050506040513d6020811015610f2c57600080fd5b505190611b77565b6080850152610f4284611bd4565b83600001516001600160a01b031684602001516001600160a01b03167fe5ca6288535c5c6c2462c912b4033eade15b80926717896a2d58a2defdeb912886604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b6004546001600160a01b031681565b60026020526000908152604090205460ff1681565b604080516002808252606080830184529260009291906020830190803683370190505090506706f05b59d3b200008160008151811061101b57fe5b6020026020010181815250506706f05b59d3b200008160018151811061103d57fe5b602090810291909101015292915050565b60408051600280825260608083018452926000929190602083019080368337019050509050826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156110ac57600080fd5b505afa1580156110c0573d6000803e3d6000fd5b505050506040513d60208110156110d657600080fd5b5051815182906000906110e557fe5b60200260200101906001600160a01b031690816001600160a01b031681525050826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561113e57600080fd5b505afa158015611152573d6000803e3d6000fd5b505050506040513d602081101561116857600080fd5b505181518290600190811061117957fe5b6001600160a01b03909216602092830291909101909101529050919050565b60606000836001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111d557600080fd5b505afa1580156111e9573d6000803e3d6000fd5b505050506040513d60208110156111ff57600080fd5b50516040805160028082526060820183529293506000929091602083019080368337019050509050611331662386f26fc10000670de0b6b3a76400000361132b84611325888a6001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561127d57600080fd5b505afa158015611291573d6000803e3d6000fd5b505050506040513d60208110156112a757600080fd5b5051604080516370a0823160e01b81526001600160a01b038e81166004830152915191909216916370a08231916024808301926020929190829003018186803b1580156112f357600080fd5b505afa158015611307573d6000803e3d6000fd5b505050506040513d602081101561131d57600080fd5b505190611c96565b90611cf6565b90611d5d565b8160008151811061133e57fe5b6020026020010181815250506113a0662386f26fc10000670de0b6b3a76400000361132b84611325888a6001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561127d57600080fd5b816001815181106113ad57fe5b6020908102919091010152949350505050565b6000546001600160a01b031681565b600080826001600160a01b031663ba9a7a566040518163ffffffff1660e01b815260040160206040518083038186803b15801561140b57600080fd5b505afa15801561141f573d6000803e3d6000fd5b505050506040513d602081101561143557600080fd5b50511192915050565b611446611f8b565b61144e611f8b565b6001600160a01b0389166020808301829052604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b892600480840193919291829003018186803b1580156114ac57600080fd5b505afa1580156114c0573d6000803e3d6000fd5b505050506040513d60208110156114d657600080fd5b50516001600160a01b0390811682528816604080830182905280517f18160ddd00000000000000000000000000000000000000000000000000000000815290516318160ddd91600480820192602092909190829003018186803b15801561153c57600080fd5b505afa158015611550573d6000803e3d6000fd5b505050506040513d602081101561156657600080fd5b50516060820152604080516370a0823160e01b81526001600160a01b038b811660048301529151918a16916370a0823191602480820192602092909190829003018186803b1580156115b757600080fd5b505afa1580156115cb573d6000803e3d6000fd5b505050506040513d60208110156115e157600080fd5b505160a0820152608081018790526040805160208581028281018201909352858252909186918691829185019084908082843760009201919091525050505060c082015298975050505050505050565b61163e81604001516113cf565b61168f576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b60008160800151116116d25760405162461bcd60e51b815260040180806020018281038252602e815260200180612036602e913960400191505060405180910390fd5b80608001518160a0015110156117195760405162461bcd60e51b815260040180806020018281038252602d815260200180612090602d913960400191505060405180910390fd5b50565b506004546001600160a01b031690565b600080606060028614611786576040805162461bcd60e51b815260206004820152601360248201527f54776f20746f6b656e7320726571756972656400000000000000000000000000604482015290519081900360640190fd5b600284146117db576040805162461bcd60e51b815260206004820152601460248201527f54776f20616d6f756e7473207265717569726564000000000000000000000000604482015290519081900360640190fd5b6000878760008181106117ea57fe5b905060200201356001600160a01b03168888600181811061180757fe5b905060200201356001600160a01b03168a8888600081811061182557fe5b905060200201358989600181811061183957fe5b905060200201358f6118777f000000000000000000000000000000000000000000000000000000000000000060ff1642611d7590919063ffffffff16565b604080516001600160a01b03988916602482015296881660448801526064870195909552608486019390935260a4850191909152841660c484015260e4808401919091528151808403909101815261010490920190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fbaa2abde000000000000000000000000000000000000000000000000000000001790526004549091169450600093509150509750975097945050505050565b80608001518160a001510381604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561199157600080fd5b505afa1580156119a5573d6000803e3d6000fd5b505050506040513d60208110156119bb57600080fd5b5051146117195760405162461bcd60e51b815260040180806020018281038252602b8152602001806120bd602b913960400191505060405180910390fd5b611a0681604001516113cf565b611a57576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b60008160800151116117195760405162461bcd60e51b8152600401808060200182810382526031815260200180611fe46031913960400191505060405180910390fd5b600080606060028614611af4576040805162461bcd60e51b815260206004820152601360248201527f54776f20746f6b656e7320726571756972656400000000000000000000000000604482015290519081900360640190fd5b60028414611b49576040805162461bcd60e51b815260206004820152601460248201527f54776f20616d6f756e7473207265717569726564000000000000000000000000604482015290519081900360640190fd5b6004546001600160a01b03166000611b648c8a8a8a8a611dcf565b9250925092509750975097945050505050565b600082821115611bce576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b8060a0015181604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611c2e57600080fd5b505afa158015611c42573d6000803e3d6000fd5b505050506040513d6020811015611c5857600080fd5b5051116117195760405162461bcd60e51b815260040180806020018281038252602c815260200180612064602c913960400191505060405180910390fd5b600082611ca55750600061067a565b82820282848281611cb257fe5b0414611cef5760405162461bcd60e51b81526004018080602001828103825260218152602001806120156021913960400191505060405180910390fd5b9392505050565b6000808211611d4c576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611d5557fe5b049392505050565b6000611cef670de0b6b3a76400006113258585611c96565b600082820183811015611cef576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b606084846000818110611dde57fe5b905060200201356001600160a01b031685856001818110611dfb57fe5b905060200201356001600160a01b031684846000818110611e1857fe5b9050602002013585856001818110611e2c57fe5b90506020020135611e85611e63662386f26fc1000089896000818110611e4e57fe5b90506020020135611d5d90919063ffffffff16565b88886000818110611e7057fe5b90506020020135611b7790919063ffffffff16565b611ead611ea0662386f26fc100008a8a6001818110611e4e57fe5b89896001818110611e7057fe5b8b611edb4260ff7f000000000000000000000000000000000000000000000000000000000000000016611d75565b604080516001600160a01b03998a16602482015297891660448901526064880196909652608487019490945260a486019290925260c485015290931660e4830152610104808301939093528051808303909301835261012490910190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fe8e3370000000000000000000000000000000000000000000000000000000000179052905095945050505050565b6040518060e0016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160608152509056fe4d696e20706f6f6c20746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77506f6f6c20746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520737472617465677920646964206e6f7420726563656976652074686520706f6f6c20746f6b656e7354686520737472617465677920646f6573206e6f74206861766520656e6f75676820706f6f6c20746f6b656e7354686520737472617465677920646964206e6f742072657475726e2074686520706f6f6c20746f6b656e73a264697066735822122027201e467ca201a9068f7ea34fdbdb0ba8ac4c00152f97e915be4d7648ceb19764736f6c63430007060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063708a34761161008c578063bd9d8ad911610066578063bd9d8ad91461042c578063ca4f2803146104a2578063f5e39325146104c8578063f77c4791146104f4576100ea565b8063708a34761461031c578063a0e47bf6146103fe578063b10198fb14610406576100ea565b80633cd5bd95116100c85780633cd5bd95146101925780633fc8cef3146101da5780635b16ebb7146101fe57806362cc395a14610238576100ea565b806306fdde03146100ef57806317d7de7c1461016c57806330adee6514610174575b600080fd5b6100f76104fc565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610131578181015183820152602001610119565b50505050905090810190601f16801561015e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100f7610589565b61017c61061e565b6040805160ff9092168252519081900360200190f35b6101c8600480360360608110156101a857600080fd5b506001600160a01b03813581169160208101359091169060400135610642565b60408051918252519081900360200190f35b6101e261064b565b604080516001600160a01b039092168252519081900360200190f35b6102246004803603602081101561021457600080fd5b50356001600160a01b031661066f565b604080519115158252519081900360200190f35b61031a600480360360a081101561024e57600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561028957600080fd5b82018360208201111561029b57600080fd5b803590602001918460208302840111640100000000831117156102bd57600080fd5b9193909290916020810190356401000000008111156102db57600080fd5b8201836020820111156102ed57600080fd5b8035906020019184602083028401116401000000008311171561030f57600080fd5b509092509050610680565b005b61031a600480360360a081101561033257600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561036d57600080fd5b82018360208201111561037f57600080fd5b803590602001918460208302840111640100000000831117156103a157600080fd5b9193909290916020810190356401000000008111156103bf57600080fd5b8201836020820111156103d157600080fd5b803590602001918460208302840111640100000000831117156103f357600080fd5b509092509050610a9d565b6101e2610fbc565b6102246004803603602081101561041c57600080fd5b50356001600160a01b0316610fcb565b6104526004803603602081101561044257600080fd5b50356001600160a01b0316610fe0565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561048e578181015183820152602001610476565b505050509050019250505060405180910390f35b610452600480360360208110156104b857600080fd5b50356001600160a01b031661104e565b610452600480360360408110156104de57600080fd5b506001600160a01b038135169060200135611198565b6101e26113c0565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105815780601f1061055657610100808354040283529160200191610581565b820191906000526020600020905b81548152906001019060200180831161056457829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156106145780601f106105e957610100808354040283529160200191610614565b820191906000526020600020905b8154815290600101906020018083116105f757829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b60019392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061067a826113cf565b92915050565b600260035414156106d8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b15801561072857600080fd5b505afa15801561073c573d6000803e3d6000fd5b505050506040513d602081101561075257600080fd5b50516107a5576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b60006107b68888888888888861143e565b90506107c181611631565b80602001516001600160a01b03166397ccdc606107dd8961171c565b89896040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561083557600080fd5b505af1158015610849573d6000803e3d6000fd5b5050505060008060006108618b8b8b8b8b8b8b61172c565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156108de5781810151838201526020016108c6565b50505050905090810190601f16801561090b5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561092c57600080fd5b505af1158015610940573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561096957600080fd5b810190808051604051939291908464010000000082111561098957600080fd5b90830190602082018581111561099e57600080fd5b82516401000000008111828201881017156109b857600080fd5b82525081516020918201929091019080838360005b838110156109e55781810151838201526020016109cd565b50505050905090810190601f168015610a125780820380516001836020036101000a031916815260200191505b5060405250505050610a2384611931565b83600001516001600160a01b031684602001516001600160a01b03167f7659e40cf608296ce5aa9eff9c80adc7a49cb481173fc4e302e3983827b042df86604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b60026003541415610af5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b158015610b4557600080fd5b505afa158015610b59573d6000803e3d6000fd5b505050506040513d6020811015610b6f57600080fd5b5051610bc2576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b6000610bd38888888888888861143e565b9050610bde816119f9565b60005b84811015610cd7576000868683818110610bf757fe5b905060200201356001600160a01b03166001600160a01b031614610ccf5781602001516001600160a01b03166397ccdc60610c318a61171c565b888885818110610c3d57fe5b905060200201356001600160a01b0316878786818110610c5957fe5b905060200201356040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015610cb657600080fd5b505af1158015610cca573d6000803e3d6000fd5b505050505b600101610be1565b506000806000610cec8b8b8b8b8b8b8b611a9a565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610d69578181015183820152602001610d51565b50505050905090810190601f168015610d965780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610db757600080fd5b505af1158015610dcb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610df457600080fd5b8101908080516040519392919084640100000000821115610e1457600080fd5b908301906020820185811115610e2957600080fd5b8251640100000000811182820188101715610e4357600080fd5b82525081516020918201929091019080838360005b83811015610e70578181015183820152602001610e58565b50505050905090810190601f168015610e9d5780820380516001836020036101000a031916815260200191505b5060405250505050610f348460a0015185604001516001600160a01b03166370a0823187602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f0257600080fd5b505afa158015610f16573d6000803e3d6000fd5b505050506040513d6020811015610f2c57600080fd5b505190611b77565b6080850152610f4284611bd4565b83600001516001600160a01b031684602001516001600160a01b03167fe5ca6288535c5c6c2462c912b4033eade15b80926717896a2d58a2defdeb912886604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b6004546001600160a01b031681565b60026020526000908152604090205460ff1681565b604080516002808252606080830184529260009291906020830190803683370190505090506706f05b59d3b200008160008151811061101b57fe5b6020026020010181815250506706f05b59d3b200008160018151811061103d57fe5b602090810291909101015292915050565b60408051600280825260608083018452926000929190602083019080368337019050509050826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156110ac57600080fd5b505afa1580156110c0573d6000803e3d6000fd5b505050506040513d60208110156110d657600080fd5b5051815182906000906110e557fe5b60200260200101906001600160a01b031690816001600160a01b031681525050826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561113e57600080fd5b505afa158015611152573d6000803e3d6000fd5b505050506040513d602081101561116857600080fd5b505181518290600190811061117957fe5b6001600160a01b03909216602092830291909101909101529050919050565b60606000836001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111d557600080fd5b505afa1580156111e9573d6000803e3d6000fd5b505050506040513d60208110156111ff57600080fd5b50516040805160028082526060820183529293506000929091602083019080368337019050509050611331662386f26fc10000670de0b6b3a76400000361132b84611325888a6001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561127d57600080fd5b505afa158015611291573d6000803e3d6000fd5b505050506040513d60208110156112a757600080fd5b5051604080516370a0823160e01b81526001600160a01b038e81166004830152915191909216916370a08231916024808301926020929190829003018186803b1580156112f357600080fd5b505afa158015611307573d6000803e3d6000fd5b505050506040513d602081101561131d57600080fd5b505190611c96565b90611cf6565b90611d5d565b8160008151811061133e57fe5b6020026020010181815250506113a0662386f26fc10000670de0b6b3a76400000361132b84611325888a6001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561127d57600080fd5b816001815181106113ad57fe5b6020908102919091010152949350505050565b6000546001600160a01b031681565b600080826001600160a01b031663ba9a7a566040518163ffffffff1660e01b815260040160206040518083038186803b15801561140b57600080fd5b505afa15801561141f573d6000803e3d6000fd5b505050506040513d602081101561143557600080fd5b50511192915050565b611446611f8b565b61144e611f8b565b6001600160a01b0389166020808301829052604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b892600480840193919291829003018186803b1580156114ac57600080fd5b505afa1580156114c0573d6000803e3d6000fd5b505050506040513d60208110156114d657600080fd5b50516001600160a01b0390811682528816604080830182905280517f18160ddd00000000000000000000000000000000000000000000000000000000815290516318160ddd91600480820192602092909190829003018186803b15801561153c57600080fd5b505afa158015611550573d6000803e3d6000fd5b505050506040513d602081101561156657600080fd5b50516060820152604080516370a0823160e01b81526001600160a01b038b811660048301529151918a16916370a0823191602480820192602092909190829003018186803b1580156115b757600080fd5b505afa1580156115cb573d6000803e3d6000fd5b505050506040513d60208110156115e157600080fd5b505160a0820152608081018790526040805160208581028281018201909352858252909186918691829185019084908082843760009201919091525050505060c082015298975050505050505050565b61163e81604001516113cf565b61168f576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b60008160800151116116d25760405162461bcd60e51b815260040180806020018281038252602e815260200180612036602e913960400191505060405180910390fd5b80608001518160a0015110156117195760405162461bcd60e51b815260040180806020018281038252602d815260200180612090602d913960400191505060405180910390fd5b50565b506004546001600160a01b031690565b600080606060028614611786576040805162461bcd60e51b815260206004820152601360248201527f54776f20746f6b656e7320726571756972656400000000000000000000000000604482015290519081900360640190fd5b600284146117db576040805162461bcd60e51b815260206004820152601460248201527f54776f20616d6f756e7473207265717569726564000000000000000000000000604482015290519081900360640190fd5b6000878760008181106117ea57fe5b905060200201356001600160a01b03168888600181811061180757fe5b905060200201356001600160a01b03168a8888600081811061182557fe5b905060200201358989600181811061183957fe5b905060200201358f6118777f000000000000000000000000000000000000000000000000000000000000000060ff1642611d7590919063ffffffff16565b604080516001600160a01b03988916602482015296881660448801526064870195909552608486019390935260a4850191909152841660c484015260e4808401919091528151808403909101815261010490920190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fbaa2abde000000000000000000000000000000000000000000000000000000001790526004549091169450600093509150509750975097945050505050565b80608001518160a001510381604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561199157600080fd5b505afa1580156119a5573d6000803e3d6000fd5b505050506040513d60208110156119bb57600080fd5b5051146117195760405162461bcd60e51b815260040180806020018281038252602b8152602001806120bd602b913960400191505060405180910390fd5b611a0681604001516113cf565b611a57576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b60008160800151116117195760405162461bcd60e51b8152600401808060200182810382526031815260200180611fe46031913960400191505060405180910390fd5b600080606060028614611af4576040805162461bcd60e51b815260206004820152601360248201527f54776f20746f6b656e7320726571756972656400000000000000000000000000604482015290519081900360640190fd5b60028414611b49576040805162461bcd60e51b815260206004820152601460248201527f54776f20616d6f756e7473207265717569726564000000000000000000000000604482015290519081900360640190fd5b6004546001600160a01b03166000611b648c8a8a8a8a611dcf565b9250925092509750975097945050505050565b600082821115611bce576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b8060a0015181604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611c2e57600080fd5b505afa158015611c42573d6000803e3d6000fd5b505050506040513d6020811015611c5857600080fd5b5051116117195760405162461bcd60e51b815260040180806020018281038252602c815260200180612064602c913960400191505060405180910390fd5b600082611ca55750600061067a565b82820282848281611cb257fe5b0414611cef5760405162461bcd60e51b81526004018080602001828103825260218152602001806120156021913960400191505060405180910390fd5b9392505050565b6000808211611d4c576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611d5557fe5b049392505050565b6000611cef670de0b6b3a76400006113258585611c96565b600082820183811015611cef576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b606084846000818110611dde57fe5b905060200201356001600160a01b031685856001818110611dfb57fe5b905060200201356001600160a01b031684846000818110611e1857fe5b9050602002013585856001818110611e2c57fe5b90506020020135611e85611e63662386f26fc1000089896000818110611e4e57fe5b90506020020135611d5d90919063ffffffff16565b88886000818110611e7057fe5b90506020020135611b7790919063ffffffff16565b611ead611ea0662386f26fc100008a8a6001818110611e4e57fe5b89896001818110611e7057fe5b8b611edb4260ff7f000000000000000000000000000000000000000000000000000000000000000016611d75565b604080516001600160a01b03998a16602482015297891660448901526064880196909652608487019490945260a486019290925260c485015290931660e4830152610104808301939093528051808303909301835261012490910190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fe8e3370000000000000000000000000000000000000000000000000000000000179052905095945050505050565b6040518060e0016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160608152509056fe4d696e20706f6f6c20746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77506f6f6c20746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520737472617465677920646964206e6f7420726563656976652074686520706f6f6c20746f6b656e7354686520737472617465677920646f6573206e6f74206861766520656e6f75676820706f6f6c20746f6b656e7354686520737472617465677920646964206e6f742072657475726e2074686520706f6f6c20746f6b656e73a264697066735822122027201e467ca201a9068f7ea34fdbdb0ba8ac4c00152f97e915be4d7648ceb19764736f6c63430007060033", + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_weth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_uniswapRouterAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_pool\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_poolTokensOut\",\"type\":\"uint256\"}],\"name\":\"PoolEntered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_garden\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_pool\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_poolTokensIn\",\"type\":\"uint256\"}],\"name\":\"PoolExited\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MAX_DELTA_BLOCKS\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_poolTokensIn\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"_tokensOut\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_minAmountsOut\",\"type\":\"uint256[]\"}],\"name\":\"exitPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_liquidity\",\"type\":\"uint256\"}],\"name\":\"getPoolMinAmountsOut\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_minAmountsOut\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"}],\"name\":\"getPoolTokens\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"getPoolTokensOut\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"getPoolWeights\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"initializedByGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"}],\"name\":\"isPool\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_poolAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_poolTokensOut\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"_tokensIn\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_maxAmountsIn\",\"type\":\"uint256[]\"}],\"name\":\"joinPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"uniRouter\",\"outputs\":[{\"internalType\":\"contract IUniswapV2Router\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Protocol Kyber protocol trade integration\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of the controller\",\"_uniswapRouterAddress\":\"Address of Uniswap router\",\"_weth\":\"Address of the WETH ERC20\"}},\"exitPool(address,address,uint256,address[],uint256[])\":{\"params\":{\"_minAmountsOut\":\"Array of min token quantities to receive from the pool\",\"_poolAddress\":\"Address of the pool token to join\",\"_poolTokensIn\":\"Pool tokens to exchange for the underlying tokens\",\"_strategy\":\"Address of the strategy\",\"_tokensOut\":\"Array of token addresses to withdraw\"}},\"isPool(address)\":{\"params\":{\"_poolAddress\":\"Pool address to check\"},\"returns\":{\"_0\":\"bool True if the address is a pool\"}},\"joinPool(address,address,uint256,address[],uint256[])\":{\"params\":{\"_maxAmountsIn\":\"Array of max token quantities to pull out from the garden\",\"_poolAddress\":\"Address of the pool token to join\",\"_poolTokensOut\":\"Min amount of pool tokens to receive\",\"_strategy\":\"Address of the strategy\",\"_tokensIn\":\"Array of token addresses to deposit\"}}},\"title\":\"BalancerIntegration\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates the integration\"},\"exitPool(address,address,uint256,address[],uint256[])\":{\"notice\":\"Exits a liquidity pool. Accrue protocol fee (if any)\"},\"getName()\":{\"notice\":\"Returns the name of the integration\"},\"isPool(address)\":{\"notice\":\"Checks whether a pool address is valid\"},\"joinPool(address,address,uint256,address[],uint256[])\":{\"notice\":\"Joins a pool\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/integrations/pool/UniswapPoolIntegration.sol\":\"UniswapPoolIntegration\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\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 /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\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, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x7b2b8baa20fd60ab4a328c8e34c64a353651b80ba4b5b157cbb61813f6f85d55\",\"license\":\"MIT\"},\"@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol\":{\"content\":\"pragma solidity >=0.5.0;\\n\\ninterface IUniswapV2Pair {\\n event Approval(address indexed owner, address indexed spender, uint value);\\n event Transfer(address indexed from, address indexed to, uint value);\\n\\n function name() external pure returns (string memory);\\n function symbol() external pure returns (string memory);\\n function decimals() external pure returns (uint8);\\n function totalSupply() external view returns (uint);\\n function balanceOf(address owner) external view returns (uint);\\n function allowance(address owner, address spender) external view returns (uint);\\n\\n function approve(address spender, uint value) external returns (bool);\\n function transfer(address to, uint value) external returns (bool);\\n function transferFrom(address from, address to, uint value) external returns (bool);\\n\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n function PERMIT_TYPEHASH() external pure returns (bytes32);\\n function nonces(address owner) external view returns (uint);\\n\\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\\n\\n event Mint(address indexed sender, uint amount0, uint amount1);\\n event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\\n event Swap(\\n address indexed sender,\\n uint amount0In,\\n uint amount1In,\\n uint amount0Out,\\n uint amount1Out,\\n address indexed to\\n );\\n event Sync(uint112 reserve0, uint112 reserve1);\\n\\n function MINIMUM_LIQUIDITY() external pure returns (uint);\\n function factory() external view returns (address);\\n function token0() external view returns (address);\\n function token1() external view returns (address);\\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\\n function price0CumulativeLast() external view returns (uint);\\n function price1CumulativeLast() external view returns (uint);\\n function kLast() external view returns (uint);\\n\\n function mint(address to) external returns (uint liquidity);\\n function burn(address to) external returns (uint amount0, uint amount1);\\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\\n function skim(address to) external;\\n function sync() external;\\n\\n function initialize(address, address) external;\\n}\\n\",\"keccak256\":\"0x7c9bc70e5996c763e02ff38905282bc24fb242b0ef2519a003b36824fc524a4b\"},\"contracts/integrations/BaseIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IIntegration} from '../interfaces/IIntegration.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\n\\n/**\\n * @title BaseIntegration\\n * @author Babylon Finance\\n *\\n * Abstract class that houses common Integration-related state and functions.\\n */\\nabstract contract BaseIntegration {\\n using SafeCast for int256;\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlySystemContract() {\\n require(IBabController(controller).isSystemContract(msg.sender), 'Only system can call this');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the controller\\n address public controller;\\n // Wrapped ETH address\\n address public immutable weth;\\n // Name of the integration\\n string public name;\\n mapping(address => bool) public initializedByGarden;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) {\\n require(_controller != address(0), 'Controller must be defined');\\n name = _name;\\n controller = _controller;\\n weth = _weth;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the name of the integration\\n */\\n function getName() external view returns (string memory) {\\n return name;\\n }\\n}\\n\",\"keccak256\":\"0x2834e38218ae7abce3038140002a433c22ea9303d65b2d929cd88f6d5f712812\",\"license\":\"Apache License\"},\"contracts/integrations/pool/PoolIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\n\\nimport {IPoolIntegration} from '../../interfaces/IPoolIntegration.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\n\\nimport {BaseIntegration} from '../BaseIntegration.sol';\\n\\n/**\\n * @title PoolIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Base class for integration with trading protocols\\n */\\nabstract contract PoolIntegration is BaseIntegration, ReentrancyGuard, IPoolIntegration {\\n using SafeMath for uint256;\\n using SafeCast for uint256;\\n\\n /* ============ Struct ============ */\\n\\n struct PoolInfo {\\n IGarden garden; // Garden address\\n IStrategy strategy; // Strategy address\\n address pool; // Pool address\\n uint256 totalSupply; // Total Supply of the pool\\n uint256 poolTokensInTransaction; // Pool tokens affected by this transaction\\n uint256 poolTokensInStrategy; // Pool tokens strategy balance\\n uint256[] limitPoolTokenQuantities;\\n }\\n\\n /* ============ Events ============ */\\n\\n event PoolEntered(address indexed _strategy, address indexed _garden, address _pool, uint256 _poolTokensOut);\\n\\n event PoolExited(address indexed _strategy, address indexed _garden, address _pool, uint256 _poolTokensIn);\\n\\n /* ============ Constants ============ */\\n\\n uint256 internal constant SLIPPAGE_ALLOWED = 1e16; // 1%\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) BaseIntegration(_name, _weth, _controller) {}\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Joins a pool\\n *\\n * @param _strategy Address of the strategy\\n * @param _poolAddress Address of the pool token to join\\n * @param _poolTokensOut Min amount of pool tokens to receive\\n * @param _tokensIn Array of token addresses to deposit\\n * @param _maxAmountsIn Array of max token quantities to pull out from the garden\\n */\\n function joinPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensOut,\\n address[] calldata _tokensIn,\\n uint256[] calldata _maxAmountsIn\\n ) external override nonReentrant onlySystemContract {\\n PoolInfo memory poolInfo = _createPoolInfo(_strategy, _poolAddress, _poolTokensOut, _tokensIn, _maxAmountsIn);\\n _validatePreJoinPoolData(poolInfo);\\n // Approve spending of the tokens\\n for (uint256 i = 0; i < _tokensIn.length; i++) {\\n // No need to approve ETH\\n if (_tokensIn[i] != address(0)) {\\n poolInfo.strategy.invokeApprove(_getSpender(_poolAddress), _tokensIn[i], _maxAmountsIn[i]);\\n }\\n }\\n (address targetPool, uint256 callValue, bytes memory methodData) =\\n _getJoinPoolCalldata(_strategy, _poolAddress, _poolTokensOut, _tokensIn, _maxAmountsIn);\\n poolInfo.strategy.invokeFromIntegration(targetPool, callValue, methodData);\\n poolInfo.poolTokensInTransaction = IERC20(poolInfo.pool).balanceOf(address(poolInfo.strategy)).sub(\\n poolInfo.poolTokensInStrategy\\n );\\n _validatePostJoinPoolData(poolInfo);\\n\\n emit PoolEntered(address(poolInfo.strategy), address(poolInfo.garden), poolInfo.pool, _poolTokensOut);\\n }\\n\\n /**\\n * Exits a liquidity pool. Accrue protocol fee (if any)\\n *\\n * @param _strategy Address of the strategy\\n * @param _poolAddress Address of the pool token to join\\n * @param _poolTokensIn Pool tokens to exchange for the underlying tokens\\n * @param _tokensOut Array of token addresses to withdraw\\n * @param _minAmountsOut Array of min token quantities to receive from the pool\\n */\\n function exitPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensIn,\\n address[] calldata _tokensOut,\\n uint256[] calldata _minAmountsOut\\n ) external override nonReentrant onlySystemContract {\\n PoolInfo memory poolInfo = _createPoolInfo(_strategy, _poolAddress, _poolTokensIn, _tokensOut, _minAmountsOut);\\n _validatePreExitPoolData(poolInfo);\\n // Approve spending of the pool token\\n poolInfo.strategy.invokeApprove(_getSpender(_poolAddress), _poolAddress, _poolTokensIn);\\n\\n (address targetPool, uint256 callValue, bytes memory methodData) =\\n _getExitPoolCalldata(_strategy, _poolAddress, _poolTokensIn, _tokensOut, _minAmountsOut);\\n poolInfo.strategy.invokeFromIntegration(targetPool, callValue, methodData);\\n _validatePostExitPoolData(poolInfo);\\n\\n emit PoolExited(address(poolInfo.strategy), address(poolInfo.garden), poolInfo.pool, _poolTokensIn);\\n }\\n\\n /**\\n * Checks whether a pool address is valid\\n *\\n * @param _poolAddress Pool address to check\\n * @return bool True if the address is a pool\\n */\\n function isPool(address _poolAddress) external view override returns (bool) {\\n return _isPool(_poolAddress);\\n }\\n\\n function getPoolTokens(\\n address /* _poolAddress */\\n ) external view virtual override returns (address[] memory);\\n\\n function getPoolWeights(\\n address /*_poolAddress */\\n ) external view virtual override returns (uint256[] memory);\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Create and return PoolInfo struct\\n *\\n * @param _strategy Address of the strategy\\n * @param _pool Address of the pool\\n * @param _poolTokensInTransaction Number of pool tokens involved\\n * hparam _poolTokens Addresseses of the pool tokens\\n * @param _limitPoolTokenQuantities Limit quantity of the pool tokens\\n *\\n * return PoolInfo Struct containing data for pool\\n */\\n function _createPoolInfo(\\n address _strategy,\\n address _pool,\\n uint256 _poolTokensInTransaction,\\n address[] calldata, /* _poolTokens */\\n uint256[] calldata _limitPoolTokenQuantities\\n ) internal view returns (PoolInfo memory) {\\n PoolInfo memory poolInfo;\\n poolInfo.strategy = IStrategy(_strategy);\\n poolInfo.garden = IGarden(poolInfo.strategy.garden());\\n poolInfo.pool = _pool;\\n poolInfo.totalSupply = IERC20(_pool).totalSupply();\\n poolInfo.poolTokensInStrategy = IERC20(_pool).balanceOf(_strategy);\\n poolInfo.poolTokensInTransaction = _poolTokensInTransaction;\\n poolInfo.limitPoolTokenQuantities = _limitPoolTokenQuantities;\\n\\n return poolInfo;\\n }\\n\\n /**\\n * Validate pre pool join data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePreJoinPoolData(PoolInfo memory _poolInfo) internal view {\\n require(_isPool(_poolInfo.pool), 'The pool address is not valid');\\n require(_poolInfo.poolTokensInTransaction > 0, 'Min pool tokens to receive must be greater than 0');\\n }\\n\\n /**\\n * Validate pre pool data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePreExitPoolData(PoolInfo memory _poolInfo) internal view {\\n require(_isPool(_poolInfo.pool), 'The pool address is not valid');\\n require(_poolInfo.poolTokensInTransaction > 0, 'Pool tokens to exchange must be greater than 0');\\n require(\\n _poolInfo.poolTokensInStrategy >= _poolInfo.poolTokensInTransaction,\\n 'The strategy does not have enough pool tokens'\\n );\\n }\\n\\n /**\\n * Validate post join pool data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePostJoinPoolData(PoolInfo memory _poolInfo) internal view {\\n require(\\n (IERC20(_poolInfo.pool).balanceOf(address(_poolInfo.strategy)) > _poolInfo.poolTokensInStrategy),\\n 'The strategy did not receive the pool tokens'\\n );\\n }\\n\\n /**\\n * Validate post exit pool data. Check pool is valid, token quantity is valid.\\n *\\n * @param _poolInfo Struct containing pool information used in internal functions\\n */\\n function _validatePostExitPoolData(PoolInfo memory _poolInfo) internal view {\\n require(\\n IERC20(_poolInfo.pool).balanceOf(address(_poolInfo.strategy)) ==\\n _poolInfo.poolTokensInStrategy - _poolInfo.poolTokensInTransaction,\\n 'The strategy did not return the pool tokens'\\n );\\n // TODO: validate individual tokens received\\n }\\n\\n /**\\n * Return join pool calldata which is already generated from the pool API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * hparam _poolTokensOut Amount of pool tokens to send\\n * hparam _tokensIn Addresses of tokens to send to the pool\\n * hparam _maxAmountsIn Amounts of tokens to send to the pool\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getJoinPoolCalldata(\\n address, /* _strategy */\\n address, /* _poolAddress */\\n uint256, /* _poolTokensOut */\\n address[] calldata, /* _tokensIn */\\n uint256[] calldata /* _maxAmountsIn */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n /**\\n * Return exit pool calldata which is already generated from the pool API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * hparam _poolTokensIn Amount of pool tokens to receive\\n * hparam _tokensOut Addresses of tokens to receive\\n * hparam _minAmountsOut Amounts of pool tokens to receive\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getExitPoolCalldata(\\n address, /* _strategy */\\n address, /* _poolAddress */\\n uint256, /* _poolTokensIn */\\n address[] calldata, /* _tokensOut */\\n uint256[] calldata /* _minAmountsOut */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n function _isPool(\\n address /* _poolAddress */\\n ) internal view virtual returns (bool);\\n\\n function _getSpender(\\n address /* _poolAddress */\\n ) internal view virtual returns (address);\\n}\\n\",\"keccak256\":\"0xdb4cc931a671cbf8ab93c43a5e9e2853b8d5cfc744eeec928ad3659b23f2db90\",\"license\":\"Apache License\"},\"contracts/integrations/pool/UniswapPoolIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';\\nimport {PoolIntegration} from './PoolIntegration.sol';\\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\\nimport {IUniswapV2Router} from '../../interfaces/external/uniswap/IUniswapV2Router.sol';\\n\\n/**\\n * @title BalancerIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Kyber protocol trade integration\\n */\\ncontract UniswapPoolIntegration is PoolIntegration {\\n using SafeMath for uint256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ State Variables ============ */\\n\\n // Address of Uniswap V2 Router\\n IUniswapV2Router public uniRouter;\\n\\n /* ============ Constants ============ */\\n\\n uint8 public immutable MAX_DELTA_BLOCKS = 5;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _controller Address of the controller\\n * @param _weth Address of the WETH ERC20\\n * @param _uniswapRouterAddress Address of Uniswap router\\n */\\n constructor(\\n address _controller,\\n address _weth,\\n address _uniswapRouterAddress\\n ) PoolIntegration('uniswap_pool', _weth, _controller) {\\n uniRouter = IUniswapV2Router(_uniswapRouterAddress);\\n }\\n\\n /* ============ External Functions ============ */\\n\\n function getPoolTokens(address _poolAddress) external view override returns (address[] memory) {\\n address[] memory result = new address[](2);\\n result[0] = IUniswapV2Pair(_poolAddress).token0();\\n result[1] = IUniswapV2Pair(_poolAddress).token1();\\n return result;\\n }\\n\\n function getPoolWeights(\\n address /* _poolAddress */\\n ) external pure override returns (uint256[] memory) {\\n uint256[] memory result = new uint256[](2);\\n result[0] = 5e17; // 50%\\n result[1] = 5e17; // 50%\\n return result;\\n }\\n\\n function getPoolTokensOut(\\n address, /* _poolAddress */\\n address, /* _poolToken */\\n uint256 /* _maxAmountsIn */\\n ) external pure override returns (uint256) {\\n // return 1 since _poolTokensOut are not used\\n return 1;\\n }\\n\\n function getPoolMinAmountsOut(address _poolAddress, uint256 _liquidity)\\n external\\n view\\n override\\n returns (uint256[] memory _minAmountsOut)\\n {\\n uint256 totalSupply = IUniswapV2Pair(_poolAddress).totalSupply();\\n uint256[] memory result = new uint256[](2);\\n result[0] = IERC20(IUniswapV2Pair(_poolAddress).token0())\\n .balanceOf(_poolAddress)\\n .mul(_liquidity)\\n .div(totalSupply)\\n .preciseMul(1e18 - SLIPPAGE_ALLOWED);\\n result[1] = IERC20(IUniswapV2Pair(_poolAddress).token1())\\n .balanceOf(_poolAddress)\\n .mul(_liquidity)\\n .div(totalSupply)\\n .preciseMul(1e18 - SLIPPAGE_ALLOWED);\\n return result;\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n function _isPool(address _poolAddress) internal pure override returns (bool) {\\n return IUniswapV2Pair(_poolAddress).MINIMUM_LIQUIDITY() > 0;\\n }\\n\\n function _getSpender(\\n address //_poolAddress\\n ) internal view override returns (address) {\\n return address(uniRouter);\\n }\\n\\n /**\\n * Return join pool calldata which is already generated from the pool API\\n *\\n * @param _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * hparam _poolTokensOut Amount of pool tokens to send\\n * @param _tokensIn Addresses of tokens to send to the pool\\n * @param _maxAmountsIn Amounts of tokens to send to the pool\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getJoinPoolCalldata(\\n address _strategy,\\n address, /* _poolAddress */\\n uint256, /* _poolTokensOut */\\n address[] calldata _tokensIn,\\n uint256[] calldata _maxAmountsIn\\n )\\n internal\\n view\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n // Encode method data for Garden to invoke\\n require(_tokensIn.length == 2, 'Two tokens required');\\n require(_maxAmountsIn.length == 2, 'Two amounts required');\\n return (address(uniRouter), 0, _getMethodData(_strategy, _tokensIn, _maxAmountsIn));\\n }\\n\\n function _getMethodData(\\n address _strategy,\\n address[] calldata _tokensIn,\\n uint256[] calldata _maxAmountsIn\\n ) private view returns (bytes memory) {\\n return\\n abi.encodeWithSignature(\\n 'addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)',\\n _tokensIn[0],\\n _tokensIn[1],\\n _maxAmountsIn[0],\\n _maxAmountsIn[1],\\n _maxAmountsIn[0].sub(_maxAmountsIn[0].preciseMul(SLIPPAGE_ALLOWED)),\\n _maxAmountsIn[1].sub(_maxAmountsIn[1].preciseMul(SLIPPAGE_ALLOWED)),\\n _strategy,\\n block.timestamp.add(MAX_DELTA_BLOCKS)\\n );\\n }\\n\\n /**\\n * Return exit pool calldata which is already generated from the pool API\\n *\\n * @param _strategy Address of the strategy\\n * hparam _poolAddress Address of the pool\\n * @param _poolTokensIn Amount of pool tokens to liquidate\\n * @param _tokensOut Addresses of tokens to receive\\n * @param _minAmountsOut Amounts of tokens to receive\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getExitPoolCalldata(\\n address _strategy,\\n address, /* _poolAddress */\\n uint256 _poolTokensIn,\\n address[] calldata _tokensOut,\\n uint256[] calldata _minAmountsOut\\n )\\n internal\\n view\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n require(_tokensOut.length == 2, 'Two tokens required');\\n require(_minAmountsOut.length == 2, 'Two amounts required');\\n // Encode method data for Garden to invoke\\n bytes memory methodData =\\n abi.encodeWithSignature(\\n 'removeLiquidity(address,address,uint256,uint256,uint256,address,uint256)',\\n _tokensOut[0],\\n _tokensOut[1],\\n _poolTokensIn,\\n _minAmountsOut[0],\\n _minAmountsOut[1],\\n _strategy,\\n block.timestamp.add(MAX_DELTA_BLOCKS)\\n );\\n\\n return (address(uniRouter), 0, methodData);\\n }\\n}\\n\",\"keccak256\":\"0x13a92084da0f9f0ed84df8f33136aed212e4d94f873fd302ba7b1bd68bac178a\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editGardenNFT(address _newGardenNFT) external;\\n\\n function editStrategyNFT(address _newStrategyNFT) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function editUniswapFactory(address _newUniswapFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\\n\\n function maxContributorsPerGarden() external view returns (uint256);\\n\\n function gardenCreationIsOpen() external view returns (bool);\\n\\n function openPublicGardenCreation() external;\\n\\n function setMaxContributorsPerGarden(uint256 _newMax) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function gardenNFT() external view returns (address);\\n\\n function strategyNFT() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\\n\\n function uniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0xdee5a27301c24f507d312f32249487fa9b0a756062a7e479405a1d1ee9ee7bb8\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function isGardenStrategy(address _strategy) external view returns (bool);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategyActiveInGarden(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to,\\n bool _withPenalty\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x88f1786ffee23e386aaa1735177912e1b5a7cdd440dafe52fb139fe50fd621b4\",\"license\":\"Apache License\"},\"contracts/interfaces/IIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIntegration\\n * @author Babylon Finance\\n *\\n * Interface for protocol integrations\\n */\\ninterface IIntegration {\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xee03c9274ddf3257e3bfd2bb229fea3412c9105f178e64174f59efeafd53182c\",\"license\":\"Apache License\"},\"contracts/interfaces/IPoolIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPoolIntegration\\n * @author Babylon Finance\\n *\\n * Interface for liquiditypool protocol integrations\\n */\\ninterface IPoolIntegration {\\n function joinPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensOut,\\n address[] memory _poolTokens,\\n uint256[] memory _maxAmountsIn\\n ) external;\\n\\n function exitPool(\\n address _strategy,\\n address _poolAddress,\\n uint256 _poolTokensIn,\\n address[] memory _poolTokens,\\n uint256[] memory _minAmountsOut\\n ) external;\\n\\n function getPoolTokens(address _poolAddress) external view returns (address[] memory);\\n\\n function getPoolWeights(address _poolAddress) external view returns (uint256[] memory);\\n\\n function getPoolTokensOut(\\n address _poolAdress,\\n address _tokenAddress,\\n uint256 _maxAmountsIn\\n ) external view returns (uint256);\\n\\n function getPoolMinAmountsOut(address _poolAddress, uint256 _poolTokenAmount)\\n external\\n view\\n returns (uint256[] memory _minAmountsOut);\\n\\n function isPool(address _poolAddress) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xee7df0934dad8d729ee6dacf85e1ec327a0c8e17bcabaa2afa7d14d93325f9ac\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n address,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x850597ec9a68eb86f31f13b6b77d3b31350b4ed3d0019dedfbd3550ad1a1d9e2\",\"license\":\"Apache License\"},\"contracts/interfaces/external/uniswap/IUniswapV2Router.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\ninterface IUniswapV2Router {\\n function factory() external pure returns (address);\\n\\n function WETH() external pure returns (address);\\n\\n function addLiquidity(\\n address tokenA,\\n address tokenB,\\n uint256 amountADesired,\\n uint256 amountBDesired,\\n uint256 amountAMin,\\n uint256 amountBMin,\\n address to,\\n uint256 deadline\\n )\\n external\\n returns (\\n uint256 amountA,\\n uint256 amountB,\\n uint256 liquidity\\n );\\n\\n function addLiquidityETH(\\n address token,\\n uint256 amountTokenDesired,\\n uint256 amountTokenMin,\\n uint256 amountETHMin,\\n address to,\\n uint256 deadline\\n )\\n external\\n payable\\n returns (\\n uint256 amountToken,\\n uint256 amountETH,\\n uint256 liquidity\\n );\\n\\n function removeLiquidity(\\n address tokenA,\\n address tokenB,\\n uint256 liquidity,\\n uint256 amountAMin,\\n uint256 amountBMin,\\n address to,\\n uint256 deadline\\n ) external returns (uint256 amountA, uint256 amountB);\\n\\n function removeLiquidityETH(\\n address token,\\n uint256 liquidity,\\n uint256 amountTokenMin,\\n uint256 amountETHMin,\\n address to,\\n uint256 deadline\\n ) external returns (uint256 amountToken, uint256 amountETH);\\n\\n function removeLiquidityWithPermit(\\n address tokenA,\\n address tokenB,\\n uint256 liquidity,\\n uint256 amountAMin,\\n uint256 amountBMin,\\n address to,\\n uint256 deadline,\\n bool approveMax,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external returns (uint256 amountA, uint256 amountB);\\n\\n function removeLiquidityETHWithPermit(\\n address token,\\n uint256 liquidity,\\n uint256 amountTokenMin,\\n uint256 amountETHMin,\\n address to,\\n uint256 deadline,\\n bool approveMax,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external returns (uint256 amountToken, uint256 amountETH);\\n\\n function swapExactTokensForTokens(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address[] calldata path,\\n address to,\\n uint256 deadline\\n ) external returns (uint256[] memory amounts);\\n\\n function swapTokensForExactTokens(\\n uint256 amountOut,\\n uint256 amountInMax,\\n address[] calldata path,\\n address to,\\n uint256 deadline\\n ) external returns (uint256[] memory amounts);\\n\\n function swapExactETHForTokens(\\n uint256 amountOutMin,\\n address[] calldata path,\\n address to,\\n uint256 deadline\\n ) external payable returns (uint256[] memory amounts);\\n\\n function swapTokensForExactETH(\\n uint256 amountOut,\\n uint256 amountInMax,\\n address[] calldata path,\\n address to,\\n uint256 deadline\\n ) external returns (uint256[] memory amounts);\\n\\n function swapExactTokensForETH(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address[] calldata path,\\n address to,\\n uint256 deadline\\n ) external returns (uint256[] memory amounts);\\n\\n function swapETHForExactTokens(\\n uint256 amountOut,\\n address[] calldata path,\\n address to,\\n uint256 deadline\\n ) external payable returns (uint256[] memory amounts);\\n\\n function quote(\\n uint256 amountA,\\n uint256 reserveA,\\n uint256 reserveB\\n ) external pure returns (uint256 amountB);\\n\\n function getAmountOut(\\n uint256 amountIn,\\n uint256 reserveIn,\\n uint256 reserveOut\\n ) external pure returns (uint256 amountOut);\\n\\n function getAmountIn(\\n uint256 amountOut,\\n uint256 reserveIn,\\n uint256 reserveOut\\n ) external pure returns (uint256 amountIn);\\n\\n function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts);\\n\\n function getAmountsIn(uint256 amountOut, address[] calldata path) external view returns (uint256[] memory amounts);\\n}\\n\",\"keccak256\":\"0x9225efc2274e92f1d4eb00d8c576fa571fd11335087a23cf3d1787167fa00b64\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"}},\"version\":1}", + "bytecode": "0x60c0604052600560f81b60a0523480156200001957600080fd5b506040516200233b3803806200233b833981810160405260608110156200003f57600080fd5b5080516020808301516040938401518451808601909552600c85526b1d5b9a5cddd85c17dc1bdbdb60a21b92850192909252919282848282826001600160a01b038116620000d4576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c6572206d75737420626520646566696e6564000000000000604482015290519081900360640190fd5b8251620000e99060019060208601906200013e565b50600080546001600160a01b03199081166001600160a01b039384161790915560609290921b6001600160601b03191660805260016003556004805490921696169590951790945550620001ea945050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001765760008555620001c1565b82601f106200019157805160ff1916838001178555620001c1565b82800160010185558215620001c1579182015b82811115620001c1578251825591602001919060010190620001a4565b50620001cf929150620001d3565b5090565b5b80821115620001cf5760008155600101620001d4565b60805160601c60a05160f81c61211d6200021e6000398061062052806118465280611eb652508061064d525061211d6000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063708a34761161008c578063bd9d8ad911610066578063bd9d8ad91461042c578063ca4f2803146104a2578063f5e39325146104c8578063f77c4791146104f4576100ea565b8063708a34761461031c578063a0e47bf6146103fe578063b10198fb14610406576100ea565b80633cd5bd95116100c85780633cd5bd95146101925780633fc8cef3146101da5780635b16ebb7146101fe57806362cc395a14610238576100ea565b806306fdde03146100ef57806317d7de7c1461016c57806330adee6514610174575b600080fd5b6100f76104fc565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610131578181015183820152602001610119565b50505050905090810190601f16801561015e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100f7610589565b61017c61061e565b6040805160ff9092168252519081900360200190f35b6101c8600480360360608110156101a857600080fd5b506001600160a01b03813581169160208101359091169060400135610642565b60408051918252519081900360200190f35b6101e261064b565b604080516001600160a01b039092168252519081900360200190f35b6102246004803603602081101561021457600080fd5b50356001600160a01b031661066f565b604080519115158252519081900360200190f35b61031a600480360360a081101561024e57600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561028957600080fd5b82018360208201111561029b57600080fd5b803590602001918460208302840111640100000000831117156102bd57600080fd5b9193909290916020810190356401000000008111156102db57600080fd5b8201836020820111156102ed57600080fd5b8035906020019184602083028401116401000000008311171561030f57600080fd5b509092509050610680565b005b61031a600480360360a081101561033257600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561036d57600080fd5b82018360208201111561037f57600080fd5b803590602001918460208302840111640100000000831117156103a157600080fd5b9193909290916020810190356401000000008111156103bf57600080fd5b8201836020820111156103d157600080fd5b803590602001918460208302840111640100000000831117156103f357600080fd5b509092509050610a9d565b6101e2610fbc565b6102246004803603602081101561041c57600080fd5b50356001600160a01b0316610fcb565b6104526004803603602081101561044257600080fd5b50356001600160a01b0316610fe0565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561048e578181015183820152602001610476565b505050509050019250505060405180910390f35b610452600480360360208110156104b857600080fd5b50356001600160a01b031661104e565b610452600480360360408110156104de57600080fd5b506001600160a01b038135169060200135611198565b6101e26113c0565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105815780601f1061055657610100808354040283529160200191610581565b820191906000526020600020905b81548152906001019060200180831161056457829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156106145780601f106105e957610100808354040283529160200191610614565b820191906000526020600020905b8154815290600101906020018083116105f757829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b60019392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061067a826113cf565b92915050565b600260035414156106d8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b15801561072857600080fd5b505afa15801561073c573d6000803e3d6000fd5b505050506040513d602081101561075257600080fd5b50516107a5576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b60006107b68888888888888861143e565b90506107c181611631565b80602001516001600160a01b03166397ccdc606107dd8961171c565b89896040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561083557600080fd5b505af1158015610849573d6000803e3d6000fd5b5050505060008060006108618b8b8b8b8b8b8b61172c565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156108de5781810151838201526020016108c6565b50505050905090810190601f16801561090b5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561092c57600080fd5b505af1158015610940573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561096957600080fd5b810190808051604051939291908464010000000082111561098957600080fd5b90830190602082018581111561099e57600080fd5b82516401000000008111828201881017156109b857600080fd5b82525081516020918201929091019080838360005b838110156109e55781810151838201526020016109cd565b50505050905090810190601f168015610a125780820380516001836020036101000a031916815260200191505b5060405250505050610a2384611931565b83600001516001600160a01b031684602001516001600160a01b03167f7659e40cf608296ce5aa9eff9c80adc7a49cb481173fc4e302e3983827b042df86604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b60026003541415610af5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b158015610b4557600080fd5b505afa158015610b59573d6000803e3d6000fd5b505050506040513d6020811015610b6f57600080fd5b5051610bc2576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b6000610bd38888888888888861143e565b9050610bde816119f9565b60005b84811015610cd7576000868683818110610bf757fe5b905060200201356001600160a01b03166001600160a01b031614610ccf5781602001516001600160a01b03166397ccdc60610c318a61171c565b888885818110610c3d57fe5b905060200201356001600160a01b0316878786818110610c5957fe5b905060200201356040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015610cb657600080fd5b505af1158015610cca573d6000803e3d6000fd5b505050505b600101610be1565b506000806000610cec8b8b8b8b8b8b8b611a9a565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610d69578181015183820152602001610d51565b50505050905090810190601f168015610d965780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610db757600080fd5b505af1158015610dcb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610df457600080fd5b8101908080516040519392919084640100000000821115610e1457600080fd5b908301906020820185811115610e2957600080fd5b8251640100000000811182820188101715610e4357600080fd5b82525081516020918201929091019080838360005b83811015610e70578181015183820152602001610e58565b50505050905090810190601f168015610e9d5780820380516001836020036101000a031916815260200191505b5060405250505050610f348460a0015185604001516001600160a01b03166370a0823187602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f0257600080fd5b505afa158015610f16573d6000803e3d6000fd5b505050506040513d6020811015610f2c57600080fd5b505190611b77565b6080850152610f4284611bd4565b83600001516001600160a01b031684602001516001600160a01b03167fe5ca6288535c5c6c2462c912b4033eade15b80926717896a2d58a2defdeb912886604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b6004546001600160a01b031681565b60026020526000908152604090205460ff1681565b604080516002808252606080830184529260009291906020830190803683370190505090506706f05b59d3b200008160008151811061101b57fe5b6020026020010181815250506706f05b59d3b200008160018151811061103d57fe5b602090810291909101015292915050565b60408051600280825260608083018452926000929190602083019080368337019050509050826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156110ac57600080fd5b505afa1580156110c0573d6000803e3d6000fd5b505050506040513d60208110156110d657600080fd5b5051815182906000906110e557fe5b60200260200101906001600160a01b031690816001600160a01b031681525050826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561113e57600080fd5b505afa158015611152573d6000803e3d6000fd5b505050506040513d602081101561116857600080fd5b505181518290600190811061117957fe5b6001600160a01b03909216602092830291909101909101529050919050565b60606000836001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111d557600080fd5b505afa1580156111e9573d6000803e3d6000fd5b505050506040513d60208110156111ff57600080fd5b50516040805160028082526060820183529293506000929091602083019080368337019050509050611331662386f26fc10000670de0b6b3a76400000361132b84611325888a6001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561127d57600080fd5b505afa158015611291573d6000803e3d6000fd5b505050506040513d60208110156112a757600080fd5b5051604080516370a0823160e01b81526001600160a01b038e81166004830152915191909216916370a08231916024808301926020929190829003018186803b1580156112f357600080fd5b505afa158015611307573d6000803e3d6000fd5b505050506040513d602081101561131d57600080fd5b505190611c96565b90611cf6565b90611d5d565b8160008151811061133e57fe5b6020026020010181815250506113a0662386f26fc10000670de0b6b3a76400000361132b84611325888a6001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561127d57600080fd5b816001815181106113ad57fe5b6020908102919091010152949350505050565b6000546001600160a01b031681565b600080826001600160a01b031663ba9a7a566040518163ffffffff1660e01b815260040160206040518083038186803b15801561140b57600080fd5b505afa15801561141f573d6000803e3d6000fd5b505050506040513d602081101561143557600080fd5b50511192915050565b611446611f8b565b61144e611f8b565b6001600160a01b0389166020808301829052604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b892600480840193919291829003018186803b1580156114ac57600080fd5b505afa1580156114c0573d6000803e3d6000fd5b505050506040513d60208110156114d657600080fd5b50516001600160a01b0390811682528816604080830182905280517f18160ddd00000000000000000000000000000000000000000000000000000000815290516318160ddd91600480820192602092909190829003018186803b15801561153c57600080fd5b505afa158015611550573d6000803e3d6000fd5b505050506040513d602081101561156657600080fd5b50516060820152604080516370a0823160e01b81526001600160a01b038b811660048301529151918a16916370a0823191602480820192602092909190829003018186803b1580156115b757600080fd5b505afa1580156115cb573d6000803e3d6000fd5b505050506040513d60208110156115e157600080fd5b505160a0820152608081018790526040805160208581028281018201909352858252909186918691829185019084908082843760009201919091525050505060c082015298975050505050505050565b61163e81604001516113cf565b61168f576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b60008160800151116116d25760405162461bcd60e51b815260040180806020018281038252602e815260200180612036602e913960400191505060405180910390fd5b80608001518160a0015110156117195760405162461bcd60e51b815260040180806020018281038252602d815260200180612090602d913960400191505060405180910390fd5b50565b506004546001600160a01b031690565b600080606060028614611786576040805162461bcd60e51b815260206004820152601360248201527f54776f20746f6b656e7320726571756972656400000000000000000000000000604482015290519081900360640190fd5b600284146117db576040805162461bcd60e51b815260206004820152601460248201527f54776f20616d6f756e7473207265717569726564000000000000000000000000604482015290519081900360640190fd5b6000878760008181106117ea57fe5b905060200201356001600160a01b03168888600181811061180757fe5b905060200201356001600160a01b03168a8888600081811061182557fe5b905060200201358989600181811061183957fe5b905060200201358f6118777f000000000000000000000000000000000000000000000000000000000000000060ff1642611d7590919063ffffffff16565b604080516001600160a01b03988916602482015296881660448801526064870195909552608486019390935260a4850191909152841660c484015260e4808401919091528151808403909101815261010490920190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fbaa2abde000000000000000000000000000000000000000000000000000000001790526004549091169450600093509150509750975097945050505050565b80608001518160a001510381604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561199157600080fd5b505afa1580156119a5573d6000803e3d6000fd5b505050506040513d60208110156119bb57600080fd5b5051146117195760405162461bcd60e51b815260040180806020018281038252602b8152602001806120bd602b913960400191505060405180910390fd5b611a0681604001516113cf565b611a57576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b60008160800151116117195760405162461bcd60e51b8152600401808060200182810382526031815260200180611fe46031913960400191505060405180910390fd5b600080606060028614611af4576040805162461bcd60e51b815260206004820152601360248201527f54776f20746f6b656e7320726571756972656400000000000000000000000000604482015290519081900360640190fd5b60028414611b49576040805162461bcd60e51b815260206004820152601460248201527f54776f20616d6f756e7473207265717569726564000000000000000000000000604482015290519081900360640190fd5b6004546001600160a01b03166000611b648c8a8a8a8a611dcf565b9250925092509750975097945050505050565b600082821115611bce576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b8060a0015181604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611c2e57600080fd5b505afa158015611c42573d6000803e3d6000fd5b505050506040513d6020811015611c5857600080fd5b5051116117195760405162461bcd60e51b815260040180806020018281038252602c815260200180612064602c913960400191505060405180910390fd5b600082611ca55750600061067a565b82820282848281611cb257fe5b0414611cef5760405162461bcd60e51b81526004018080602001828103825260218152602001806120156021913960400191505060405180910390fd5b9392505050565b6000808211611d4c576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611d5557fe5b049392505050565b6000611cef670de0b6b3a76400006113258585611c96565b600082820183811015611cef576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b606084846000818110611dde57fe5b905060200201356001600160a01b031685856001818110611dfb57fe5b905060200201356001600160a01b031684846000818110611e1857fe5b9050602002013585856001818110611e2c57fe5b90506020020135611e85611e63662386f26fc1000089896000818110611e4e57fe5b90506020020135611d5d90919063ffffffff16565b88886000818110611e7057fe5b90506020020135611b7790919063ffffffff16565b611ead611ea0662386f26fc100008a8a6001818110611e4e57fe5b89896001818110611e7057fe5b8b611edb4260ff7f000000000000000000000000000000000000000000000000000000000000000016611d75565b604080516001600160a01b03998a16602482015297891660448901526064880196909652608487019490945260a486019290925260c485015290931660e4830152610104808301939093528051808303909301835261012490910190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fe8e3370000000000000000000000000000000000000000000000000000000000179052905095945050505050565b6040518060e0016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160608152509056fe4d696e20706f6f6c20746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77506f6f6c20746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520737472617465677920646964206e6f7420726563656976652074686520706f6f6c20746f6b656e7354686520737472617465677920646f6573206e6f74206861766520656e6f75676820706f6f6c20746f6b656e7354686520737472617465677920646964206e6f742072657475726e2074686520706f6f6c20746f6b656e73a2646970667358221220eab39abc37ee192e172e17dab3ab0f5ae27530e8f660c2cc29682f59dd62fee864736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063708a34761161008c578063bd9d8ad911610066578063bd9d8ad91461042c578063ca4f2803146104a2578063f5e39325146104c8578063f77c4791146104f4576100ea565b8063708a34761461031c578063a0e47bf6146103fe578063b10198fb14610406576100ea565b80633cd5bd95116100c85780633cd5bd95146101925780633fc8cef3146101da5780635b16ebb7146101fe57806362cc395a14610238576100ea565b806306fdde03146100ef57806317d7de7c1461016c57806330adee6514610174575b600080fd5b6100f76104fc565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610131578181015183820152602001610119565b50505050905090810190601f16801561015e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100f7610589565b61017c61061e565b6040805160ff9092168252519081900360200190f35b6101c8600480360360608110156101a857600080fd5b506001600160a01b03813581169160208101359091169060400135610642565b60408051918252519081900360200190f35b6101e261064b565b604080516001600160a01b039092168252519081900360200190f35b6102246004803603602081101561021457600080fd5b50356001600160a01b031661066f565b604080519115158252519081900360200190f35b61031a600480360360a081101561024e57600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561028957600080fd5b82018360208201111561029b57600080fd5b803590602001918460208302840111640100000000831117156102bd57600080fd5b9193909290916020810190356401000000008111156102db57600080fd5b8201836020820111156102ed57600080fd5b8035906020019184602083028401116401000000008311171561030f57600080fd5b509092509050610680565b005b61031a600480360360a081101561033257600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561036d57600080fd5b82018360208201111561037f57600080fd5b803590602001918460208302840111640100000000831117156103a157600080fd5b9193909290916020810190356401000000008111156103bf57600080fd5b8201836020820111156103d157600080fd5b803590602001918460208302840111640100000000831117156103f357600080fd5b509092509050610a9d565b6101e2610fbc565b6102246004803603602081101561041c57600080fd5b50356001600160a01b0316610fcb565b6104526004803603602081101561044257600080fd5b50356001600160a01b0316610fe0565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561048e578181015183820152602001610476565b505050509050019250505060405180910390f35b610452600480360360208110156104b857600080fd5b50356001600160a01b031661104e565b610452600480360360408110156104de57600080fd5b506001600160a01b038135169060200135611198565b6101e26113c0565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105815780601f1061055657610100808354040283529160200191610581565b820191906000526020600020905b81548152906001019060200180831161056457829003601f168201915b505050505081565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156106145780601f106105e957610100808354040283529160200191610614565b820191906000526020600020905b8154815290600101906020018083116105f757829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b60019392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061067a826113cf565b92915050565b600260035414156106d8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b15801561072857600080fd5b505afa15801561073c573d6000803e3d6000fd5b505050506040513d602081101561075257600080fd5b50516107a5576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b60006107b68888888888888861143e565b90506107c181611631565b80602001516001600160a01b03166397ccdc606107dd8961171c565b89896040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561083557600080fd5b505af1158015610849573d6000803e3d6000fd5b5050505060008060006108618b8b8b8b8b8b8b61172c565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156108de5781810151838201526020016108c6565b50505050905090810190601f16801561090b5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561092c57600080fd5b505af1158015610940573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561096957600080fd5b810190808051604051939291908464010000000082111561098957600080fd5b90830190602082018581111561099e57600080fd5b82516401000000008111828201881017156109b857600080fd5b82525081516020918201929091019080838360005b838110156109e55781810151838201526020016109cd565b50505050905090810190601f168015610a125780820380516001836020036101000a031916815260200191505b5060405250505050610a2384611931565b83600001516001600160a01b031684602001516001600160a01b03167f7659e40cf608296ce5aa9eff9c80adc7a49cb481173fc4e302e3983827b042df86604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b60026003541415610af5576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b158015610b4557600080fd5b505afa158015610b59573d6000803e3d6000fd5b505050506040513d6020811015610b6f57600080fd5b5051610bc2576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b6000610bd38888888888888861143e565b9050610bde816119f9565b60005b84811015610cd7576000868683818110610bf757fe5b905060200201356001600160a01b03166001600160a01b031614610ccf5781602001516001600160a01b03166397ccdc60610c318a61171c565b888885818110610c3d57fe5b905060200201356001600160a01b0316878786818110610c5957fe5b905060200201356040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015610cb657600080fd5b505af1158015610cca573d6000803e3d6000fd5b505050505b600101610be1565b506000806000610cec8b8b8b8b8b8b8b611a9a565b92509250925083602001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610d69578181015183820152602001610d51565b50505050905090810190601f168015610d965780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610db757600080fd5b505af1158015610dcb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610df457600080fd5b8101908080516040519392919084640100000000821115610e1457600080fd5b908301906020820185811115610e2957600080fd5b8251640100000000811182820188101715610e4357600080fd5b82525081516020918201929091019080838360005b83811015610e70578181015183820152602001610e58565b50505050905090810190601f168015610e9d5780820380516001836020036101000a031916815260200191505b5060405250505050610f348460a0015185604001516001600160a01b03166370a0823187602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f0257600080fd5b505afa158015610f16573d6000803e3d6000fd5b505050506040513d6020811015610f2c57600080fd5b505190611b77565b6080850152610f4284611bd4565b83600001516001600160a01b031684602001516001600160a01b03167fe5ca6288535c5c6c2462c912b4033eade15b80926717896a2d58a2defdeb912886604001518c60405180836001600160a01b031681526020018281526020019250505060405180910390a350506001600355505050505050505050565b6004546001600160a01b031681565b60026020526000908152604090205460ff1681565b604080516002808252606080830184529260009291906020830190803683370190505090506706f05b59d3b200008160008151811061101b57fe5b6020026020010181815250506706f05b59d3b200008160018151811061103d57fe5b602090810291909101015292915050565b60408051600280825260608083018452926000929190602083019080368337019050509050826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156110ac57600080fd5b505afa1580156110c0573d6000803e3d6000fd5b505050506040513d60208110156110d657600080fd5b5051815182906000906110e557fe5b60200260200101906001600160a01b031690816001600160a01b031681525050826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561113e57600080fd5b505afa158015611152573d6000803e3d6000fd5b505050506040513d602081101561116857600080fd5b505181518290600190811061117957fe5b6001600160a01b03909216602092830291909101909101529050919050565b60606000836001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111d557600080fd5b505afa1580156111e9573d6000803e3d6000fd5b505050506040513d60208110156111ff57600080fd5b50516040805160028082526060820183529293506000929091602083019080368337019050509050611331662386f26fc10000670de0b6b3a76400000361132b84611325888a6001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561127d57600080fd5b505afa158015611291573d6000803e3d6000fd5b505050506040513d60208110156112a757600080fd5b5051604080516370a0823160e01b81526001600160a01b038e81166004830152915191909216916370a08231916024808301926020929190829003018186803b1580156112f357600080fd5b505afa158015611307573d6000803e3d6000fd5b505050506040513d602081101561131d57600080fd5b505190611c96565b90611cf6565b90611d5d565b8160008151811061133e57fe5b6020026020010181815250506113a0662386f26fc10000670de0b6b3a76400000361132b84611325888a6001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561127d57600080fd5b816001815181106113ad57fe5b6020908102919091010152949350505050565b6000546001600160a01b031681565b600080826001600160a01b031663ba9a7a566040518163ffffffff1660e01b815260040160206040518083038186803b15801561140b57600080fd5b505afa15801561141f573d6000803e3d6000fd5b505050506040513d602081101561143557600080fd5b50511192915050565b611446611f8b565b61144e611f8b565b6001600160a01b0389166020808301829052604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b892600480840193919291829003018186803b1580156114ac57600080fd5b505afa1580156114c0573d6000803e3d6000fd5b505050506040513d60208110156114d657600080fd5b50516001600160a01b0390811682528816604080830182905280517f18160ddd00000000000000000000000000000000000000000000000000000000815290516318160ddd91600480820192602092909190829003018186803b15801561153c57600080fd5b505afa158015611550573d6000803e3d6000fd5b505050506040513d602081101561156657600080fd5b50516060820152604080516370a0823160e01b81526001600160a01b038b811660048301529151918a16916370a0823191602480820192602092909190829003018186803b1580156115b757600080fd5b505afa1580156115cb573d6000803e3d6000fd5b505050506040513d60208110156115e157600080fd5b505160a0820152608081018790526040805160208581028281018201909352858252909186918691829185019084908082843760009201919091525050505060c082015298975050505050505050565b61163e81604001516113cf565b61168f576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b60008160800151116116d25760405162461bcd60e51b815260040180806020018281038252602e815260200180612036602e913960400191505060405180910390fd5b80608001518160a0015110156117195760405162461bcd60e51b815260040180806020018281038252602d815260200180612090602d913960400191505060405180910390fd5b50565b506004546001600160a01b031690565b600080606060028614611786576040805162461bcd60e51b815260206004820152601360248201527f54776f20746f6b656e7320726571756972656400000000000000000000000000604482015290519081900360640190fd5b600284146117db576040805162461bcd60e51b815260206004820152601460248201527f54776f20616d6f756e7473207265717569726564000000000000000000000000604482015290519081900360640190fd5b6000878760008181106117ea57fe5b905060200201356001600160a01b03168888600181811061180757fe5b905060200201356001600160a01b03168a8888600081811061182557fe5b905060200201358989600181811061183957fe5b905060200201358f6118777f000000000000000000000000000000000000000000000000000000000000000060ff1642611d7590919063ffffffff16565b604080516001600160a01b03988916602482015296881660448801526064870195909552608486019390935260a4850191909152841660c484015260e4808401919091528151808403909101815261010490920190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fbaa2abde000000000000000000000000000000000000000000000000000000001790526004549091169450600093509150509750975097945050505050565b80608001518160a001510381604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561199157600080fd5b505afa1580156119a5573d6000803e3d6000fd5b505050506040513d60208110156119bb57600080fd5b5051146117195760405162461bcd60e51b815260040180806020018281038252602b8152602001806120bd602b913960400191505060405180910390fd5b611a0681604001516113cf565b611a57576040805162461bcd60e51b815260206004820152601d60248201527f54686520706f6f6c2061646472657373206973206e6f742076616c6964000000604482015290519081900360640190fd5b60008160800151116117195760405162461bcd60e51b8152600401808060200182810382526031815260200180611fe46031913960400191505060405180910390fd5b600080606060028614611af4576040805162461bcd60e51b815260206004820152601360248201527f54776f20746f6b656e7320726571756972656400000000000000000000000000604482015290519081900360640190fd5b60028414611b49576040805162461bcd60e51b815260206004820152601460248201527f54776f20616d6f756e7473207265717569726564000000000000000000000000604482015290519081900360640190fd5b6004546001600160a01b03166000611b648c8a8a8a8a611dcf565b9250925092509750975097945050505050565b600082821115611bce576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b8060a0015181604001516001600160a01b03166370a0823183602001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611c2e57600080fd5b505afa158015611c42573d6000803e3d6000fd5b505050506040513d6020811015611c5857600080fd5b5051116117195760405162461bcd60e51b815260040180806020018281038252602c815260200180612064602c913960400191505060405180910390fd5b600082611ca55750600061067a565b82820282848281611cb257fe5b0414611cef5760405162461bcd60e51b81526004018080602001828103825260218152602001806120156021913960400191505060405180910390fd5b9392505050565b6000808211611d4c576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611d5557fe5b049392505050565b6000611cef670de0b6b3a76400006113258585611c96565b600082820183811015611cef576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b606084846000818110611dde57fe5b905060200201356001600160a01b031685856001818110611dfb57fe5b905060200201356001600160a01b031684846000818110611e1857fe5b9050602002013585856001818110611e2c57fe5b90506020020135611e85611e63662386f26fc1000089896000818110611e4e57fe5b90506020020135611d5d90919063ffffffff16565b88886000818110611e7057fe5b90506020020135611b7790919063ffffffff16565b611ead611ea0662386f26fc100008a8a6001818110611e4e57fe5b89896001818110611e7057fe5b8b611edb4260ff7f000000000000000000000000000000000000000000000000000000000000000016611d75565b604080516001600160a01b03998a16602482015297891660448901526064880196909652608487019490945260a486019290925260c485015290931660e4830152610104808301939093528051808303909301835261012490910190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fe8e3370000000000000000000000000000000000000000000000000000000000179052905095945050505050565b6040518060e0016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160608152509056fe4d696e20706f6f6c20746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77506f6f6c20746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520737472617465677920646964206e6f7420726563656976652074686520706f6f6c20746f6b656e7354686520737472617465677920646f6573206e6f74206861766520656e6f75676820706f6f6c20746f6b656e7354686520737472617465677920646964206e6f742072657475726e2074686520706f6f6c20746f6b656e73a2646970667358221220eab39abc37ee192e172e17dab3ab0f5ae27530e8f660c2cc29682f59dd62fee864736f6c63430007060033", "devdoc": { "author": "Babylon Finance Protocol Kyber protocol trade integration", "kind": "dev", @@ -448,7 +448,7 @@ "storageLayout": { "storage": [ { - "astId": 18742, + "astId": 17657, "contract": "contracts/integrations/pool/UniswapPoolIntegration.sol:UniswapPoolIntegration", "label": "controller", "offset": 0, @@ -456,7 +456,7 @@ "type": "t_address" }, { - "astId": 18746, + "astId": 17661, "contract": "contracts/integrations/pool/UniswapPoolIntegration.sol:UniswapPoolIntegration", "label": "name", "offset": 0, @@ -464,7 +464,7 @@ "type": "t_string_storage" }, { - "astId": 18750, + "astId": 17665, "contract": "contracts/integrations/pool/UniswapPoolIntegration.sol:UniswapPoolIntegration", "label": "initializedByGarden", "offset": 0, @@ -472,7 +472,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 7995, + "astId": 5603, "contract": "contracts/integrations/pool/UniswapPoolIntegration.sol:UniswapPoolIntegration", "label": "_status", "offset": 0, @@ -480,12 +480,12 @@ "type": "t_uint256" }, { - "astId": 22153, + "astId": 21058, "contract": "contracts/integrations/pool/UniswapPoolIntegration.sol:UniswapPoolIntegration", "label": "uniRouter", "offset": 0, "slot": "4", - "type": "t_contract(IUniswapV2Router)26981" + "type": "t_contract(IUniswapV2Router)26084" } ], "types": { @@ -499,7 +499,7 @@ "label": "bool", "numberOfBytes": "1" }, - "t_contract(IUniswapV2Router)26981": { + "t_contract(IUniswapV2Router)26084": { "encoding": "inplace", "label": "contract IUniswapV2Router", "numberOfBytes": "20" diff --git a/deployments/artifacts/mainnet/UniswapTWAPV3.json b/deployments/artifacts/mainnet/UniswapTWAPV3.json new file mode 100644 index 000000000..dd9c7dae0 --- /dev/null +++ b/deployments/artifacts/mainnet/UniswapTWAPV3.json @@ -0,0 +1,373 @@ +{ + "address": "0xDB1Bf4f4976A4BEd769B9106bd41E0211E342446", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_controller", + "type": "address" + }, + { + "internalType": "address", + "name": "_factory", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "SECONDS_GRANULARITY", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WETH", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "controller", + "outputs": [ + { + "internalType": "contract IBabController", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "factory", + "outputs": [ + { + "internalType": "contract IUniswapV3Factory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenOut", + "type": "address" + } + ], + "name": "getPrice", + "outputs": [ + { + "internalType": "bool", + "name": "found", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "secondsAgo", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenA", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenB", + "type": "address" + } + ], + "name": "update", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xfecda232fa57ec696d2b4cbc05f3fb530b78903d682c8d5a0bb105d884b60080", + "receipt": { + "to": null, + "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", + "contractAddress": "0xDB1Bf4f4976A4BEd769B9106bd41E0211E342446", + "transactionIndex": 104, + "gasUsed": "1056813", + "logsBloom": "0x00020000000000000000000000000000000000000000000000800000000000000000000000000000000000000008000000000000000000000000008000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000100000000000004000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x93f5b916d5b5647c15a2b27f899a2503c131a6be76112c09214fbce51f3d795f", + "transactionHash": "0xfecda232fa57ec696d2b4cbc05f3fb530b78903d682c8d5a0bb105d884b60080", + "logs": [ + { + "transactionIndex": 104, + "blockNumber": 12451239, + "transactionHash": "0xfecda232fa57ec696d2b4cbc05f3fb530b78903d682c8d5a0bb105d884b60080", + "address": "0xDB1Bf4f4976A4BEd769B9106bd41E0211E342446", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000040cc3af8455f3c34d1df1d2a305e047a062bebf" + ], + "data": "0x", + "logIndex": 168, + "blockHash": "0x93f5b916d5b5647c15a2b27f899a2503c131a6be76112c09214fbce51f3d795f" + } + ], + "blockNumber": 12451239, + "cumulativeGasUsed": "7990118", + "status": 1, + "byzantium": true + }, + "args": [ + "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F", + "0x1F98431c8aD98523631AE4a59f267346ea31F984" + ], + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_factory\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"SECONDS_GRANULARITY\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WETH\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"contract IBabController\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"contract IUniswapV3Factory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenOut\",\"type\":\"address\"}],\"name\":\"getPrice\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"found\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"secondsAgo\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"}],\"name\":\"update\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Protocol Uses uniswap V3 to get the price of a token pair\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Instance of controller contract\",\"_factory\":\"Address of Uniswap factory\"}},\"getPrice(address,address)\":{\"params\":{\"tokenIn\":\"Address of the first token\",\"tokenOut\":\"Address of the second token\"},\"returns\":{\"amountOut\":\" How many tokenOut are one tokenIn\",\"found\":\" Whether or not the price as found\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"title\":\"UniswapTWAPV3\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Set state variables\"},\"getPrice(address,address)\":{\"notice\":\"Returns the amount out corresponding to the amount in for a given token\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/oracle_adapter/UniswapTWAPV3.sol\":\"UniswapTWAPV3\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor () internal {\\n address msgSender = _msgSender();\\n _owner = msgSender;\\n emit OwnershipTransferred(address(0), msgSender);\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n emit OwnershipTransferred(_owner, address(0));\\n _owner = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n emit OwnershipTransferred(_owner, newOwner);\\n _owner = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0x15e2d5bd4c28a88548074c54d220e8086f638a71ed07e6b3ba5a70066fcf458d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\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 /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\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, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x7b2b8baa20fd60ab4a328c8e34c64a353651b80ba4b5b157cbb61813f6f85d55\",\"license\":\"MIT\"},\"@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title The interface for the Uniswap V3 Factory\\n/// @notice The Uniswap V3 Factory facilitates creation of Uniswap V3 pools and control over the protocol fees\\ninterface IUniswapV3Factory {\\n /// @notice Emitted when the owner of the factory is changed\\n /// @param oldOwner The owner before the owner was changed\\n /// @param newOwner The owner after the owner was changed\\n event OwnerChanged(address indexed oldOwner, address indexed newOwner);\\n\\n /// @notice Emitted when a pool is created\\n /// @param token0 The first token of the pool by address sort order\\n /// @param token1 The second token of the pool by address sort order\\n /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip\\n /// @param tickSpacing The minimum number of ticks between initialized ticks\\n /// @param pool The address of the created pool\\n event PoolCreated(\\n address indexed token0,\\n address indexed token1,\\n uint24 indexed fee,\\n int24 tickSpacing,\\n address pool\\n );\\n\\n /// @notice Emitted when a new fee amount is enabled for pool creation via the factory\\n /// @param fee The enabled fee, denominated in hundredths of a bip\\n /// @param tickSpacing The minimum number of ticks between initialized ticks for pools created with the given fee\\n event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing);\\n\\n /// @notice Returns the current owner of the factory\\n /// @dev Can be changed by the current owner via setOwner\\n /// @return The address of the factory owner\\n function owner() external view returns (address);\\n\\n /// @notice Returns the tick spacing for a given fee amount, if enabled, or 0 if not enabled\\n /// @dev A fee amount can never be removed, so this value should be hard coded or cached in the calling context\\n /// @param fee The enabled fee, denominated in hundredths of a bip. Returns 0 in case of unenabled fee\\n /// @return The tick spacing\\n function feeAmountTickSpacing(uint24 fee) external view returns (int24);\\n\\n /// @notice Returns the pool address for a given pair of tokens and a fee, or address 0 if it does not exist\\n /// @dev tokenA and tokenB may be passed in either token0/token1 or token1/token0 order\\n /// @param tokenA The contract address of either token0 or token1\\n /// @param tokenB The contract address of the other token\\n /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip\\n /// @return pool The pool address\\n function getPool(\\n address tokenA,\\n address tokenB,\\n uint24 fee\\n ) external view returns (address pool);\\n\\n /// @notice Creates a pool for the given two tokens and fee\\n /// @param tokenA One of the two tokens in the desired pool\\n /// @param tokenB The other of the two tokens in the desired pool\\n /// @param fee The desired fee for the pool\\n /// @dev tokenA and tokenB may be passed in either order: token0/token1 or token1/token0. tickSpacing is retrieved\\n /// from the fee. The call will revert if the pool already exists, the fee is invalid, or the token arguments\\n /// are invalid.\\n /// @return pool The address of the newly created pool\\n function createPool(\\n address tokenA,\\n address tokenB,\\n uint24 fee\\n ) external returns (address pool);\\n\\n /// @notice Updates the owner of the factory\\n /// @dev Must be called by the current owner\\n /// @param _owner The new owner of the factory\\n function setOwner(address _owner) external;\\n\\n /// @notice Enables a fee amount with the given tickSpacing\\n /// @dev Fee amounts may never be removed once enabled\\n /// @param fee The fee amount to enable, denominated in hundredths of a bip (i.e. 1e-6)\\n /// @param tickSpacing The spacing between ticks to be enforced for all pools created with the given fee amount\\n function enableFeeAmount(uint24 fee, int24 tickSpacing) external;\\n}\\n\",\"keccak256\":\"0xcc3d0c93fc9ac0febbe09f941b465b57f750bcf3b48432da0b97dc289cfdc489\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\nimport './pool/IUniswapV3PoolImmutables.sol';\\nimport './pool/IUniswapV3PoolState.sol';\\nimport './pool/IUniswapV3PoolDerivedState.sol';\\nimport './pool/IUniswapV3PoolActions.sol';\\nimport './pool/IUniswapV3PoolOwnerActions.sol';\\nimport './pool/IUniswapV3PoolEvents.sol';\\n\\n/// @title The interface for a Uniswap V3 Pool\\n/// @notice A Uniswap pool facilitates swapping and automated market making between any two assets that strictly conform\\n/// to the ERC20 specification\\n/// @dev The pool interface is broken up into many smaller pieces\\ninterface IUniswapV3Pool is\\n IUniswapV3PoolImmutables,\\n IUniswapV3PoolState,\\n IUniswapV3PoolDerivedState,\\n IUniswapV3PoolActions,\\n IUniswapV3PoolOwnerActions,\\n IUniswapV3PoolEvents\\n{\\n\\n}\\n\",\"keccak256\":\"0xfe6113d518466cd6652c85b111e01f33eb62157f49ae5ed7d5a3947a2044adb1\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolActions.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Permissionless pool actions\\n/// @notice Contains pool methods that can be called by anyone\\ninterface IUniswapV3PoolActions {\\n /// @notice Sets the initial price for the pool\\n /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value\\n /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96\\n function initialize(uint160 sqrtPriceX96) external;\\n\\n /// @notice Adds liquidity for the given recipient/tickLower/tickUpper position\\n /// @dev The caller of this method receives a callback in the form of IUniswapV3MintCallback#uniswapV3MintCallback\\n /// in which they must pay any token0 or token1 owed for the liquidity. The amount of token0/token1 due depends\\n /// on tickLower, tickUpper, the amount of liquidity, and the current price.\\n /// @param recipient The address for which the liquidity will be created\\n /// @param tickLower The lower tick of the position in which to add liquidity\\n /// @param tickUpper The upper tick of the position in which to add liquidity\\n /// @param amount The amount of liquidity to mint\\n /// @param data Any data that should be passed through to the callback\\n /// @return amount0 The amount of token0 that was paid to mint the given amount of liquidity. Matches the value in the callback\\n /// @return amount1 The amount of token1 that was paid to mint the given amount of liquidity. Matches the value in the callback\\n function mint(\\n address recipient,\\n int24 tickLower,\\n int24 tickUpper,\\n uint128 amount,\\n bytes calldata data\\n ) external returns (uint256 amount0, uint256 amount1);\\n\\n /// @notice Collects tokens owed to a position\\n /// @dev Does not recompute fees earned, which must be done either via mint or burn of any amount of liquidity.\\n /// Collect must be called by the position owner. To withdraw only token0 or only token1, amount0Requested or\\n /// amount1Requested may be set to zero. To withdraw all tokens owed, caller may pass any value greater than the\\n /// actual tokens owed, e.g. type(uint128).max. Tokens owed may be from accumulated swap fees or burned liquidity.\\n /// @param recipient The address which should receive the fees collected\\n /// @param tickLower The lower tick of the position for which to collect fees\\n /// @param tickUpper The upper tick of the position for which to collect fees\\n /// @param amount0Requested How much token0 should be withdrawn from the fees owed\\n /// @param amount1Requested How much token1 should be withdrawn from the fees owed\\n /// @return amount0 The amount of fees collected in token0\\n /// @return amount1 The amount of fees collected in token1\\n function collect(\\n address recipient,\\n int24 tickLower,\\n int24 tickUpper,\\n uint128 amount0Requested,\\n uint128 amount1Requested\\n ) external returns (uint128 amount0, uint128 amount1);\\n\\n /// @notice Burn liquidity from the sender and account tokens owed for the liquidity to the position\\n /// @dev Can be used to trigger a recalculation of fees owed to a position by calling with an amount of 0\\n /// @dev Fees must be collected separately via a call to #collect\\n /// @param tickLower The lower tick of the position for which to burn liquidity\\n /// @param tickUpper The upper tick of the position for which to burn liquidity\\n /// @param amount How much liquidity to burn\\n /// @return amount0 The amount of token0 sent to the recipient\\n /// @return amount1 The amount of token1 sent to the recipient\\n function burn(\\n int24 tickLower,\\n int24 tickUpper,\\n uint128 amount\\n ) external returns (uint256 amount0, uint256 amount1);\\n\\n /// @notice Swap token0 for token1, or token1 for token0\\n /// @dev The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback\\n /// @param recipient The address to receive the output of the swap\\n /// @param zeroForOne The direction of the swap, true for token0 to token1, false for token1 to token0\\n /// @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative)\\n /// @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this\\n /// value after the swap. If one for zero, the price cannot be greater than this value after the swap\\n /// @param data Any data to be passed through to the callback\\n /// @return amount0 The delta of the balance of token0 of the pool, exact when negative, minimum when positive\\n /// @return amount1 The delta of the balance of token1 of the pool, exact when negative, minimum when positive\\n function swap(\\n address recipient,\\n bool zeroForOne,\\n int256 amountSpecified,\\n uint160 sqrtPriceLimitX96,\\n bytes calldata data\\n ) external returns (int256 amount0, int256 amount1);\\n\\n /// @notice Receive token0 and/or token1 and pay it back, plus a fee, in the callback\\n /// @dev The caller of this method receives a callback in the form of IUniswapV3FlashCallback#uniswapV3FlashCallback\\n /// @dev Can be used to donate underlying tokens pro-rata to currently in-range liquidity providers by calling\\n /// with 0 amount{0,1} and sending the donation amount(s) from the callback\\n /// @param recipient The address which will receive the token0 and token1 amounts\\n /// @param amount0 The amount of token0 to send\\n /// @param amount1 The amount of token1 to send\\n /// @param data Any data to be passed through to the callback\\n function flash(\\n address recipient,\\n uint256 amount0,\\n uint256 amount1,\\n bytes calldata data\\n ) external;\\n\\n /// @notice Increase the maximum number of price and liquidity observations that this pool will store\\n /// @dev This method is no-op if the pool already has an observationCardinalityNext greater than or equal to\\n /// the input observationCardinalityNext.\\n /// @param observationCardinalityNext The desired minimum number of observations for the pool to store\\n function increaseObservationCardinalityNext(uint16 observationCardinalityNext) external;\\n}\\n\",\"keccak256\":\"0x9453dd0e7442188667d01d9b65de3f1e14e9511ff3e303179a15f6fc267f7634\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolDerivedState.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Pool state that is not stored\\n/// @notice Contains view functions to provide information about the pool that is computed rather than stored on the\\n/// blockchain. The functions here may have variable gas costs.\\ninterface IUniswapV3PoolDerivedState {\\n /// @notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp\\n /// @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing\\n /// the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick,\\n /// you must call it with secondsAgos = [3600, 0].\\n /// @dev The time weighted average tick represents the geometric time weighted average price of the pool, in\\n /// log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.\\n /// @param secondsAgos From how long ago each cumulative tick and liquidity value should be returned\\n /// @return tickCumulatives Cumulative tick values as of each `secondsAgos` from the current block timestamp\\n /// @return secondsPerLiquidityCumulativeX128s Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block\\n /// timestamp\\n function observe(uint32[] calldata secondsAgos)\\n external\\n view\\n returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s);\\n\\n /// @notice Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range\\n /// @dev Snapshots must only be compared to other snapshots, taken over a period for which a position existed.\\n /// I.e., snapshots cannot be compared if a position is not held for the entire period between when the first\\n /// snapshot is taken and the second snapshot is taken.\\n /// @param tickLower The lower tick of the range\\n /// @param tickUpper The upper tick of the range\\n /// @return tickCumulativeInside The snapshot of the tick accumulator for the range\\n /// @return secondsPerLiquidityInsideX128 The snapshot of seconds per liquidity for the range\\n /// @return secondsInside The snapshot of seconds per liquidity for the range\\n function snapshotCumulativesInside(int24 tickLower, int24 tickUpper)\\n external\\n view\\n returns (\\n int56 tickCumulativeInside,\\n uint160 secondsPerLiquidityInsideX128,\\n uint32 secondsInside\\n );\\n}\\n\",\"keccak256\":\"0xe603ac5b17ecdee73ba2b27efdf386c257a19c14206e87eee77e2017b742d9e5\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolEvents.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Events emitted by a pool\\n/// @notice Contains all events emitted by the pool\\ninterface IUniswapV3PoolEvents {\\n /// @notice Emitted exactly once by a pool when #initialize is first called on the pool\\n /// @dev Mint/Burn/Swap cannot be emitted by the pool before Initialize\\n /// @param sqrtPriceX96 The initial sqrt price of the pool, as a Q64.96\\n /// @param tick The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool\\n event Initialize(uint160 sqrtPriceX96, int24 tick);\\n\\n /// @notice Emitted when liquidity is minted for a given position\\n /// @param sender The address that minted the liquidity\\n /// @param owner The owner of the position and recipient of any minted liquidity\\n /// @param tickLower The lower tick of the position\\n /// @param tickUpper The upper tick of the position\\n /// @param amount The amount of liquidity minted to the position range\\n /// @param amount0 How much token0 was required for the minted liquidity\\n /// @param amount1 How much token1 was required for the minted liquidity\\n event Mint(\\n address sender,\\n address indexed owner,\\n int24 indexed tickLower,\\n int24 indexed tickUpper,\\n uint128 amount,\\n uint256 amount0,\\n uint256 amount1\\n );\\n\\n /// @notice Emitted when fees are collected by the owner of a position\\n /// @dev Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees\\n /// @param owner The owner of the position for which fees are collected\\n /// @param tickLower The lower tick of the position\\n /// @param tickUpper The upper tick of the position\\n /// @param amount0 The amount of token0 fees collected\\n /// @param amount1 The amount of token1 fees collected\\n event Collect(\\n address indexed owner,\\n address recipient,\\n int24 indexed tickLower,\\n int24 indexed tickUpper,\\n uint128 amount0,\\n uint128 amount1\\n );\\n\\n /// @notice Emitted when a position's liquidity is removed\\n /// @dev Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect\\n /// @param owner The owner of the position for which liquidity is removed\\n /// @param tickLower The lower tick of the position\\n /// @param tickUpper The upper tick of the position\\n /// @param amount The amount of liquidity to remove\\n /// @param amount0 The amount of token0 withdrawn\\n /// @param amount1 The amount of token1 withdrawn\\n event Burn(\\n address indexed owner,\\n int24 indexed tickLower,\\n int24 indexed tickUpper,\\n uint128 amount,\\n uint256 amount0,\\n uint256 amount1\\n );\\n\\n /// @notice Emitted by the pool for any swaps between token0 and token1\\n /// @param sender The address that initiated the swap call, and that received the callback\\n /// @param recipient The address that received the output of the swap\\n /// @param amount0 The delta of the token0 balance of the pool\\n /// @param amount1 The delta of the token1 balance of the pool\\n /// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96\\n /// @param liquidity The liquidity of the pool after the swap\\n /// @param tick The log base 1.0001 of price of the pool after the swap\\n event Swap(\\n address indexed sender,\\n address indexed recipient,\\n int256 amount0,\\n int256 amount1,\\n uint160 sqrtPriceX96,\\n uint128 liquidity,\\n int24 tick\\n );\\n\\n /// @notice Emitted by the pool for any flashes of token0/token1\\n /// @param sender The address that initiated the swap call, and that received the callback\\n /// @param recipient The address that received the tokens from flash\\n /// @param amount0 The amount of token0 that was flashed\\n /// @param amount1 The amount of token1 that was flashed\\n /// @param paid0 The amount of token0 paid for the flash, which can exceed the amount0 plus the fee\\n /// @param paid1 The amount of token1 paid for the flash, which can exceed the amount1 plus the fee\\n event Flash(\\n address indexed sender,\\n address indexed recipient,\\n uint256 amount0,\\n uint256 amount1,\\n uint256 paid0,\\n uint256 paid1\\n );\\n\\n /// @notice Emitted by the pool for increases to the number of observations that can be stored\\n /// @dev observationCardinalityNext is not the observation cardinality until an observation is written at the index\\n /// just before a mint/swap/burn.\\n /// @param observationCardinalityNextOld The previous value of the next observation cardinality\\n /// @param observationCardinalityNextNew The updated value of the next observation cardinality\\n event IncreaseObservationCardinalityNext(\\n uint16 observationCardinalityNextOld,\\n uint16 observationCardinalityNextNew\\n );\\n\\n /// @notice Emitted when the protocol fee is changed by the pool\\n /// @param feeProtocol0Old The previous value of the token0 protocol fee\\n /// @param feeProtocol1Old The previous value of the token1 protocol fee\\n /// @param feeProtocol0New The updated value of the token0 protocol fee\\n /// @param feeProtocol1New The updated value of the token1 protocol fee\\n event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New);\\n\\n /// @notice Emitted when the collected protocol fees are withdrawn by the factory owner\\n /// @param sender The address that collects the protocol fees\\n /// @param recipient The address that receives the collected protocol fees\\n /// @param amount0 The amount of token0 protocol fees that is withdrawn\\n /// @param amount0 The amount of token1 protocol fees that is withdrawn\\n event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1);\\n}\\n\",\"keccak256\":\"0x8071514d0fe5d17d6fbd31c191cdfb703031c24e0ece3621d88ab10e871375cd\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolImmutables.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Pool state that never changes\\n/// @notice These parameters are fixed for a pool forever, i.e., the methods will always return the same values\\ninterface IUniswapV3PoolImmutables {\\n /// @notice The contract that deployed the pool, which must adhere to the IUniswapV3Factory interface\\n /// @return The contract address\\n function factory() external view returns (address);\\n\\n /// @notice The first of the two tokens of the pool, sorted by address\\n /// @return The token contract address\\n function token0() external view returns (address);\\n\\n /// @notice The second of the two tokens of the pool, sorted by address\\n /// @return The token contract address\\n function token1() external view returns (address);\\n\\n /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6\\n /// @return The fee\\n function fee() external view returns (uint24);\\n\\n /// @notice The pool tick spacing\\n /// @dev Ticks can only be used at multiples of this value, minimum of 1 and always positive\\n /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ...\\n /// This value is an int24 to avoid casting even though it is always positive.\\n /// @return The tick spacing\\n function tickSpacing() external view returns (int24);\\n\\n /// @notice The maximum amount of position liquidity that can use any tick in the range\\n /// @dev This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and\\n /// also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool\\n /// @return The max amount of liquidity per tick\\n function maxLiquidityPerTick() external view returns (uint128);\\n}\\n\",\"keccak256\":\"0xf6e5d2cd1139c4c276bdbc8e1d2b256e456c866a91f1b868da265c6d2685c3f7\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolOwnerActions.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Permissioned pool actions\\n/// @notice Contains pool methods that may only be called by the factory owner\\ninterface IUniswapV3PoolOwnerActions {\\n /// @notice Set the denominator of the protocol's % share of the fees\\n /// @param feeProtocol0 new protocol fee for token0 of the pool\\n /// @param feeProtocol1 new protocol fee for token1 of the pool\\n function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external;\\n\\n /// @notice Collect the protocol fee accrued to the pool\\n /// @param recipient The address to which collected protocol fees should be sent\\n /// @param amount0Requested The maximum amount of token0 to send, can be 0 to collect fees in only token1\\n /// @param amount1Requested The maximum amount of token1 to send, can be 0 to collect fees in only token0\\n /// @return amount0 The protocol fee collected in token0\\n /// @return amount1 The protocol fee collected in token1\\n function collectProtocol(\\n address recipient,\\n uint128 amount0Requested,\\n uint128 amount1Requested\\n ) external returns (uint128 amount0, uint128 amount1);\\n}\\n\",\"keccak256\":\"0x759b78a2918af9e99e246dc3af084f654e48ef32bb4e4cb8a966aa3dcaece235\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolState.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Pool state that can change\\n/// @notice These methods compose the pool's state, and can change with any frequency including multiple times\\n/// per transaction\\ninterface IUniswapV3PoolState {\\n /// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas\\n /// when accessed externally.\\n /// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value\\n /// tick The current tick of the pool, i.e. according to the last tick transition that was run.\\n /// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick\\n /// boundary.\\n /// observationIndex The index of the last oracle observation that was written,\\n /// observationCardinality The current maximum number of observations stored in the pool,\\n /// observationCardinalityNext The next maximum number of observations, to be updated when the observation.\\n /// feeProtocol The protocol fee for both tokens of the pool.\\n /// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0\\n /// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee.\\n /// unlocked Whether the pool is currently locked to reentrancy\\n function slot0()\\n external\\n view\\n returns (\\n uint160 sqrtPriceX96,\\n int24 tick,\\n uint16 observationIndex,\\n uint16 observationCardinality,\\n uint16 observationCardinalityNext,\\n uint8 feeProtocol,\\n bool unlocked\\n );\\n\\n /// @notice The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool\\n /// @dev This value can overflow the uint256\\n function feeGrowthGlobal0X128() external view returns (uint256);\\n\\n /// @notice The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool\\n /// @dev This value can overflow the uint256\\n function feeGrowthGlobal1X128() external view returns (uint256);\\n\\n /// @notice The amounts of token0 and token1 that are owed to the protocol\\n /// @dev Protocol fees will never exceed uint128 max in either token\\n function protocolFees() external view returns (uint128 token0, uint128 token1);\\n\\n /// @notice The currently in range liquidity available to the pool\\n /// @dev This value has no relationship to the total liquidity across all ticks\\n function liquidity() external view returns (uint128);\\n\\n /// @notice Look up information about a specific tick in the pool\\n /// @param tick The tick to look up\\n /// @return liquidityGross the total amount of position liquidity that uses the pool either as tick lower or\\n /// tick upper,\\n /// liquidityNet how much liquidity changes when the pool price crosses the tick,\\n /// feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0,\\n /// feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1,\\n /// tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick\\n /// secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick,\\n /// secondsOutside the seconds spent on the other side of the tick from the current tick,\\n /// initialized Set to true if the tick is initialized, i.e. liquidityGross is greater than 0, otherwise equal to false.\\n /// Outside values can only be used if the tick is initialized, i.e. if liquidityGross is greater than 0.\\n /// In addition, these values are only relative and must be used only in comparison to previous snapshots for\\n /// a specific position.\\n function ticks(int24 tick)\\n external\\n view\\n returns (\\n uint128 liquidityGross,\\n int128 liquidityNet,\\n uint256 feeGrowthOutside0X128,\\n uint256 feeGrowthOutside1X128,\\n int56 tickCumulativeOutside,\\n uint160 secondsPerLiquidityOutsideX128,\\n uint32 secondsOutside,\\n bool initialized\\n );\\n\\n /// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information\\n function tickBitmap(int16 wordPosition) external view returns (uint256);\\n\\n /// @notice Returns the information about a position by the position's key\\n /// @param key The position's key is a hash of a preimage composed by the owner, tickLower and tickUpper\\n /// @return _liquidity The amount of liquidity in the position,\\n /// Returns feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke,\\n /// Returns feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke,\\n /// Returns tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke,\\n /// Returns tokensOwed1 the computed amount of token1 owed to the position as of the last mint/burn/poke\\n function positions(bytes32 key)\\n external\\n view\\n returns (\\n uint128 _liquidity,\\n uint256 feeGrowthInside0LastX128,\\n uint256 feeGrowthInside1LastX128,\\n uint128 tokensOwed0,\\n uint128 tokensOwed1\\n );\\n\\n /// @notice Returns data about a specific observation index\\n /// @param index The element of the observations array to fetch\\n /// @dev You most likely want to use #observe() instead of this method to get an observation as of some amount of time\\n /// ago, rather than at a specific index in the array.\\n /// @return blockTimestamp The timestamp of the observation,\\n /// Returns tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp,\\n /// Returns secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp,\\n /// Returns initialized whether the observation has been initialized and the values are safe to use\\n function observations(uint256 index)\\n external\\n view\\n returns (\\n uint32 blockTimestamp,\\n int56 tickCumulative,\\n uint160 secondsPerLiquidityCumulativeX128,\\n bool initialized\\n );\\n}\\n\",\"keccak256\":\"0x852dc1f5df7dcf7f11e7bb3eed79f0cea72ad4b25f6a9d2c35aafb48925fd49f\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/libraries/TickMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Math library for computing sqrt prices from ticks and vice versa\\n/// @notice Computes sqrt price for ticks of size 1.0001, i.e. sqrt(1.0001^tick) as fixed point Q64.96 numbers. Supports\\n/// prices between 2**-128 and 2**128\\nlibrary TickMath {\\n /// @dev The minimum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**-128\\n int24 internal constant MIN_TICK = -887272;\\n /// @dev The maximum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**128\\n int24 internal constant MAX_TICK = -MIN_TICK;\\n\\n /// @dev The minimum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MIN_TICK)\\n uint160 internal constant MIN_SQRT_RATIO = 4295128739;\\n /// @dev The maximum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MAX_TICK)\\n uint160 internal constant MAX_SQRT_RATIO = 1461446703485210103287273052203988822378723970342;\\n\\n /// @notice Calculates sqrt(1.0001^tick) * 2^96\\n /// @dev Throws if |tick| > max tick\\n /// @param tick The input tick for the above formula\\n /// @return sqrtPriceX96 A Fixed point Q64.96 number representing the sqrt of the ratio of the two assets (token1/token0)\\n /// at the given tick\\n function getSqrtRatioAtTick(int24 tick) internal pure returns (uint160 sqrtPriceX96) {\\n uint256 absTick = tick < 0 ? uint256(-int256(tick)) : uint256(int256(tick));\\n require(absTick <= uint256(MAX_TICK), 'T');\\n\\n uint256 ratio = absTick & 0x1 != 0 ? 0xfffcb933bd6fad37aa2d162d1a594001 : 0x100000000000000000000000000000000;\\n if (absTick & 0x2 != 0) ratio = (ratio * 0xfff97272373d413259a46990580e213a) >> 128;\\n if (absTick & 0x4 != 0) ratio = (ratio * 0xfff2e50f5f656932ef12357cf3c7fdcc) >> 128;\\n if (absTick & 0x8 != 0) ratio = (ratio * 0xffe5caca7e10e4e61c3624eaa0941cd0) >> 128;\\n if (absTick & 0x10 != 0) ratio = (ratio * 0xffcb9843d60f6159c9db58835c926644) >> 128;\\n if (absTick & 0x20 != 0) ratio = (ratio * 0xff973b41fa98c081472e6896dfb254c0) >> 128;\\n if (absTick & 0x40 != 0) ratio = (ratio * 0xff2ea16466c96a3843ec78b326b52861) >> 128;\\n if (absTick & 0x80 != 0) ratio = (ratio * 0xfe5dee046a99a2a811c461f1969c3053) >> 128;\\n if (absTick & 0x100 != 0) ratio = (ratio * 0xfcbe86c7900a88aedcffc83b479aa3a4) >> 128;\\n if (absTick & 0x200 != 0) ratio = (ratio * 0xf987a7253ac413176f2b074cf7815e54) >> 128;\\n if (absTick & 0x400 != 0) ratio = (ratio * 0xf3392b0822b70005940c7a398e4b70f3) >> 128;\\n if (absTick & 0x800 != 0) ratio = (ratio * 0xe7159475a2c29b7443b29c7fa6e889d9) >> 128;\\n if (absTick & 0x1000 != 0) ratio = (ratio * 0xd097f3bdfd2022b8845ad8f792aa5825) >> 128;\\n if (absTick & 0x2000 != 0) ratio = (ratio * 0xa9f746462d870fdf8a65dc1f90e061e5) >> 128;\\n if (absTick & 0x4000 != 0) ratio = (ratio * 0x70d869a156d2a1b890bb3df62baf32f7) >> 128;\\n if (absTick & 0x8000 != 0) ratio = (ratio * 0x31be135f97d08fd981231505542fcfa6) >> 128;\\n if (absTick & 0x10000 != 0) ratio = (ratio * 0x9aa508b5b7a84e1c677de54f3e99bc9) >> 128;\\n if (absTick & 0x20000 != 0) ratio = (ratio * 0x5d6af8dedb81196699c329225ee604) >> 128;\\n if (absTick & 0x40000 != 0) ratio = (ratio * 0x2216e584f5fa1ea926041bedfe98) >> 128;\\n if (absTick & 0x80000 != 0) ratio = (ratio * 0x48a170391f7dc42444e8fa2) >> 128;\\n\\n if (tick > 0) ratio = type(uint256).max / ratio;\\n\\n // this divides by 1<<32 rounding up to go from a Q128.128 to a Q128.96.\\n // we then downcast because we know the result always fits within 160 bits due to our tick input constraint\\n // we round up in the division so getTickAtSqrtRatio of the output price is always consistent\\n sqrtPriceX96 = uint160((ratio >> 32) + (ratio % (1 << 32) == 0 ? 0 : 1));\\n }\\n\\n /// @notice Calculates the greatest tick value such that getRatioAtTick(tick) <= ratio\\n /// @dev Throws in case sqrtPriceX96 < MIN_SQRT_RATIO, as MIN_SQRT_RATIO is the lowest value getRatioAtTick may\\n /// ever return.\\n /// @param sqrtPriceX96 The sqrt ratio for which to compute the tick as a Q64.96\\n /// @return tick The greatest tick for which the ratio is less than or equal to the input ratio\\n function getTickAtSqrtRatio(uint160 sqrtPriceX96) internal pure returns (int24 tick) {\\n // second inequality must be < because the price can never reach the price at the max tick\\n require(sqrtPriceX96 >= MIN_SQRT_RATIO && sqrtPriceX96 < MAX_SQRT_RATIO, 'R');\\n uint256 ratio = uint256(sqrtPriceX96) << 32;\\n\\n uint256 r = ratio;\\n uint256 msb = 0;\\n\\n assembly {\\n let f := shl(7, gt(r, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF))\\n msb := or(msb, f)\\n r := shr(f, r)\\n }\\n assembly {\\n let f := shl(6, gt(r, 0xFFFFFFFFFFFFFFFF))\\n msb := or(msb, f)\\n r := shr(f, r)\\n }\\n assembly {\\n let f := shl(5, gt(r, 0xFFFFFFFF))\\n msb := or(msb, f)\\n r := shr(f, r)\\n }\\n assembly {\\n let f := shl(4, gt(r, 0xFFFF))\\n msb := or(msb, f)\\n r := shr(f, r)\\n }\\n assembly {\\n let f := shl(3, gt(r, 0xFF))\\n msb := or(msb, f)\\n r := shr(f, r)\\n }\\n assembly {\\n let f := shl(2, gt(r, 0xF))\\n msb := or(msb, f)\\n r := shr(f, r)\\n }\\n assembly {\\n let f := shl(1, gt(r, 0x3))\\n msb := or(msb, f)\\n r := shr(f, r)\\n }\\n assembly {\\n let f := gt(r, 0x1)\\n msb := or(msb, f)\\n }\\n\\n if (msb >= 128) r = ratio >> (msb - 127);\\n else r = ratio << (127 - msb);\\n\\n int256 log_2 = (int256(msb) - 128) << 64;\\n\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(63, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(62, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(61, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(60, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(59, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(58, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(57, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(56, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(55, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(54, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(53, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(52, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(51, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(50, f))\\n }\\n\\n int256 log_sqrt10001 = log_2 * 255738958999603826347141; // 128.128 number\\n\\n int24 tickLow = int24((log_sqrt10001 - 3402992956809132418596140100660247210) >> 128);\\n int24 tickHi = int24((log_sqrt10001 + 291339464771989622907027621153398088495) >> 128);\\n\\n tick = tickLow == tickHi ? tickLow : getSqrtRatioAtTick(tickHi) <= sqrtPriceX96 ? tickHi : tickLow;\\n }\\n}\\n\",\"keccak256\":\"0x1f864a2bf61ba05f3173eaf2e3f94c5e1da4bec0554757527b6d1ef1fe439e4e\",\"license\":\"GPL-2.0-or-later\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editGardenNFT(address _newGardenNFT) external;\\n\\n function editStrategyNFT(address _newStrategyNFT) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function editUniswapFactory(address _newUniswapFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\\n\\n function maxContributorsPerGarden() external view returns (uint256);\\n\\n function gardenCreationIsOpen() external view returns (bool);\\n\\n function openPublicGardenCreation() external;\\n\\n function setMaxContributorsPerGarden(uint256 _newMax) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function gardenNFT() external view returns (address);\\n\\n function strategyNFT() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\\n\\n function uniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0xdee5a27301c24f507d312f32249487fa9b0a756062a7e479405a1d1ee9ee7bb8\",\"license\":\"Apache License\"},\"contracts/interfaces/IOracleAdapter.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from (Set Protocol IOracleAdapter)\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IOracleAdapter\\n * @author Babylon Finance\\n *\\n * Interface for calling an oracle adapter.\\n */\\ninterface IOracleAdapter {\\n /**\\n * Function for retrieving a price that requires sourcing data from outside protocols to calculate.\\n *\\n * @param _assetOne First asset in pair\\n * @param _assetTwo Second asset in pair\\n * @return Boolean indicating if oracle exists\\n * @return Current price of asset represented in uint256\\n */\\n function getPrice(address _assetOne, address _assetTwo) external view returns (bool, uint256);\\n\\n function update(address _assetOne, address _assetTwo) external;\\n}\\n\",\"keccak256\":\"0xe77f738e9740ce5a33165dbe4027b455eea635812cdceec302863f34952ce388\",\"license\":\"Apache License\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"contracts/oracle_adapter/UniswapTWAPV3.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Modified from Uniswap TWAPs\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport '@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol';\\nimport '@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol';\\nimport '@uniswap/v3-core/contracts/libraries/TickMath.sol';\\n\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\n\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IOracleAdapter} from '../interfaces/IOracleAdapter.sol';\\n\\n/**\\n * @title UniswapTWAPV3\\n * @author Babylon Finance Protocol\\n *\\n * Uses uniswap V3 to get the price of a token pair\\n */\\ncontract UniswapTWAPV3 is Ownable, IOracleAdapter {\\n using PreciseUnitMath for int256;\\n using PreciseUnitMath for uint256;\\n using SafeMath for uint256;\\n\\n /* ============ State Variables ============ */\\n\\n // Instance of the Controller contract\\n IBabController public controller;\\n\\n // Name to identify this adapter\\n string public constant name = 'uniswapTwapV3';\\n\\n // Address of Uniswap factory\\n IUniswapV3Factory public immutable factory;\\n\\n address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\\n\\n // the desired seconds agos array passed to the observe method\\n uint32[] public secondsAgo = new uint32[](2);\\n uint32 public constant SECONDS_GRANULARITY = 30;\\n\\n uint24 private constant FEE_LOW = 500;\\n uint24 private constant FEE_MEDIUM = 3000;\\n uint24 private constant FEE_HIGH = 10000;\\n int24 private maxTwapDeviation = 100;\\n uint160 private maxLiquidityDeviationFactor = 50;\\n int24 private baseThreshold = 1000;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Set state variables\\n *\\n * @param _controller Instance of controller contract\\n * @param _factory Address of Uniswap factory\\n */\\n constructor(address _controller, address _factory) {\\n factory = IUniswapV3Factory(_factory);\\n controller = IBabController(_controller);\\n secondsAgo[0] = SECONDS_GRANULARITY;\\n secondsAgo[1] = 0;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the amount out corresponding to the amount in for a given token\\n * @param tokenIn Address of the first token\\n * @param tokenOut Address of the second token\\n * @return found Whether or not the price as found\\n * @return amountOut How many tokenOut are one tokenIn\\n */\\n function getPrice(address tokenIn, address tokenOut)\\n external\\n view\\n override\\n returns (bool found, uint256 amountOut)\\n {\\n uint160 sqrtPriceX96;\\n int24 tick;\\n bool found = false;\\n // We try the low pool first\\n IUniswapV3Pool pool = IUniswapV3Pool(factory.getPool(tokenIn, tokenOut, FEE_LOW));\\n if (address(pool) != address(0)) {\\n (sqrtPriceX96, tick, , , , , ) = pool.slot0();\\n found = _checkPrice(tick, pool);\\n }\\n if (!found) {\\n pool = IUniswapV3Pool(factory.getPool(tokenIn, tokenOut, FEE_MEDIUM));\\n if (address(pool) != address(0)) {\\n (sqrtPriceX96, tick, , , , , ) = pool.slot0();\\n found = _checkPrice(tick, pool);\\n }\\n }\\n if (!found) {\\n pool = IUniswapV3Pool(factory.getPool(tokenIn, tokenOut, FEE_HIGH));\\n if (address(pool) != address(0)) {\\n (sqrtPriceX96, tick, , , , , ) = pool.slot0();\\n found = _checkPrice(tick, pool);\\n }\\n }\\n // No valid price\\n if (!found) {\\n return (false, 0);\\n }\\n\\n uint256 price =\\n uint256(sqrtPriceX96).mul(uint256(sqrtPriceX96)).mul(10**ERC20(pool.token0()).decimals()) >> (96 * 2);\\n if (pool.token0() == tokenOut) {\\n return (true, uint256(1e18).preciseDiv(price));\\n } else {\\n return (true, price);\\n }\\n }\\n\\n function update(address tokenA, address tokenB) external override {}\\n\\n /* ============ Internal Functions ============ */\\n\\n /// @dev Revert if current price is too close to min or max ticks allowed\\n /// by Uniswap, or if it deviates too much from the TWAP. Should be called\\n /// whenever base and limit ranges are updated. In practice, prices should\\n /// only become this extreme if there's no liquidity in the Uniswap pool.\\n function _checkPrice(int24 mid, IUniswapV3Pool _pool) internal view returns (bool) {\\n int24 tickSpacing = _pool.tickSpacing();\\n // TODO: Add the other param from charm\\n if (mid < TickMath.MIN_TICK + baseThreshold + tickSpacing) {\\n // \\\"price too low\\\"\\n return false;\\n }\\n if (mid > TickMath.MAX_TICK - baseThreshold - tickSpacing) {\\n // \\\"price too high\\\"\\n return false;\\n }\\n\\n // Check TWAP deviation. This check prevents price manipulation before\\n // the rebalance and also avoids rebalancing when price has just spiked.\\n (int56 twap, ) = _getTwap(_pool);\\n int56 deviation = mid > twap ? mid - twap : twap - mid;\\n // Fail twap check\\n return deviation < maxTwapDeviation;\\n }\\n\\n // given the cumulative prices of the start and end of a period, and the length of the period, compute the average\\n // price in terms of how much amount out is received for the amount in\\n function _getTwap(IUniswapV3Pool _pool) private view returns (int56 amountOut, uint160 liquidity) {\\n (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s) =\\n _pool.observe(secondsAgo);\\n liquidity =\\n (secondsPerLiquidityCumulativeX128s[1] - secondsPerLiquidityCumulativeX128s[0]) /\\n SECONDS_GRANULARITY;\\n amountOut = (tickCumulatives[1] - tickCumulatives[0]) / SECONDS_GRANULARITY;\\n }\\n}\\n\",\"keccak256\":\"0xc5d4ae254b864cde76c7b7d2cc460dc6eb6935bcc6977a82e71586e2074c7ae1\",\"license\":\"Apache License\"}},\"version\":1}", + "bytecode": "0x600260a0818152610100604052908160200160208202803683375050815162000030926002925060200190620001b8565b5060038054606462ffffff19909116176301000000600160b81b03191663320000001762ffffff60b81b1916607d60bb1b1790553480156200007157600080fd5b506040516200129738038062001297833981810160405260408110156200009757600080fd5b5080516020909101516000620000ac620001b4565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350606081901b6001600160601b031916608052600180546001600160a01b0319166001600160a01b03841617905560028054601e91906000906200013557fe5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908363ffffffff160217905550600060026001815481106200017957fe5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908363ffffffff160217905550505062000285565b3390565b828054828255906000526020600020906007016008900481019282156200025c5791602002820160005b838211156200022857835183826101000a81548163ffffffff021916908363ffffffff1602179055509260200192600401602081600301049283019260010302620001e2565b80156200025a5782816101000a81549063ffffffff021916905560040160208160030104928301926001030262000228565b505b506200026a9291506200026e565b5090565b5b808211156200026a57600081556001016200026f565b60805160601c610fe5620002b2600039806103c45280610541528061067c528061097c5250610fe56000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c8063ad5c464811610081578063d9db84641161005b578063d9db846414610236578063f2fde38b1461023e578063f77c479114610264576100c9565b8063ad5c4648146101f8578063c45a015514610200578063c640752d14610208576100c9565b80638da5cb5b116100b25780638da5cb5b146101555780639eb2f94c14610179578063ac41865a146101af576100c9565b806306fdde03146100ce578063715018a61461014b575b600080fd5b6100d661026c565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101105781810151838201526020016100f8565b50505050905090810190601f16801561013d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101536102a5565b005b61015d610370565b604080516001600160a01b039092168252519081900360200190f35b6101966004803603602081101561018f57600080fd5b503561037f565b6040805163ffffffff9092168252519081900360200190f35b6101dd600480360360408110156101c557600080fd5b506001600160a01b03813581169160200135166103b9565b60408051921515835260208301919091528051918290030190f35b61015d610962565b61015d61097a565b6101536004803603604081101561021e57600080fd5b506001600160a01b038135811691602001351661099e565b6101966109a2565b6101536004803603602081101561025457600080fd5b50356001600160a01b03166109a7565b61015d610ac8565b6040518060400160405280600d81526020017f756e69737761705477617056330000000000000000000000000000000000000081525081565b6102ad610ad7565b6001600160a01b03166102be610370565b6001600160a01b031614610319576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000546001600160a01b031690565b6002818154811061038f57600080fd5b9060005260206000209060089182820401919006600402915054906101000a900463ffffffff1681565b6000806000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631698ee8289896101f46040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018262ffffff168152602001935050505060206040518083038186803b15801561044f57600080fd5b505afa158015610463573d6000803e3d6000fd5b505050506040513d602081101561047957600080fd5b505190506001600160a01b0381161561050a57806001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b1580156104c557600080fd5b505afa1580156104d9573d6000803e3d6000fd5b505050506040513d60e08110156104ef57600080fd5b50805160209091015190945092506105078382610adb565b91505b816106455760408051630b4c774160e11b81526001600160a01b038a811660048301528981166024830152610bb8604483015291517f000000000000000000000000000000000000000000000000000000000000000090921691631698ee8291606480820192602092909190829003018186803b15801561058a57600080fd5b505afa15801561059e573d6000803e3d6000fd5b505050506040513d60208110156105b457600080fd5b505190506001600160a01b0381161561064557806001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b15801561060057600080fd5b505afa158015610614573d6000803e3d6000fd5b505050506040513d60e081101561062a57600080fd5b50805160209091015190945092506106428382610adb565b91505b816107805760408051630b4c774160e11b81526001600160a01b038a811660048301528981166024830152612710604483015291517f000000000000000000000000000000000000000000000000000000000000000090921691631698ee8291606480820192602092909190829003018186803b1580156106c557600080fd5b505afa1580156106d9573d6000803e3d6000fd5b505050506040513d60208110156106ef57600080fd5b505190506001600160a01b0381161561078057806001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b15801561073b57600080fd5b505afa15801561074f573d6000803e3d6000fd5b505050506040513d60e081101561076557600080fd5b508051602090910151909450925061077d8382610adb565b91505b8161079557600080955095505050505061095b565b600060c06108a7836001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156107d557600080fd5b505afa1580156107e9573d6000803e3d6000fd5b505050506040513d60208110156107ff57600080fd5b5051604080517f313ce56700000000000000000000000000000000000000000000000000000000815290516001600160a01b039092169163313ce56791600480820192602092909190829003018186803b15801561085c57600080fd5b505afa158015610870573d6000803e3d6000fd5b505050506040513d602081101561088657600080fd5b505160ff16600a0a6108a16001600160a01b03891680610bec565b90610bec565b901c9050876001600160a01b0316826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156108ee57600080fd5b505afa158015610902573d6000803e3d6000fd5b505050506040513d602081101561091857600080fd5b50516001600160a01b0316141561094b57600161093d670de0b6b3a764000083610c4c565b96509650505050505061095b565b60019650945061095b9350505050565b9250929050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b7f000000000000000000000000000000000000000000000000000000000000000081565b5050565b601e81565b6109af610ad7565b6001600160a01b03166109c0610370565b6001600160a01b031614610a1b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610a605760405162461bcd60e51b8152600401808060200182810382526026815260200180610f696026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6001546001600160a01b031681565b3390565b600080826001600160a01b031663d0c93a7c6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b1757600080fd5b505afa158015610b2b573d6000803e3d6000fd5b505050506040513d6020811015610b4157600080fd5b5051600354909150600160b81b9004600290810b8201620d89e71901810b9085900b1215610b73576000915050610be6565b600354600160b81b9004600290810b620d89e803829003810b9085900b1315610ba0576000915050610be6565b6000610bab84610c6a565b50905060008160060b8660020b13610bc8578560020b8203610bcf565b818660020b035b600354600290810b900b60069190910b1293505050505b92915050565b600082610bfb57506000610be6565b82820282848281610c0857fe5b0414610c455760405162461bcd60e51b8152600401808060200182810382526021815260200180610f8f6021913960400191505060405180910390fd5b9392505050565b6000610c4582610c6485670de0b6b3a7640000610bec565b90610f01565b600080600080846001600160a01b031663883bdbfd60026040518263ffffffff1660e01b815260040180806020018281038252838181548152602001915080548015610d0157602002820191906000526020600020906000905b82829054906101000a900463ffffffff1663ffffffff1681526020019060040190602082600301049283019260010382029150808411610cc45790505b50509250505060006040518083038186803b158015610d1f57600080fd5b505afa158015610d33573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040908152811015610d5c57600080fd5b8101908080516040519392919084640100000000821115610d7c57600080fd5b908301906020820185811115610d9157600080fd5b8251866020820283011164010000000082111715610dae57600080fd5b82525081516020918201928201910280838360005b83811015610ddb578181015183820152602001610dc3565b5050505090500160405260200180516040519392919084640100000000821115610e0457600080fd5b908301906020820185811115610e1957600080fd5b8251866020820283011164010000000082111715610e3657600080fd5b82525081516020918201928201910280838360005b83811015610e63578181015183820152602001610e4b565b5050505090500160405250505091509150601e63ffffffff1681600081518110610e8957fe5b602002602001015182600181518110610e9e57fe5b6020026020010151036001600160a01b031681610eb757fe5b049250601e63ffffffff1682600081518110610ecf57fe5b602002602001015183600181518110610ee457fe5b60200260200101510360060b81610ef757fe5b0593505050915091565b6000808211610f57576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381610f6057fe5b04939250505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220f9c67ef33be9f60461e5a9e5af2f5982c1177cd2b69506b93294ec270ac488c264736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100c95760003560e01c8063ad5c464811610081578063d9db84641161005b578063d9db846414610236578063f2fde38b1461023e578063f77c479114610264576100c9565b8063ad5c4648146101f8578063c45a015514610200578063c640752d14610208576100c9565b80638da5cb5b116100b25780638da5cb5b146101555780639eb2f94c14610179578063ac41865a146101af576100c9565b806306fdde03146100ce578063715018a61461014b575b600080fd5b6100d661026c565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101105781810151838201526020016100f8565b50505050905090810190601f16801561013d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101536102a5565b005b61015d610370565b604080516001600160a01b039092168252519081900360200190f35b6101966004803603602081101561018f57600080fd5b503561037f565b6040805163ffffffff9092168252519081900360200190f35b6101dd600480360360408110156101c557600080fd5b506001600160a01b03813581169160200135166103b9565b60408051921515835260208301919091528051918290030190f35b61015d610962565b61015d61097a565b6101536004803603604081101561021e57600080fd5b506001600160a01b038135811691602001351661099e565b6101966109a2565b6101536004803603602081101561025457600080fd5b50356001600160a01b03166109a7565b61015d610ac8565b6040518060400160405280600d81526020017f756e69737761705477617056330000000000000000000000000000000000000081525081565b6102ad610ad7565b6001600160a01b03166102be610370565b6001600160a01b031614610319576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000546001600160a01b031690565b6002818154811061038f57600080fd5b9060005260206000209060089182820401919006600402915054906101000a900463ffffffff1681565b6000806000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631698ee8289896101f46040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018262ffffff168152602001935050505060206040518083038186803b15801561044f57600080fd5b505afa158015610463573d6000803e3d6000fd5b505050506040513d602081101561047957600080fd5b505190506001600160a01b0381161561050a57806001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b1580156104c557600080fd5b505afa1580156104d9573d6000803e3d6000fd5b505050506040513d60e08110156104ef57600080fd5b50805160209091015190945092506105078382610adb565b91505b816106455760408051630b4c774160e11b81526001600160a01b038a811660048301528981166024830152610bb8604483015291517f000000000000000000000000000000000000000000000000000000000000000090921691631698ee8291606480820192602092909190829003018186803b15801561058a57600080fd5b505afa15801561059e573d6000803e3d6000fd5b505050506040513d60208110156105b457600080fd5b505190506001600160a01b0381161561064557806001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b15801561060057600080fd5b505afa158015610614573d6000803e3d6000fd5b505050506040513d60e081101561062a57600080fd5b50805160209091015190945092506106428382610adb565b91505b816107805760408051630b4c774160e11b81526001600160a01b038a811660048301528981166024830152612710604483015291517f000000000000000000000000000000000000000000000000000000000000000090921691631698ee8291606480820192602092909190829003018186803b1580156106c557600080fd5b505afa1580156106d9573d6000803e3d6000fd5b505050506040513d60208110156106ef57600080fd5b505190506001600160a01b0381161561078057806001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b15801561073b57600080fd5b505afa15801561074f573d6000803e3d6000fd5b505050506040513d60e081101561076557600080fd5b508051602090910151909450925061077d8382610adb565b91505b8161079557600080955095505050505061095b565b600060c06108a7836001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156107d557600080fd5b505afa1580156107e9573d6000803e3d6000fd5b505050506040513d60208110156107ff57600080fd5b5051604080517f313ce56700000000000000000000000000000000000000000000000000000000815290516001600160a01b039092169163313ce56791600480820192602092909190829003018186803b15801561085c57600080fd5b505afa158015610870573d6000803e3d6000fd5b505050506040513d602081101561088657600080fd5b505160ff16600a0a6108a16001600160a01b03891680610bec565b90610bec565b901c9050876001600160a01b0316826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156108ee57600080fd5b505afa158015610902573d6000803e3d6000fd5b505050506040513d602081101561091857600080fd5b50516001600160a01b0316141561094b57600161093d670de0b6b3a764000083610c4c565b96509650505050505061095b565b60019650945061095b9350505050565b9250929050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b7f000000000000000000000000000000000000000000000000000000000000000081565b5050565b601e81565b6109af610ad7565b6001600160a01b03166109c0610370565b6001600160a01b031614610a1b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610a605760405162461bcd60e51b8152600401808060200182810382526026815260200180610f696026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6001546001600160a01b031681565b3390565b600080826001600160a01b031663d0c93a7c6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b1757600080fd5b505afa158015610b2b573d6000803e3d6000fd5b505050506040513d6020811015610b4157600080fd5b5051600354909150600160b81b9004600290810b8201620d89e71901810b9085900b1215610b73576000915050610be6565b600354600160b81b9004600290810b620d89e803829003810b9085900b1315610ba0576000915050610be6565b6000610bab84610c6a565b50905060008160060b8660020b13610bc8578560020b8203610bcf565b818660020b035b600354600290810b900b60069190910b1293505050505b92915050565b600082610bfb57506000610be6565b82820282848281610c0857fe5b0414610c455760405162461bcd60e51b8152600401808060200182810382526021815260200180610f8f6021913960400191505060405180910390fd5b9392505050565b6000610c4582610c6485670de0b6b3a7640000610bec565b90610f01565b600080600080846001600160a01b031663883bdbfd60026040518263ffffffff1660e01b815260040180806020018281038252838181548152602001915080548015610d0157602002820191906000526020600020906000905b82829054906101000a900463ffffffff1663ffffffff1681526020019060040190602082600301049283019260010382029150808411610cc45790505b50509250505060006040518083038186803b158015610d1f57600080fd5b505afa158015610d33573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040908152811015610d5c57600080fd5b8101908080516040519392919084640100000000821115610d7c57600080fd5b908301906020820185811115610d9157600080fd5b8251866020820283011164010000000082111715610dae57600080fd5b82525081516020918201928201910280838360005b83811015610ddb578181015183820152602001610dc3565b5050505090500160405260200180516040519392919084640100000000821115610e0457600080fd5b908301906020820185811115610e1957600080fd5b8251866020820283011164010000000082111715610e3657600080fd5b82525081516020918201928201910280838360005b83811015610e63578181015183820152602001610e4b565b5050505090500160405250505091509150601e63ffffffff1681600081518110610e8957fe5b602002602001015182600181518110610e9e57fe5b6020026020010151036001600160a01b031681610eb757fe5b049250601e63ffffffff1682600081518110610ecf57fe5b602002602001015183600181518110610ee457fe5b60200260200101510360060b81610ef757fe5b0593505050915091565b6000808211610f57576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381610f6057fe5b04939250505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220f9c67ef33be9f60461e5a9e5af2f5982c1177cd2b69506b93294ec270ac488c264736f6c63430007060033", + "devdoc": { + "author": "Babylon Finance Protocol Uses uniswap V3 to get the price of a token pair", + "kind": "dev", + "methods": { + "constructor": { + "params": { + "_controller": "Instance of controller contract", + "_factory": "Address of Uniswap factory" + } + }, + "getPrice(address,address)": { + "params": { + "tokenIn": "Address of the first token", + "tokenOut": "Address of the second token" + }, + "returns": { + "amountOut": " How many tokenOut are one tokenIn", + "found": " Whether or not the price as found" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "title": "UniswapTWAPV3", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "constructor": { + "notice": "Set state variables" + }, + "getPrice(address,address)": { + "notice": "Returns the amount out corresponding to the amount in for a given token" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1456, + "contract": "contracts/oracle_adapter/UniswapTWAPV3.sol:UniswapTWAPV3", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 28349, + "contract": "contracts/oracle_adapter/UniswapTWAPV3.sol:UniswapTWAPV3", + "label": "controller", + "offset": 0, + "slot": "1", + "type": "t_contract(IBabController)22767" + }, + { + "astId": 28365, + "contract": "contracts/oracle_adapter/UniswapTWAPV3.sol:UniswapTWAPV3", + "label": "secondsAgo", + "offset": 0, + "slot": "2", + "type": "t_array(t_uint32)dyn_storage" + }, + { + "astId": 28380, + "contract": "contracts/oracle_adapter/UniswapTWAPV3.sol:UniswapTWAPV3", + "label": "maxTwapDeviation", + "offset": 0, + "slot": "3", + "type": "t_int24" + }, + { + "astId": 28383, + "contract": "contracts/oracle_adapter/UniswapTWAPV3.sol:UniswapTWAPV3", + "label": "maxLiquidityDeviationFactor", + "offset": 3, + "slot": "3", + "type": "t_uint160" + }, + { + "astId": 28386, + "contract": "contracts/oracle_adapter/UniswapTWAPV3.sol:UniswapTWAPV3", + "label": "baseThreshold", + "offset": 23, + "slot": "3", + "type": "t_int24" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint32)dyn_storage": { + "base": "t_uint32", + "encoding": "dynamic_array", + "label": "uint32[]", + "numberOfBytes": "32" + }, + "t_contract(IBabController)22767": { + "encoding": "inplace", + "label": "contract IBabController", + "numberOfBytes": "20" + }, + "t_int24": { + "encoding": "inplace", + "label": "int24", + "numberOfBytes": "3" + }, + "t_uint160": { + "encoding": "inplace", + "label": "uint160", + "numberOfBytes": "20" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + } + } + } +} \ No newline at end of file diff --git a/deployments/artifacts/mainnet/YearnVaultIntegration.json b/deployments/artifacts/mainnet/YearnVaultIntegration.json index 7f7165a7f..5d467c11e 100644 --- a/deployments/artifacts/mainnet/YearnVaultIntegration.json +++ b/deployments/artifacts/mainnet/YearnVaultIntegration.json @@ -1,5 +1,5 @@ { - "address": "0x215e785cEF1F6024762cf16E895ede5bB3E1908A", + "address": "0x2AE45257e4B352bA31BAc7115A228bf7DD94C9a5", "abi": [ { "inputs": [ @@ -322,31 +322,31 @@ "type": "function" } ], - "transactionHash": "0xb0333877857bfec47ff1e48dff008d56d28be8c5de563e31e926413a3bb6a241", + "transactionHash": "0xd3b9aafad84a6569fcc935094a26282c4d0278c6dff82198839a6c94c4ec8be7", "receipt": { "to": null, "from": "0x040cC3AF8455F3c34D1df1D2a305e047a062BeBf", - "contractAddress": "0x215e785cEF1F6024762cf16E895ede5bB3E1908A", - "transactionIndex": 200, - "gasUsed": "1415152", + "contractAddress": "0x2AE45257e4B352bA31BAc7115A228bf7DD94C9a5", + "transactionIndex": 96, + "gasUsed": "1415164", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x95c38f607386b7c7c14f952fc9e7c3e4b03f8091889a27f65ee920da021010f2", - "transactionHash": "0xb0333877857bfec47ff1e48dff008d56d28be8c5de563e31e926413a3bb6a241", + "blockHash": "0x965b0160d179dfb49e585167f1ce1ba2d8f221503de5e6804a31cb31f2509e28", + "transactionHash": "0xd3b9aafad84a6569fcc935094a26282c4d0278c6dff82198839a6c94c4ec8be7", "logs": [], - "blockNumber": 12361000, - "cumulativeGasUsed": "13852653", + "blockNumber": 12451299, + "cumulativeGasUsed": "7419012", "status": 1, "byzantium": true }, "args": [ - "0xffe7c30daDb1B132b86aB7bbede496615d54c8Ac", + "0xD4a5b5fcB561dAF3aDF86F8477555B92FBa43b5F", "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", "0x3eE41C098f9666ed2eA246f4D2558010e59d63A0" ], - "solcInputHash": "a02a2075cf667a20c416d2d0a5e8f337", - "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_weth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_yearnRegistryAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"garden\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"investment\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"investmentTokensOut\",\"type\":\"uint256\"}],\"name\":\"InvestmentEntered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"garden\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"investment\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"investmentTokensOut\",\"type\":\"uint256\"}],\"name\":\"InvestmentExited\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_investmentAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_investmentTokensOut\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_tokenIn\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxAmountIn\",\"type\":\"uint256\"}],\"name\":\"enterInvestment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_investmentAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_investmentTokenIn\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_tokenOut\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minAmountOut\",\"type\":\"uint256\"}],\"name\":\"exitInvestment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_investmentAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_ethAmount\",\"type\":\"uint256\"}],\"name\":\"getExpectedShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_investmentAddress\",\"type\":\"address\"}],\"name\":\"getInvestmentAsset\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_investmentAddress\",\"type\":\"address\"}],\"name\":\"getPricePerShare\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"initializedByGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_investmentAddress\",\"type\":\"address\"}],\"name\":\"isInvestment\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"yearnv2Registry\",\"outputs\":[{\"internalType\":\"contract YRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Protocol Yearn v2 Vault Integration\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of the controller\",\"_weth\":\"Address of the WETH ERC20\",\"_yearnRegistryAddress\":\"Address of Balancer core factory address\"}},\"enterInvestment(address,address,uint256,address,uint256)\":{\"params\":{\"_investmentAddress\":\"Address of the investment token to join\",\"_investmentTokensOut\":\"Min amount of investment tokens to receive\",\"_maxAmountIn\":\"Max amount of the token to deposit\",\"_strategy\":\"Address of the strategy\",\"_tokenIn\":\"Token aaddress to deposit\"}},\"exitInvestment(address,address,uint256,address,uint256)\":{\"params\":{\"_investmentAddress\":\"Address of the investment token to join\",\"_investmentTokenIn\":\"Quantity of investment tokens to return\",\"_minAmountOut\":\"Min token quantities to receive from the investment\",\"_strategy\":\"Address of the strategy\",\"_tokenOut\":\"Token address to withdraw\"}},\"getExpectedShares(address,uint256)\":{\"params\":{\"_ethAmount\":\"Amount of eth to invest\",\"_investmentAddress\":\"Investment address to check\"},\"returns\":{\"_0\":\"uint256 Amount of investment shares to receive\"}},\"getInvestmentAsset(address)\":{\"returns\":{\"_0\":\"address Returns the asset that this investment needs\"}},\"getPricePerShare(address)\":{\"params\":{\"_investmentAddress\":\"Investment address to check\"},\"returns\":{\"_0\":\"uint256 Returns the price in ETH of an investment share\"}},\"isInvestment(address)\":{\"params\":{\"_investmentAddress\":\"Investment address to check\"},\"returns\":{\"_0\":\"bool True if the address is a investment\"}}},\"title\":\"YearnIntegration\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates the integration\"},\"enterInvestment(address,address,uint256,address,uint256)\":{\"notice\":\"Deposits tokens into an investment\"},\"exitInvestment(address,address,uint256,address,uint256)\":{\"notice\":\"Exits an outside passive investment\"},\"getExpectedShares(address,uint256)\":{\"notice\":\"Gets the amount of shares expected to get after depositing _ethAmount\"},\"getInvestmentAsset(address)\":{\"notice\":\"Gets the asset needed to enter the investment\"},\"getName()\":{\"notice\":\"Returns the name of the integration\"},\"getPricePerShare(address)\":{\"notice\":\"Gets how much eth one unit of the investment is worth\"},\"isInvestment(address)\":{\"notice\":\"Checks whether an investment address is valid\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/integrations/passive/YearnVaultIntegration.sol\":\"YearnVaultIntegration\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\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 /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\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, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x7b2b8baa20fd60ab4a328c8e34c64a353651b80ba4b5b157cbb61813f6f85d55\",\"license\":\"MIT\"},\"contracts/integrations/BaseIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IIntegration} from '../interfaces/IIntegration.sol';\\nimport {IWETH} from '../interfaces/external/weth/IWETH.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\n\\n/**\\n * @title BaseIntegration\\n * @author Babylon Finance\\n *\\n * Abstract class that houses common Integration-related state and functions.\\n */\\nabstract contract BaseIntegration {\\n using SafeCast for int256;\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlySystemContract() {\\n require(IBabController(controller).isSystemContract(msg.sender), 'Only system can call this');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the controller\\n address public controller;\\n // Wrapped ETH address\\n address public immutable weth;\\n // Name of the integration\\n string public name;\\n mapping(address => bool) public initializedByGarden;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) {\\n require(_controller != address(0), 'Controller must be defined');\\n name = _name;\\n controller = _controller;\\n weth = _weth;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the name of the integration\\n */\\n function getName() external view returns (string memory) {\\n return name;\\n }\\n}\\n\",\"keccak256\":\"0xf15da8b024a5a4f205b363420cb5851fd1c4225970999aed5f00d829bbd4f638\",\"license\":\"Apache License\"},\"contracts/integrations/passive/PassiveIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\n\\nimport {IPassiveIntegration} from '../../interfaces/IPassiveIntegration.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\nimport {BaseIntegration} from '../BaseIntegration.sol';\\n\\n/**\\n * @title PassiveIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Base class for integration with passive investments like Yearn, Indexed\\n */\\nabstract contract PassiveIntegration is BaseIntegration, ReentrancyGuard, IPassiveIntegration {\\n using SafeMath for uint256;\\n using SafeCast for uint256;\\n\\n /* ============ Struct ============ */\\n\\n struct InvestmentInfo {\\n IStrategy strategy; // Strategy address\\n IGarden garden; // Garden address\\n address investment; // Investment address\\n uint256 totalSupply; // Total Supply of the investment\\n uint256 investmentTokensInTransaction; // Investment tokens affected by this transaction\\n uint256 investmentTokensInGarden; // Investment tokens garden balance\\n uint256 limitDepositTokenQuantity; // Limit deposit/withdrawal token amount\\n }\\n\\n /* ============ Events ============ */\\n\\n event InvestmentEntered(\\n address indexed garden,\\n address indexed strategy,\\n address indexed investment,\\n address tokenIn,\\n uint256 investmentTokensOut\\n );\\n\\n event InvestmentExited(\\n address indexed garden,\\n address indexed strategy,\\n address indexed investment,\\n uint256 investmentTokensOut\\n );\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) BaseIntegration(_name, _weth, _controller) {}\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Deposits tokens into an investment\\n *\\n * @param _strategy Address of the strategy\\n * @param _investmentAddress Address of the investment token to join\\n * @param _investmentTokensOut Min amount of investment tokens to receive\\n * @param _tokenIn Token aaddress to deposit\\n * @param _maxAmountIn Max amount of the token to deposit\\n */\\n function enterInvestment(\\n address _strategy,\\n address _investmentAddress,\\n uint256 _investmentTokensOut,\\n address _tokenIn,\\n uint256 _maxAmountIn\\n ) external override nonReentrant onlySystemContract {\\n InvestmentInfo memory investmentInfo =\\n _createInvestmentInfo(_strategy, _investmentAddress, _investmentTokensOut, _tokenIn, _maxAmountIn);\\n _validatePreJoinInvestmentData(investmentInfo);\\n // Approve spending of the token\\n investmentInfo.strategy.invokeApprove(_getSpender(_investmentAddress), _tokenIn, _maxAmountIn);\\n (address targetInvestment, uint256 callValue, bytes memory methodData) =\\n _getEnterInvestmentCalldata(_strategy, _investmentAddress, _investmentTokensOut, _tokenIn, _maxAmountIn);\\n investmentInfo.strategy.invokeFromIntegration(targetInvestment, callValue, methodData);\\n _validatePostEnterInvestmentData(investmentInfo);\\n\\n emit InvestmentEntered(\\n address(investmentInfo.garden),\\n address(investmentInfo.strategy),\\n _investmentAddress,\\n _tokenIn,\\n _investmentTokensOut\\n );\\n }\\n\\n /**\\n * Exits an outside passive investment\\n *\\n * @param _strategy Address of the strategy\\n * @param _investmentAddress Address of the investment token to join\\n * @param _investmentTokenIn Quantity of investment tokens to return\\n * @param _tokenOut Token address to withdraw\\n * @param _minAmountOut Min token quantities to receive from the investment\\n */\\n function exitInvestment(\\n address _strategy,\\n address _investmentAddress,\\n uint256 _investmentTokenIn,\\n address _tokenOut,\\n uint256 _minAmountOut\\n ) external override nonReentrant onlySystemContract {\\n InvestmentInfo memory investmentInfo =\\n _createInvestmentInfo(_strategy, _investmentAddress, _investmentTokenIn, _tokenOut, _minAmountOut);\\n _validatePreExitInvestmentData(investmentInfo);\\n // Approve spending of the investment token\\n investmentInfo.strategy.invokeApprove(_getSpender(_investmentAddress), _investmentAddress, _investmentTokenIn);\\n\\n (address targetInvestment, uint256 callValue, bytes memory methodData) =\\n _getExitInvestmentCalldata(_strategy, _investmentAddress, _investmentTokenIn, _tokenOut, _minAmountOut);\\n investmentInfo.strategy.invokeFromIntegration(targetInvestment, callValue, methodData);\\n _validatePostExitInvestmentData(investmentInfo);\\n\\n emit InvestmentExited(\\n address(investmentInfo.garden),\\n address(investmentInfo.strategy),\\n investmentInfo.investment,\\n _investmentTokenIn\\n );\\n }\\n\\n /**\\n * Checks whether an investment address is valid\\n *\\n * @param _investmentAddress Investment address to check\\n * @return bool True if the address is a investment\\n */\\n function isInvestment(address _investmentAddress) external view override returns (bool) {\\n return _isInvestment(_investmentAddress);\\n }\\n\\n /**\\n * Gets the amount of shares expected to get after depositing _ethAmount\\n *\\n * @param _investmentAddress Investment address to check\\n * @param _ethAmount Amount of eth to invest\\n * @return uint256 Amount of investment shares to receive\\n */\\n function getExpectedShares(address _investmentAddress, uint256 _ethAmount)\\n external\\n view\\n override\\n returns (uint256)\\n {\\n return _getExpectedShares(_investmentAddress, _ethAmount);\\n }\\n\\n /**\\n * Gets how much eth one unit of the investment is worth\\n *\\n * @param _investmentAddress Investment address to check\\n * @return uint256 Returns the price in ETH of an investment share\\n */\\n function getPricePerShare(address _investmentAddress) external view override returns (uint256) {\\n return _getPricePerShare(_investmentAddress);\\n }\\n\\n /**\\n * Gets the asset needed to enter the investment\\n *\\n * @return address Returns the asset that this investment needs\\n */\\n function getInvestmentAsset(address _investmentAddress) external view override returns (address) {\\n return _getInvestmentAsset(_investmentAddress);\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Create and return InvestmentInfo struct\\n *\\n * @param _strategy Address of the strategy\\n * @param _investment Address of the investment\\n * @param _investmentTokensInTransaction Number of investment tokens involved\\n * hparam _tokenIn Addresseses of the deposit token\\n * @param _limitDepositToken Limit quantity of the deposit/withdrawal token\\n *\\n * return InvestmentInfo Struct containing data for the investment\\n */\\n function _createInvestmentInfo(\\n address _strategy,\\n address _investment,\\n uint256 _investmentTokensInTransaction,\\n address, /*_tokenIn*/\\n uint256 _limitDepositToken\\n ) internal view returns (InvestmentInfo memory) {\\n InvestmentInfo memory investmentInfo;\\n investmentInfo.strategy = IStrategy(_strategy);\\n investmentInfo.garden = IGarden(investmentInfo.strategy.garden());\\n investmentInfo.investment = _investment;\\n investmentInfo.totalSupply = IERC20(_investment).totalSupply();\\n investmentInfo.investmentTokensInGarden = IERC20(_investment).balanceOf(_strategy);\\n investmentInfo.investmentTokensInTransaction = _investmentTokensInTransaction;\\n investmentInfo.limitDepositTokenQuantity = _limitDepositToken;\\n\\n return investmentInfo;\\n }\\n\\n /**\\n * Validate pre investment join data. Check investment is valid, token quantity is valid.\\n *\\n * @param _investmentInfo Struct containing investment information used in internal functions\\n */\\n function _validatePreJoinInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\\n require(_isInvestment(_investmentInfo.investment), 'The investment address is not valid');\\n require(\\n _investmentInfo.investmentTokensInTransaction > 0,\\n 'Min investment tokens to receive must be greater than 0'\\n );\\n }\\n\\n /**\\n * Validate pre investment data. Check investment is valid, token quantity is valid.\\n *\\n * @param _investmentInfo Struct containing investment information used in internal functions\\n */\\n function _validatePreExitInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\\n require(_isInvestment(_investmentInfo.investment), 'The investment address is not valid');\\n require(\\n _investmentInfo.investmentTokensInTransaction > 0,\\n 'Investment tokens to exchange must be greater than 0'\\n );\\n require(\\n _investmentInfo.investmentTokensInGarden >= _investmentInfo.investmentTokensInTransaction,\\n 'The garden does not have enough investment tokens'\\n );\\n }\\n\\n /**\\n * Validate post enter investment data. Check investment is valid, token quantity is valid.\\n *\\n * @param _investmentInfo Struct containing investment information used in internal functions\\n */\\n function _validatePostEnterInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\\n require(\\n (IERC20(_investmentInfo.investment).balanceOf(address(_investmentInfo.strategy)) >\\n _investmentInfo.investmentTokensInGarden),\\n 'The garden did not receive the investment tokens'\\n );\\n }\\n\\n /**\\n * Validate post exit investment data. Check investment is valid, token quantity is valid.\\n *\\n * @param _investmentInfo Struct containing investment information used in internal functions\\n */\\n function _validatePostExitInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\\n require(\\n IERC20(_investmentInfo.investment).balanceOf(address(_investmentInfo.strategy)) ==\\n _investmentInfo.investmentTokensInGarden - _investmentInfo.investmentTokensInTransaction,\\n 'The garden did not return the investment tokens'\\n );\\n }\\n\\n /**\\n * Return join investment calldata which is already generated from the investment API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _investmentAddress Address of the investment\\n * hparam _investmentTokensOut Amount of investment tokens to send\\n * hparam _tokenIn Addresses of tokens to send to the investment\\n * hparam _maxAmountIn Amounts of tokens to send to the investment\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getEnterInvestmentCalldata(\\n address, /* _strategy */\\n address, /* _investmentAddress */\\n uint256, /* _investmentTokensOut */\\n address, /* _tokenIn */\\n uint256 /* _maxAmountIn */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n /**\\n * Return exit investment calldata which is already generated from the investment API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _investmentAddress Address of the investment\\n * hparam _investmentTokensIn Amount of investment tokens to receive\\n * hparam _tokenOut Addresses of token to receive\\n * hparam _minAmountOut Amount of investment tokens to receive\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getExitInvestmentCalldata(\\n address, /*_strategy */\\n address, /*_investmentAddress */\\n uint256, /*_investmentTokensIn */\\n address, /*_tokenOut */\\n uint256 /* _minAmountOut */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n function _isInvestment(\\n address //_investmentAddress\\n ) internal view virtual returns (bool);\\n\\n function _getExpectedShares(\\n address, //_investmentAddress\\n uint256 // _ethAmount\\n ) internal view virtual returns (uint256);\\n\\n function _getPricePerShare(\\n address //_investmentAddress\\n ) internal view virtual returns (uint256);\\n\\n function _getInvestmentAsset(\\n address //_investmentAddress\\n ) internal view virtual returns (address);\\n\\n function _getSpender(\\n address //_investmentAddress\\n ) internal view virtual returns (address);\\n}\\n\",\"keccak256\":\"0x994bf2a119542647397cc5e0e8848d8fd6a7cd52a3ad42fcdac46c69e5aa0f95\",\"license\":\"Apache License\"},\"contracts/integrations/passive/YearnVaultIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport 'hardhat/console.sol';\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\\nimport {PassiveIntegration} from './PassiveIntegration.sol';\\nimport {YRegistry} from '../../interfaces/external/yearn/YRegistry.sol';\\nimport {IVault} from '../../interfaces/external/yearn/IVault.sol';\\n\\n/**\\n * @title YearnIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Yearn v2 Vault Integration\\n */\\ncontract YearnVaultIntegration is PassiveIntegration {\\n using SafeMath for uint256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ State Variables ============ */\\n\\n // Address of Kyber Network Proxy\\n YRegistry public yearnv2Registry;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _controller Address of the controller\\n * @param _weth Address of the WETH ERC20\\n * @param _yearnRegistryAddress Address of Balancer core factory address\\n */\\n constructor(\\n address _controller,\\n address _weth,\\n address _yearnRegistryAddress\\n ) PassiveIntegration('yearnvaults', _weth, _controller) {\\n yearnv2Registry = YRegistry(_yearnRegistryAddress);\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n function _isInvestment(address _investmentAddress) internal view override returns (bool) {\\n (address _controller, , , , ) = yearnv2Registry.getVaultInfo(_investmentAddress);\\n return _controller != address(0);\\n }\\n\\n function _getSpender(address _investmentAddress) internal pure override returns (address) {\\n return _investmentAddress;\\n }\\n\\n function _getExpectedShares(address _investmentAddress, uint256 _ethAmount)\\n internal\\n view\\n override\\n returns (uint256)\\n {\\n return _ethAmount.preciseDiv(IVault(_investmentAddress).getPricePerFullShare());\\n }\\n\\n function _getPricePerShare(address _investmentAddress) internal view override returns (uint256) {\\n return IVault(_investmentAddress).getPricePerFullShare();\\n }\\n\\n function _getInvestmentAsset(address _investmentAddress) internal view override returns (address) {\\n return IVault(_investmentAddress).token();\\n }\\n\\n /**\\n * Return join investment calldata which is already generated from the investment API\\n *\\n * hparam _strategy Address of the strategy\\n * @param _investmentAddress Address of the vault\\n * hparam _investmentTokensOut Amount of investment tokens to send\\n * hparam _tokenIn Addresses of tokens to send to the investment\\n * @param _maxAmountIn Amounts of tokens to send to the investment\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getEnterInvestmentCalldata(\\n address, /* _strategy */\\n address _investmentAddress,\\n uint256, /* _investmentTokensOut */\\n address, /* _tokenIn */\\n uint256 _maxAmountIn\\n )\\n internal\\n pure\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n // Encode method data for Garden to invoke\\n bytes memory methodData = abi.encodeWithSignature('deposit(uint256)', _maxAmountIn);\\n\\n return (_investmentAddress, 0, methodData);\\n }\\n\\n /**\\n * Return exit investment calldata which is already generated from the investment API\\n *\\n * hparam _strategy Address of the strategy\\n * @param _investmentAddress Address of the investment\\n * @param _investmentTokensIn Amount of investment tokens to receive\\n * hparam _tokenOut Addresses of tokens to receive\\n * hparam _minAmountOut Amounts of investment tokens to receive\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getExitInvestmentCalldata(\\n address, /* _strategy */\\n address _investmentAddress,\\n uint256 _investmentTokensIn,\\n address, /* _tokenOut */\\n uint256 /* _minAmountOut */\\n )\\n internal\\n pure\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n // Encode method data for Garden to invoke\\n bytes memory methodData = abi.encodeWithSignature('withdraw(uint256)', _investmentTokensIn);\\n\\n return (_investmentAddress, 0, methodData);\\n }\\n}\\n\",\"keccak256\":\"0x117d2b75918006d8076bbb2b82aa3324d3e8041277fbeb92e62c8427fa2b264d\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityMinimum(uint256 _minRiskyPairLiquidityEth) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minRiskyPairLiquidityEth() external view returns (uint256);\\n\\n function getUniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0x57cf4ece98219f805a416e8c24728d30d9b37c4126d66785d2617b97e35ffae6\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function nftAddress() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategy(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function reenableEthForStrategies() external;\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x5e460136e0b45024ea1c1f32cde607f3ce75dd5b14cee34007d6bbd08beabc82\",\"license\":\"Apache License\"},\"contracts/interfaces/IIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIntegration\\n * @author Babylon Finance\\n *\\n * Interface for protocol integrations\\n */\\ninterface IIntegration {\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xee03c9274ddf3257e3bfd2bb229fea3412c9105f178e64174f59efeafd53182c\",\"license\":\"Apache License\"},\"contracts/interfaces/IPassiveIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPassiveIntegration\\n * @author Babylon Finance\\n *\\n * Interface for passive investments protocol integrations\\n */\\ninterface IPassiveIntegration {\\n function enterInvestment(\\n address _strategy,\\n address _investmentAddress,\\n uint256 _investmentTokensOut,\\n address _tokenIn,\\n uint256 _maxAmountIn\\n ) external;\\n\\n function exitInvestment(\\n address _strategy,\\n address _investmentAddress,\\n uint256 _investmentTokenIn,\\n address _tokenOut,\\n uint256 _minAmountOut\\n ) external;\\n\\n function isInvestment(address _investmentAddress) external view returns (bool);\\n\\n function getExpectedShares(address _investmentAddress, uint256 _ethAmount) external view returns (uint256);\\n\\n function getPricePerShare(address _investmentAddress) external view returns (uint256);\\n\\n function getInvestmentAsset(address _investmentAddress) external view returns (address);\\n}\\n\",\"keccak256\":\"0xfd83ed02b6f3b4e2c7cbd460165f943f313082c93d76d2c4b4ff67859805559d\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital,\\n address _strategyNft\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function strategyNft() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x4396906e436eb68c96715e0a53ae1656ac5d7934ebdaeb58ec3c33953465bc39\",\"license\":\"Apache License\"},\"contracts/interfaces/external/weth/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\ninterface IWETH is IERC20 {\\n function deposit() external payable;\\n\\n function withdraw(uint256 wad) external;\\n}\\n\",\"keccak256\":\"0xacc7980a650b7a753ee51f1bbc0ae4f641e84261bcc02cfdaf87ee8136483684\",\"license\":\"MIT\"},\"contracts/interfaces/external/yearn/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\ninterface IVault {\\n function token() external view returns (address);\\n\\n function underlying() external view returns (address);\\n\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n function controller() external view returns (address);\\n\\n function governance() external view returns (address);\\n\\n function getPricePerFullShare() external view returns (uint256);\\n\\n function deposit(uint256) external;\\n\\n function depositAll() external;\\n\\n function withdraw(uint256) external;\\n\\n function withdrawAll() external;\\n\\n function balanceOf(address) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf45ea1154dc78598515a0436c17da2f8a22b41ac4db015e717f34126597377d3\",\"license\":\"MIT\"},\"contracts/interfaces/external/yearn/YRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\ninterface YRegistry {\\n function getName() external pure returns (string memory);\\n\\n function getVault(uint256 index) external view returns (address vault);\\n\\n function getVaultsLength() external view returns (uint256);\\n\\n function getVaults() external view returns (address[] memory);\\n\\n function getVaultInfo(address _vault)\\n external\\n view\\n returns (\\n address controller,\\n address token,\\n address strategy,\\n bool isWrapped,\\n bool isDelegated\\n );\\n\\n function getVaultsInfo()\\n external\\n view\\n returns (\\n address[] memory vaultsAddresses,\\n address[] memory controllerArray,\\n address[] memory tokenArray,\\n address[] memory strategyArray,\\n bool[] memory isWrappedArray,\\n bool[] memory isDelegatedArray\\n );\\n}\\n\",\"keccak256\":\"0x920529659f314ef51477454c9f93dca420baa44b9f73a66ddb14baa4392aa185\",\"license\":\"MIT\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"},\"hardhat/console.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >= 0.4.22 <0.9.0;\\n\\nlibrary console {\\n\\taddress constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);\\n\\n\\tfunction _sendLogPayload(bytes memory payload) private view {\\n\\t\\tuint256 payloadLength = payload.length;\\n\\t\\taddress consoleAddress = CONSOLE_ADDRESS;\\n\\t\\tassembly {\\n\\t\\t\\tlet payloadStart := add(payload, 32)\\n\\t\\t\\tlet r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)\\n\\t\\t}\\n\\t}\\n\\n\\tfunction log() internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log()\\\"));\\n\\t}\\n\\n\\tfunction logInt(int p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(int)\\\", p0));\\n\\t}\\n\\n\\tfunction logUint(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction logString(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction logBool(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction logAddress(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes(bytes memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes1(bytes1 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes1)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes2(bytes2 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes2)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes3(bytes3 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes3)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes4(bytes4 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes4)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes5(bytes5 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes5)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes6(bytes6 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes6)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes7(bytes7 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes7)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes8(bytes8 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes8)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes9(bytes9 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes9)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes10(bytes10 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes10)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes11(bytes11 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes11)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes12(bytes12 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes12)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes13(bytes13 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes13)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes14(bytes14 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes14)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes15(bytes15 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes15)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes16(bytes16 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes16)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes17(bytes17 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes17)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes18(bytes18 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes18)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes19(bytes19 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes19)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes20(bytes20 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes20)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes21(bytes21 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes21)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes22(bytes22 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes22)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes23(bytes23 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes23)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes24(bytes24 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes24)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes25(bytes25 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes25)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes26(bytes26 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes26)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes27(bytes27 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes27)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes28(bytes28 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes28)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes29(bytes29 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes29)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes30(bytes30 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes30)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes31(bytes31 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes31)\\\", p0));\\n\\t}\\n\\n\\tfunction logBytes32(bytes32 p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bytes32)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint)\\\", p0));\\n\\t}\\n\\n\\tfunction log(string memory p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string)\\\", p0));\\n\\t}\\n\\n\\tfunction log(bool p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool)\\\", p0));\\n\\t}\\n\\n\\tfunction log(address p0) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address)\\\", p0));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(address p0, address p1) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address)\\\", p0, p1));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address)\\\", p0, p1, p2));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(uint p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(uint,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(string memory p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(string,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(bool p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(bool,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, uint p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,uint,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, string memory p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,string,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, bool p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,bool,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, uint p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,uint,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, string memory p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,string,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, bool p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,bool,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, uint p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,uint)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, string memory p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,string)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, bool p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,bool)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n\\tfunction log(address p0, address p1, address p2, address p3) internal view {\\n\\t\\t_sendLogPayload(abi.encodeWithSignature(\\\"log(address,address,address,address)\\\", p0, p1, p2, p3));\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523480156200001157600080fd5b50604051620018ec380380620018ec833981810160405260608110156200003757600080fd5b5080516020808301516040938401518451808601909552600b85526a796561726e7661756c747360a81b92850192909252919282848282826001600160a01b038116620000cb576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c6572206d75737420626520646566696e6564000000000000604482015290519081900360640190fd5b8251620000e090600190602086019062000135565b50600080546001600160a01b03199081166001600160a01b039384161790915560609290921b6001600160601b03191660805260016003556004805490921696169590951790945550620001e1945050505050565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826200016d5760008555620001b8565b82601f106200018857805160ff1916838001178555620001b8565b82800160010185558215620001b8579182015b82811115620001b85782518255916020019190600101906200019b565b50620001c6929150620001ca565b5090565b5b80821115620001c65760008155600101620001cb565b60805160601c6116ed620001ff6000398061042a52506116ed6000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c80639e12fef211610081578063ec422afd1161005b578063ec422afd146102b2578063f337f630146102d8578063f77c4791146102fe576100d4565b80639e12fef21461024a578063b10198fb14610284578063c9a15584146102aa576100d4565b80634deef649116100b25780634deef64914610182578063871be911146101c0578063976a99be14610206576100d4565b806306fdde03146100d957806317d7de7c146101565780633fc8cef31461015e575b600080fd5b6100e1610306565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561011b578181015183820152602001610103565b50505050905090810190601f1680156101485780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100e1610393565b610166610428565b604080516001600160a01b039092168252519081900360200190f35b6101ae6004803603604081101561019857600080fd5b506001600160a01b03813516906020013561044c565b60408051918252519081900360200190f35b610204600480360360a08110156101d657600080fd5b506001600160a01b038135811691602081013582169160408201359160608101359091169060800135610461565b005b610204600480360360a081101561021c57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135909116906080013561086e565b6102706004803603602081101561026057600080fd5b50356001600160a01b0316610c88565b604080519115158252519081900360200190f35b6102706004803603602081101561029a57600080fd5b50356001600160a01b0316610c93565b610166610ca8565b6101ae600480360360208110156102c857600080fd5b50356001600160a01b0316610cb7565b610166600480360360208110156102ee57600080fd5b50356001600160a01b0316610cc2565b610166610ccd565b60018054604080516020600284861615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561038b5780601f106103605761010080835404028352916020019161038b565b820191906000526020600020905b81548152906001019060200180831161036e57829003601f168201915b505050505081565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526060939092909183018282801561041e5780601f106103f35761010080835404028352916020019161041e565b820191906000526020600020905b81548152906001019060200180831161040157829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006104588383610cdc565b90505b92915050565b600260035414156104b9576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b15801561050957600080fd5b505afa15801561051d573d6000803e3d6000fd5b505050506040513d602081101561053357600080fd5b5051610586576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b60006105958686868686610d4d565b90506105a081610f27565b80516001600160a01b03166397ccdc606105b987610ffc565b87876040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561061157600080fd5b505af1158015610625573d6000803e3d6000fd5b50505050600080600061063b8989898989610fff565b92509250925083600001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156106b85781810151838201526020016106a0565b50505050905090810190601f1680156106e55780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561070657600080fd5b505af115801561071a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561074357600080fd5b810190808051604051939291908464010000000082111561076357600080fd5b90830190602082018581111561077857600080fd5b825164010000000081118282018810171561079257600080fd5b82525081516020918201929091019080838360005b838110156107bf5781810151838201526020016107a7565b50505050905090810190601f1680156107ec5780820380516001836020036101000a031916815260200191505b50604052505050506107fd8461106d565b83604001516001600160a01b031684600001516001600160a01b031685602001516001600160a01b03167f99d773709d80de3e15433c22c381fd8e3b82a68b56322240ff4a304956ef0e528a6040518082815260200191505060405180910390a45050600160035550505050505050565b600260035414156108c6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b15801561091657600080fd5b505afa15801561092a573d6000803e3d6000fd5b505050506040513d602081101561094057600080fd5b5051610993576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b60006109a28686868686610d4d565b90506109ad81611135565b80516001600160a01b03166397ccdc606109c687610ffc565b85856040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015610a1e57600080fd5b505af1158015610a32573d6000803e3d6000fd5b505050506000806000610a4889898989896111c0565b92509250925083600001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610ac5578181015183820152602001610aad565b50505050905090810190601f168015610af25780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610b1357600080fd5b505af1158015610b27573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610b5057600080fd5b8101908080516040519392919084640100000000821115610b7057600080fd5b908301906020820185811115610b8557600080fd5b8251640100000000811182820188101715610b9f57600080fd5b82525081516020918201929091019080838360005b83811015610bcc578181015183820152602001610bb4565b50505050905090810190601f168015610bf95780820380516001836020036101000a031916815260200191505b5060405250505050610c0a8461122f565b876001600160a01b031684600001516001600160a01b031685602001516001600160a01b03167fdc0718d28ea0f80518c2c454af93bc46bf51dd4a1b25a048ca4ca75a7ac359c4898b60405180836001600160a01b031681526020018281526020019250505060405180910390a45050600160035550505050505050565b600061045b826112f1565b60026020526000908152604090205460ff1681565b6004546001600160a01b031681565b600061045b8261139a565b600061045b82611407565b6000546001600160a01b031681565b6000610458836001600160a01b03166377c7b8fc6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1a57600080fd5b505afa158015610d2e573d6000803e3d6000fd5b505050506040513d6020811015610d4457600080fd5b50518390611442565b610d55611520565b610d5d611520565b6001600160a01b038716808252604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b891600480820192602092909190829003018186803b158015610db957600080fd5b505afa158015610dcd573d6000803e3d6000fd5b505050506040513d6020811015610de357600080fd5b50516001600160a01b03908116602083810191909152908716604080840182905280517f18160ddd000000000000000000000000000000000000000000000000000000008152905191926318160ddd92600480840193829003018186803b158015610e4d57600080fd5b505afa158015610e61573d6000803e3d6000fd5b505050506040513d6020811015610e7757600080fd5b50516060820152604080517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0389811660048301529151918816916370a0823191602480820192602092909190829003018186803b158015610ee157600080fd5b505afa158015610ef5573d6000803e3d6000fd5b505050506040513d6020811015610f0b57600080fd5b505160a082015260808101949094525060c08301525092915050565b610f3481604001516112f1565b610f6f5760405162461bcd60e51b81526004018080602001828103825260238152602001806116956023913960400191505060405180910390fd5b6000816080015111610fb25760405162461bcd60e51b81526004018080602001828103825260348152602001806116616034913960400191505060405180910390fd5b80608001518160a001511015610ff95760405162461bcd60e51b81526004018080602001828103825260318152602001806115796031913960400191505060405180910390fd5b50565b90565b5050604080516024808201939093528151808203909301835260440190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f2e1a7d4d00000000000000000000000000000000000000000000000000000000179052909260009250565b80608001518160a001510381604001516001600160a01b03166370a0823183600001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156110cd57600080fd5b505afa1580156110e1573d6000803e3d6000fd5b505050506040513d60208110156110f757600080fd5b505114610ff95760405162461bcd60e51b815260040180806020018281038252602f8152602001806115da602f913960400191505060405180910390fd5b61114281604001516112f1565b61117d5760405162461bcd60e51b81526004018080602001828103825260238152602001806116956023913960400191505060405180910390fd5b6000816080015111610ff95760405162461bcd60e51b81526004018080602001828103825260378152602001806116096037913960400191505060405180910390fd5b604080516024808201939093528151808203909301835260440190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb6b55f2500000000000000000000000000000000000000000000000000000000179052929460009450915050565b8060a0015181604001516001600160a01b03166370a0823183600001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561128957600080fd5b505afa15801561129d573d6000803e3d6000fd5b505050506040513d60208110156112b357600080fd5b505111610ff95760405162461bcd60e51b81526004018080602001828103825260308152602001806115aa6030913960400191505060405180910390fd5b60048054604080517f90229af70000000000000000000000000000000000000000000000000000000081526001600160a01b03858116948201949094529051600093849316916390229af79160248083019260a0929190829003018186803b15801561135c57600080fd5b505afa158015611370573d6000803e3d6000fd5b505050506040513d60a081101561138657600080fd5b50516001600160a01b031615159392505050565b6000816001600160a01b03166377c7b8fc6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113d557600080fd5b505afa1580156113e9573d6000803e3d6000fd5b505050506040513d60208110156113ff57600080fd5b505192915050565b6000816001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113d557600080fd5b60006104588261145a85670de0b6b3a7640000611460565b906114b9565b60008261146f5750600061045b565b8282028284828161147c57fe5b04146104585760405162461bcd60e51b81526004018080602001828103825260218152602001806116406021913960400191505060405180910390fd5b600080821161150f576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161151857fe5b049392505050565b6040518060e0016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160008152509056fe5468652067617264656e20646f6573206e6f74206861766520656e6f75676820696e766573746d656e7420746f6b656e735468652067617264656e20646964206e6f7420726563656976652074686520696e766573746d656e7420746f6b656e735468652067617264656e20646964206e6f742072657475726e2074686520696e766573746d656e7420746f6b656e734d696e20696e766573746d656e7420746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77496e766573746d656e7420746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520696e766573746d656e742061646472657373206973206e6f742076616c6964a264697066735822122080db6b8566e707f761ec105278406f6acce94503913afccbf9aebbf129a100ba64736f6c63430007060033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100d45760003560e01c80639e12fef211610081578063ec422afd1161005b578063ec422afd146102b2578063f337f630146102d8578063f77c4791146102fe576100d4565b80639e12fef21461024a578063b10198fb14610284578063c9a15584146102aa576100d4565b80634deef649116100b25780634deef64914610182578063871be911146101c0578063976a99be14610206576100d4565b806306fdde03146100d957806317d7de7c146101565780633fc8cef31461015e575b600080fd5b6100e1610306565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561011b578181015183820152602001610103565b50505050905090810190601f1680156101485780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100e1610393565b610166610428565b604080516001600160a01b039092168252519081900360200190f35b6101ae6004803603604081101561019857600080fd5b506001600160a01b03813516906020013561044c565b60408051918252519081900360200190f35b610204600480360360a08110156101d657600080fd5b506001600160a01b038135811691602081013582169160408201359160608101359091169060800135610461565b005b610204600480360360a081101561021c57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135909116906080013561086e565b6102706004803603602081101561026057600080fd5b50356001600160a01b0316610c88565b604080519115158252519081900360200190f35b6102706004803603602081101561029a57600080fd5b50356001600160a01b0316610c93565b610166610ca8565b6101ae600480360360208110156102c857600080fd5b50356001600160a01b0316610cb7565b610166600480360360208110156102ee57600080fd5b50356001600160a01b0316610cc2565b610166610ccd565b60018054604080516020600284861615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561038b5780601f106103605761010080835404028352916020019161038b565b820191906000526020600020905b81548152906001019060200180831161036e57829003601f168201915b505050505081565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526060939092909183018282801561041e5780601f106103f35761010080835404028352916020019161041e565b820191906000526020600020905b81548152906001019060200180831161040157829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006104588383610cdc565b90505b92915050565b600260035414156104b9576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b15801561050957600080fd5b505afa15801561051d573d6000803e3d6000fd5b505050506040513d602081101561053357600080fd5b5051610586576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b60006105958686868686610d4d565b90506105a081610f27565b80516001600160a01b03166397ccdc606105b987610ffc565b87876040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561061157600080fd5b505af1158015610625573d6000803e3d6000fd5b50505050600080600061063b8989898989610fff565b92509250925083600001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156106b85781810151838201526020016106a0565b50505050905090810190601f1680156106e55780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561070657600080fd5b505af115801561071a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561074357600080fd5b810190808051604051939291908464010000000082111561076357600080fd5b90830190602082018581111561077857600080fd5b825164010000000081118282018810171561079257600080fd5b82525081516020918201929091019080838360005b838110156107bf5781810151838201526020016107a7565b50505050905090810190601f1680156107ec5780820380516001836020036101000a031916815260200191505b50604052505050506107fd8461106d565b83604001516001600160a01b031684600001516001600160a01b031685602001516001600160a01b03167f99d773709d80de3e15433c22c381fd8e3b82a68b56322240ff4a304956ef0e528a6040518082815260200191505060405180910390a45050600160035550505050505050565b600260035414156108c6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b15801561091657600080fd5b505afa15801561092a573d6000803e3d6000fd5b505050506040513d602081101561094057600080fd5b5051610993576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b60006109a28686868686610d4d565b90506109ad81611135565b80516001600160a01b03166397ccdc606109c687610ffc565b85856040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015610a1e57600080fd5b505af1158015610a32573d6000803e3d6000fd5b505050506000806000610a4889898989896111c0565b92509250925083600001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610ac5578181015183820152602001610aad565b50505050905090810190601f168015610af25780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610b1357600080fd5b505af1158015610b27573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610b5057600080fd5b8101908080516040519392919084640100000000821115610b7057600080fd5b908301906020820185811115610b8557600080fd5b8251640100000000811182820188101715610b9f57600080fd5b82525081516020918201929091019080838360005b83811015610bcc578181015183820152602001610bb4565b50505050905090810190601f168015610bf95780820380516001836020036101000a031916815260200191505b5060405250505050610c0a8461122f565b876001600160a01b031684600001516001600160a01b031685602001516001600160a01b03167fdc0718d28ea0f80518c2c454af93bc46bf51dd4a1b25a048ca4ca75a7ac359c4898b60405180836001600160a01b031681526020018281526020019250505060405180910390a45050600160035550505050505050565b600061045b826112f1565b60026020526000908152604090205460ff1681565b6004546001600160a01b031681565b600061045b8261139a565b600061045b82611407565b6000546001600160a01b031681565b6000610458836001600160a01b03166377c7b8fc6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1a57600080fd5b505afa158015610d2e573d6000803e3d6000fd5b505050506040513d6020811015610d4457600080fd5b50518390611442565b610d55611520565b610d5d611520565b6001600160a01b038716808252604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b891600480820192602092909190829003018186803b158015610db957600080fd5b505afa158015610dcd573d6000803e3d6000fd5b505050506040513d6020811015610de357600080fd5b50516001600160a01b03908116602083810191909152908716604080840182905280517f18160ddd000000000000000000000000000000000000000000000000000000008152905191926318160ddd92600480840193829003018186803b158015610e4d57600080fd5b505afa158015610e61573d6000803e3d6000fd5b505050506040513d6020811015610e7757600080fd5b50516060820152604080517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0389811660048301529151918816916370a0823191602480820192602092909190829003018186803b158015610ee157600080fd5b505afa158015610ef5573d6000803e3d6000fd5b505050506040513d6020811015610f0b57600080fd5b505160a082015260808101949094525060c08301525092915050565b610f3481604001516112f1565b610f6f5760405162461bcd60e51b81526004018080602001828103825260238152602001806116956023913960400191505060405180910390fd5b6000816080015111610fb25760405162461bcd60e51b81526004018080602001828103825260348152602001806116616034913960400191505060405180910390fd5b80608001518160a001511015610ff95760405162461bcd60e51b81526004018080602001828103825260318152602001806115796031913960400191505060405180910390fd5b50565b90565b5050604080516024808201939093528151808203909301835260440190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f2e1a7d4d00000000000000000000000000000000000000000000000000000000179052909260009250565b80608001518160a001510381604001516001600160a01b03166370a0823183600001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156110cd57600080fd5b505afa1580156110e1573d6000803e3d6000fd5b505050506040513d60208110156110f757600080fd5b505114610ff95760405162461bcd60e51b815260040180806020018281038252602f8152602001806115da602f913960400191505060405180910390fd5b61114281604001516112f1565b61117d5760405162461bcd60e51b81526004018080602001828103825260238152602001806116956023913960400191505060405180910390fd5b6000816080015111610ff95760405162461bcd60e51b81526004018080602001828103825260378152602001806116096037913960400191505060405180910390fd5b604080516024808201939093528151808203909301835260440190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb6b55f2500000000000000000000000000000000000000000000000000000000179052929460009450915050565b8060a0015181604001516001600160a01b03166370a0823183600001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561128957600080fd5b505afa15801561129d573d6000803e3d6000fd5b505050506040513d60208110156112b357600080fd5b505111610ff95760405162461bcd60e51b81526004018080602001828103825260308152602001806115aa6030913960400191505060405180910390fd5b60048054604080517f90229af70000000000000000000000000000000000000000000000000000000081526001600160a01b03858116948201949094529051600093849316916390229af79160248083019260a0929190829003018186803b15801561135c57600080fd5b505afa158015611370573d6000803e3d6000fd5b505050506040513d60a081101561138657600080fd5b50516001600160a01b031615159392505050565b6000816001600160a01b03166377c7b8fc6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113d557600080fd5b505afa1580156113e9573d6000803e3d6000fd5b505050506040513d60208110156113ff57600080fd5b505192915050565b6000816001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113d557600080fd5b60006104588261145a85670de0b6b3a7640000611460565b906114b9565b60008261146f5750600061045b565b8282028284828161147c57fe5b04146104585760405162461bcd60e51b81526004018080602001828103825260218152602001806116406021913960400191505060405180910390fd5b600080821161150f576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161151857fe5b049392505050565b6040518060e0016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160008152509056fe5468652067617264656e20646f6573206e6f74206861766520656e6f75676820696e766573746d656e7420746f6b656e735468652067617264656e20646964206e6f7420726563656976652074686520696e766573746d656e7420746f6b656e735468652067617264656e20646964206e6f742072657475726e2074686520696e766573746d656e7420746f6b656e734d696e20696e766573746d656e7420746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77496e766573746d656e7420746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520696e766573746d656e742061646472657373206973206e6f742076616c6964a264697066735822122080db6b8566e707f761ec105278406f6acce94503913afccbf9aebbf129a100ba64736f6c63430007060033", + "solcInputHash": "bd873b418320faeabd457a4fe7c7c19d", + "metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_controller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_weth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_yearnRegistryAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"garden\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"investment\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"investmentTokensOut\",\"type\":\"uint256\"}],\"name\":\"InvestmentEntered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"garden\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"strategy\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"investment\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"investmentTokensOut\",\"type\":\"uint256\"}],\"name\":\"InvestmentExited\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"controller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_investmentAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_investmentTokensOut\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_tokenIn\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxAmountIn\",\"type\":\"uint256\"}],\"name\":\"enterInvestment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_investmentAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_investmentTokenIn\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_tokenOut\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minAmountOut\",\"type\":\"uint256\"}],\"name\":\"exitInvestment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_investmentAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_ethAmount\",\"type\":\"uint256\"}],\"name\":\"getExpectedShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_investmentAddress\",\"type\":\"address\"}],\"name\":\"getInvestmentAsset\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_investmentAddress\",\"type\":\"address\"}],\"name\":\"getPricePerShare\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"initializedByGarden\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_investmentAddress\",\"type\":\"address\"}],\"name\":\"isInvestment\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"yearnv2Registry\",\"outputs\":[{\"internalType\":\"contract YRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Babylon Finance Protocol Yearn v2 Vault Integration\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_controller\":\"Address of the controller\",\"_weth\":\"Address of the WETH ERC20\",\"_yearnRegistryAddress\":\"Address of Balancer core factory address\"}},\"enterInvestment(address,address,uint256,address,uint256)\":{\"params\":{\"_investmentAddress\":\"Address of the investment token to join\",\"_investmentTokensOut\":\"Min amount of investment tokens to receive\",\"_maxAmountIn\":\"Max amount of the token to deposit\",\"_strategy\":\"Address of the strategy\",\"_tokenIn\":\"Token aaddress to deposit\"}},\"exitInvestment(address,address,uint256,address,uint256)\":{\"params\":{\"_investmentAddress\":\"Address of the investment token to join\",\"_investmentTokenIn\":\"Quantity of investment tokens to return\",\"_minAmountOut\":\"Min token quantities to receive from the investment\",\"_strategy\":\"Address of the strategy\",\"_tokenOut\":\"Token address to withdraw\"}},\"getExpectedShares(address,uint256)\":{\"params\":{\"_ethAmount\":\"Amount of eth to invest\",\"_investmentAddress\":\"Investment address to check\"},\"returns\":{\"_0\":\"uint256 Amount of investment shares to receive\"}},\"getInvestmentAsset(address)\":{\"returns\":{\"_0\":\"address Returns the asset that this investment needs\"}},\"getPricePerShare(address)\":{\"params\":{\"_investmentAddress\":\"Investment address to check\"},\"returns\":{\"_0\":\"uint256 Returns the price in ETH of an investment share\"}},\"isInvestment(address)\":{\"params\":{\"_investmentAddress\":\"Investment address to check\"},\"returns\":{\"_0\":\"bool True if the address is a investment\"}}},\"title\":\"YearnIntegration\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Creates the integration\"},\"enterInvestment(address,address,uint256,address,uint256)\":{\"notice\":\"Deposits tokens into an investment\"},\"exitInvestment(address,address,uint256,address,uint256)\":{\"notice\":\"Exits an outside passive investment\"},\"getExpectedShares(address,uint256)\":{\"notice\":\"Gets the amount of shares expected to get after depositing _ethAmount\"},\"getInvestmentAsset(address)\":{\"notice\":\"Gets the asset needed to enter the investment\"},\"getName()\":{\"notice\":\"Returns the name of the integration\"},\"getPricePerShare(address)\":{\"notice\":\"Gets how much eth one unit of the investment is worth\"},\"isInvestment(address)\":{\"notice\":\"Checks whether an investment address is valid\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/integrations/passive/YearnVaultIntegration.sol\":\"YearnVaultIntegration\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n\\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, \\\"SafeMath: addition overflow\\\");\\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 require(b <= a, \\\"SafeMath: subtraction overflow\\\");\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) return 0;\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: division by zero\\\");\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b > 0, \\\"SafeMath: modulo by zero\\\");\\n return a % b;\\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryDiv}.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52\",\"license\":\"MIT\"},\"@openzeppelin/contracts/math/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/**\\n * @title SignedSafeMath\\n * @dev Signed math operations with safety checks that revert on error.\\n */\\nlibrary SignedSafeMath {\\n int256 constant private _INT256_MIN = -2**255;\\n\\n /**\\n * @dev Returns the multiplication of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(int256 a, int256 b) internal pure returns (int256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n require(!(a == -1 && b == _INT256_MIN), \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n int256 c = a * b;\\n require(c / a == b, \\\"SignedSafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two signed integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, \\\"SignedSafeMath: division by zero\\\");\\n require(!(b == -1 && a == _INT256_MIN), \\\"SignedSafeMath: division overflow\\\");\\n\\n int256 c = a / b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot 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), \\\"SignedSafeMath: subtraction overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the addition of two signed integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot 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), \\\"SignedSafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n}\\n\",\"keccak256\":\"0xd17ac7e1d8f83d20d80e652adfed83da122f3a3c7b69fefa2985d85aebf0a3e9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"../../math/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 Context, 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_) public {\\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 virtual 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 virtual 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 virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\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(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount 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), \\\"ERC20: mint to the 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), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\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(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the 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 virtual {\\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(address from, address to, uint256 amount) internal virtual { }\\n}\\n\",\"keccak256\":\"0xca0c2396dbeb3503b51abf4248ebf77a1461edad513c01529df51850a012bee3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with GSN meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address payable) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes memory) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\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 () internal {\\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 // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\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\":\"0x8bbbc2f5c10065ee272592ae0a7a6ceb23de2fbd81564ee0bb015ecf404d5f61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.6.0 <0.8.0;\\n\\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 /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\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, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x7b2b8baa20fd60ab4a328c8e34c64a353651b80ba4b5b157cbb61813f6f85d55\",\"license\":\"MIT\"},\"contracts/integrations/BaseIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {IBabController} from '../interfaces/IBabController.sol';\\nimport {IIntegration} from '../interfaces/IIntegration.sol';\\nimport {IStrategy} from '../interfaces/IStrategy.sol';\\nimport {IGarden} from '../interfaces/IGarden.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\\n\\n/**\\n * @title BaseIntegration\\n * @author Babylon Finance\\n *\\n * Abstract class that houses common Integration-related state and functions.\\n */\\nabstract contract BaseIntegration {\\n using SafeCast for int256;\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ Modifiers ============ */\\n\\n modifier onlySystemContract() {\\n require(IBabController(controller).isSystemContract(msg.sender), 'Only system can call this');\\n _;\\n }\\n\\n /* ============ State Variables ============ */\\n\\n // Address of the controller\\n address public controller;\\n // Wrapped ETH address\\n address public immutable weth;\\n // Name of the integration\\n string public name;\\n mapping(address => bool) public initializedByGarden;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) {\\n require(_controller != address(0), 'Controller must be defined');\\n name = _name;\\n controller = _controller;\\n weth = _weth;\\n }\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Returns the name of the integration\\n */\\n function getName() external view returns (string memory) {\\n return name;\\n }\\n}\\n\",\"keccak256\":\"0x2834e38218ae7abce3038140002a433c22ea9303d65b2d929cd88f6d5f712812\",\"license\":\"Apache License\"},\"contracts/integrations/passive/PassiveIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\\n\\nimport {IPassiveIntegration} from '../../interfaces/IPassiveIntegration.sol';\\nimport {IGarden} from '../../interfaces/IGarden.sol';\\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\\nimport {IBabController} from '../../interfaces/IBabController.sol';\\nimport {BaseIntegration} from '../BaseIntegration.sol';\\n\\n/**\\n * @title PassiveIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Base class for integration with passive investments like Yearn, Indexed\\n */\\nabstract contract PassiveIntegration is BaseIntegration, ReentrancyGuard, IPassiveIntegration {\\n using SafeMath for uint256;\\n using SafeCast for uint256;\\n\\n /* ============ Struct ============ */\\n\\n struct InvestmentInfo {\\n IStrategy strategy; // Strategy address\\n IGarden garden; // Garden address\\n address investment; // Investment address\\n uint256 totalSupply; // Total Supply of the investment\\n uint256 investmentTokensInTransaction; // Investment tokens affected by this transaction\\n uint256 investmentTokensInGarden; // Investment tokens garden balance\\n uint256 limitDepositTokenQuantity; // Limit deposit/withdrawal token amount\\n }\\n\\n /* ============ Events ============ */\\n\\n event InvestmentEntered(\\n address indexed garden,\\n address indexed strategy,\\n address indexed investment,\\n address tokenIn,\\n uint256 investmentTokensOut\\n );\\n\\n event InvestmentExited(\\n address indexed garden,\\n address indexed strategy,\\n address indexed investment,\\n uint256 investmentTokensOut\\n );\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _name Name of the integration\\n * @param _weth Address of the WETH ERC20\\n * @param _controller Address of the controller\\n */\\n constructor(\\n string memory _name,\\n address _weth,\\n address _controller\\n ) BaseIntegration(_name, _weth, _controller) {}\\n\\n /* ============ External Functions ============ */\\n\\n /**\\n * Deposits tokens into an investment\\n *\\n * @param _strategy Address of the strategy\\n * @param _investmentAddress Address of the investment token to join\\n * @param _investmentTokensOut Min amount of investment tokens to receive\\n * @param _tokenIn Token aaddress to deposit\\n * @param _maxAmountIn Max amount of the token to deposit\\n */\\n function enterInvestment(\\n address _strategy,\\n address _investmentAddress,\\n uint256 _investmentTokensOut,\\n address _tokenIn,\\n uint256 _maxAmountIn\\n ) external override nonReentrant onlySystemContract {\\n InvestmentInfo memory investmentInfo =\\n _createInvestmentInfo(_strategy, _investmentAddress, _investmentTokensOut, _tokenIn, _maxAmountIn);\\n _validatePreJoinInvestmentData(investmentInfo);\\n // Approve spending of the token\\n investmentInfo.strategy.invokeApprove(_getSpender(_investmentAddress), _tokenIn, _maxAmountIn);\\n (address targetInvestment, uint256 callValue, bytes memory methodData) =\\n _getEnterInvestmentCalldata(_strategy, _investmentAddress, _investmentTokensOut, _tokenIn, _maxAmountIn);\\n investmentInfo.strategy.invokeFromIntegration(targetInvestment, callValue, methodData);\\n _validatePostEnterInvestmentData(investmentInfo);\\n\\n emit InvestmentEntered(\\n address(investmentInfo.garden),\\n address(investmentInfo.strategy),\\n _investmentAddress,\\n _tokenIn,\\n _investmentTokensOut\\n );\\n }\\n\\n /**\\n * Exits an outside passive investment\\n *\\n * @param _strategy Address of the strategy\\n * @param _investmentAddress Address of the investment token to join\\n * @param _investmentTokenIn Quantity of investment tokens to return\\n * @param _tokenOut Token address to withdraw\\n * @param _minAmountOut Min token quantities to receive from the investment\\n */\\n function exitInvestment(\\n address _strategy,\\n address _investmentAddress,\\n uint256 _investmentTokenIn,\\n address _tokenOut,\\n uint256 _minAmountOut\\n ) external override nonReentrant onlySystemContract {\\n InvestmentInfo memory investmentInfo =\\n _createInvestmentInfo(_strategy, _investmentAddress, _investmentTokenIn, _tokenOut, _minAmountOut);\\n _validatePreExitInvestmentData(investmentInfo);\\n // Approve spending of the investment token\\n investmentInfo.strategy.invokeApprove(_getSpender(_investmentAddress), _investmentAddress, _investmentTokenIn);\\n\\n (address targetInvestment, uint256 callValue, bytes memory methodData) =\\n _getExitInvestmentCalldata(_strategy, _investmentAddress, _investmentTokenIn, _tokenOut, _minAmountOut);\\n investmentInfo.strategy.invokeFromIntegration(targetInvestment, callValue, methodData);\\n _validatePostExitInvestmentData(investmentInfo);\\n\\n emit InvestmentExited(\\n address(investmentInfo.garden),\\n address(investmentInfo.strategy),\\n investmentInfo.investment,\\n _investmentTokenIn\\n );\\n }\\n\\n /**\\n * Checks whether an investment address is valid\\n *\\n * @param _investmentAddress Investment address to check\\n * @return bool True if the address is a investment\\n */\\n function isInvestment(address _investmentAddress) external view override returns (bool) {\\n return _isInvestment(_investmentAddress);\\n }\\n\\n /**\\n * Gets the amount of shares expected to get after depositing _ethAmount\\n *\\n * @param _investmentAddress Investment address to check\\n * @param _ethAmount Amount of eth to invest\\n * @return uint256 Amount of investment shares to receive\\n */\\n function getExpectedShares(address _investmentAddress, uint256 _ethAmount)\\n external\\n view\\n override\\n returns (uint256)\\n {\\n return _getExpectedShares(_investmentAddress, _ethAmount);\\n }\\n\\n /**\\n * Gets how much eth one unit of the investment is worth\\n *\\n * @param _investmentAddress Investment address to check\\n * @return uint256 Returns the price in ETH of an investment share\\n */\\n function getPricePerShare(address _investmentAddress) external view override returns (uint256) {\\n return _getPricePerShare(_investmentAddress);\\n }\\n\\n /**\\n * Gets the asset needed to enter the investment\\n *\\n * @return address Returns the asset that this investment needs\\n */\\n function getInvestmentAsset(address _investmentAddress) external view override returns (address) {\\n return _getInvestmentAsset(_investmentAddress);\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n /**\\n * Create and return InvestmentInfo struct\\n *\\n * @param _strategy Address of the strategy\\n * @param _investment Address of the investment\\n * @param _investmentTokensInTransaction Number of investment tokens involved\\n * hparam _tokenIn Addresseses of the deposit token\\n * @param _limitDepositToken Limit quantity of the deposit/withdrawal token\\n *\\n * return InvestmentInfo Struct containing data for the investment\\n */\\n function _createInvestmentInfo(\\n address _strategy,\\n address _investment,\\n uint256 _investmentTokensInTransaction,\\n address, /*_tokenIn*/\\n uint256 _limitDepositToken\\n ) internal view returns (InvestmentInfo memory) {\\n InvestmentInfo memory investmentInfo;\\n investmentInfo.strategy = IStrategy(_strategy);\\n investmentInfo.garden = IGarden(investmentInfo.strategy.garden());\\n investmentInfo.investment = _investment;\\n investmentInfo.totalSupply = IERC20(_investment).totalSupply();\\n investmentInfo.investmentTokensInGarden = IERC20(_investment).balanceOf(_strategy);\\n investmentInfo.investmentTokensInTransaction = _investmentTokensInTransaction;\\n investmentInfo.limitDepositTokenQuantity = _limitDepositToken;\\n\\n return investmentInfo;\\n }\\n\\n /**\\n * Validate pre investment join data. Check investment is valid, token quantity is valid.\\n *\\n * @param _investmentInfo Struct containing investment information used in internal functions\\n */\\n function _validatePreJoinInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\\n require(_isInvestment(_investmentInfo.investment), 'The investment address is not valid');\\n require(\\n _investmentInfo.investmentTokensInTransaction > 0,\\n 'Min investment tokens to receive must be greater than 0'\\n );\\n }\\n\\n /**\\n * Validate pre investment data. Check investment is valid, token quantity is valid.\\n *\\n * @param _investmentInfo Struct containing investment information used in internal functions\\n */\\n function _validatePreExitInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\\n require(_isInvestment(_investmentInfo.investment), 'The investment address is not valid');\\n require(\\n _investmentInfo.investmentTokensInTransaction > 0,\\n 'Investment tokens to exchange must be greater than 0'\\n );\\n require(\\n _investmentInfo.investmentTokensInGarden >= _investmentInfo.investmentTokensInTransaction,\\n 'The garden does not have enough investment tokens'\\n );\\n }\\n\\n /**\\n * Validate post enter investment data. Check investment is valid, token quantity is valid.\\n *\\n * @param _investmentInfo Struct containing investment information used in internal functions\\n */\\n function _validatePostEnterInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\\n require(\\n (IERC20(_investmentInfo.investment).balanceOf(address(_investmentInfo.strategy)) >\\n _investmentInfo.investmentTokensInGarden),\\n 'The garden did not receive the investment tokens'\\n );\\n }\\n\\n /**\\n * Validate post exit investment data. Check investment is valid, token quantity is valid.\\n *\\n * @param _investmentInfo Struct containing investment information used in internal functions\\n */\\n function _validatePostExitInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\\n require(\\n IERC20(_investmentInfo.investment).balanceOf(address(_investmentInfo.strategy)) ==\\n _investmentInfo.investmentTokensInGarden - _investmentInfo.investmentTokensInTransaction,\\n 'The garden did not return the investment tokens'\\n );\\n }\\n\\n /**\\n * Return join investment calldata which is already generated from the investment API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _investmentAddress Address of the investment\\n * hparam _investmentTokensOut Amount of investment tokens to send\\n * hparam _tokenIn Addresses of tokens to send to the investment\\n * hparam _maxAmountIn Amounts of tokens to send to the investment\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getEnterInvestmentCalldata(\\n address, /* _strategy */\\n address, /* _investmentAddress */\\n uint256, /* _investmentTokensOut */\\n address, /* _tokenIn */\\n uint256 /* _maxAmountIn */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n /**\\n * Return exit investment calldata which is already generated from the investment API\\n *\\n * hparam _strategy Address of the strategy\\n * hparam _investmentAddress Address of the investment\\n * hparam _investmentTokensIn Amount of investment tokens to receive\\n * hparam _tokenOut Addresses of token to receive\\n * hparam _minAmountOut Amount of investment tokens to receive\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getExitInvestmentCalldata(\\n address, /*_strategy */\\n address, /*_investmentAddress */\\n uint256, /*_investmentTokensIn */\\n address, /*_tokenOut */\\n uint256 /* _minAmountOut */\\n )\\n internal\\n view\\n virtual\\n returns (\\n address,\\n uint256,\\n bytes memory\\n );\\n\\n function _isInvestment(\\n address //_investmentAddress\\n ) internal view virtual returns (bool);\\n\\n function _getExpectedShares(\\n address, //_investmentAddress\\n uint256 // _ethAmount\\n ) internal view virtual returns (uint256);\\n\\n function _getPricePerShare(\\n address //_investmentAddress\\n ) internal view virtual returns (uint256);\\n\\n function _getInvestmentAsset(\\n address //_investmentAddress\\n ) internal view virtual returns (address);\\n\\n function _getSpender(\\n address //_investmentAddress\\n ) internal view virtual returns (address);\\n}\\n\",\"keccak256\":\"0x85c5097277802a81f91d91ca3cc41968fa64a9f22dd1473b1f9c6b6c7b2e107d\",\"license\":\"Apache License\"},\"contracts/integrations/passive/YearnVaultIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\\nimport {PassiveIntegration} from './PassiveIntegration.sol';\\nimport {YRegistry} from '../../interfaces/external/yearn/YRegistry.sol';\\nimport {IVault} from '../../interfaces/external/yearn/IVault.sol';\\n\\n/**\\n * @title YearnIntegration\\n * @author Babylon Finance Protocol\\n *\\n * Yearn v2 Vault Integration\\n */\\ncontract YearnVaultIntegration is PassiveIntegration {\\n using SafeMath for uint256;\\n using PreciseUnitMath for uint256;\\n\\n /* ============ State Variables ============ */\\n\\n // Address of Kyber Network Proxy\\n YRegistry public yearnv2Registry;\\n\\n /* ============ Constructor ============ */\\n\\n /**\\n * Creates the integration\\n *\\n * @param _controller Address of the controller\\n * @param _weth Address of the WETH ERC20\\n * @param _yearnRegistryAddress Address of Balancer core factory address\\n */\\n constructor(\\n address _controller,\\n address _weth,\\n address _yearnRegistryAddress\\n ) PassiveIntegration('yearnvaults', _weth, _controller) {\\n yearnv2Registry = YRegistry(_yearnRegistryAddress);\\n }\\n\\n /* ============ Internal Functions ============ */\\n\\n function _isInvestment(address _investmentAddress) internal view override returns (bool) {\\n (address _controller, , , , ) = yearnv2Registry.getVaultInfo(_investmentAddress);\\n return _controller != address(0);\\n }\\n\\n function _getSpender(address _investmentAddress) internal pure override returns (address) {\\n return _investmentAddress;\\n }\\n\\n function _getExpectedShares(address _investmentAddress, uint256 _ethAmount)\\n internal\\n view\\n override\\n returns (uint256)\\n {\\n return _ethAmount.preciseDiv(IVault(_investmentAddress).getPricePerFullShare());\\n }\\n\\n function _getPricePerShare(address _investmentAddress) internal view override returns (uint256) {\\n return IVault(_investmentAddress).getPricePerFullShare();\\n }\\n\\n function _getInvestmentAsset(address _investmentAddress) internal view override returns (address) {\\n return IVault(_investmentAddress).token();\\n }\\n\\n /**\\n * Return join investment calldata which is already generated from the investment API\\n *\\n * hparam _strategy Address of the strategy\\n * @param _investmentAddress Address of the vault\\n * hparam _investmentTokensOut Amount of investment tokens to send\\n * hparam _tokenIn Addresses of tokens to send to the investment\\n * @param _maxAmountIn Amounts of tokens to send to the investment\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getEnterInvestmentCalldata(\\n address, /* _strategy */\\n address _investmentAddress,\\n uint256, /* _investmentTokensOut */\\n address, /* _tokenIn */\\n uint256 _maxAmountIn\\n )\\n internal\\n pure\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n // Encode method data for Garden to invoke\\n bytes memory methodData = abi.encodeWithSignature('deposit(uint256)', _maxAmountIn);\\n\\n return (_investmentAddress, 0, methodData);\\n }\\n\\n /**\\n * Return exit investment calldata which is already generated from the investment API\\n *\\n * hparam _strategy Address of the strategy\\n * @param _investmentAddress Address of the investment\\n * @param _investmentTokensIn Amount of investment tokens to receive\\n * hparam _tokenOut Addresses of tokens to receive\\n * hparam _minAmountOut Amounts of investment tokens to receive\\n *\\n * @return address Target contract address\\n * @return uint256 Call value\\n * @return bytes Trade calldata\\n */\\n function _getExitInvestmentCalldata(\\n address, /* _strategy */\\n address _investmentAddress,\\n uint256 _investmentTokensIn,\\n address, /* _tokenOut */\\n uint256 /* _minAmountOut */\\n )\\n internal\\n pure\\n override\\n returns (\\n address,\\n uint256,\\n bytes memory\\n )\\n {\\n // Encode method data for Garden to invoke\\n bytes memory methodData = abi.encodeWithSignature('withdraw(uint256)', _investmentTokensIn);\\n\\n return (_investmentAddress, 0, methodData);\\n }\\n}\\n\",\"keccak256\":\"0xd3d6a278d9e40ef73658092f7b93167ac123b6c2adbfad1786bae795801ec8ce\",\"license\":\"Apache License\"},\"contracts/interfaces/IBabController.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IBabController\\n * @author Babylon Finance\\n *\\n * Interface for interacting with BabController\\n */\\ninterface IBabController {\\n /* ============ Functions ============ */\\n\\n function createGarden(\\n address _reserveAsset,\\n string memory _name,\\n string memory _symbol,\\n string memory _tokenURI,\\n uint256 _seed,\\n uint256[] calldata _gardenParams,\\n uint256 _initialContribution\\n ) external payable returns (address);\\n\\n function removeGarden(address _garden) external;\\n\\n function addReserveAsset(address _reserveAsset) external;\\n\\n function removeReserveAsset(address _reserveAsset) external;\\n\\n function disableGarden(address _garden) external;\\n\\n function editPriceOracle(address _priceOracle) external;\\n\\n function editIshtarGate(address _ishtarGate) external;\\n\\n function editGardenValuer(address _gardenValuer) external;\\n\\n function editRewardsDistributor(address _rewardsDistributor) external;\\n\\n function editTreasury(address _newTreasury) external;\\n\\n function editGardenFactory(address _newGardenFactory) external;\\n\\n function editGardenNFT(address _newGardenNFT) external;\\n\\n function editStrategyNFT(address _newStrategyNFT) external;\\n\\n function editStrategyFactory(address _newStrategyFactory) external;\\n\\n function editUniswapFactory(address _newUniswapFactory) external;\\n\\n function addIntegration(string memory _name, address _integration) external;\\n\\n function editIntegration(string memory _name, address _integration) external;\\n\\n function removeIntegration(string memory _name) external;\\n\\n function setOperation(uint8 _kind, address _operation) external;\\n\\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\\n\\n function addKeeper(address _keeper) external;\\n\\n function addKeepers(address[] memory _keepers) external;\\n\\n function removeKeeper(address _keeper) external;\\n\\n function enableGardenTokensTransfers() external;\\n\\n function enableBABLMiningProgram() external;\\n\\n function setAllowPublicGardens() external;\\n\\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\\n\\n function maxContributorsPerGarden() external view returns (uint256);\\n\\n function gardenCreationIsOpen() external view returns (bool);\\n\\n function openPublicGardenCreation() external;\\n\\n function setMaxContributorsPerGarden(uint256 _newMax) external;\\n\\n function owner() external view returns (address);\\n\\n function priceOracle() external view returns (address);\\n\\n function gardenValuer() external view returns (address);\\n\\n function gardenNFT() external view returns (address);\\n\\n function strategyNFT() external view returns (address);\\n\\n function rewardsDistributor() external view returns (address);\\n\\n function gardenFactory() external view returns (address);\\n\\n function treasury() external view returns (address);\\n\\n function ishtarGate() external view returns (address);\\n\\n function strategyFactory() external view returns (address);\\n\\n function defaultTradeIntegration() external view returns (address);\\n\\n function protocolDepositGardenTokenFee() external view returns (uint256);\\n\\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\\n\\n function gardenTokensTransfersEnabled() external view returns (bool);\\n\\n function bablMiningProgramEnabled() external view returns (bool);\\n\\n function allowPublicGardens() external view returns (bool);\\n\\n function enabledOperations(uint256 _kind) external view returns (address);\\n\\n function getProfitSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getBABLSharing()\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function getGardens() external view returns (address[] memory);\\n\\n function getOperations() external view returns (address[20] memory);\\n\\n function isGarden(address _garden) external view returns (bool);\\n\\n function getIntegrationByName(string memory _name) external view returns (address);\\n\\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\\n\\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\\n\\n function isValidKeeper(address _keeper) external view returns (bool);\\n\\n function isSystemContract(address _contractAddress) external view returns (bool);\\n\\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\\n\\n function getMinCooldownPeriod() external view returns (uint256);\\n\\n function getMaxCooldownPeriod() external view returns (uint256);\\n\\n function protocolPerformanceFee() external view returns (uint256);\\n\\n function protocolManagementFee() external view returns (uint256);\\n\\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\\n\\n function uniswapFactory() external view returns (address);\\n}\\n\",\"keccak256\":\"0xdee5a27301c24f507d312f32249487fa9b0a756062a7e479405a1d1ee9ee7bb8\",\"license\":\"Apache License\"},\"contracts/interfaces/IGarden.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IGarden\\n * @author Babylon Finance\\n *\\n * Interface for operating with a Garden.\\n */\\ninterface IGarden {\\n /* ============ Functions ============ */\\n function makeGardenPublic() external;\\n\\n function setActive(bool _val) external;\\n\\n function active() external view returns (bool);\\n\\n function guestListEnabled() external view returns (bool);\\n\\n function controller() external view returns (address);\\n\\n function creator() external view returns (address);\\n\\n function isGardenStrategy(address _strategy) external view returns (bool);\\n\\n function getContributor(address _contributor)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function reserveAsset() external view returns (address);\\n\\n function totalContributors() external view returns (uint256);\\n\\n function gardenInitializedAt() external view returns (uint256);\\n\\n function minContribution() external view returns (uint256);\\n\\n function maxContributors() external view returns (uint256);\\n\\n function minLiquidityAsset() external view returns (uint256);\\n\\n function principal() external view returns (uint256);\\n\\n function reserveAssetRewardsSetAside() external view returns (uint256);\\n\\n function reserveAssetPrincipalWindow() external view returns (uint256);\\n\\n function absoluteReturns() external view returns (int256);\\n\\n function totalStake() external view returns (uint256);\\n\\n function minVotersQuorum() external view returns (uint256);\\n\\n function minStrategyDuration() external view returns (uint256);\\n\\n function maxStrategyDuration() external view returns (uint256);\\n\\n function strategyCooldownPeriod() external view returns (uint256);\\n\\n function getStrategies() external view returns (address[] memory);\\n\\n function getFinalizedStrategies() external view returns (address[] memory);\\n\\n function isStrategyActiveInGarden(address _strategy) external view returns (bool);\\n\\n function startWithdrawalWindow(\\n uint256 _amount,\\n uint256 _profits,\\n int256 _returns,\\n address _strategy\\n ) external;\\n\\n function allocateCapitalToStrategy(uint256 _capital) external;\\n\\n function addStrategy(\\n string memory _name,\\n string memory _symbol,\\n uint256[] calldata _stratParams,\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function deposit(\\n uint256 _reserveAssetQuantity,\\n uint256 _minGardenTokenReceiveQuantity,\\n address _to\\n ) external payable;\\n\\n function withdraw(\\n uint256 _gardenTokenQuantity,\\n uint256 _minReserveReceiveQuantity,\\n address payable _to,\\n bool _withPenalty\\n ) external;\\n\\n function claimReturns(address[] calldata _finalizedStrategies) external;\\n\\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\\n\\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\\n\\n function getLockedBalance(address _contributor) external view returns (uint256);\\n\\n function rebalanceStrategies(uint256 _fee) external;\\n\\n function expireCandidateStrategy(address _strategy) external;\\n\\n function burnStrategistStake(address _strategist, uint256 _amount) external;\\n\\n function payKeeper(address payable _keeper, uint256 _fee) external;\\n}\\n\",\"keccak256\":\"0x88f1786ffee23e386aaa1735177912e1b5a7cdd440dafe52fb139fe50fd621b4\",\"license\":\"Apache License\"},\"contracts/interfaces/IIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IIntegration\\n * @author Babylon Finance\\n *\\n * Interface for protocol integrations\\n */\\ninterface IIntegration {\\n function getName() external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xee03c9274ddf3257e3bfd2bb229fea3412c9105f178e64174f59efeafd53182c\",\"license\":\"Apache License\"},\"contracts/interfaces/IPassiveIntegration.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\n/**\\n * @title IPassiveIntegration\\n * @author Babylon Finance\\n *\\n * Interface for passive investments protocol integrations\\n */\\ninterface IPassiveIntegration {\\n function enterInvestment(\\n address _strategy,\\n address _investmentAddress,\\n uint256 _investmentTokensOut,\\n address _tokenIn,\\n uint256 _maxAmountIn\\n ) external;\\n\\n function exitInvestment(\\n address _strategy,\\n address _investmentAddress,\\n uint256 _investmentTokenIn,\\n address _tokenOut,\\n uint256 _minAmountOut\\n ) external;\\n\\n function isInvestment(address _investmentAddress) external view returns (bool);\\n\\n function getExpectedShares(address _investmentAddress, uint256 _ethAmount) external view returns (uint256);\\n\\n function getPricePerShare(address _investmentAddress) external view returns (uint256);\\n\\n function getInvestmentAsset(address _investmentAddress) external view returns (address);\\n}\\n\",\"keccak256\":\"0xfd83ed02b6f3b4e2c7cbd460165f943f313082c93d76d2c4b4ff67859805559d\",\"license\":\"Apache License\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"/*\\n Copyright 2021 Babylon Finance\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\npragma solidity 0.7.6;\\n\\nimport {IGarden} from '../interfaces/IGarden.sol';\\n\\n/**\\n * @title IStrategy\\n * @author Babylon Finance\\n *\\n * Interface for strategy\\n */\\ninterface IStrategy {\\n function initialize(\\n address _strategist,\\n address _garden,\\n address _controller,\\n uint256 _maxCapitalRequested,\\n uint256 _stake,\\n uint256 _strategyDuration,\\n uint256 _expectedReturn,\\n uint256 _minRebalanceCapital\\n ) external;\\n\\n function resolveVoting(\\n address[] calldata _voters,\\n int256[] calldata _votes,\\n uint256 _absoluteTotalVotes,\\n int256 _totalVotes,\\n uint256 fee\\n ) external;\\n\\n function setData(\\n uint8[] calldata _opTypes,\\n address[] calldata _opIntegrations,\\n address[] calldata _opDatas\\n ) external;\\n\\n function executeStrategy(uint256 _capital, uint256 fee) external;\\n\\n function getNAV() external view returns (uint256);\\n\\n function opDatas(uint256 _index) external view returns (address);\\n\\n function opIntegrations(uint256 _index) external view returns (address);\\n\\n function opTypes(uint256 _index) external view returns (uint8);\\n\\n function getOperationsCount() external view returns (uint256);\\n\\n function getOperationByIndex(uint8 _index)\\n external\\n view\\n returns (\\n uint8,\\n address,\\n address\\n );\\n\\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\\n\\n function unwindStrategy(uint256 _amountToUnwind) external;\\n\\n function changeStrategyDuration(uint256 _newDuration) external;\\n\\n function invokeFromIntegration(\\n address _target,\\n uint256 _value,\\n bytes calldata _data\\n ) external returns (bytes memory);\\n\\n function invokeApprove(\\n address _spender,\\n address _asset,\\n uint256 _quantity\\n ) external;\\n\\n function trade(\\n address _sendToken,\\n uint256 _sendQuantity,\\n address _receiveToken\\n ) external returns (uint256);\\n\\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\\n\\n function getStrategyDetails()\\n external\\n view\\n returns (\\n address,\\n address,\\n uint256,\\n uint256,\\n uint256,\\n int256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n uint256,\\n address,\\n uint256\\n );\\n\\n function getStrategyState()\\n external\\n view\\n returns (\\n address,\\n bool,\\n bool,\\n bool,\\n uint256,\\n uint256,\\n uint256\\n );\\n\\n function isStrategyActive() external view returns (bool);\\n\\n function getUserVotes(address _address) external view returns (int256);\\n\\n function strategist() external view returns (address);\\n\\n function enteredAt() external view returns (uint256);\\n\\n function enteredCooldownAt() external view returns (uint256);\\n\\n function executedAt() external view returns (uint256);\\n\\n function updatedAt() external view returns (uint256);\\n\\n function exitedAt() external view returns (uint256);\\n\\n function stake() external view returns (uint256);\\n\\n function strategyRewards() external view returns (uint256);\\n\\n function rewardsTotalOverhead() external view returns (uint256);\\n\\n function maxCapitalRequested() external view returns (uint256);\\n\\n function expectedReturn() external view returns (uint256);\\n\\n function minRebalanceCapital() external view returns (uint256);\\n\\n function duration() external view returns (uint256);\\n\\n function totalVotes() external view returns (int256);\\n\\n function absoluteTotalVotes() external view returns (uint256);\\n\\n function totalPositiveVotes() external view returns (uint256);\\n\\n function totalNegativeVotes() external view returns (uint256);\\n\\n function capitalReturned() external view returns (uint256);\\n\\n function capitalAllocated() external view returns (uint256);\\n\\n function finalized() external view returns (bool);\\n\\n function active() external view returns (bool);\\n\\n function garden() external view returns (IGarden);\\n}\\n\",\"keccak256\":\"0x850597ec9a68eb86f31f13b6b77d3b31350b4ed3d0019dedfbd3550ad1a1d9e2\",\"license\":\"Apache License\"},\"contracts/interfaces/external/yearn/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\ninterface IVault {\\n function token() external view returns (address);\\n\\n function underlying() external view returns (address);\\n\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n function controller() external view returns (address);\\n\\n function governance() external view returns (address);\\n\\n function getPricePerFullShare() external view returns (uint256);\\n\\n function deposit(uint256) external;\\n\\n function depositAll() external;\\n\\n function withdraw(uint256) external;\\n\\n function withdrawAll() external;\\n\\n function balanceOf(address) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf45ea1154dc78598515a0436c17da2f8a22b41ac4db015e717f34126597377d3\",\"license\":\"MIT\"},\"contracts/interfaces/external/yearn/YRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\ninterface YRegistry {\\n function getName() external pure returns (string memory);\\n\\n function getVault(uint256 index) external view returns (address vault);\\n\\n function getVaultsLength() external view returns (uint256);\\n\\n function getVaults() external view returns (address[] memory);\\n\\n function getVaultInfo(address _vault)\\n external\\n view\\n returns (\\n address controller,\\n address token,\\n address strategy,\\n bool isWrapped,\\n bool isDelegated\\n );\\n\\n function getVaultsInfo()\\n external\\n view\\n returns (\\n address[] memory vaultsAddresses,\\n address[] memory controllerArray,\\n address[] memory tokenArray,\\n address[] memory strategyArray,\\n bool[] memory isWrappedArray,\\n bool[] memory isDelegatedArray\\n );\\n}\\n\",\"keccak256\":\"0x920529659f314ef51477454c9f93dca420baa44b9f73a66ddb14baa4392aa185\",\"license\":\"MIT\"},\"contracts/lib/PreciseUnitMath.sol\":{\"content\":\"/*\\n Copyright 2020 Set Labs Inc.\\n\\n Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n you may not use this file except in compliance with the License.\\n You may obtain a copy of the License at\\n\\n http://www.apache.org/licenses/LICENSE-2.0\\n\\n Unless required by applicable law or agreed to in writing, software\\n distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n See the License for the specific language governing permissions and\\n limitations under the License.\\n\\n SPDX-License-Identifier: Apache License, Version 2.0\\n*/\\n\\npragma solidity 0.7.6;\\n\\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\\n\\n/**\\n * @title PreciseUnitMath\\n * @author Set Protocol\\n *\\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\\n * dYdX's BaseMath library.\\n *\\n * CHANGELOG:\\n * - 9/21/20: Added safePower function\\n */\\nlibrary PreciseUnitMath {\\n using SafeMath for uint256;\\n using SignedSafeMath for int256;\\n\\n // The number One in precise units.\\n uint256 internal constant PRECISE_UNIT = 10**18;\\n int256 internal constant PRECISE_UNIT_INT = 10**18;\\n\\n // Max unsigned integer value\\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\\n // Max and min signed integer value\\n int256 internal constant MAX_INT_256 = type(int256).max;\\n int256 internal constant MIN_INT_256 = type(int256).min;\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnit() internal pure returns (uint256) {\\n return PRECISE_UNIT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function preciseUnitInt() internal pure returns (int256) {\\n return PRECISE_UNIT_INT;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxUint256() internal pure returns (uint256) {\\n return MAX_UINT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function maxInt256() internal pure returns (int256) {\\n return MAX_INT_256;\\n }\\n\\n /**\\n * @dev Getter function since constants can't be read directly from libraries.\\n */\\n function minInt256() internal pure returns (int256) {\\n return MIN_INT_256;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(b).div(PRECISE_UNIT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\\n * significand of a number with 18 decimals precision.\\n */\\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(b).div(PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\\n * of a number with 18 decimals precision.\\n */\\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down).\\n */\\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a.mul(PRECISE_UNIT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded towards 0).\\n */\\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return a.mul(PRECISE_UNIT_INT).div(b);\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded up or away from 0).\\n */\\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\\n require(b != 0, 'Cant divide by 0');\\n\\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\\n }\\n\\n /**\\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\\n */\\n function divDown(int256 a, int256 b) internal pure returns (int256) {\\n require(b != 0, 'Cant divide by 0');\\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\\n\\n int256 result = a.div(b);\\n if (a ^ b < 0 && a % b != 0) {\\n result -= 1;\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(b), PRECISE_UNIT_INT);\\n }\\n\\n /**\\n * @dev Divides value a by value b where rounding is towards the lesser number.\\n * (positive values are rounded towards zero and negative values are rounded away from 0).\\n */\\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\\n return divDown(a.mul(PRECISE_UNIT_INT), b);\\n }\\n\\n /**\\n * @dev Performs the power on a specified value, reverts on overflow.\\n */\\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\\n require(a > 0, 'Value must be positive');\\n\\n uint256 result = 1;\\n for (uint256 i = 0; i < pow; i++) {\\n uint256 previousResult = result;\\n\\n // Using safemath multiplication prevents overflows\\n result = previousResult.mul(a);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xb9e221da0132ab13fc991f633d3daac43cc3a99596e63b175e4c85675bd94017\",\"license\":\"Apache License\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b50604051620018ec380380620018ec833981810160405260608110156200003757600080fd5b5080516020808301516040938401518451808601909552600b85526a796561726e7661756c747360a81b92850192909252919282848282826001600160a01b038116620000cb576040805162461bcd60e51b815260206004820152601a60248201527f436f6e74726f6c6c6572206d75737420626520646566696e6564000000000000604482015290519081900360640190fd5b8251620000e090600190602086019062000135565b50600080546001600160a01b03199081166001600160a01b039384161790915560609290921b6001600160601b03191660805260016003556004805490921696169590951790945550620001e1945050505050565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826200016d5760008555620001b8565b82601f106200018857805160ff1916838001178555620001b8565b82800160010185558215620001b8579182015b82811115620001b85782518255916020019190600101906200019b565b50620001c6929150620001ca565b5090565b5b80821115620001c65760008155600101620001cb565b60805160601c6116ed620001ff6000398061042a52506116ed6000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c80639e12fef211610081578063ec422afd1161005b578063ec422afd146102b2578063f337f630146102d8578063f77c4791146102fe576100d4565b80639e12fef21461024a578063b10198fb14610284578063c9a15584146102aa576100d4565b80634deef649116100b25780634deef64914610182578063871be911146101c0578063976a99be14610206576100d4565b806306fdde03146100d957806317d7de7c146101565780633fc8cef31461015e575b600080fd5b6100e1610306565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561011b578181015183820152602001610103565b50505050905090810190601f1680156101485780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100e1610393565b610166610428565b604080516001600160a01b039092168252519081900360200190f35b6101ae6004803603604081101561019857600080fd5b506001600160a01b03813516906020013561044c565b60408051918252519081900360200190f35b610204600480360360a08110156101d657600080fd5b506001600160a01b038135811691602081013582169160408201359160608101359091169060800135610461565b005b610204600480360360a081101561021c57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135909116906080013561086e565b6102706004803603602081101561026057600080fd5b50356001600160a01b0316610c88565b604080519115158252519081900360200190f35b6102706004803603602081101561029a57600080fd5b50356001600160a01b0316610c93565b610166610ca8565b6101ae600480360360208110156102c857600080fd5b50356001600160a01b0316610cb7565b610166600480360360208110156102ee57600080fd5b50356001600160a01b0316610cc2565b610166610ccd565b60018054604080516020600284861615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561038b5780601f106103605761010080835404028352916020019161038b565b820191906000526020600020905b81548152906001019060200180831161036e57829003601f168201915b505050505081565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526060939092909183018282801561041e5780601f106103f35761010080835404028352916020019161041e565b820191906000526020600020905b81548152906001019060200180831161040157829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006104588383610cdc565b90505b92915050565b600260035414156104b9576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b15801561050957600080fd5b505afa15801561051d573d6000803e3d6000fd5b505050506040513d602081101561053357600080fd5b5051610586576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b60006105958686868686610d4d565b90506105a081610f27565b80516001600160a01b03166397ccdc606105b987610ffc565b87876040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561061157600080fd5b505af1158015610625573d6000803e3d6000fd5b50505050600080600061063b8989898989610fff565b92509250925083600001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156106b85781810151838201526020016106a0565b50505050905090810190601f1680156106e55780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561070657600080fd5b505af115801561071a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561074357600080fd5b810190808051604051939291908464010000000082111561076357600080fd5b90830190602082018581111561077857600080fd5b825164010000000081118282018810171561079257600080fd5b82525081516020918201929091019080838360005b838110156107bf5781810151838201526020016107a7565b50505050905090810190601f1680156107ec5780820380516001836020036101000a031916815260200191505b50604052505050506107fd8461106d565b83604001516001600160a01b031684600001516001600160a01b031685602001516001600160a01b03167f99d773709d80de3e15433c22c381fd8e3b82a68b56322240ff4a304956ef0e528a6040518082815260200191505060405180910390a45050600160035550505050505050565b600260035414156108c6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b15801561091657600080fd5b505afa15801561092a573d6000803e3d6000fd5b505050506040513d602081101561094057600080fd5b5051610993576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b60006109a28686868686610d4d565b90506109ad81611135565b80516001600160a01b03166397ccdc606109c687610ffc565b85856040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015610a1e57600080fd5b505af1158015610a32573d6000803e3d6000fd5b505050506000806000610a4889898989896111c0565b92509250925083600001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610ac5578181015183820152602001610aad565b50505050905090810190601f168015610af25780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610b1357600080fd5b505af1158015610b27573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610b5057600080fd5b8101908080516040519392919084640100000000821115610b7057600080fd5b908301906020820185811115610b8557600080fd5b8251640100000000811182820188101715610b9f57600080fd5b82525081516020918201929091019080838360005b83811015610bcc578181015183820152602001610bb4565b50505050905090810190601f168015610bf95780820380516001836020036101000a031916815260200191505b5060405250505050610c0a8461122f565b876001600160a01b031684600001516001600160a01b031685602001516001600160a01b03167fdc0718d28ea0f80518c2c454af93bc46bf51dd4a1b25a048ca4ca75a7ac359c4898b60405180836001600160a01b031681526020018281526020019250505060405180910390a45050600160035550505050505050565b600061045b826112f1565b60026020526000908152604090205460ff1681565b6004546001600160a01b031681565b600061045b8261139a565b600061045b82611407565b6000546001600160a01b031681565b6000610458836001600160a01b03166377c7b8fc6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1a57600080fd5b505afa158015610d2e573d6000803e3d6000fd5b505050506040513d6020811015610d4457600080fd5b50518390611442565b610d55611520565b610d5d611520565b6001600160a01b038716808252604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b891600480820192602092909190829003018186803b158015610db957600080fd5b505afa158015610dcd573d6000803e3d6000fd5b505050506040513d6020811015610de357600080fd5b50516001600160a01b03908116602083810191909152908716604080840182905280517f18160ddd000000000000000000000000000000000000000000000000000000008152905191926318160ddd92600480840193829003018186803b158015610e4d57600080fd5b505afa158015610e61573d6000803e3d6000fd5b505050506040513d6020811015610e7757600080fd5b50516060820152604080517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0389811660048301529151918816916370a0823191602480820192602092909190829003018186803b158015610ee157600080fd5b505afa158015610ef5573d6000803e3d6000fd5b505050506040513d6020811015610f0b57600080fd5b505160a082015260808101949094525060c08301525092915050565b610f3481604001516112f1565b610f6f5760405162461bcd60e51b81526004018080602001828103825260238152602001806116956023913960400191505060405180910390fd5b6000816080015111610fb25760405162461bcd60e51b81526004018080602001828103825260348152602001806116616034913960400191505060405180910390fd5b80608001518160a001511015610ff95760405162461bcd60e51b81526004018080602001828103825260318152602001806115796031913960400191505060405180910390fd5b50565b90565b5050604080516024808201939093528151808203909301835260440190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f2e1a7d4d00000000000000000000000000000000000000000000000000000000179052909260009250565b80608001518160a001510381604001516001600160a01b03166370a0823183600001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156110cd57600080fd5b505afa1580156110e1573d6000803e3d6000fd5b505050506040513d60208110156110f757600080fd5b505114610ff95760405162461bcd60e51b815260040180806020018281038252602f8152602001806115da602f913960400191505060405180910390fd5b61114281604001516112f1565b61117d5760405162461bcd60e51b81526004018080602001828103825260238152602001806116956023913960400191505060405180910390fd5b6000816080015111610ff95760405162461bcd60e51b81526004018080602001828103825260378152602001806116096037913960400191505060405180910390fd5b604080516024808201939093528151808203909301835260440190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb6b55f2500000000000000000000000000000000000000000000000000000000179052929460009450915050565b8060a0015181604001516001600160a01b03166370a0823183600001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561128957600080fd5b505afa15801561129d573d6000803e3d6000fd5b505050506040513d60208110156112b357600080fd5b505111610ff95760405162461bcd60e51b81526004018080602001828103825260308152602001806115aa6030913960400191505060405180910390fd5b60048054604080517f90229af70000000000000000000000000000000000000000000000000000000081526001600160a01b03858116948201949094529051600093849316916390229af79160248083019260a0929190829003018186803b15801561135c57600080fd5b505afa158015611370573d6000803e3d6000fd5b505050506040513d60a081101561138657600080fd5b50516001600160a01b031615159392505050565b6000816001600160a01b03166377c7b8fc6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113d557600080fd5b505afa1580156113e9573d6000803e3d6000fd5b505050506040513d60208110156113ff57600080fd5b505192915050565b6000816001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113d557600080fd5b60006104588261145a85670de0b6b3a7640000611460565b906114b9565b60008261146f5750600061045b565b8282028284828161147c57fe5b04146104585760405162461bcd60e51b81526004018080602001828103825260218152602001806116406021913960400191505060405180910390fd5b600080821161150f576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161151857fe5b049392505050565b6040518060e0016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160008152509056fe5468652067617264656e20646f6573206e6f74206861766520656e6f75676820696e766573746d656e7420746f6b656e735468652067617264656e20646964206e6f7420726563656976652074686520696e766573746d656e7420746f6b656e735468652067617264656e20646964206e6f742072657475726e2074686520696e766573746d656e7420746f6b656e734d696e20696e766573746d656e7420746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77496e766573746d656e7420746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520696e766573746d656e742061646472657373206973206e6f742076616c6964a2646970667358221220e4939839f60b83048e1b1225fa990bb9eaa80abaaa11eb961d3d26e5fbffe58b64736f6c63430007060033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100d45760003560e01c80639e12fef211610081578063ec422afd1161005b578063ec422afd146102b2578063f337f630146102d8578063f77c4791146102fe576100d4565b80639e12fef21461024a578063b10198fb14610284578063c9a15584146102aa576100d4565b80634deef649116100b25780634deef64914610182578063871be911146101c0578063976a99be14610206576100d4565b806306fdde03146100d957806317d7de7c146101565780633fc8cef31461015e575b600080fd5b6100e1610306565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561011b578181015183820152602001610103565b50505050905090810190601f1680156101485780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6100e1610393565b610166610428565b604080516001600160a01b039092168252519081900360200190f35b6101ae6004803603604081101561019857600080fd5b506001600160a01b03813516906020013561044c565b60408051918252519081900360200190f35b610204600480360360a08110156101d657600080fd5b506001600160a01b038135811691602081013582169160408201359160608101359091169060800135610461565b005b610204600480360360a081101561021c57600080fd5b506001600160a01b03813581169160208101358216916040820135916060810135909116906080013561086e565b6102706004803603602081101561026057600080fd5b50356001600160a01b0316610c88565b604080519115158252519081900360200190f35b6102706004803603602081101561029a57600080fd5b50356001600160a01b0316610c93565b610166610ca8565b6101ae600480360360208110156102c857600080fd5b50356001600160a01b0316610cb7565b610166600480360360208110156102ee57600080fd5b50356001600160a01b0316610cc2565b610166610ccd565b60018054604080516020600284861615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561038b5780601f106103605761010080835404028352916020019161038b565b820191906000526020600020905b81548152906001019060200180831161036e57829003601f168201915b505050505081565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526060939092909183018282801561041e5780601f106103f35761010080835404028352916020019161041e565b820191906000526020600020905b81548152906001019060200180831161040157829003601f168201915b5050505050905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006104588383610cdc565b90505b92915050565b600260035414156104b9576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b15801561050957600080fd5b505afa15801561051d573d6000803e3d6000fd5b505050506040513d602081101561053357600080fd5b5051610586576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b60006105958686868686610d4d565b90506105a081610f27565b80516001600160a01b03166397ccdc606105b987610ffc565b87876040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561061157600080fd5b505af1158015610625573d6000803e3d6000fd5b50505050600080600061063b8989898989610fff565b92509250925083600001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156106b85781810151838201526020016106a0565b50505050905090810190601f1680156106e55780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561070657600080fd5b505af115801561071a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561074357600080fd5b810190808051604051939291908464010000000082111561076357600080fd5b90830190602082018581111561077857600080fd5b825164010000000081118282018810171561079257600080fd5b82525081516020918201929091019080838360005b838110156107bf5781810151838201526020016107a7565b50505050905090810190601f1680156107ec5780820380516001836020036101000a031916815260200191505b50604052505050506107fd8461106d565b83604001516001600160a01b031684600001516001600160a01b031685602001516001600160a01b03167f99d773709d80de3e15433c22c381fd8e3b82a68b56322240ff4a304956ef0e528a6040518082815260200191505060405180910390a45050600160035550505050505050565b600260035414156108c6576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600355600054604080516313bc6d4b60e01b815233600482015290516001600160a01b03909216916313bc6d4b91602480820192602092909190829003018186803b15801561091657600080fd5b505afa15801561092a573d6000803e3d6000fd5b505050506040513d602081101561094057600080fd5b5051610993576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c792073797374656d2063616e2063616c6c207468697300000000000000604482015290519081900360640190fd5b60006109a28686868686610d4d565b90506109ad81611135565b80516001600160a01b03166397ccdc606109c687610ffc565b85856040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015610a1e57600080fd5b505af1158015610a32573d6000803e3d6000fd5b505050506000806000610a4889898989896111c0565b92509250925083600001516001600160a01b0316636bc195dd8484846040518463ffffffff1660e01b815260040180846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610ac5578181015183820152602001610aad565b50505050905090810190601f168015610af25780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610b1357600080fd5b505af1158015610b27573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610b5057600080fd5b8101908080516040519392919084640100000000821115610b7057600080fd5b908301906020820185811115610b8557600080fd5b8251640100000000811182820188101715610b9f57600080fd5b82525081516020918201929091019080838360005b83811015610bcc578181015183820152602001610bb4565b50505050905090810190601f168015610bf95780820380516001836020036101000a031916815260200191505b5060405250505050610c0a8461122f565b876001600160a01b031684600001516001600160a01b031685602001516001600160a01b03167fdc0718d28ea0f80518c2c454af93bc46bf51dd4a1b25a048ca4ca75a7ac359c4898b60405180836001600160a01b031681526020018281526020019250505060405180910390a45050600160035550505050505050565b600061045b826112f1565b60026020526000908152604090205460ff1681565b6004546001600160a01b031681565b600061045b8261139a565b600061045b82611407565b6000546001600160a01b031681565b6000610458836001600160a01b03166377c7b8fc6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1a57600080fd5b505afa158015610d2e573d6000803e3d6000fd5b505050506040513d6020811015610d4457600080fd5b50518390611442565b610d55611520565b610d5d611520565b6001600160a01b038716808252604080517f56ba88b800000000000000000000000000000000000000000000000000000000815290516356ba88b891600480820192602092909190829003018186803b158015610db957600080fd5b505afa158015610dcd573d6000803e3d6000fd5b505050506040513d6020811015610de357600080fd5b50516001600160a01b03908116602083810191909152908716604080840182905280517f18160ddd000000000000000000000000000000000000000000000000000000008152905191926318160ddd92600480840193829003018186803b158015610e4d57600080fd5b505afa158015610e61573d6000803e3d6000fd5b505050506040513d6020811015610e7757600080fd5b50516060820152604080517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0389811660048301529151918816916370a0823191602480820192602092909190829003018186803b158015610ee157600080fd5b505afa158015610ef5573d6000803e3d6000fd5b505050506040513d6020811015610f0b57600080fd5b505160a082015260808101949094525060c08301525092915050565b610f3481604001516112f1565b610f6f5760405162461bcd60e51b81526004018080602001828103825260238152602001806116956023913960400191505060405180910390fd5b6000816080015111610fb25760405162461bcd60e51b81526004018080602001828103825260348152602001806116616034913960400191505060405180910390fd5b80608001518160a001511015610ff95760405162461bcd60e51b81526004018080602001828103825260318152602001806115796031913960400191505060405180910390fd5b50565b90565b5050604080516024808201939093528151808203909301835260440190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f2e1a7d4d00000000000000000000000000000000000000000000000000000000179052909260009250565b80608001518160a001510381604001516001600160a01b03166370a0823183600001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156110cd57600080fd5b505afa1580156110e1573d6000803e3d6000fd5b505050506040513d60208110156110f757600080fd5b505114610ff95760405162461bcd60e51b815260040180806020018281038252602f8152602001806115da602f913960400191505060405180910390fd5b61114281604001516112f1565b61117d5760405162461bcd60e51b81526004018080602001828103825260238152602001806116956023913960400191505060405180910390fd5b6000816080015111610ff95760405162461bcd60e51b81526004018080602001828103825260378152602001806116096037913960400191505060405180910390fd5b604080516024808201939093528151808203909301835260440190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fb6b55f2500000000000000000000000000000000000000000000000000000000179052929460009450915050565b8060a0015181604001516001600160a01b03166370a0823183600001516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561128957600080fd5b505afa15801561129d573d6000803e3d6000fd5b505050506040513d60208110156112b357600080fd5b505111610ff95760405162461bcd60e51b81526004018080602001828103825260308152602001806115aa6030913960400191505060405180910390fd5b60048054604080517f90229af70000000000000000000000000000000000000000000000000000000081526001600160a01b03858116948201949094529051600093849316916390229af79160248083019260a0929190829003018186803b15801561135c57600080fd5b505afa158015611370573d6000803e3d6000fd5b505050506040513d60a081101561138657600080fd5b50516001600160a01b031615159392505050565b6000816001600160a01b03166377c7b8fc6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113d557600080fd5b505afa1580156113e9573d6000803e3d6000fd5b505050506040513d60208110156113ff57600080fd5b505192915050565b6000816001600160a01b031663fc0c546a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113d557600080fd5b60006104588261145a85670de0b6b3a7640000611460565b906114b9565b60008261146f5750600061045b565b8282028284828161147c57fe5b04146104585760405162461bcd60e51b81526004018080602001828103825260218152602001806116406021913960400191505060405180910390fd5b600080821161150f576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161151857fe5b049392505050565b6040518060e0016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160008152509056fe5468652067617264656e20646f6573206e6f74206861766520656e6f75676820696e766573746d656e7420746f6b656e735468652067617264656e20646964206e6f7420726563656976652074686520696e766573746d656e7420746f6b656e735468652067617264656e20646964206e6f742072657475726e2074686520696e766573746d656e7420746f6b656e734d696e20696e766573746d656e7420746f6b656e7320746f2072656365697665206d7573742062652067726561746572207468616e2030536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77496e766573746d656e7420746f6b656e7320746f2065786368616e6765206d7573742062652067726561746572207468616e203054686520696e766573746d656e742061646472657373206973206e6f742076616c6964a2646970667358221220e4939839f60b83048e1b1225fa990bb9eaa80abaaa11eb961d3d26e5fbffe58b64736f6c63430007060033", "devdoc": { "author": "Babylon Finance Protocol Yearn v2 Vault Integration", "kind": "dev", @@ -443,7 +443,7 @@ "storageLayout": { "storage": [ { - "astId": 18742, + "astId": 17657, "contract": "contracts/integrations/passive/YearnVaultIntegration.sol:YearnVaultIntegration", "label": "controller", "offset": 0, @@ -451,7 +451,7 @@ "type": "t_address" }, { - "astId": 18746, + "astId": 17661, "contract": "contracts/integrations/passive/YearnVaultIntegration.sol:YearnVaultIntegration", "label": "name", "offset": 0, @@ -459,7 +459,7 @@ "type": "t_string_storage" }, { - "astId": 18750, + "astId": 17665, "contract": "contracts/integrations/passive/YearnVaultIntegration.sol:YearnVaultIntegration", "label": "initializedByGarden", "offset": 0, @@ -467,7 +467,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 7995, + "astId": 5603, "contract": "contracts/integrations/passive/YearnVaultIntegration.sol:YearnVaultIntegration", "label": "_status", "offset": 0, @@ -475,12 +475,12 @@ "type": "t_uint256" }, { - "astId": 20513, + "astId": 19423, "contract": "contracts/integrations/passive/YearnVaultIntegration.sol:YearnVaultIntegration", "label": "yearnv2Registry", "offset": 0, "slot": "4", - "type": "t_contract(YRegistry)27124" + "type": "t_contract(YRegistry)26227" } ], "types": { @@ -494,7 +494,7 @@ "label": "bool", "numberOfBytes": "1" }, - "t_contract(YRegistry)27124": { + "t_contract(YRegistry)26227": { "encoding": "inplace", "label": "contract YRegistry", "numberOfBytes": "20" diff --git a/deployments/artifacts/mainnet/solcInputs/bd873b418320faeabd457a4fe7c7c19d.json b/deployments/artifacts/mainnet/solcInputs/bd873b418320faeabd457a4fe7c7c19d.json new file mode 100644 index 000000000..04c1f6f05 --- /dev/null +++ b/deployments/artifacts/mainnet/solcInputs/bd873b418320faeabd457a4fe7c7c19d.json @@ -0,0 +1,427 @@ +{ + "language": "Solidity", + "sources": { + "contracts/BabController.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\nimport {OwnableUpgradeable} from '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';\nimport {AddressUpgradeable} from '@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol';\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\n\nimport {RewardsDistributor} from './token/RewardsDistributor.sol';\nimport {IGarden} from './interfaces/IGarden.sol';\nimport {IGardenFactory} from './interfaces/IGardenFactory.sol';\nimport {IStrategy} from './interfaces/IStrategy.sol';\nimport {IIshtarGate} from './interfaces/IIshtarGate.sol';\nimport {IIntegration} from './interfaces/IIntegration.sol';\nimport {IBabController} from './interfaces/IBabController.sol';\n\nimport {AddressArrayUtils} from './lib/AddressArrayUtils.sol';\n\n/**\n * @title BabController\n * @author Babylon Finance Protocol\n *\n * BabController is a smart contract used to deploy new gardens contracts and house the\n * integrations and resources of the system.\n */\ncontract BabController is OwnableUpgradeable, IBabController {\n using AddressArrayUtils for address[];\n using AddressUpgradeable for address;\n using SafeMath for uint256;\n\n /* ============ Events ============ */\n event GardenAdded(address indexed _garden, address indexed _factory);\n event GardenRemoved(address indexed _garden);\n\n event ControllerIntegrationAdded(address _integration, string indexed _integrationName);\n event ControllerIntegrationRemoved(address _integration, string indexed _integrationName);\n event ControllerIntegrationEdited(address _newIntegration, string indexed _integrationName);\n event ControllerOperationSet(uint8 indexed _kind, address _address);\n event DefaultTradeIntegrationChanged(address indexed _newTradeIntegration, address _oldTradeIntegration);\n\n event ReserveAssetAdded(address indexed _reserveAsset);\n event ReserveAssetRemoved(address indexed _reserveAsset);\n event LiquidityMinimumEdited(address indexed _resesrveAsset, uint256 _newMinLiquidityReserve);\n\n event PriceOracleChanged(address indexed _priceOracle, address _oldPriceOracle);\n event RewardsDistributorChanged(address indexed _rewardsDistributor, address _oldRewardsDistributor);\n event TreasuryChanged(address _newTreasury, address _oldTreasury);\n event IshtarGateChanged(address _newIshtarGate, address _oldIshtarGate);\n event GardenValuerChanged(address indexed _gardenValuer, address _oldGardenValuer);\n event GardenFactoryChanged(address indexed _gardenFactory, address _oldGardenFactory);\n event UniswapFactoryChanged(address indexed _newUniswapFactory, address _oldUniswapFactory);\n event GardenNFTChanged(address indexed _newGardenNFT, address _oldStrategyNFT);\n event StrategyNFTChanged(address indexed _newStrategyNFT, address _oldStrategyNFT);\n\n event StrategyFactoryEdited(address indexed _strategyFactory, address _oldStrategyFactory);\n\n /* ============ Modifiers ============ */\n\n /* ============ State Variables ============ */\n\n address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\n uint8 public constant MAX_OPERATIONS = 20;\n\n // List of enabled Communities\n address[] public gardens;\n address[] public reserveAssets;\n address public override uniswapFactory;\n address public override gardenValuer;\n address public override priceOracle;\n address public override gardenFactory;\n address public override rewardsDistributor;\n address public override ishtarGate;\n address public override strategyFactory;\n address public override gardenNFT;\n address public override strategyNFT;\n\n // Mapping of integration name => integration address\n mapping(bytes32 => address) private enabledIntegrations;\n // Address of the default trade integration used by the protocol\n address public override defaultTradeIntegration;\n // Mapping of valid operations\n address[MAX_OPERATIONS] public override enabledOperations;\n\n // Mappings to check whether address is valid Garden or Reserve Asset\n mapping(address => bool) public override isGarden;\n mapping(address => bool) public validReserveAsset;\n\n // Mapping to check whitelisted assets\n mapping(address => bool) public assetWhitelist;\n\n // Mapping to check keepers\n mapping(address => bool) public keeperList;\n\n // Mapping of minimum liquidity per reserve asset\n mapping(address => uint256) public override minLiquidityPerReserve;\n\n // Recipient of protocol fees\n address public override treasury;\n\n // Strategy cooldown period\n uint256 public constant MIN_COOLDOWN_PERIOD = 6 hours;\n uint256 public constant MAX_COOLDOWN_PERIOD = 7 days;\n\n // Strategy Profit Sharing\n uint256 public strategistProfitPercentage; // (0.01% = 1e14, 1% = 1e16)\n uint256 public stewardsProfitPercentage; // (0.01% = 1e14, 1% = 1e16)\n uint256 public lpsProfitPercentage; //\n\n // Strategy BABL Rewards Sharing\n uint256 public strategistBABLPercentage; // (0.01% = 1e14, 1% = 1e16)\n uint256 public stewardsBABLPercentage; // (0.01% = 1e14, 1% = 1e16)\n uint256 public lpsBABLPercentage; //\n\n uint256 public gardenCreatorBonus;\n\n // Assets\n\n // Enable Transfer of ERC20 gardenTokens\n // Only members can transfer tokens until the protocol is fully decentralized\n bool public override gardenTokensTransfersEnabled;\n\n // Enable and starts the BABL Mining program within Rewards Distributor contract\n bool public override bablMiningProgramEnabled;\n // Enable public gardens\n bool public override allowPublicGardens;\n\n uint256 public override protocolPerformanceFee; // 5% (0.01% = 1e14, 1% = 1e16) on profits\n uint256 public override protocolManagementFee; // 0.5% (0.01% = 1e14, 1% = 1e16)\n uint256 public override protocolDepositGardenTokenFee; // 0 (0.01% = 1e14, 1% = 1e16)\n uint256 public override protocolWithdrawalGardenTokenFee; // 0 (0.01% = 1e14, 1% = 1e16)\n\n // Maximum number of contributors per garden\n uint256 public override maxContributorsPerGarden;\n\n // Enable garden creations to be fully open to the public (no need of Ishtar gate anymore)\n bool public override gardenCreationIsOpen;\n\n /* ============ Constructor ============ */\n\n /**\n * Initializes the initial fee recipient on deployment.\n */\n function initialize() public {\n OwnableUpgradeable.__Ownable_init();\n\n // vars init values has to be set in initialize due to how upgrade proxy pattern works\n protocolManagementFee = 5e15; // 0.5% (0.01% = 1e14, 1% = 1e16)\n protocolPerformanceFee = 5e16; // 5% (0.01% = 1e14, 1% = 1e16) on profits\n protocolDepositGardenTokenFee = 0; // 0% (0.01% = 1e14, 1% = 1e16) on profits\n protocolWithdrawalGardenTokenFee = 0; // 0% (0.01% = 1e14, 1% = 1e16) on profits\n gardenTokensTransfersEnabled = false;\n bablMiningProgramEnabled = false;\n allowPublicGardens = false;\n\n uniswapFactory = 0x1F98431c8aD98523631AE4a59f267346ea31F984;\n\n strategistProfitPercentage = 10e16;\n stewardsProfitPercentage = 5e16;\n lpsProfitPercentage = 80e16;\n\n strategistBABLPercentage = 8e16;\n stewardsBABLPercentage = 17e16;\n lpsBABLPercentage = 75e16;\n\n gardenCreatorBonus = 15e16;\n maxContributorsPerGarden = 100;\n gardenCreationIsOpen = false;\n }\n\n /* ============ External Functions ============ */\n\n // =========== Garden related Gov Functions ======\n /**\n * Creates a Garden smart contract and registers the Garden with the controller.\n *\n * If asset is not WETH, the creator needs to approve the controller\n * @param _reserveAsset Reserve asset of the Garden. Initially just weth\n * @param _name Name of the Garden\n * @param _symbol Symbol of the Garden\n * @param _gardenParams Array of numeric garden params\n * @param _tokenURI Garden NFT token URI\n * @param _seed Seed to regenerate the garden NFT\n * @param _initialContribution Initial contribution by the gardener\n */\n function createGarden(\n address _reserveAsset,\n string memory _name,\n string memory _symbol,\n string memory _tokenURI,\n uint256 _seed,\n uint256[] calldata _gardenParams,\n uint256 _initialContribution\n ) external payable override returns (address) {\n require(defaultTradeIntegration != address(0), 'Need a default trade integration');\n require(enabledOperations.length > 0, 'Need operations enabled');\n require(\n IIshtarGate(ishtarGate).canCreate(msg.sender) || gardenCreationIsOpen,\n 'User does not have creation permissions'\n );\n address newGarden =\n IGardenFactory(gardenFactory).createGarden(\n _reserveAsset,\n msg.sender,\n _name,\n _symbol,\n _tokenURI,\n _seed,\n _gardenParams,\n _initialContribution\n );\n if (_reserveAsset != WETH || msg.value == 0) {\n IERC20(_reserveAsset).transferFrom(msg.sender, address(this), _initialContribution);\n IERC20(_reserveAsset).approve(newGarden, _initialContribution);\n }\n require(!isGarden[newGarden], 'Garden already exists');\n isGarden[newGarden] = true;\n gardens.push(newGarden);\n IGarden(newGarden).deposit{value: msg.value}(_initialContribution, _initialContribution, msg.sender);\n emit GardenAdded(newGarden, msg.sender);\n return newGarden;\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a Garden\n *\n * @param _garden Address of the Garden contract to remove\n */\n function removeGarden(address _garden) external override onlyOwner {\n require(isGarden[_garden], 'Garden does not exist');\n require(!IGarden(_garden).active(), 'The garden needs to be disabled.');\n gardens = gardens.remove(_garden);\n\n delete isGarden[_garden];\n\n emit GardenRemoved(_garden);\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to disable a garden\n *\n * @param _garden Address of the garden\n */\n function disableGarden(address _garden) external override onlyOwner {\n require(isGarden[_garden], 'Garden does not exist');\n IGarden garden = IGarden(_garden);\n require(garden.active(), 'The garden needs to be active.');\n garden.setActive(false);\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to enable a garden\n *\n * @param _garden Address of the garden\n */\n function enableGarden(address _garden) external onlyOwner {\n require(isGarden[_garden], 'Garden does not exist');\n IGarden garden = IGarden(_garden);\n require(!garden.active(), 'The garden needs to be disabled.');\n garden.setActive(true);\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to enable public creation of gardens\n *\n */\n function openPublicGardenCreation() external override onlyOwner {\n require(!gardenCreationIsOpen, 'Garden creation is already open to the public');\n gardenCreationIsOpen = true;\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Allows transfers of ERC20 gardenTokens\n * Can only happen after 2021 is finished.\n */\n function enableGardenTokensTransfers() external override onlyOwner {\n require(block.timestamp > 1641024000000, 'Transfers cannot be enabled yet');\n gardenTokensTransfersEnabled = true;\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Allows public gardens\n */\n function setAllowPublicGardens() external override onlyOwner {\n allowPublicGardens = true;\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Change the max number of contributors for new Gardens since the change\n */\n function setMaxContributorsPerGarden(uint256 _newMax) external override onlyOwner {\n require(_newMax >= 1, 'Contributors cannot be less than 1 per garden');\n maxContributorsPerGarden = _newMax;\n }\n\n // =========== Protocol related Gov Functions ======\n\n /** PRIVILEGED GOVERNANCE FUNCTION. Enable and starts the BABL Mining program by the Rewards Distributor\n * Can only happen after public launch of the protocol.\n */\n function enableBABLMiningProgram() external override onlyOwner {\n if (bablMiningProgramEnabled == false) {\n // Can only be activated once\n bablMiningProgramEnabled = true;\n RewardsDistributor(rewardsDistributor).startBABLRewards(); // Sets the timestamp\n }\n }\n\n /**\n * PRIVILEGED FACTORY FUNCTION. Adds a new valid keeper to the list\n *\n * @param _keeper Address of the keeper\n */\n function addKeeper(address _keeper) external override onlyOwner {\n keeperList[_keeper] = true;\n }\n\n /**\n * PRIVILEGED FACTORY FUNCTION. Removes a keeper\n *\n * @param _keeper Address of the keeper\n */\n function removeKeeper(address _keeper) external override onlyOwner {\n require(keeperList[_keeper], 'Keeper is whitelisted');\n delete keeperList[_keeper];\n }\n\n /**\n * PRIVILEGED FACTORY FUNCTION. Adds a list of assets to the whitelist\n *\n * @param _keepers List with keeprs of the assets to whitelist\n */\n function addKeepers(address[] memory _keepers) external override onlyOwner {\n for (uint256 i = 0; i < _keepers.length; i++) {\n keeperList[_keepers[i]] = true;\n }\n }\n\n /**\n * PRIVILEGED FACTORY FUNCTION. Adds a new valid reserve asset for gardens\n *\n * @param _reserveAsset Address of the reserve assset\n */\n function addReserveAsset(address _reserveAsset) external override onlyOwner {\n require(!validReserveAsset[_reserveAsset], 'Reserve asset already added');\n // TODO: check decimals reserve asset\n validReserveAsset[_reserveAsset] = true;\n reserveAssets.push(_reserveAsset);\n emit ReserveAssetAdded(_reserveAsset);\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to remove a reserve asset\n *\n * @param _reserveAsset Address of the reserve asset to remove\n */\n function removeReserveAsset(address _reserveAsset) external override onlyOwner {\n require(validReserveAsset[_reserveAsset], 'Reserve asset does not exist');\n\n reserveAssets = reserveAssets.remove(_reserveAsset);\n\n delete validReserveAsset[_reserveAsset];\n\n emit ReserveAssetRemoved(_reserveAsset);\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to change the price oracle\n *\n * @param _priceOracle Address of the new price oracle\n */\n function editPriceOracle(address _priceOracle) external override onlyOwner {\n require(_priceOracle != priceOracle, 'Price oracle already exists');\n\n require(_priceOracle != address(0), 'Price oracle must exist');\n\n address oldPriceOracle = priceOracle;\n priceOracle = _priceOracle;\n\n emit PriceOracleChanged(_priceOracle, oldPriceOracle);\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to change the Ishtar Gate Address\n *\n * @param _ishtarGate Address of the new Ishtar Gate\n */\n function editIshtarGate(address _ishtarGate) external override onlyOwner {\n require(_ishtarGate != ishtarGate, 'Ishtar Gate already exists');\n\n require(_ishtarGate != address(0), 'Ishtar Gate oracle must exist');\n\n address oldIshtarGate = ishtarGate;\n ishtarGate = _ishtarGate;\n\n emit IshtarGateChanged(_ishtarGate, oldIshtarGate);\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to change the garden valuer\n *\n * @param _gardenValuer Address of the new garden valuer\n */\n function editGardenValuer(address _gardenValuer) external override onlyOwner {\n require(_gardenValuer != gardenValuer, 'Garden Valuer already exists');\n\n require(_gardenValuer != address(0), 'Garden Valuer must exist');\n\n address oldGardenValuer = gardenValuer;\n gardenValuer = _gardenValuer;\n\n emit GardenValuerChanged(_gardenValuer, oldGardenValuer);\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol fee recipient\n *\n * @param _newTreasury Address of the new protocol fee recipient\n */\n function editTreasury(address _newTreasury) external override onlyOwner {\n require(_newTreasury != address(0), 'Address must not be 0');\n\n address oldTreasury = treasury;\n treasury = _newTreasury;\n\n emit TreasuryChanged(_newTreasury, oldTreasury);\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the rewards distributor\n *\n * @param _newRewardsDistributor Address of the new rewards distributor\n */\n function editRewardsDistributor(address _newRewardsDistributor) external override onlyOwner {\n require(_newRewardsDistributor != address(0), 'Address must not be 0');\n\n address oldRewardsDistributor = rewardsDistributor;\n rewardsDistributor = _newRewardsDistributor;\n\n emit RewardsDistributorChanged(_newRewardsDistributor, oldRewardsDistributor);\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol garden factory\n *\n * @param _newGardenFactory Address of the new garden factory\n */\n function editGardenFactory(address _newGardenFactory) external override onlyOwner {\n require(_newGardenFactory != address(0), 'Address must not be 0');\n\n address oldGardenFactory = gardenFactory;\n gardenFactory = _newGardenFactory;\n\n emit GardenFactoryChanged(_newGardenFactory, oldGardenFactory);\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol garden NFT\n *\n * @param _newGardenNFT Address of the new garden NFT\n */\n function editGardenNFT(address _newGardenNFT) external override onlyOwner {\n require(_newGardenNFT != address(0), 'Address must not be 0');\n\n address oldGardenNFT = gardenNFT;\n gardenNFT = _newGardenNFT;\n\n emit GardenNFTChanged(_newGardenNFT, oldGardenNFT);\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol strategy NFT\n *\n * @param _newStrategyNFT Address of the new strategy NFT\n */\n function editStrategyNFT(address _newStrategyNFT) external override onlyOwner {\n require(_newStrategyNFT != address(0), 'Address must not be 0');\n\n address oldStrategyNFT = strategyNFT;\n strategyNFT = _newStrategyNFT;\n\n emit StrategyNFTChanged(_newStrategyNFT, oldStrategyNFT);\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol uniswaps factory\n *\n * @param _newUniswapFactory Address of the new uniswap factory\n */\n function editUniswapFactory(address _newUniswapFactory) external override onlyOwner {\n require(_newUniswapFactory != address(0), 'Address must not be 0');\n\n address oldUniswapFactory = uniswapFactory;\n uniswapFactory = _newUniswapFactory;\n\n emit UniswapFactoryChanged(_newUniswapFactory, oldUniswapFactory);\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol strategy factory\n *\n * @param _newStrategyFactory Address of the new strategy factory\n */\n function editStrategyFactory(address _newStrategyFactory) external override onlyOwner {\n require(_newStrategyFactory != address(0), 'Address must not be 0');\n\n address oldStrategyFactory = strategyFactory;\n strategyFactory = _newStrategyFactory;\n\n emit StrategyFactoryEdited(_newStrategyFactory, oldStrategyFactory);\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to edit the protocol default trde integration\n *\n * @param _newDefaultTradeIntegation Address of the new default trade integration\n */\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external override onlyOwner {\n require(_newDefaultTradeIntegation != address(0), 'Address must not be 0');\n require(_newDefaultTradeIntegation != defaultTradeIntegration, 'Address must be different');\n require(\n enabledIntegrations[_nameHash(IIntegration(_newDefaultTradeIntegation).getName())] ==\n _newDefaultTradeIntegation,\n 'Integration needs to be valid'\n );\n address oldDefaultTradeIntegration = defaultTradeIntegration;\n defaultTradeIntegration = _newDefaultTradeIntegation;\n\n emit DefaultTradeIntegrationChanged(_newDefaultTradeIntegation, oldDefaultTradeIntegration);\n }\n\n /**\n * GOVERNANCE FUNCTION: Add a new integration to the registry\n *\n * @param _name Human readable string identifying the integration\n * @param _integration Address of the integration contract to add\n */\n function addIntegration(string memory _name, address _integration) public override onlyOwner {\n bytes32 hashedName = _nameHash(_name);\n require(enabledIntegrations[hashedName] == address(0), 'Integration exists already.');\n require(_integration != address(0), 'Integration address must exist.');\n\n enabledIntegrations[hashedName] = _integration;\n\n emit ControllerIntegrationAdded(_integration, _name);\n }\n\n /**\n * GOVERNANCE FUNCTION: Edit an existing integration on the registry\n *\n * @param _name Human readable string identifying the integration\n * @param _integration Address of the integration contract to edit\n */\n function editIntegration(string memory _name, address _integration) public override onlyOwner {\n bytes32 hashedName = _nameHash(_name);\n\n require(enabledIntegrations[hashedName] != address(0), 'Integration does not exist.');\n require(_integration != address(0), 'Integration address must exist.');\n\n enabledIntegrations[hashedName] = _integration;\n\n emit ControllerIntegrationEdited(_integration, _name);\n }\n\n /**\n * GOVERNANCE FUNCTION: Remove an existing integration on the registry\n *\n * @param _name Human readable string identifying the integration\n */\n function removeIntegration(string memory _name) external override onlyOwner {\n bytes32 hashedName = _nameHash(_name);\n require(enabledIntegrations[hashedName] != address(0), 'Integration does not exist.');\n\n address oldIntegration = enabledIntegrations[hashedName];\n delete enabledIntegrations[hashedName];\n\n emit ControllerIntegrationRemoved(oldIntegration, _name);\n }\n\n /**\n * GOVERNANCE FUNCTION: Edit an existing operation on the registry\n *\n * @param _kind Operation kind\n * @param _operation Address of the operation contract to set\n */\n function setOperation(uint8 _kind, address _operation) public override onlyOwner {\n require(_kind < MAX_OPERATIONS, 'Max operations reached');\n require(enabledOperations[_kind] != _operation, 'Operation already set');\n require(_operation != address(0), 'Operation address must exist.');\n enabledOperations[_kind] = _operation;\n\n emit ControllerOperationSet(_kind, _operation);\n }\n\n /**\n * GOVERNANCE FUNCTION: Edits the minimum liquidity an asset must have on Uniswap\n *\n * @param _reserve Address of the reserve to edit\n * @param _newMinLiquidityReserve Absolute min liquidity of an asset to grab price\n */\n function editLiquidityReserve(address _reserve, uint256 _newMinLiquidityReserve) public override onlyOwner {\n require(_newMinLiquidityReserve > 0, '_minRiskyPairLiquidityEth > 0');\n require(validReserveAsset[_reserve], 'Needs to be a valid reserve');\n minLiquidityPerReserve[_reserve] = _newMinLiquidityReserve;\n\n emit LiquidityMinimumEdited(_reserve, _newMinLiquidityReserve);\n }\n\n /* ============ External Getter Functions ============ */\n\n function owner() public view override(IBabController, OwnableUpgradeable) returns (address) {\n return OwnableUpgradeable.owner();\n }\n\n function getGardens() external view override returns (address[] memory) {\n return gardens;\n }\n\n function getOperations() external view override returns (address[20] memory) {\n return enabledOperations;\n }\n\n function getReserveAssets() external view returns (address[] memory) {\n return reserveAssets;\n }\n\n function getMinCooldownPeriod() external pure override returns (uint256) {\n return MIN_COOLDOWN_PERIOD;\n }\n\n function getMaxCooldownPeriod() external pure override returns (uint256) {\n return MAX_COOLDOWN_PERIOD;\n }\n\n function isValidReserveAsset(address _reserveAsset) external view override returns (bool) {\n return validReserveAsset[_reserveAsset];\n }\n\n function isValidKeeper(address _keeper) external view override returns (bool) {\n return keeperList[_keeper];\n }\n\n /**\n * Returns the percentages of a strategy Profit Sharing\n *\n * @return Strategist, Stewards, Lps, creator bonus\n */\n function getProfitSharing()\n external\n view\n override\n returns (\n uint256,\n uint256,\n uint256\n )\n {\n return (strategistProfitPercentage, stewardsProfitPercentage, lpsProfitPercentage);\n }\n\n /**\n * Returns the percentages of BABL Profit Sharing\n *\n * @return Strategist, Stewards, Lps, creator bonus\n */\n function getBABLSharing()\n external\n view\n override\n returns (\n uint256,\n uint256,\n uint256,\n uint256\n )\n {\n return (strategistBABLPercentage, stewardsBABLPercentage, lpsBABLPercentage, gardenCreatorBonus);\n }\n\n /**\n * Get the integration address associated with passed human readable name\n *\n * @param _name Human readable integration name\n *\n * @return Address of integration\n */\n function getIntegrationByName(string memory _name) external view override returns (address) {\n return enabledIntegrations[_nameHash(_name)];\n }\n\n /**\n * Get integration integration address associated with passed hashed name\n *\n * @param _nameHashP Hash of human readable integration name\n *\n * @return Address of integration\n */\n function getIntegrationWithHash(bytes32 _nameHashP) external view override returns (address) {\n return enabledIntegrations[_nameHashP];\n }\n\n /**\n * Check if integration name is valid\n *\n * @param _name Human readable string identifying the integration\n *\n * @return Boolean indicating if valid\n */\n function isValidIntegration(string memory _name, address _integration) external view override returns (bool) {\n return enabledIntegrations[_nameHash(_name)] == _integration;\n }\n\n /**\n * Check if a contract address is a garden or one of the system contracts\n *\n * @param _contractAddress The contract address to check\n */\n function isSystemContract(address _contractAddress) external view override returns (bool) {\n return (isGarden[_contractAddress] ||\n gardenValuer == _contractAddress ||\n priceOracle == _contractAddress ||\n gardenFactory == _contractAddress ||\n strategyFactory == _contractAddress ||\n rewardsDistributor == _contractAddress ||\n owner() == _contractAddress ||\n _contractAddress == address(this) ||\n _isOperation(_contractAddress) ||\n (isGarden[address(IStrategy(_contractAddress).garden())] &&\n IGarden(IStrategy(_contractAddress).garden()).isStrategyActiveInGarden(_contractAddress)));\n }\n\n /* ============ Internal Only Function ============ */\n\n /**\n * Hashes the string and returns a bytes32 value\n */\n function _nameHash(string memory _name) private pure returns (bytes32) {\n return keccak256(bytes(_name));\n }\n\n function _isOperation(address _address) private view returns (bool) {\n for (uint8 i = 0; i < MAX_OPERATIONS; i++) {\n if (_address == enabledOperations[i]) {\n return true;\n }\n }\n return false;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/Initializable.sol\";\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n function __Ownable_init() internal initializer {\n __Context_init_unchained();\n __Ownable_init_unchained();\n }\n\n function __Ownable_init_unchained() internal initializer {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), msgSender);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\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 { size := extcodesize(account) }\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, \"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, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain`call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.staticcall(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/math/SafeMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\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, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n\n /**\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n *\n * _Available since v3.4._\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n *\n * _Available since v3.4._\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\n\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, \"SafeMath: addition overflow\");\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 require(b <= a, \"SafeMath: subtraction overflow\");\n return a - b;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n *\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) return 0;\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b > 0, \"SafeMath: division by zero\");\n return a / b;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * reverting when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b > 0, \"SafeMath: modulo by zero\");\n return a % b;\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {trySub}.\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {tryDiv}.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n return a / b;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * reverting with custom message when dividing by zero.\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {tryMod}.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n return a % b;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.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(address sender, address recipient, uint256 amount) 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" + }, + "contracts/token/RewardsDistributor.sol": { + "content": "/*\n Copyright 2021 Babylon Finance.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\nimport {TimeLockedToken} from './TimeLockedToken.sol';\n\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\n\nimport {SafeDecimalMath} from '../lib/SafeDecimalMath.sol';\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\nimport {Math} from '../lib/Math.sol';\nimport {Safe3296} from '../lib/Safe3296.sol';\nimport {Errors, _require} from '../lib/BabylonErrors.sol';\n\nimport {IBabController} from '../interfaces/IBabController.sol';\nimport {IGarden} from '../interfaces/IGarden.sol';\nimport {IStrategy} from '../interfaces/IStrategy.sol';\nimport {TimeLockedToken} from './TimeLockedToken.sol';\nimport {IRewardsDistributor} from '../interfaces/IRewardsDistributor.sol';\nimport {IPriceOracle} from '../interfaces/IPriceOracle.sol';\n\n/**\n * @title Rewards Distributor implementing the BABL Mining Program and other Rewards to Strategists and Stewards\n * @author Babylon Finance\n * Rewards Distributor contract is a smart contract used to calculate and distribute all the BABL rewards of the BABL Mining Program\n * along the time reserved for executed strategies. It implements a supply curve to distribute 500K BABL along the time.\n * The supply curve is designed to optimize the long-term sustainability of the protocol.\n * The rewards are front-loaded but they last for more than 10 years, slowly decreasing quarter by quarter.\n * For that, it houses the state of the protocol power along the time as each strategy power is compared to the whole protocol usage.\n * Rewards Distributor also is responsible for the calculation and delivery of other rewards as bonuses to specific profiles\n * which are actively contributing to the protocol growth and their communities (Garden creators, Strategists and Stewards).\n */\ncontract RewardsDistributor is Ownable, IRewardsDistributor {\n using SafeMath for uint256;\n using SafeMath for int256;\n using PreciseUnitMath for uint256;\n using PreciseUnitMath for int256;\n using SafeDecimalMath for uint256;\n using SafeDecimalMath for int256;\n using Math for uint256;\n using Math for int256;\n using Safe3296 for uint256;\n using Safe3296 for int256;\n using Safe3296 for uint96;\n using Safe3296 for uint32;\n\n /* ========== Events ========== */\n\n /* ============ Modifiers ============ */\n /**\n * Throws if the call is not from a valid strategy\n */\n modifier onlyStrategy {\n _require(controller.isSystemContract(address(IStrategy(msg.sender).garden())), Errors.ONLY_STRATEGY);\n _;\n }\n /**\n * Throws if the call is not from a valid active garden\n */\n modifier onlyActiveGarden(address _garden, uint256 _pid) {\n if (_pid != 0 || gardenPid[address(_garden)] > 1) {\n // Enable deploying flow with security restrictions\n _require(IBabController(controller).isSystemContract(address(_garden)), Errors.NOT_A_SYSTEM_CONTRACT);\n _require(IBabController(controller).isGarden(address(_garden)), Errors.ONLY_ACTIVE_GARDEN);\n }\n _require(msg.sender == address(_garden), Errors.ONLY_ACTIVE_GARDEN);\n _require(IGarden(_garden).active(), Errors.ONLY_ACTIVE_GARDEN);\n _;\n }\n\n /**\n * Throws if the BABL Rewards mining program is not active\n */\n modifier onlyMiningActive() {\n _require(IBabController(controller).bablMiningProgramEnabled(), Errors.ONLY_MINING_ACTIVE);\n _;\n }\n /**\n * Throws if the sender is not the controller\n */\n modifier onlyController() {\n _require(IBabController(controller).isSystemContract(msg.sender), Errors.NOT_A_SYSTEM_CONTRACT);\n _require(address(controller) == msg.sender, Errors.ONLY_CONTROLLER);\n _;\n }\n\n /* ============ Constants ============ */\n // 500K BABL allocated to this BABL Mining Program, the first quarter is Q1_REWARDS\n // and the following quarters will follow the supply curve using a decay rate\n uint256 public constant override Q1_REWARDS = 53_571_428_571_428_600e6; // First quarter (epoch) BABL rewards\n // 12% quarterly decay rate (each 90 days)\n // (Rewards on Q1 = 1,12 * Rewards on Q2) being Q1= Quarter 1, Q2 = Quarter 2\n uint256 public constant override DECAY_RATE = 12e16;\n // Duration of its EPOCH in days // BABL & profits split from the protocol\n uint256 public constant override EPOCH_DURATION = 90 days;\n\n // solhint-disable-next-line\n uint256 public override START_TIME; // Starting time of the rewards distribution\n\n // solhint-disable-next-line\n uint256 public immutable BABL_STRATEGIST_SHARE;\n // solhint-disable-next-line\n uint256 public immutable BABL_STEWARD_SHARE;\n // solhint-disable-next-line\n uint256 public immutable BABL_LP_SHARE;\n // solhint-disable-next-line\n uint256 public immutable PROFIT_STRATEGIST_SHARE;\n // solhint-disable-next-line\n uint256 public immutable PROFIT_STEWARD_SHARE;\n // solhint-disable-next-line\n uint256 public immutable PROFIT_LP_SHARE;\n // solhint-disable-next-line\n uint256 public immutable PROFIT_PROTOCOL_FEE;\n // solhint-disable-next-line\n uint256 public immutable CREATOR_BONUS;\n\n // DAI normalize asset\n address private constant DAI = 0x6B175474E89094C44Da98b954EedeAC495271d0F;\n\n /* ============ Structs ============ */\n\n struct ProtocolPerTimestamp {\n // Protocol allocation checkpoints per timestamp along the time\n uint256 principal; // Protocol principal allocation in normalized asset (DAI)\n uint256 time; // Time of the checkpoint\n uint256 quarterBelonging; // # Quarter checkpoint belonging since START_TIME\n uint256 timeListPointer; // Pointer to the array of timestamps to enable the possibility of struct iteration\n uint256 power; // Protocol power checkpoint (power is proportional to = principal * duration)\n }\n\n struct ProtocolPerQuarter {\n // Protocol allocation checkpoints per timestamp per each quarter along the time\n uint256 quarterPrincipal; // Checkpoint to keep track on accumulated protocol principal per quarter in normalized asset (DAI)\n uint256 quarterNumber; // # Quarter since START_TIME\n uint256 quarterPower; // Accumulated Protocol power for each quarter\n uint96 supplyPerQuarter; // Supply per quarter\n }\n\n struct GardenPowerByTimestamp {\n // Garden allocation checkpoints per timestamp per each garden\n uint256 supply; // Checkpoint to keep track on garden supply\n uint256 timestamp; // Checkpoint timestamps\n uint256 power; // Garden power checkpoint (power is proportional to = principal * duration)\n }\n struct ContributorPerGarden {\n // Checkpoints to keep track on the evolution of each contributor vs. each garden\n uint256 lastDepositAt; // Last deposit timestamp of each contributor in each garden\n uint256 initialDepositAt; // Checkpoint of the initial deposit\n uint256[] timeListPointer; // Array of timestamps for each user in each garden\n uint256 pid; // Garden contributor checkpoints counter to enable iteration\n mapping(uint256 => TimestampContribution) tsContributions; // Sub-mapping all the contributor checkpoints\n }\n\n struct TimestampContribution {\n // Sub-mapping with all checkpoints for deposits and withdrawals of garden users\n uint256 supply; // Garden token balance of user in each garden along the time\n uint256 timestamp; // Checkpoint time\n uint256 timePointer; // Pointer\n uint256 power; // Contributor power per checkpoint\n }\n struct Checkpoints {\n // Checkpoints for contributor power calculations where a certain window (from -> to) is queried\n uint256 fromDepositAt; // First contributor checkpoint within the provided window\n uint256 lastDepositAt; // Last contributor checkpoint within the provided window\n uint256 gardenFromDepositAt; // First contributor checkpoint within the provided window\n uint256 gardenLastDepositAt; // Last garden checkpoint within the provided window\n }\n\n /* ============ State Variables ============ */\n\n // Instance of the Controller contract\n IBabController public controller;\n\n // BABL Token contract\n TimeLockedToken public babltoken;\n\n // Protocol total allocation points. Must be the sum of all allocation points (strategyPrincipal) in all strategy pools.\n uint256 public override protocolPrincipal;\n mapping(uint256 => ProtocolPerTimestamp) public protocolPerTimestamp; // Mapping of all protocol checkpoints\n uint256[] public timeList; // Array of all protocol checkpoints\n uint256 public override pid; // Initialization of the ID assigning timeListPointer to the checkpoint number\n\n mapping(uint256 => ProtocolPerQuarter) public protocolPerQuarter; // Mapping of the accumulated protocol per each active quarter\n mapping(uint256 => bool) public isProtocolPerQuarter; // Check if the protocol per quarter data has been initialized\n\n // Strategy overhead control. Only used if each strategy has power overhead due to changes overtime\n mapping(address => mapping(uint256 => uint256)) public rewardsPowerOverhead; // Overhead control to enable high level accuracy calculations for strategy rewards\n // Contributor power control\n mapping(address => mapping(address => ContributorPerGarden)) public contributorPerGarden; // Enable high level accuracy calculations\n mapping(address => mapping(address => Checkpoints)) private checkpoints;\n // Garden power control\n mapping(address => mapping(uint256 => GardenPowerByTimestamp)) public gardenPowerByTimestamp;\n mapping(address => uint256[]) public gardenTimelist;\n mapping(address => uint256) public gardenPid;\n\n /* ============ Constructor ============ */\n\n constructor(TimeLockedToken _bablToken, IBabController _controller) {\n require(address(_bablToken) != address(0), 'Token needs to exist');\n require(address(_controller) != address(0), 'Controller needs to exist');\n babltoken = _bablToken;\n controller = _controller;\n\n (BABL_STRATEGIST_SHARE, BABL_STEWARD_SHARE, BABL_LP_SHARE, CREATOR_BONUS) = controller.getBABLSharing();\n (PROFIT_STRATEGIST_SHARE, PROFIT_STEWARD_SHARE, PROFIT_LP_SHARE) = controller.getProfitSharing();\n PROFIT_PROTOCOL_FEE = controller.protocolPerformanceFee();\n }\n\n /* ============ External Functions ============ */\n\n /**\n * Function that adds the capital received to the total principal of the protocol per timestamp\n * @param _capital Amount of capital in any type of asset to be normalized into DAI\n */\n function addProtocolPrincipal(uint256 _capital) external override onlyStrategy onlyMiningActive {\n IStrategy strategy = IStrategy(msg.sender);\n if (strategy.enteredAt() >= START_TIME) {\n // onlyMiningActive control, it does not create a checkpoint if the strategy is not part of the Mining Program\n _updateProtocolPrincipal(address(strategy), _capital, true);\n }\n }\n\n /**\n * Function that removes the capital received to the total principal of the protocol per timestamp\n * @param _capital Amount of capital in any type of asset to be normalized into DAI\n */\n function substractProtocolPrincipal(uint256 _capital) external override onlyStrategy onlyMiningActive {\n IStrategy strategy = IStrategy(msg.sender);\n if (strategy.enteredAt() >= START_TIME) {\n // onlyMiningActive control, it does not create a checkpoint if the strategy is not part of the Mining Program\n _updateProtocolPrincipal(address(strategy), _capital, false);\n }\n }\n\n /**\n * Gets the total amount of rewards for a given strategy\n * @param _strategy Strategy to check\n */\n function getStrategyRewards(address _strategy) external view override returns (uint96) {\n IStrategy strategy = IStrategy(_strategy);\n _require(strategy.exitedAt() != 0, Errors.STRATEGY_IS_NOT_OVER_YET);\n IPriceOracle oracle = IPriceOracle(IBabController(controller).priceOracle());\n uint256 pricePerTokenUnit = oracle.getPrice(IGarden(strategy.garden()).reserveAsset(), DAI);\n uint256 allocated = strategy.capitalAllocated().preciseMul(pricePerTokenUnit);\n uint256 returned = strategy.capitalReturned().preciseMul(pricePerTokenUnit);\n if ((strategy.enteredAt() >= START_TIME) && (START_TIME != 0)) {\n // We avoid gas consuming once a strategy got its BABL rewards during its finalization\n uint256 rewards = strategy.strategyRewards();\n if (rewards != 0) {\n return Safe3296.safe96(rewards, 'overflow 96 bits');\n }\n // If the calculation was not done earlier we go for it\n (uint256 numQuarters, uint256 startingQuarter) =\n _getRewardsWindow(strategy.executedAt(), strategy.exitedAt());\n uint256 bablRewards = 0;\n if (numQuarters <= 1) {\n bablRewards = _getStrategyRewardsOneQuarter(_strategy, allocated, startingQuarter); // Proportional supply till that moment within the same epoch\n _require(\n bablRewards <= protocolPerQuarter[startingQuarter].supplyPerQuarter,\n Errors.OVERFLOW_IN_SUPPLY\n );\n _require(\n allocated.mul(strategy.exitedAt().sub(strategy.executedAt())).sub(\n strategy.rewardsTotalOverhead()\n ) <= protocolPerQuarter[startingQuarter].quarterPower,\n Errors.OVERFLOW_IN_POWER\n );\n } else {\n bablRewards = _getStrategyRewardsSomeQuarters(_strategy, allocated, startingQuarter, numQuarters);\n }\n\n // Babl rewards will be proportional to the total return (profit) with a max cap of x2\n uint256 percentageMul = returned.preciseDiv(allocated);\n if (percentageMul > 2e18) percentageMul = 2e18;\n bablRewards = bablRewards.preciseMul(percentageMul);\n return Safe3296.safe96(bablRewards, 'overflow 96 bits');\n } else {\n return 0;\n }\n }\n\n /**\n * Sends BABL tokens rewards to a contributor after a claim is requested to the protocol.\n * @param _to Address to send the tokens to\n * @param _amount Amount of tokens to send the address to\n */\n function sendTokensToContributor(address _to, uint96 _amount) external override onlyMiningActive {\n _require(controller.isSystemContract(msg.sender), Errors.NOT_A_SYSTEM_CONTRACT);\n _safeBABLTransfer(_to, _amount);\n }\n\n /**\n * Starts BABL Rewards Mining Program from the controller.\n */\n function startBABLRewards() external onlyController {\n if (START_TIME == 0) {\n // It can only be activated once to avoid overriding START_TIME\n START_TIME = block.timestamp;\n }\n }\n\n /**\n * Function that set each contributor timestamp per garden\n * @param _garden Address of the garden the contributor belongs to\n * @param _contributor Address of the contributor\n * @param _previousBalance Previous balance of the contributor\n * @param _depositOrWithdraw If the timestamp is a deposit (true) or a withdraw (false)\n * @param _pid The pid # of the Garden timestamps\n */\n function setContributorTimestampParams(\n address _garden,\n address _contributor,\n uint256 _previousBalance,\n bool _depositOrWithdraw,\n uint256 _pid\n ) external override onlyActiveGarden(_garden, _pid) {\n _setContributorTimestampParams(_garden, _contributor, _previousBalance, _depositOrWithdraw);\n }\n\n /**\n * Function that set each garden timestamp\n * @param _garden Address of the garden\n * @param _pid The pid # of the Garden timestamp\n */\n function updateGardenPower(address _garden, uint256 _pid) external override onlyActiveGarden(_garden, _pid) {\n _updateGardenPower(_garden);\n }\n\n /* ========== View functions ========== */\n\n /**\n * Calculates the profits and BABL that a contributor should receive from a series of finalized strategies\n * @param _garden Garden to which the strategies and the user must belong to\n * @param _contributor Address of the contributor to check\n * @param _finalizedStrategies List of addresses of the finalized strategies to check\n */\n function getRewards(\n address _garden,\n address _contributor,\n address[] calldata _finalizedStrategies\n ) external view override returns (uint256, uint96) {\n uint256 contributorTotalProfits = 0;\n uint256 bablTotalRewards = 0;\n _require(IBabController(controller).isGarden(address(_garden)), Errors.ONLY_ACTIVE_GARDEN);\n for (uint256 i = 0; i < _finalizedStrategies.length; i++) {\n (uint256 strategyProfits, uint256 strategyBABL) =\n _getStrategyProfitsAndBABL(_garden, _finalizedStrategies[i], _contributor);\n contributorTotalProfits = contributorTotalProfits.add(strategyProfits);\n bablTotalRewards = bablTotalRewards.add(strategyBABL);\n }\n\n return (contributorTotalProfits, Safe3296.safe96(bablTotalRewards, 'R28'));\n }\n\n /**\n * Gets the contributor power from one timestamp to the other\n * @param _garden Address of the garden where the contributor belongs to\n * @param _contributor Address if the contributor\n * @param _from Initial timestamp\n * @param _to End timestamp\n * @return uint256 Contributor power during that period\n */\n function getContributorPower(\n address _garden,\n address _contributor,\n uint256 _from,\n uint256 _to\n ) external view override returns (uint256) {\n return _getContributorPower(_garden, _contributor, _from, _to);\n }\n\n /**\n * Calculates the BABL rewards supply for each quarter\n * @param _quarter Number of the epoch (quarter)\n */\n function tokenSupplyPerQuarter(uint256 _quarter) external pure override returns (uint96) {\n return _tokenSupplyPerQuarter(_quarter);\n }\n\n /**\n * Check the protocol state in a certain timestamp\n * @param time Timestamp\n */\n function checkProtocol(uint256 _time)\n external\n view\n override\n returns (\n uint256 principal,\n uint256 time,\n uint256 quarterBelonging,\n uint256 timeListPointer,\n uint256 power\n )\n {\n return (\n protocolPerTimestamp[_time].principal,\n protocolPerTimestamp[_time].time,\n protocolPerTimestamp[_time].quarterBelonging,\n protocolPerTimestamp[_time].timeListPointer,\n protocolPerTimestamp[_time].power\n );\n }\n\n /**\n * Check the quarter state for a specific quarter\n * @param _num Number of quarter\n */\n function checkQuarter(uint256 _num)\n external\n view\n override\n returns (\n uint256 quarterPrincipal,\n uint256 quarterNumber,\n uint256 quarterPower,\n uint96 supplyPerQuarter\n )\n {\n return (\n protocolPerQuarter[_num].quarterPrincipal,\n protocolPerQuarter[_num].quarterNumber,\n protocolPerQuarter[_num].quarterPower,\n protocolPerQuarter[_num].supplyPerQuarter\n );\n }\n\n /* ============ Internal Functions ============ */\n /**\n * Update the protocol principal checkpoints\n * @param _strategy Strategy which is adding/removing principal\n * @param _capital Capital to update\n * @param _addOrSubstract Adding (true) or removing (false)\n */\n\n function _updateProtocolPrincipal(\n address _strategy,\n uint256 _capital,\n bool _addOrSubstract\n ) internal {\n IStrategy strategy = IStrategy(_strategy);\n // Normalizing into DAI\n IPriceOracle oracle = IPriceOracle(IBabController(controller).priceOracle());\n uint256 pricePerTokenUnit = oracle.getPrice(IGarden(strategy.garden()).reserveAsset(), DAI);\n _capital = _capital.preciseMul(pricePerTokenUnit);\n ProtocolPerTimestamp storage protocolCheckpoint = protocolPerTimestamp[block.timestamp];\n if (_addOrSubstract == false) {\n // Substract\n protocolPrincipal = protocolPrincipal.sub(_capital);\n } else {\n protocolPrincipal = protocolPrincipal.add(_capital);\n }\n protocolCheckpoint.principal = protocolPrincipal;\n protocolCheckpoint.time = block.timestamp;\n protocolCheckpoint.quarterBelonging = _getQuarter(block.timestamp);\n protocolCheckpoint.timeListPointer = pid;\n if (pid == 0) {\n // The very first strategy of all strategies in the mining program\n protocolCheckpoint.power = 0;\n } else {\n // Any other strategy different from the very first one (will have an antecesor)\n protocolCheckpoint.power = protocolPerTimestamp[timeList[pid.sub(1)]].power.add(\n protocolCheckpoint.time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time).mul(\n protocolPerTimestamp[timeList[pid.sub(1)]].principal\n )\n );\n }\n timeList.push(block.timestamp); // Register of added strategies timestamps in the array for iteration\n // Here we control the accumulated protocol power per each quarter\n // Create the quarter checkpoint in case the checkpoint is the first in the epoch\n _addProtocolPerQuarter(block.timestamp);\n // We update the rewards overhead if any in normalized DAI\n _updatePowerOverhead(strategy, _capital);\n pid++;\n }\n\n /**\n * Get the rewards for a specific contributor activately contributing in strategies of a specific garden\n * @param _garden Garden address responsible of the strategies to calculate rewards\n * @param _strategy Strategy address\n * @param _contributor Contributor address\n */\n function _getStrategyProfitsAndBABL(\n address _garden,\n address _strategy,\n address _contributor\n ) private view returns (uint256, uint256) {\n IStrategy strategy = IStrategy(_strategy);\n _require(address(strategy.garden()) == _garden, Errors.STRATEGY_GARDEN_MISMATCH);\n _require(IGarden(_garden).isGardenStrategy(_strategy), Errors.STRATEGY_GARDEN_MISMATCH);\n uint256 contributorProfits = 0;\n uint256 contributorBABL = 0;\n // We get the state of the strategy in terms of profit and distance from expected to accurately calculate profits and rewards\n (bool profit, uint256 profitValue, bool distance, uint256 distanceValue) =\n _getStrategyRewardsContext(address(strategy));\n\n (, uint256 initialDepositAt, uint256 claimedAt, , , ) = IGarden(_garden).getContributor(_contributor);\n // Positive strategies not yet claimed\n if (\n strategy.exitedAt() > claimedAt &&\n strategy.executedAt() >= initialDepositAt &&\n address(strategy.garden()) == _garden\n ) {\n uint256 contributorPower =\n _getContributorPower(address(_garden), _contributor, strategy.executedAt(), strategy.exitedAt());\n // If strategy returned money we give out the profits\n if (profit == true) {\n // We reserve 5% of profits for performance fees\n profitValue = profitValue.sub(profitValue.multiplyDecimal(PROFIT_PROTOCOL_FEE));\n }\n // Get strategist rewards in case the contributor is also the strategist of the strategy\n contributorBABL = contributorBABL.add(\n _getStrategyStrategistBabl(\n address(strategy),\n _contributor,\n profit,\n profitValue,\n distance,\n distanceValue\n )\n );\n\n contributorProfits = contributorProfits.add(\n _getStrategyStrategistProfits(address(strategy), _contributor, profit, profitValue)\n );\n\n // Get steward rewards\n contributorBABL = contributorBABL.add(\n _getStrategyStewardBabl(address(strategy), _contributor, profit, profitValue, distance, distanceValue)\n );\n\n contributorProfits = contributorProfits.add(\n _getStrategyStewardProfits(\n address(strategy),\n _contributor,\n profit,\n profitValue,\n distance,\n distanceValue\n )\n );\n\n // Get LP rewards\n\n contributorBABL = contributorBABL.add(\n uint256(strategy.strategyRewards()).multiplyDecimal(BABL_LP_SHARE).preciseMul(\n contributorPower.preciseDiv(strategy.capitalAllocated())\n )\n );\n\n // Get a multiplier bonus in case the contributor is the garden creator\n if (_contributor == IGarden(_garden).creator()) {\n contributorBABL = contributorBABL.add(contributorBABL.multiplyDecimal(CREATOR_BONUS));\n }\n }\n return (contributorProfits, contributorBABL);\n }\n\n /**\n * Get the context of a specific address depending on their expected returns, capital allocated and capital returned\n * @param _strategy Strategy address\n */\n function _getStrategyRewardsContext(address _strategy)\n private\n view\n returns (\n bool,\n uint256,\n bool,\n uint256\n )\n {\n IStrategy strategy = IStrategy(_strategy);\n uint256 returned = strategy.capitalReturned();\n uint256 expected =\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\n uint256 allocated = strategy.capitalAllocated();\n bool profit;\n bool distance;\n uint256 profitValue;\n uint256 distanceValue;\n if (returned > allocated && returned >= expected) {\n // The strategy went equal or above expectations\n profit = true; // positive\n distance = true; // positive\n profitValue = returned.sub(allocated);\n distanceValue = returned.sub(expected);\n } else if (returned >= allocated && returned < expected) {\n // The strategy went worse than expected but with some profits\n profit = true; // positive or zero profits\n distance = false; // negative vs expected return (got less than expected)\n profitValue = returned.sub(allocated);\n distanceValue = expected.sub(returned);\n } else if (returned < allocated && returned < expected) {\n // Negative profits - bad investments has penalties\n profit = false; // negative - loosing capital\n distance = false; // negative vs expected return (got less than expected)\n profitValue = allocated.sub(returned); // Negative number, there were no profits at all\n distanceValue = expected.sub(returned);\n }\n\n return (profit, profitValue, distance, distanceValue);\n }\n\n /**\n * Get the BABL rewards (Mining program) for a Steward profile\n * @param _strategy Strategy address\n * @param _contributor Contributor address\n * @param _profit Whether or not the strategy had profits\n * @param _distance If true the results were above expected returns, false means opposite\n * @param _distanceValue The distance from/to expected returns for capital returned\n */\n function _getStrategyStewardBabl(\n address _strategy,\n address _contributor,\n bool _profit,\n uint256, /* _profitValue */\n bool _distance,\n uint256 _distanceValue\n ) private view returns (uint256) {\n IStrategy strategy = IStrategy(_strategy);\n uint256 strategyRewards = strategy.strategyRewards();\n int256 userVotes = strategy.getUserVotes(_contributor);\n uint256 bablCap;\n uint256 expected =\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\n\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\n uint256 babl = 0;\n if (userVotes > 0 && _profit == true && _distance == true) {\n // Voting in favor of the execution of the strategy with profits and positive distance\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\n uint256(userVotes).preciseDiv(strategy.totalPositiveVotes())\n );\n } else if (userVotes > 0 && _profit == true && _distance == false) {\n // Voting in favor positive profits but below expected return\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\n uint256(userVotes).preciseDiv(strategy.totalPositiveVotes())\n );\n babl = babl.sub(babl.preciseMul(_distanceValue.preciseDiv(expected))); // We discount the error of expected return vs real returns\n } else if (userVotes > 0 && _profit == false) {\n // Voting in favor of a non profitable strategy get nothing\n babl = 0;\n } else if (userVotes < 0 && _distance == false) {\n // Voting against a strategy that got results below expected return provides rewards to the voter (helping the protocol to only have good strategies)\n babl = strategyRewards.multiplyDecimal(BABL_STEWARD_SHARE).preciseMul(\n uint256(Math.abs(userVotes)).preciseDiv(strategy.totalNegativeVotes())\n );\n\n bablCap = babl.mul(2); // Max cap\n babl = babl.add(babl.preciseMul(_distanceValue.preciseDiv(expected))); // We add a bonus inverse to the error of expected return vs real returns\n\n if (babl > bablCap) babl = bablCap; // We limit 2x by a Cap\n } else if (userVotes < 0 && _distance == true) {\n babl = 0;\n }\n return babl;\n }\n\n /**\n * Get the rewards for a Steward profile\n * @param _strategy Strategy address\n * @param _contributor Contributor address\n * @param _profit Whether or not the strategy had profits\n * @param _profitValue The value of profits\n * @param _distance If true the results were above expected returns, false means opposite\n */\n function _getStrategyStewardProfits(\n address _strategy,\n address _contributor,\n bool _profit,\n uint256 _profitValue,\n bool _distance,\n uint256 /* _distanceValue */\n ) private view returns (uint256) {\n IStrategy strategy = IStrategy(_strategy);\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\n uint256 profits = 0;\n int256 userVotes = strategy.getUserVotes(_contributor);\n if (_profit == true) {\n if (userVotes > 0) {\n profits = _profitValue.multiplyDecimal(PROFIT_STEWARD_SHARE).preciseMul(uint256(userVotes)).preciseDiv(\n strategy.totalPositiveVotes()\n );\n } else if ((userVotes < 0) && _distance == false) {\n profits = _profitValue\n .multiplyDecimal(PROFIT_STEWARD_SHARE)\n .preciseMul(uint256(Math.abs(userVotes)))\n .preciseDiv(strategy.totalNegativeVotes());\n } else if ((userVotes < 0) && _distance == true) {\n // Voted against a very profit strategy above expected returns, get no profit at all\n profits = 0;\n }\n } else profits = 0; // No profits at all\n\n return profits;\n }\n\n /**\n * Get the BABL rewards (Mining program) for a Strategist profile\n * @param _strategy Strategy address\n * @param _contributor Contributor address\n * @param _profit Whether or not the strategy had profits\n * @param _distance If true the results were above expected returns, false means opposite\n */\n function _getStrategyStrategistBabl(\n address _strategy,\n address _contributor,\n bool _profit,\n uint256, /* _profitValue */\n bool _distance,\n uint256 /* _distanceValue */\n ) private view returns (uint256) {\n IStrategy strategy = IStrategy(_strategy);\n uint256 strategyRewards = strategy.strategyRewards();\n uint256 babl;\n uint256 bablCap;\n uint256 expected =\n strategy.capitalAllocated().add(strategy.capitalAllocated().preciseMul(strategy.expectedReturn()));\n if (strategy.strategist() == _contributor) {\n babl = strategyRewards.multiplyDecimal(BABL_STRATEGIST_SHARE); // Standard calculation to be ponderated\n if (_profit == true && _distance == true) {\n // Strategy with equal or higher profits than expected\n bablCap = babl.mul(2); // Max cap\n // The more the results are close to the expected the more bonus will get (limited by a x2 cap)\n babl = babl.add(babl.preciseMul(expected.preciseDiv(strategy.capitalReturned())));\n if (babl > bablCap) babl = bablCap; // We limit 2x by a Cap\n } else if (_profit == true && _distance == false) {\n //under expectations\n // The more the results are close to the expected the less penalization it might have\n babl = babl.sub(babl.sub(babl.preciseMul(strategy.capitalReturned().preciseDiv(expected))));\n } else {\n // No positive profit\n return 0;\n }\n } else {\n return 0;\n }\n return babl;\n }\n\n /**\n * Get the rewards for a Strategist profile\n * @param _strategy Strategy address\n * @param _contributor Contributor address\n * @param _profit Whether or not the strategy had profits\n * @param _profitValue The value of profits\n */\n function _getStrategyStrategistProfits(\n address _strategy,\n address _contributor,\n bool _profit,\n uint256 _profitValue\n ) private view returns (uint256) {\n IStrategy strategy = IStrategy(_strategy);\n // Get proportional voter (stewards) rewards in case the contributor was also a steward of the strategy\n uint256 profits;\n if (_profit == true) {\n if (strategy.strategist() == _contributor) {\n // If the contributor was the strategist of the strategy\n profits = _profitValue.multiplyDecimal(PROFIT_STRATEGIST_SHARE);\n }\n } else profits = 0; // No profits at all\n\n return profits;\n }\n\n /**\n * Add protocol power timestamps for each quarter\n * @param _time Timestamp\n */\n function _addProtocolPerQuarter(uint256 _time) private onlyMiningActive {\n ProtocolPerQuarter storage protocolCheckpoint = protocolPerQuarter[_getQuarter(_time)];\n\n if (!isProtocolPerQuarter[_getQuarter(_time).sub(1)]) {\n // The quarter is not yet initialized then we create it\n protocolCheckpoint.quarterNumber = _getQuarter(_time);\n if (pid == 0) {\n // The first strategy added in the first epoch\n protocolCheckpoint.quarterPower = 0;\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\n } else {\n // Each time a new epoch starts with either a new strategy execution or finalization\n // We just take the proportional power for this quarter from previous checkpoint\n uint256 powerToSplit =\n protocolPerTimestamp[_time].power.sub(protocolPerTimestamp[timeList[pid.sub(1)]].power);\n if (protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging == _getQuarter(_time).sub(1)) {\n // There were no intermediate epochs without checkpoints\n // We re-initialize the protocol power counting for this new quarter\n protocolCheckpoint.quarterPower = powerToSplit\n .mul(_time.sub(START_TIME.add(_getQuarter(_time).mul(EPOCH_DURATION).sub(EPOCH_DURATION))))\n .div(_time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time));\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\n\n protocolPerQuarter[_getQuarter(_time).sub(1)].quarterPower = protocolPerQuarter[\n _getQuarter(_time).sub(1)\n ]\n .quarterPower\n .add(powerToSplit.sub(protocolCheckpoint.quarterPower));\n } else {\n // There were intermediate epochs without checkpoints - we need to create their protocolPerQuarter's and update the last one\n // We have to update all the quarters including where the previous checkpoint is and the one were we are now\n for (\n uint256 i = 0;\n i <= _getQuarter(_time).sub(protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging);\n i++\n ) {\n ProtocolPerQuarter storage newCheckpoint =\n protocolPerQuarter[protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i)];\n uint256 slotEnding =\n START_TIME.add(\n protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i).mul(EPOCH_DURATION)\n );\n if (i == 0) {\n // We are in the first quarter to update, we add the corresponding part\n\n newCheckpoint.quarterPower = newCheckpoint.quarterPower.add(\n powerToSplit.mul(slotEnding.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)).div(\n _time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)\n )\n );\n newCheckpoint.quarterPrincipal = protocolPerTimestamp[timeList[pid.sub(1)]].principal;\n } else if (\n i < _getQuarter(_time).sub(protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging)\n ) {\n // We are in an intermediate quarter\n newCheckpoint.quarterPower = powerToSplit.mul(EPOCH_DURATION).div(\n _time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time)\n );\n newCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(\n protocolPerTimestamp[timeList[pid.sub(1)]].quarterBelonging.add(i)\n );\n newCheckpoint.quarterNumber = protocolPerTimestamp[timeList[pid.sub(1)]]\n .quarterBelonging\n .add(i);\n newCheckpoint.quarterPrincipal = protocolPerTimestamp[timeList[pid.sub(1)]].principal;\n } else {\n // We are in the last quarter of the strategy\n protocolCheckpoint.quarterPower = powerToSplit\n .mul(\n _time.sub(START_TIME.add(_getQuarter(_time).mul(EPOCH_DURATION).sub(EPOCH_DURATION)))\n )\n .div(_time.sub(protocolPerTimestamp[timeList[pid.sub(1)]].time));\n protocolCheckpoint.supplyPerQuarter = _tokenSupplyPerQuarter(_getQuarter(_time));\n protocolCheckpoint.quarterNumber = _getQuarter(_time);\n protocolCheckpoint.quarterPrincipal = protocolPrincipal;\n }\n }\n }\n }\n isProtocolPerQuarter[_getQuarter(_time).sub(1)] = true;\n } else {\n // Quarter checkpoint already created, it must have been filled with general info\n // We update the power of the quarter by adding the new difference between last quarter checkpoint and this checkpoint\n protocolCheckpoint.quarterPower = protocolCheckpoint.quarterPower.add(\n protocolPerTimestamp[_time].power.sub(protocolPerTimestamp[timeList[pid.sub(1)]].power)\n );\n }\n protocolCheckpoint.quarterPrincipal = protocolPrincipal;\n }\n\n /**\n * Updates the strategy power overhead for rewards calculations of each strategy out of the whole protocol\n * @param _strategy Strategy\n * @param _capital New capital normalized in DAI\n */\n function _updatePowerOverhead(IStrategy _strategy, uint256 _capital) private onlyMiningActive {\n if (_strategy.updatedAt() != 0) {\n // There will be overhead after the first execution not before\n if (_getQuarter(block.timestamp) == _getQuarter(_strategy.updatedAt())) {\n // The overhead will remain within the same epoch\n rewardsPowerOverhead[address(_strategy)][_getQuarter(block.timestamp)] = rewardsPowerOverhead[\n address(_strategy)\n ][_getQuarter(block.timestamp)]\n .add(_capital.mul(block.timestamp.sub(_strategy.updatedAt())));\n } else {\n // We need to iterate since last update of the strategy capital\n (uint256 numQuarters, uint256 startingQuarter) =\n _getRewardsWindow(_strategy.updatedAt(), block.timestamp);\n uint256 overheadPerQuarter = _capital.mul(block.timestamp.sub(_strategy.updatedAt())).div(numQuarters);\n for (uint256 i = 0; i <= numQuarters.sub(1); i++) {\n rewardsPowerOverhead[address(_strategy)][startingQuarter.add(i)] = rewardsPowerOverhead[\n address(_strategy)\n ][startingQuarter.add(i)]\n .add(overheadPerQuarter);\n }\n }\n }\n }\n\n /**\n * Check the strategy rewards for strategies starting and ending in the same quarter\n * @param _strategy Strategy\n * @param _startingQuarter Starting quarter\n */\n function _getStrategyRewardsOneQuarter(\n address _strategy,\n uint256 _allocated,\n uint256 _startingQuarter\n ) private view onlyMiningActive returns (uint256) {\n IStrategy strategy = IStrategy(_strategy);\n uint256 strategyOverTime =\n _allocated.mul(strategy.exitedAt().sub(strategy.executedAt())).sub(strategy.rewardsTotalOverhead());\n return\n strategyOverTime\n .preciseDiv(protocolPerQuarter[_startingQuarter].quarterPower)\n .preciseMul(uint256(protocolPerQuarter[_startingQuarter].supplyPerQuarter))\n .mul(strategy.exitedAt().sub(_startingQuarter))\n .div(block.timestamp.sub(_startingQuarter));\n }\n\n /**\n * Check the strategy rewards for strategies starting and ending in different quarters and/or more quarters\n * @param _strategy Strategy\n * @param _allocated Normalized allocated in DAI\n * @param _startingQuarter Starting quarter\n * @param _numQuarters Num of Quarters (in epochs)\n */\n function _getStrategyRewardsSomeQuarters(\n address _strategy,\n uint256 _allocated,\n uint256 _startingQuarter,\n uint256 _numQuarters\n ) private view onlyMiningActive returns (uint256) {\n // The strategy takes longer than one quarter / epoch\n uint256 bablRewards;\n for (uint256 i = 0; i <= _numQuarters.sub(1); i++) {\n uint256 slotEnding = START_TIME.add(_startingQuarter.add(i).mul(EPOCH_DURATION)); // Initialization timestamp at the end of the first slot where the strategy starts its execution\n uint256 powerRatioInQuarter =\n _getStrategyRewardsPerQuarter(_strategy, _allocated, _startingQuarter, i, slotEnding);\n bablRewards = bablRewards.add(powerRatioInQuarter);\n }\n return bablRewards;\n }\n\n /**\n * Check the strategy rewards for a specific quarter when strategies starting and ending in different quarters and/or more quarters\n * @param _strategy Strategy\n * @param _allocated Normalized allocated in DAI\n * @param _startingQuarter Starting quarter\n * @param _id Epoch number\n * @param _slotEnding Ending slot timestamp of current slot (epoch)\n */\n function _getStrategyRewardsPerQuarter(\n address _strategy,\n uint256 _allocated,\n uint256 _startingQuarter,\n uint256 _id,\n uint256 _slotEnding\n ) private view onlyMiningActive returns (uint256) {\n // The strategy takes longer than one quarter / epoch\n // We need to calculate the strategy vs. protocol power ratio per each quarter\n uint256 strategyPower; // Strategy power in each Epoch\n uint256 protocolPower; // Protocol power in each Epoch\n\n // We iterate all the quarters where the strategy was active\n uint256 percentage = 1e18;\n if (IStrategy(_strategy).executedAt().add(EPOCH_DURATION) > _slotEnding) {\n // We are in the first quarter of the strategy\n\n strategyPower = _allocated.mul(_slotEnding.sub(IStrategy(_strategy).executedAt())).sub(\n rewardsPowerOverhead[address(_strategy)][_getQuarter(IStrategy(_strategy).executedAt())]\n );\n } else if (\n IStrategy(_strategy).executedAt() < _slotEnding.sub(EPOCH_DURATION) &&\n _slotEnding < IStrategy(_strategy).exitedAt()\n ) {\n // We are in an intermediate quarter different from starting or ending quarters\n strategyPower = _allocated.mul(_slotEnding.sub(_slotEnding.sub(EPOCH_DURATION))).sub(\n rewardsPowerOverhead[address(_strategy)][_getQuarter(_slotEnding.sub(45 days))]\n );\n } else {\n // We are in the last quarter of the strategy\n percentage = block.timestamp.sub(_slotEnding.sub(EPOCH_DURATION)).preciseDiv(\n _slotEnding.sub(_slotEnding.sub(EPOCH_DURATION))\n );\n\n strategyPower = _allocated.mul(IStrategy(_strategy).exitedAt().sub(_slotEnding.sub(EPOCH_DURATION))).sub(\n rewardsPowerOverhead[address(_strategy)][_getQuarter(IStrategy(_strategy).exitedAt())]\n );\n }\n protocolPower = protocolPerQuarter[_startingQuarter.add(_id)].quarterPower;\n\n _require(strategyPower <= protocolPower, Errors.OVERFLOW_IN_POWER);\n\n return\n strategyPower\n .preciseDiv(protocolPower)\n .preciseMul(uint256(protocolPerQuarter[_startingQuarter.add(_id)].supplyPerQuarter))\n .preciseMul(percentage);\n }\n\n /**\n * Safe BABL rewards (Mining program) token transfer.\n * It handle cases when in case of rounding errors, RewardsDistributor might not have enough BABL.\n * @param _to The receiver address of the contributor to send\n * @param _amount The amount of BABL tokens to be rewarded during this claim\n */\n function _safeBABLTransfer(address _to, uint96 _amount) private onlyMiningActive {\n uint256 bablBal = babltoken.balanceOf(address(this));\n if (_amount > bablBal) {\n SafeERC20.safeTransfer(babltoken, _to, bablBal);\n } else {\n SafeERC20.safeTransfer(babltoken, _to, _amount);\n }\n }\n\n /**\n * Gets the contributor power from a timestamp to a specific timestamp within a garden\n * @param _garden Address of the garden\n * @param _contributor Address if the contributor\n * @param _from Initial timestamp\n * @param _to End timestamp\n * @return uint256 Contributor power during that period\n */\n function _getContributorPower(\n address _garden,\n address _contributor,\n uint256 _from,\n uint256 _to\n ) private view returns (uint256) {\n // Out of bounds\n _require(_to >= IGarden(_garden).gardenInitializedAt() && _to >= _from, Errors.CONTRIBUTOR_POWER_CHECK_WINDOW);\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][address(_contributor)];\n Checkpoints memory powerCheckpoints = checkpoints[address(_garden)][address(_contributor)];\n\n if (contributor.initialDepositAt == 0 || contributor.initialDepositAt > _to) {\n return 0;\n } else {\n if (_from <= IGarden(_garden).gardenInitializedAt()) {\n // Avoid division by zero in case of _from parameter is not passed\n _from = IGarden(_garden).gardenInitializedAt();\n }\n // Find closest point to _from and _to either contributor and garden checkpoints at their left\n (powerCheckpoints.fromDepositAt, powerCheckpoints.lastDepositAt) = _locateCheckpointsContributor(\n _garden,\n _contributor,\n _from,\n _to\n );\n (powerCheckpoints.gardenFromDepositAt, powerCheckpoints.gardenLastDepositAt) = _locateCheckpointsGarden(\n _garden,\n _from,\n _to\n );\n\n // origin must be less than end window\n _require(\n powerCheckpoints.fromDepositAt <= powerCheckpoints.lastDepositAt &&\n powerCheckpoints.gardenFromDepositAt <= powerCheckpoints.gardenLastDepositAt,\n Errors.CONTRIBUTOR_POWER_CHECK_DEPOSITS\n );\n uint256 contributorPower;\n uint256 gardenPower;\n\n // \"FROM power calculations\" PART\n // Avoid underflows\n\n if (_from < powerCheckpoints.fromDepositAt) {\n // Contributor still has no power but _from is later than the start of the garden\n contributorPower = 0;\n } else if (_from > powerCheckpoints.fromDepositAt) {\n contributorPower = contributor.tsContributions[powerCheckpoints.fromDepositAt].power.add(\n (_from.sub(powerCheckpoints.fromDepositAt)).mul(\n contributor.tsContributions[powerCheckpoints.fromDepositAt].supply\n )\n );\n } else {\n // _from == fromDepositAt\n contributorPower = contributor.tsContributions[powerCheckpoints.fromDepositAt].power;\n }\n gardenPower = gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenFromDepositAt].power.add(\n (_from.sub(powerCheckpoints.gardenFromDepositAt)).mul(\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenFromDepositAt].supply\n )\n );\n // \"TO power calculations\" PART\n // We go for accurate power calculations avoiding overflows\n // contributor power overflow\n _require(contributorPower <= gardenPower, Errors.CONTRIBUTOR_POWER_OVERFLOW);\n if (_from == _to) {\n // Requested a specific checkpoint calculation (no slot)\n if (gardenPower == 0) {\n return 0;\n } else {\n return contributorPower.preciseDiv(gardenPower);\n }\n // Not a checkpoint anymore but a slot\n } else if (_to < powerCheckpoints.lastDepositAt) {\n // contributor has not deposited yet\n return 0;\n } else if (\n _to == powerCheckpoints.lastDepositAt &&\n powerCheckpoints.fromDepositAt == powerCheckpoints.lastDepositAt\n ) {\n // no more contributor checkpoints in the slot\n gardenPower = (\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].power.add(\n (_to.sub(powerCheckpoints.gardenLastDepositAt)).mul(\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].supply\n )\n )\n )\n .sub(gardenPower);\n _require(contributorPower <= gardenPower, Errors.CONTRIBUTOR_POWER_OVERFLOW);\n return contributorPower.preciseDiv(gardenPower);\n } else {\n contributorPower = (\n contributor.tsContributions[powerCheckpoints.lastDepositAt].power.add(\n (_to.sub(powerCheckpoints.lastDepositAt)).mul(\n contributor.tsContributions[powerCheckpoints.lastDepositAt].supply\n )\n )\n )\n .sub(contributorPower);\n\n gardenPower = (\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].power.add(\n (_to.sub(powerCheckpoints.gardenLastDepositAt)).mul(\n gardenPowerByTimestamp[address(_garden)][powerCheckpoints.gardenLastDepositAt].supply\n )\n )\n )\n .sub(gardenPower);\n _require(contributorPower <= gardenPower, Errors.CONTRIBUTOR_POWER_OVERFLOW);\n\n return contributorPower.preciseDiv(gardenPower);\n }\n }\n }\n\n /**\n * Gets the earlier and closest (deposit/withdrawal) checkpoints of a contributor in a specific range\n * @param _garden Address of the garden\n * @param _contributor Address if the contributor\n * @param _from Initial timestamp\n * @param _to End timestamp\n * @return uint256 Contributor power during that period\n */\n function _locateCheckpointsContributor(\n address _garden,\n address _contributor,\n uint256 _from,\n uint256 _to\n ) private view returns (uint256, uint256) {\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][address(_contributor)];\n\n uint256 lastDepositAt = contributor.timeListPointer[contributor.timeListPointer.length.sub(1)]; // Initialized with lastDeposit\n uint256 fromDepositAt = contributor.timeListPointer[0]; // Initialized with initialDeposit\n\n if (lastDepositAt > _to || fromDepositAt < _from) {\n // We go to find the closest deposits of the contributor to _from and _to\n for (uint256 i = 0; i <= contributor.timeListPointer.length.sub(1); i++) {\n if (contributor.timeListPointer[i] <= _to) {\n lastDepositAt = contributor.timeListPointer[i];\n }\n if (contributor.timeListPointer[i] <= _from) {\n fromDepositAt = contributor.timeListPointer[i];\n }\n }\n }\n return (fromDepositAt, lastDepositAt);\n }\n\n /**\n * Gets the earlier and closest (deposit/withdrawal) checkpoints of a garden in a specific range\n * @param _garden Address of the garden\n * @param _from Initial timestamp\n * @param _to End timestamp\n * @return uint256 Contributor power during that period\n */\n function _locateCheckpointsGarden(\n address _garden,\n uint256 _from,\n uint256 _to\n ) private view returns (uint256, uint256) {\n uint256 gardenLastCheckpoint = gardenTimelist[address(_garden)].length.sub(1);\n uint256 gardenLastDepositAt = gardenTimelist[address(_garden)][gardenLastCheckpoint]; // Initialized to the last garden checkpoint\n uint256 gardenFromDepositAt = gardenTimelist[address(_garden)][0]; // Initialized to the first garden checkpoint\n\n if (gardenLastDepositAt > _to || gardenFromDepositAt < _from) {\n // We go for the closest timestamp of garden to _to and _from\n for (uint256 i = 0; i <= gardenLastCheckpoint; i++) {\n uint256 gardenTime = gardenTimelist[address(_garden)][i];\n if (gardenTime <= _to) {\n gardenLastDepositAt = gardenTime;\n }\n if (gardenTime <= _from) {\n gardenFromDepositAt = gardenTime;\n }\n }\n }\n return (gardenFromDepositAt, gardenLastDepositAt);\n }\n\n /**\n * Function that keeps checkpoints of the garden power (deposits and withdrawals) per timestamp\n * @param _garden Garden address\n */\n function _updateGardenPower(address _garden) private {\n IGarden garden = IGarden(_garden);\n GardenPowerByTimestamp storage gardenTimestamp = gardenPowerByTimestamp[address(garden)][block.timestamp];\n gardenTimestamp.supply = IERC20(address(IGarden(_garden))).totalSupply();\n\n gardenTimestamp.timestamp = block.timestamp;\n\n if (gardenPid[address(_garden)] == 0) {\n // The very first deposit of all contributors in the mining program\n gardenTimestamp.power = 0;\n } else {\n // Any other deposit different from the very first one (will have an antecesor)\n gardenTimestamp.power = gardenPowerByTimestamp[address(garden)][\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\n ]\n .power\n .add(\n gardenTimestamp\n .timestamp\n .sub(\n gardenPowerByTimestamp[address(garden)][\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\n ]\n .timestamp\n )\n .mul(\n gardenPowerByTimestamp[address(garden)][\n gardenTimelist[address(garden)][gardenPid[address(garden)].sub(1)]\n ]\n .supply\n )\n );\n }\n\n gardenTimelist[address(garden)].push(block.timestamp); // Register of deposit timestamps in the array for iteration\n gardenPid[address(garden)]++;\n }\n\n /**\n * Updates contributor timestamps params\n * @param _garden Garden address\n * @param _contributor Contributor address\n * @param _previousBalance Previous balance\n * @param _depositOrWithdraw Whether it is a deposit or a withdraw\n */\n function _setContributorTimestampParams(\n address _garden,\n address _contributor,\n uint256 _previousBalance,\n bool _depositOrWithdraw\n ) private {\n // We make checkpoints around contributor deposits to avoid fast loans and give the right rewards afterwards\n ContributorPerGarden storage contributor = contributorPerGarden[address(_garden)][_contributor];\n\n contributor.tsContributions[block.timestamp].supply = IERC20(address(IGarden(_garden))).balanceOf(\n address(_contributor)\n );\n\n contributor.tsContributions[block.timestamp].timestamp = block.timestamp;\n\n contributor.tsContributions[block.timestamp].timePointer = contributor.pid;\n\n if (contributor.pid == 0) {\n // The very first deposit\n contributor.tsContributions[block.timestamp].power = 0;\n } else {\n // Any other deposits or withdrawals different from the very first one (will have an antecesor)\n contributor.tsContributions[block.timestamp].power = contributor.tsContributions[contributor.lastDepositAt]\n .power\n .add(\n (block.timestamp.sub(contributor.lastDepositAt)).mul(\n contributor.tsContributions[contributor.lastDepositAt].supply\n )\n );\n }\n if (_depositOrWithdraw == true) {\n // Deposit\n if (_previousBalance == 0 || contributor.initialDepositAt == 0) {\n contributor.initialDepositAt = block.timestamp;\n }\n contributor.lastDepositAt = block.timestamp;\n } else {\n // Withdrawals\n if (IERC20(address(IGarden(_garden))).balanceOf(address(_contributor)) == 0) {\n contributor.lastDepositAt = 0;\n contributor.initialDepositAt = 0;\n delete contributor.timeListPointer;\n }\n }\n\n contributor.timeListPointer.push(block.timestamp);\n contributor.pid++;\n }\n\n /**\n * Calculates the BABL rewards supply for each quarter\n * @param _quarter Number of the epoch (quarter)\n */\n function _tokenSupplyPerQuarter(uint256 _quarter) internal pure returns (uint96) {\n _require(_quarter >= 1, Errors.QUARTERS_MIN_1);\n if (_quarter >= 513) {\n return 0;\n } else {\n uint256 firstFactor = (SafeDecimalMath.unit().add(DECAY_RATE)).powDecimal(_quarter.sub(1));\n uint256 supplyForQuarter = Q1_REWARDS.divideDecimal(firstFactor);\n return Safe3296.safe96(supplyForQuarter, 'overflow 96 bits');\n }\n }\n\n /**\n * Calculates the quarter number for a specific time since START_TIME\n * @param _now Timestamp to calculate its quarter\n */\n function _getQuarter(uint256 _now) internal view returns (uint256) {\n uint256 quarter = (_now.sub(START_TIME).preciseDivCeil(EPOCH_DURATION)).div(1e18);\n return quarter.add(1);\n }\n\n /**\n * Calculates the range (starting quarter and ending quarter since START_TIME)\n * @param _from Starting timestamp\n * @param _to Ending timestamp\n */\n function _getRewardsWindow(uint256 _from, uint256 _to) internal view returns (uint256, uint256) {\n uint256 quarters = (_to.sub(_from).preciseDivCeil(EPOCH_DURATION)).div(1e18);\n uint256 startingQuarter = (_from.sub(START_TIME).preciseDivCeil(EPOCH_DURATION)).div(1e18);\n return (quarters.add(1), startingQuarter.add(1));\n }\n}\n" + }, + "contracts/interfaces/IGarden.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\npragma solidity 0.7.6;\n\n/**\n * @title IGarden\n * @author Babylon Finance\n *\n * Interface for operating with a Garden.\n */\ninterface IGarden {\n /* ============ Functions ============ */\n function makeGardenPublic() external;\n\n function setActive(bool _val) external;\n\n function active() external view returns (bool);\n\n function guestListEnabled() external view returns (bool);\n\n function controller() external view returns (address);\n\n function creator() external view returns (address);\n\n function isGardenStrategy(address _strategy) external view returns (bool);\n\n function getContributor(address _contributor)\n external\n view\n returns (\n uint256,\n uint256,\n uint256,\n uint256,\n uint256,\n uint256\n );\n\n function reserveAsset() external view returns (address);\n\n function totalContributors() external view returns (uint256);\n\n function gardenInitializedAt() external view returns (uint256);\n\n function minContribution() external view returns (uint256);\n\n function maxContributors() external view returns (uint256);\n\n function minLiquidityAsset() external view returns (uint256);\n\n function principal() external view returns (uint256);\n\n function reserveAssetRewardsSetAside() external view returns (uint256);\n\n function reserveAssetPrincipalWindow() external view returns (uint256);\n\n function absoluteReturns() external view returns (int256);\n\n function totalStake() external view returns (uint256);\n\n function minVotersQuorum() external view returns (uint256);\n\n function minStrategyDuration() external view returns (uint256);\n\n function maxStrategyDuration() external view returns (uint256);\n\n function strategyCooldownPeriod() external view returns (uint256);\n\n function getStrategies() external view returns (address[] memory);\n\n function getFinalizedStrategies() external view returns (address[] memory);\n\n function isStrategyActiveInGarden(address _strategy) external view returns (bool);\n\n function startWithdrawalWindow(\n uint256 _amount,\n uint256 _profits,\n int256 _returns,\n address _strategy\n ) external;\n\n function allocateCapitalToStrategy(uint256 _capital) external;\n\n function addStrategy(\n string memory _name,\n string memory _symbol,\n uint256[] calldata _stratParams,\n uint8[] calldata _opTypes,\n address[] calldata _opIntegrations,\n address[] calldata _opDatas\n ) external;\n\n function deposit(\n uint256 _reserveAssetQuantity,\n uint256 _minGardenTokenReceiveQuantity,\n address _to\n ) external payable;\n\n function withdraw(\n uint256 _gardenTokenQuantity,\n uint256 _minReserveReceiveQuantity,\n address payable _to,\n bool _withPenalty\n ) external;\n\n function claimReturns(address[] calldata _finalizedStrategies) external;\n\n function getGardenTokenMintQuantity(uint256 _netReserveFlows, bool isDeposit) external view returns (uint256);\n\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity) external view returns (uint256);\n\n function getLockedBalance(address _contributor) external view returns (uint256);\n\n function rebalanceStrategies(uint256 _fee) external;\n\n function expireCandidateStrategy(address _strategy) external;\n\n function burnStrategistStake(address _strategist, uint256 _amount) external;\n\n function payKeeper(address payable _keeper, uint256 _fee) external;\n}\n" + }, + "contracts/interfaces/IGardenFactory.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\npragma solidity 0.7.6;\n\nimport {IIntegration} from './IIntegration.sol';\n\n/**\n * @title IGardenFactory\n * @author Babylon Finance\n *\n * Interface for the garden factory\n */\ninterface IGardenFactory {\n function createGarden(\n address _reserveAsset,\n address _creator,\n string memory _name,\n string memory _symbol,\n string memory _tokenURI,\n uint256 _seed,\n uint256[] calldata _gardenParams,\n uint256 _initialContribution\n ) external returns (address);\n}\n" + }, + "contracts/interfaces/IStrategy.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\npragma solidity 0.7.6;\n\nimport {IGarden} from '../interfaces/IGarden.sol';\n\n/**\n * @title IStrategy\n * @author Babylon Finance\n *\n * Interface for strategy\n */\ninterface IStrategy {\n function initialize(\n address _strategist,\n address _garden,\n address _controller,\n uint256 _maxCapitalRequested,\n uint256 _stake,\n uint256 _strategyDuration,\n uint256 _expectedReturn,\n uint256 _minRebalanceCapital\n ) external;\n\n function resolveVoting(\n address[] calldata _voters,\n int256[] calldata _votes,\n uint256 _absoluteTotalVotes,\n int256 _totalVotes,\n uint256 fee\n ) external;\n\n function setData(\n uint8[] calldata _opTypes,\n address[] calldata _opIntegrations,\n address[] calldata _opDatas\n ) external;\n\n function executeStrategy(uint256 _capital, uint256 fee) external;\n\n function getNAV() external view returns (uint256);\n\n function opDatas(uint256 _index) external view returns (address);\n\n function opIntegrations(uint256 _index) external view returns (address);\n\n function opTypes(uint256 _index) external view returns (uint8);\n\n function getOperationsCount() external view returns (uint256);\n\n function getOperationByIndex(uint8 _index)\n external\n view\n returns (\n uint8,\n address,\n address\n );\n\n function finalizeStrategy(uint256 fee, string memory _tokenURI) external;\n\n function unwindStrategy(uint256 _amountToUnwind) external;\n\n function changeStrategyDuration(uint256 _newDuration) external;\n\n function invokeFromIntegration(\n address _target,\n uint256 _value,\n bytes calldata _data\n ) external returns (bytes memory);\n\n function invokeApprove(\n address _spender,\n address _asset,\n uint256 _quantity\n ) external;\n\n function trade(\n address _sendToken,\n uint256 _sendQuantity,\n address _receiveToken\n ) external returns (uint256);\n\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external;\n\n function getStrategyDetails()\n external\n view\n returns (\n address,\n address,\n uint256,\n uint256,\n uint256,\n int256,\n uint256,\n uint256,\n uint256,\n uint256,\n uint256,\n uint256,\n address,\n uint256\n );\n\n function getStrategyState()\n external\n view\n returns (\n address,\n bool,\n bool,\n bool,\n uint256,\n uint256,\n uint256\n );\n\n function isStrategyActive() external view returns (bool);\n\n function getUserVotes(address _address) external view returns (int256);\n\n function strategist() external view returns (address);\n\n function enteredAt() external view returns (uint256);\n\n function enteredCooldownAt() external view returns (uint256);\n\n function executedAt() external view returns (uint256);\n\n function updatedAt() external view returns (uint256);\n\n function exitedAt() external view returns (uint256);\n\n function stake() external view returns (uint256);\n\n function strategyRewards() external view returns (uint256);\n\n function rewardsTotalOverhead() external view returns (uint256);\n\n function maxCapitalRequested() external view returns (uint256);\n\n function expectedReturn() external view returns (uint256);\n\n function minRebalanceCapital() external view returns (uint256);\n\n function duration() external view returns (uint256);\n\n function totalVotes() external view returns (int256);\n\n function absoluteTotalVotes() external view returns (uint256);\n\n function totalPositiveVotes() external view returns (uint256);\n\n function totalNegativeVotes() external view returns (uint256);\n\n function capitalReturned() external view returns (uint256);\n\n function capitalAllocated() external view returns (uint256);\n\n function finalized() external view returns (bool);\n\n function active() external view returns (bool);\n\n function garden() external view returns (IGarden);\n}\n" + }, + "contracts/interfaces/IIshtarGate.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\npragma solidity 0.7.6;\n\n/**\n * @title IIshtarGate\n * @author Babylon Finance\n *\n * Interface for interacting with the Gate Guestlist NFT\n */\ninterface IIshtarGate {\n /* ============ Functions ============ */\n\n function setGardenAccess(\n address _user,\n address _garden,\n uint8 _permission\n ) external returns (uint256);\n\n function setCreatorPermissions(address _user, bool _canCreate) external returns (uint256);\n\n function grantGardenAccessBatch(\n address _garden,\n address[] calldata _users,\n uint8[] calldata _perms\n ) external returns (bool);\n\n function maxNumberOfInvites() external view returns (uint256);\n\n function tokenURI() external view returns (string memory);\n\n function setMaxNumberOfInvites(uint256 _maxNumberOfInvites) external;\n\n function updateGardenURI(string memory _tokenURI) external;\n\n function grantCreatorsInBatch(address[] calldata _users, bool[] calldata _perms) external returns (bool);\n\n function canCreate(address _user) external view returns (bool);\n\n function canJoinAGarden(address _garden, address _user) external view returns (bool);\n\n function canVoteInAGarden(address _garden, address _user) external view returns (bool);\n\n function canAddStrategiesInAGarden(address _garden, address _user) external view returns (bool);\n}\n" + }, + "contracts/interfaces/IIntegration.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\npragma solidity 0.7.6;\n\n/**\n * @title IIntegration\n * @author Babylon Finance\n *\n * Interface for protocol integrations\n */\ninterface IIntegration {\n function getName() external view returns (string memory);\n}\n" + }, + "contracts/interfaces/IBabController.sol": { + "content": "/*\n Copyright 2021 Babylon Finance.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\npragma solidity 0.7.6;\n\n/**\n * @title IBabController\n * @author Babylon Finance\n *\n * Interface for interacting with BabController\n */\ninterface IBabController {\n /* ============ Functions ============ */\n\n function createGarden(\n address _reserveAsset,\n string memory _name,\n string memory _symbol,\n string memory _tokenURI,\n uint256 _seed,\n uint256[] calldata _gardenParams,\n uint256 _initialContribution\n ) external payable returns (address);\n\n function removeGarden(address _garden) external;\n\n function addReserveAsset(address _reserveAsset) external;\n\n function removeReserveAsset(address _reserveAsset) external;\n\n function disableGarden(address _garden) external;\n\n function editPriceOracle(address _priceOracle) external;\n\n function editIshtarGate(address _ishtarGate) external;\n\n function editGardenValuer(address _gardenValuer) external;\n\n function editRewardsDistributor(address _rewardsDistributor) external;\n\n function editTreasury(address _newTreasury) external;\n\n function editGardenFactory(address _newGardenFactory) external;\n\n function editGardenNFT(address _newGardenNFT) external;\n\n function editStrategyNFT(address _newStrategyNFT) external;\n\n function editStrategyFactory(address _newStrategyFactory) external;\n\n function editUniswapFactory(address _newUniswapFactory) external;\n\n function addIntegration(string memory _name, address _integration) external;\n\n function editIntegration(string memory _name, address _integration) external;\n\n function removeIntegration(string memory _name) external;\n\n function setOperation(uint8 _kind, address _operation) external;\n\n function setDefaultTradeIntegration(address _newDefaultTradeIntegation) external;\n\n function addKeeper(address _keeper) external;\n\n function addKeepers(address[] memory _keepers) external;\n\n function removeKeeper(address _keeper) external;\n\n function enableGardenTokensTransfers() external;\n\n function enableBABLMiningProgram() external;\n\n function setAllowPublicGardens() external;\n\n function editLiquidityReserve(address _reserve, uint256 _minRiskyPairLiquidityEth) external;\n\n function maxContributorsPerGarden() external view returns (uint256);\n\n function gardenCreationIsOpen() external view returns (bool);\n\n function openPublicGardenCreation() external;\n\n function setMaxContributorsPerGarden(uint256 _newMax) external;\n\n function owner() external view returns (address);\n\n function priceOracle() external view returns (address);\n\n function gardenValuer() external view returns (address);\n\n function gardenNFT() external view returns (address);\n\n function strategyNFT() external view returns (address);\n\n function rewardsDistributor() external view returns (address);\n\n function gardenFactory() external view returns (address);\n\n function treasury() external view returns (address);\n\n function ishtarGate() external view returns (address);\n\n function strategyFactory() external view returns (address);\n\n function defaultTradeIntegration() external view returns (address);\n\n function protocolDepositGardenTokenFee() external view returns (uint256);\n\n function protocolWithdrawalGardenTokenFee() external view returns (uint256);\n\n function gardenTokensTransfersEnabled() external view returns (bool);\n\n function bablMiningProgramEnabled() external view returns (bool);\n\n function allowPublicGardens() external view returns (bool);\n\n function enabledOperations(uint256 _kind) external view returns (address);\n\n function getProfitSharing()\n external\n view\n returns (\n uint256,\n uint256,\n uint256\n );\n\n function getBABLSharing()\n external\n view\n returns (\n uint256,\n uint256,\n uint256,\n uint256\n );\n\n function getGardens() external view returns (address[] memory);\n\n function getOperations() external view returns (address[20] memory);\n\n function isGarden(address _garden) external view returns (bool);\n\n function getIntegrationByName(string memory _name) external view returns (address);\n\n function getIntegrationWithHash(bytes32 _nameHashP) external view returns (address);\n\n function isValidReserveAsset(address _reserveAsset) external view returns (bool);\n\n function isValidKeeper(address _keeper) external view returns (bool);\n\n function isSystemContract(address _contractAddress) external view returns (bool);\n\n function isValidIntegration(string memory _name, address _integration) external view returns (bool);\n\n function getMinCooldownPeriod() external view returns (uint256);\n\n function getMaxCooldownPeriod() external view returns (uint256);\n\n function protocolPerformanceFee() external view returns (uint256);\n\n function protocolManagementFee() external view returns (uint256);\n\n function minLiquidityPerReserve(address _reserve) external view returns (uint256);\n\n function uniswapFactory() external view returns (address);\n}\n" + }, + "contracts/lib/AddressArrayUtils.sol": { + "content": "/*\n Copyright 2020 Set Labs Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\n\n/**\n * @title AddressArrayUtils\n * @author Set Protocol\n *\n * Utility functions to handle Address Arrays\n */\nlibrary AddressArrayUtils {\n /**\n * Finds the index of the first occurrence of the given element.\n * @param A The input array to search\n * @param a The value to find\n * @return Returns (index and isIn) for the first occurrence starting from index 0\n */\n function indexOf(address[] memory A, address a) internal pure returns (uint256, bool) {\n uint256 length = A.length;\n for (uint256 i = 0; i < length; i++) {\n if (A[i] == a) {\n return (i, true);\n }\n }\n return (uint256(-1), false);\n }\n\n /**\n * Returns true if the value is present in the list. Uses indexOf internally.\n * @param A The input array to search\n * @param a The value to find\n * @return Returns isIn for the first occurrence starting from index 0\n */\n function contains(address[] memory A, address a) internal pure returns (bool) {\n (, bool isIn) = indexOf(A, a);\n return isIn;\n }\n\n /**\n * Returns true if there are 2 elements that are the same in an array\n * @param A The input array to search\n * @return Returns boolean for the first occurrence of a duplicate\n */\n function hasDuplicate(address[] memory A) internal pure returns (bool) {\n require(A.length > 0, 'A is empty');\n\n for (uint256 i = 0; i < A.length - 1; i++) {\n address current = A[i];\n for (uint256 j = i + 1; j < A.length; j++) {\n if (current == A[j]) {\n return true;\n }\n }\n }\n return false;\n }\n\n /**\n * @param A The input array to search\n * @param a The address to remove\n * @return Returns the array with the object removed.\n */\n function remove(address[] memory A, address a) internal pure returns (address[] memory) {\n (uint256 index, bool isIn) = indexOf(A, a);\n if (!isIn) {\n revert('Address not in array.');\n } else {\n (address[] memory _A, ) = pop(A, index);\n return _A;\n }\n }\n\n /**\n * Removes specified index from array\n * @param A The input array to search\n * @param index The index to remove\n * @return Returns the new array and the removed entry\n */\n function pop(address[] memory A, uint256 index) internal pure returns (address[] memory, address) {\n uint256 length = A.length;\n require(index < A.length, 'Index must be < A length');\n address[] memory newAddresses = new address[](length - 1);\n for (uint256 i = 0; i < index; i++) {\n newAddresses[i] = A[i];\n }\n for (uint256 j = index + 1; j < length; j++) {\n newAddresses[j - 1] = A[j];\n }\n return (newAddresses, A[index]);\n }\n\n /**\n * Returns the combination of the two arrays\n * @param A The first array\n * @param B The second array\n * @return Returns A extended by B\n */\n function extend(address[] memory A, address[] memory B) internal pure returns (address[] memory) {\n uint256 aLength = A.length;\n uint256 bLength = B.length;\n address[] memory newAddresses = new address[](aLength + bLength);\n for (uint256 i = 0; i < aLength; i++) {\n newAddresses[i] = A[i];\n }\n for (uint256 j = 0; j < bLength; j++) {\n newAddresses[aLength + j] = B[j];\n }\n return newAddresses;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\nimport \"../proxy/Initializable.sol\";\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal initializer {\n __Context_init_unchained();\n }\n\n function __Context_init_unchained() internal initializer {\n }\n function _msgSender() internal view virtual returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\n// solhint-disable-next-line compiler-version\npragma solidity >=0.4.24 <0.8.0;\n\nimport \"../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n */\nabstract contract Initializable {\n\n /**\n * @dev Indicates that the contract has been initialized.\n */\n bool private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Modifier to protect an initializer function from being invoked twice.\n */\n modifier initializer() {\n require(_initializing || _isConstructor() || !_initialized, \"Initializable: contract is already initialized\");\n\n bool isTopLevelCall = !_initializing;\n if (isTopLevelCall) {\n _initializing = true;\n _initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n }\n }\n\n /// @dev Returns true if and only if the function is running in the constructor\n function _isConstructor() private view returns (bool) {\n return !AddressUpgradeable.isContract(address(this));\n }\n}\n" + }, + "contracts/token/TimeLockedToken.sol": { + "content": "/*\n Copyright 2021 Babylon Finance.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\nimport {IBabController} from '../interfaces/IBabController.sol';\nimport {TimeLockRegistry} from './TimeLockRegistry.sol';\nimport {RewardsDistributor} from './RewardsDistributor.sol';\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {VoteToken} from './VoteToken.sol';\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\nimport {Errors, _require} from '../lib/BabylonErrors.sol';\nimport {IBabController} from '../interfaces/IBabController.sol';\n\n/**\n * @title TimeLockedToken\n * @notice Time Locked ERC20 Token\n * @author Babylon Finance\n * @dev Contract which gives the ability to time-lock tokens specially for vesting purposes usage\n *\n * By overriding the balanceOf() and transfer() functions in ERC20,\n * an account can show its full, post-distribution balance and use it for voting power\n * but only transfer or spend up to an allowed amount\n *\n * A portion of previously non-spendable tokens are allowed to be transferred\n * along the time depending on each vesting conditions, and after all epochs have passed, the full\n * account balance is unlocked. In case on non-completion vesting period, only the Time Lock Registry can cancel\n * the delivery of the pending tokens and only can cancel the remaining locked ones.\n */\n\nabstract contract TimeLockedToken is VoteToken {\n using SafeMath for uint256;\n\n /* ============ Events ============ */\n\n /// @notice An event that emitted when a new lockout ocurr\n event NewLockout(\n address account,\n uint256 tokenslocked,\n bool isTeamOrAdvisor,\n uint256 startingVesting,\n uint256 endingVesting\n );\n\n /// @notice An event that emitted when a new Time Lock is registered\n event NewTimeLockRegistration(address previousAddress, address newAddress);\n\n /// @notice An event that emitted when a new Rewards Distributor is registered\n event NewRewardsDistributorRegistration(address previousAddress, address newAddress);\n\n /// @notice An event that emitted when a cancellation of Lock tokens is registered\n event Cancel(address account, uint256 amount);\n\n /// @notice An event that emitted when a claim of tokens are registered\n event Claim(address _receiver, uint256 amount);\n\n /// @notice An event that emitted when a lockedBalance query is done\n event LockedBalance(address _account, uint256 amount);\n\n /* ============ Modifiers ============ */\n\n modifier onlyTimeLockRegistry() {\n require(\n msg.sender == address(timeLockRegistry),\n 'TimeLockedToken:: onlyTimeLockRegistry: can only be executed by TimeLockRegistry'\n );\n _;\n }\n\n modifier onlyTimeLockOwner() {\n if (address(timeLockRegistry) != address(0)) {\n require(\n msg.sender == Ownable(timeLockRegistry).owner(),\n 'TimeLockedToken:: onlyTimeLockOwner: can only be executed by the owner of TimeLockRegistry'\n );\n }\n _;\n }\n\n /* ============ State Variables ============ */\n\n // represents total distribution for locked balances\n mapping(address => uint256) distribution;\n\n /// @notice The profile of each token owner under its particular vesting conditions\n /**\n * @param team Indicates whether or not is a Team member or Advisor (true = team member/advisor, false = private investor)\n * @param vestingBegin When the vesting begins for such token owner\n * @param vestingEnd When the vesting ends for such token owner\n * @param lastClaim When the last claim was done\n */\n struct VestedToken {\n bool teamOrAdvisor;\n uint256 vestingBegin;\n uint256 vestingEnd;\n uint256 lastClaim;\n }\n\n /// @notice A record of token owners under vesting conditions for each account, by index\n mapping(address => VestedToken) public vestedToken;\n\n // vesting duration for Team Members and Advisors\n uint256 private teamVesting = 365 days * 4;\n\n // vesting duration for Investors\n uint256 private investorVesting = 365 days * 3;\n\n // address of Time Lock Registry contract\n IBabController public controller;\n\n // address of Time Lock Registry contract\n TimeLockRegistry public timeLockRegistry;\n\n // address of Rewards Distriburor contract\n RewardsDistributor public rewardsDistributor;\n\n // Enable Transfer of ERC20 BABL Tokens\n // Only Minting or transfers from/to TimeLockRegistry and Rewards Distributor can transfer tokens until the protocol is fully decentralized\n bool private tokenTransfersEnabled;\n bool private tokenTransfersWereDisabled;\n\n /* ============ Functions ============ */\n\n /* ============ Constructor ============ */\n\n constructor(string memory _name, string memory _symbol) VoteToken(_name, _symbol) {\n tokenTransfersEnabled = true;\n }\n\n /* ============ External Functions ============ */\n\n /* =========== Token related Gov Functions ====== */\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Disables transfers of ERC20 BABL Tokens\n */\n function disableTokensTransfers() external onlyOwner {\n require(!tokenTransfersWereDisabled, 'BABL must flow');\n tokenTransfersEnabled = false;\n tokenTransfersWereDisabled = true;\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Allows transfers of ERC20 BABL Tokens\n * Can only happen after the protocol is fully decentralized.\n */\n function enableTokensTransfers() external onlyOwner {\n tokenTransfersEnabled = true;\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Set the Time Lock Registry contract to control token vesting conditions\n *\n * @notice Set the Time Lock Registry contract to control token vesting conditions\n * @param newTimeLockRegistry Address of TimeLockRegistry contract\n */\n function setTimeLockRegistry(TimeLockRegistry newTimeLockRegistry) external onlyTimeLockOwner returns (bool) {\n require(address(newTimeLockRegistry) != address(0), 'cannot be zero address');\n require(address(newTimeLockRegistry) != address(this), 'cannot be this contract');\n require(address(newTimeLockRegistry) != address(timeLockRegistry), 'must be new TimeLockRegistry');\n emit NewTimeLockRegistration(address(timeLockRegistry), address(newTimeLockRegistry));\n\n timeLockRegistry = newTimeLockRegistry;\n\n return true;\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Set the Rewards Distributor contract to control either BABL Mining or profit rewards\n *\n * @notice Set the Rewards Distriburor contract to control both types of rewards (profit and BABL Mining program)\n * @param newRewardsDistributor Address of Rewards Distributor contract\n */\n function setRewardsDistributor(RewardsDistributor newRewardsDistributor) external onlyOwner returns (bool) {\n require(address(newRewardsDistributor) != address(0), 'cannot be zero address');\n require(address(newRewardsDistributor) != address(this), 'cannot be this contract');\n require(address(newRewardsDistributor) != address(rewardsDistributor), 'must be new Rewards Distributor');\n emit NewRewardsDistributorRegistration(address(rewardsDistributor), address(newRewardsDistributor));\n\n rewardsDistributor = newRewardsDistributor;\n\n return true;\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Register new token lockup conditions for vested tokens defined only by Time Lock Registry\n *\n * @notice Tokens are completely delivered during the registration however lockup conditions apply for vested tokens\n * locking them according to the distribution epoch periods and the type of recipient (Team, Advisor, Investor)\n * Emits a transfer event showing a transfer to the recipient\n * Only the registry can call this function\n * @param _receiver Address to receive the tokens\n * @param _amount Tokens to be transferred\n * @param _profile True if is a Team Member or Advisor\n * @param _vestingBegin Unix Time when the vesting for that particular address\n * @param _vestingEnd Unix Time when the vesting for that particular address\n * @param _lastClaim Unix Time when the claim was done from that particular address\n *\n */\n function registerLockup(\n address _receiver,\n uint256 _amount,\n bool _profile,\n uint256 _vestingBegin,\n uint256 _vestingEnd,\n uint256 _lastClaim\n ) external onlyTimeLockRegistry returns (bool) {\n require(balanceOf(msg.sender) >= _amount, 'insufficient balance');\n require(_receiver != address(0), 'cannot be zero address');\n require(_receiver != address(this), 'cannot be this contract');\n require(_receiver != address(timeLockRegistry), 'cannot be the TimeLockRegistry contract itself');\n require(_receiver != msg.sender, 'the owner cannot lockup itself');\n\n // update amount of locked distribution\n distribution[_receiver] = distribution[_receiver].add(_amount);\n\n VestedToken storage newVestedToken = vestedToken[_receiver];\n\n newVestedToken.teamOrAdvisor = _profile;\n newVestedToken.vestingBegin = _vestingBegin;\n newVestedToken.vestingEnd = _vestingEnd;\n newVestedToken.lastClaim = _lastClaim;\n\n // transfer tokens to the recipient\n _transfer(msg.sender, _receiver, _amount);\n emit NewLockout(_receiver, _amount, _profile, _vestingBegin, _vestingEnd);\n\n return true;\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel and remove locked tokens due to non-completion of vesting period\n * applied only by Time Lock Registry and specifically to Team or Advisors as it does not apply to investors.\n *\n * @dev Cancel distribution registration\n * @param lockedAccount that should have its still locked distribution removed due to non-completion of its vesting period\n */\n function cancelVestedTokens(address lockedAccount) external onlyTimeLockRegistry returns (uint256) {\n return _cancelVestedTokensFromTimeLock(lockedAccount);\n }\n\n /**\n * GOVERNANCE FUNCTION. Each token owner can claim its own specific tokens with its own specific vesting conditions from the Time Lock Registry\n *\n * @dev Claim msg.sender tokens (if any available in the registry)\n */\n function claimMyTokens() external {\n // claim msg.sender tokens from timeLockRegistry\n uint256 amount = timeLockRegistry.claim(msg.sender);\n // After a proper claim, locked tokens of Team and Advisors profiles are under restricted special vesting conditions so they automatic grant\n // rights to the Time Lock Registry to only retire locked tokens if non-compliance vesting conditions take places along the vesting periods.\n // It does not apply to Investors under vesting (their locked tokens cannot be removed).\n if (vestedToken[msg.sender].teamOrAdvisor == true) {\n approve(address(timeLockRegistry), amount);\n }\n // emit claim event\n emit Claim(msg.sender, amount);\n }\n\n /**\n * GOVERNANCE FUNCTION. Get unlocked balance for an account\n *\n * @notice Get unlocked balance for an account\n * @param account Account to check\n * @return Amount that is unlocked and available eg. to transfer\n */\n function unlockedBalance(address account) public returns (uint256) {\n // totalBalance - lockedBalance\n return balanceOf(account).sub(lockedBalance(account));\n }\n\n /**\n * GOVERNANCE FUNCTION. View the locked balance for an account\n *\n * @notice View locked balance for an account\n * @param account Account to check\n * @return Amount locked in the time of checking\n */\n\n function viewLockedBalance(address account) public view returns (uint256) {\n // distribution of locked tokens\n // get amount from distributions\n\n uint256 amount = distribution[account];\n uint256 lockedAmount = amount;\n\n // Team and investors cannot transfer tokens in the first year\n if (vestedToken[account].vestingBegin.add(365 days) > block.timestamp && amount != 0) {\n return lockedAmount;\n }\n\n // in case of vesting has passed, all tokens are now available, if no vesting lock is 0 as well\n if (block.timestamp >= vestedToken[account].vestingEnd || amount == 0) {\n lockedAmount = 0;\n } else if (amount != 0) {\n // in case of still under vesting period, locked tokens are recalculated\n lockedAmount = amount.mul(vestedToken[account].vestingEnd.sub(block.timestamp)).div(\n vestedToken[account].vestingEnd.sub(vestedToken[account].vestingBegin)\n );\n }\n return lockedAmount;\n }\n\n /**\n * GOVERNANCE FUNCTION. Get locked balance for an account\n *\n * @notice Get locked balance for an account\n * @param account Account to check\n * @return Amount locked in the time of checking\n */\n function lockedBalance(address account) public returns (uint256) {\n // get amount from distributions locked tokens (if any)\n uint256 lockedAmount = viewLockedBalance(account);\n // in case of vesting has passed, all tokens are now available so we set mapping to 0 only for accounts under vesting\n if (\n block.timestamp >= vestedToken[account].vestingEnd &&\n msg.sender == account &&\n lockedAmount == 0 &&\n vestedToken[account].vestingEnd != 0\n ) {\n delete distribution[account];\n }\n emit LockedBalance(account, lockedAmount);\n return lockedAmount;\n }\n\n /**\n * PUBLIC FUNCTION. Get the address of Time Lock Registry\n *\n * @notice Get the address of Time Lock Registry\n * @return Address of the Time Lock Registry\n */\n function getTimeLockRegistry() external view returns (address) {\n return address(timeLockRegistry);\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Override the Approval of allowances of ERC20 with special conditions for vesting\n *\n * @notice Override of \"Approve\" function to allow the `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender` except in the case of spender is Time Lock Registry\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint256 rawAmount) public override nonReentrant returns (bool) {\n require(spender != address(0), 'TimeLockedToken::approve: spender cannot be zero address');\n require(spender != msg.sender, 'TimeLockedToken::approve: spender cannot be the msg.sender');\n\n uint96 amount;\n if (rawAmount == uint256(-1)) {\n amount = uint96(-1);\n } else {\n amount = safe96(rawAmount, 'TimeLockedToken::approve: amount exceeds 96 bits');\n }\n\n // There is no option to decreaseAllowance to timeLockRegistry in case of vested tokens\n if ((spender == address(timeLockRegistry)) && (amount < allowance(msg.sender, address(timeLockRegistry)))) {\n amount = safe96(\n allowance(msg.sender, address(timeLockRegistry)),\n 'TimeLockedToken::approve: cannot decrease allowance to timelockregistry'\n );\n }\n _approve(msg.sender, spender, amount);\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Override the Increase of allowances of ERC20 with special conditions for vesting\n *\n * @notice Atomically increases the allowance granted to `spender` by the caller.\n *\n * @dev This is an override with respect to the fulfillment of vesting conditions along the way\n * However an user can increase allowance many times, it will never be able to transfer locked tokens during vesting period\n * @return Whether or not the increaseAllowance succeeded\n */\n function increaseAllowance(address spender, uint256 addedValue) public override nonReentrant returns (bool) {\n require(\n unlockedBalance(msg.sender) >= allowance(msg.sender, spender).add(addedValue) ||\n spender == address(timeLockRegistry),\n 'TimeLockedToken::increaseAllowance:Not enough unlocked tokens'\n );\n require(spender != address(0), 'TimeLockedToken::increaseAllowance:Spender cannot be zero address');\n require(spender != msg.sender, 'TimeLockedToken::increaseAllowance:Spender cannot be the msg.sender');\n _approve(msg.sender, spender, allowance(msg.sender, spender).add(addedValue));\n return true;\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Override the decrease of allowances of ERC20 with special conditions for vesting\n *\n * @notice Atomically decrease the allowance granted to `spender` by the caller.\n *\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n * This is an override with respect to the fulfillment of vesting conditions along the way\n * An user cannot decrease the allowance to the Time Lock Registry who is in charge of vesting conditions\n * @return Whether or not the decreaseAllowance succeeded\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public override nonReentrant returns (bool) {\n require(spender != address(0), 'TimeLockedToken::decreaseAllowance:Spender cannot be zero address');\n require(spender != msg.sender, 'TimeLockedToken::decreaseAllowance:Spender cannot be the msg.sender');\n require(\n allowance(msg.sender, spender) >= subtractedValue,\n 'TimeLockedToken::decreaseAllowance:Underflow condition'\n );\n\n // There is no option to decreaseAllowance to timeLockRegistry in case of vested tokens\n require(\n address(spender) != address(timeLockRegistry),\n 'TimeLockedToken::decreaseAllowance:cannot decrease allowance to timeLockRegistry'\n );\n\n _approve(\n msg.sender,\n spender,\n allowance(msg.sender, spender).sub(subtractedValue, 'ERC20: decreased allowance below zero')\n );\n return true;\n }\n\n /* ============ Internal Only Function ============ */\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Override the _transfer of ERC20 BABL tokens only allowing the transfer of unlocked tokens\n *\n * @dev Transfer function which includes only unlocked tokens\n * Locked tokens can always be transfered back to the returns address\n * Transferring to owner allows re-issuance of funds through registry\n *\n * @param _from The address to send tokens from\n * @param _to The address that will receive the tokens\n * @param _value The amount of tokens to be transferred\n */\n function _transfer(\n address _from,\n address _to,\n uint256 _value\n ) internal override {\n require(_from != address(0), 'TimeLockedToken:: _transfer: cannot transfer from the zero address');\n require(_to != address(0), 'TimeLockedToken:: _transfer: cannot transfer to the zero address');\n require(\n _to != address(this),\n 'TimeLockedToken:: _transfer: do not transfer tokens to the token contract itself'\n );\n\n require(balanceOf(_from) >= _value, 'TimeLockedToken:: _transfer: insufficient balance');\n\n // check if enough unlocked balance to transfer\n require(unlockedBalance(_from) >= _value, 'TimeLockedToken:: _transfer: attempting to transfer locked funds');\n super._transfer(_from, _to, _value);\n // voting power\n _moveDelegates(\n delegates[_from],\n delegates[_to],\n safe96(_value, 'TimeLockedToken:: _transfer: uint96 overflow')\n );\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Disable BABL token transfer until certain conditions are met\n *\n * @dev Override the _beforeTokenTransfer of ERC20 BABL tokens until certain conditions are met:\n * Only allowing minting or transfers from Time Lock Registry and Rewards Distributor until transfers are allowed in the controller\n * Transferring to owner allows re-issuance of funds through registry\n *\n * @param _from The address to send tokens from\n * @param _to The address that will receive the tokens\n * @param _value The amount of tokens to be transferred\n */\n\n // Disable garden token transfers. Allow minting and burning.\n function _beforeTokenTransfer(\n address _from,\n address _to,\n uint256 _value\n ) internal virtual override {\n super._beforeTokenTransfer(_from, _to, _value);\n _require(\n _from == address(0) ||\n _from == address(timeLockRegistry) ||\n _from == address(rewardsDistributor) ||\n _to == address(timeLockRegistry) ||\n tokenTransfersEnabled,\n Errors.BABL_TRANSFERS_DISABLED\n );\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel and remove locked tokens due to non-completion of vesting period\n * applied only by Time Lock Registry and specifically to Team or Advisors\n *\n * @dev Cancel distribution registration\n * @param lockedAccount that should have its still locked distribution removed due to non-completion of its vesting period\n */\n function _cancelVestedTokensFromTimeLock(address lockedAccount) internal onlyTimeLockRegistry returns (uint256) {\n require(distribution[lockedAccount] != 0, 'TimeLockedToken::cancelTokens:Not registered');\n\n // get an update on locked amount from distributions at this precise moment\n uint256 loosingAmount = lockedBalance(lockedAccount);\n\n require(loosingAmount > 0, 'TimeLockedToken::cancelTokens:There are no more locked tokens');\n require(\n vestedToken[lockedAccount].teamOrAdvisor == true,\n 'TimeLockedToken::cancelTokens:cannot cancel locked tokens to Investors'\n );\n\n // set distribution mapping to 0\n delete distribution[lockedAccount];\n\n // set tokenVested mapping to 0\n delete vestedToken[lockedAccount];\n\n // transfer only locked tokens back to TimeLockRegistry Owner (msg.sender)\n require(\n transferFrom(lockedAccount, address(timeLockRegistry), loosingAmount),\n 'TimeLockedToken::cancelTokens:Transfer failed'\n );\n\n // emit cancel event\n emit Cancel(lockedAccount, loosingAmount);\n\n return loosingAmount;\n }\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../utils/Context.sol\";\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor () internal {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), msgSender);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\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 { size := extcodesize(account) }\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, \"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, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain`call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.staticcall(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.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 using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n // solhint-disable-next-line max-line-length\n require((value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\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 * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 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. We use {Address.functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n if (returndata.length > 0) { // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n" + }, + "contracts/lib/SafeDecimalMath.sol": { + "content": "/*\n Original version by Synthetix.io\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\n\n Adapted by Babylon Finance.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\n\nimport '@openzeppelin/contracts/math/SafeMath.sol';\n\nlibrary SafeDecimalMath {\n using SafeMath for uint256;\n\n /* Number of decimal places in the representations. */\n uint8 public constant decimals = 18;\n uint8 public constant highPrecisionDecimals = 27;\n\n /* The number representing 1.0. */\n uint256 public constant UNIT = 10**uint256(decimals);\n\n /* The number representing 1.0 for higher fidelity numbers. */\n uint256 public constant PRECISE_UNIT = 10**uint256(highPrecisionDecimals);\n uint256 private constant UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR = 10**uint256(highPrecisionDecimals - decimals);\n\n /**\n * @return Provides an interface to UNIT.\n */\n function unit() external pure returns (uint256) {\n return UNIT;\n }\n\n /**\n * @return Provides an interface to PRECISE_UNIT.\n */\n function preciseUnit() external pure returns (uint256) {\n return PRECISE_UNIT;\n }\n\n /**\n * @return The result of multiplying x and y, interpreting the operands as fixed-point\n * decimals.\n *\n * @dev A unit factor is divided out after the product of x and y is evaluated,\n * so that product must be less than 2**256. As this is an integer division,\n * the internal division always rounds down. This helps save on gas. Rounding\n * is more expensive on gas.\n */\n function multiplyDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\n /* Divide by UNIT to remove the extra factor introduced by the product. */\n return x.mul(y) / UNIT;\n }\n\n /**\n * @return The result of safely multiplying x and y, interpreting the operands\n * as fixed-point decimals of the specified precision unit.\n *\n * @dev The operands should be in the form of a the specified unit factor which will be\n * divided out after the product of x and y is evaluated, so that product must be\n * less than 2**256.\n *\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\n * Rounding is useful when you need to retain fidelity for small decimal numbers\n * (eg. small fractions or percentages).\n */\n function _multiplyDecimalRound(\n uint256 x,\n uint256 y,\n uint256 precisionUnit\n ) private pure returns (uint256) {\n /* Divide by UNIT to remove the extra factor introduced by the product. */\n uint256 quotientTimesTen = x.mul(y) / (precisionUnit / 10);\n\n if (quotientTimesTen % 10 >= 5) {\n quotientTimesTen += 10;\n }\n\n return quotientTimesTen / 10;\n }\n\n /**\n * @return The result of safely multiplying x and y, interpreting the operands\n * as fixed-point decimals of a precise unit.\n *\n * @dev The operands should be in the precise unit factor which will be\n * divided out after the product of x and y is evaluated, so that product must be\n * less than 2**256.\n *\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\n * Rounding is useful when you need to retain fidelity for small decimal numbers\n * (eg. small fractions or percentages).\n */\n function multiplyDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\n return _multiplyDecimalRound(x, y, PRECISE_UNIT);\n }\n\n /**\n * @return The result of safely multiplying x and y, interpreting the operands\n * as fixed-point decimals of a standard unit.\n *\n * @dev The operands should be in the standard unit factor which will be\n * divided out after the product of x and y is evaluated, so that product must be\n * less than 2**256.\n *\n * Unlike multiplyDecimal, this function rounds the result to the nearest increment.\n * Rounding is useful when you need to retain fidelity for small decimal numbers\n * (eg. small fractions or percentages).\n */\n function multiplyDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\n return _multiplyDecimalRound(x, y, UNIT);\n }\n\n /**\n * @return The result of safely dividing x and y. The return value is a high\n * precision decimal.\n *\n * @dev y is divided after the product of x and the standard precision unit\n * is evaluated, so the product of x and UNIT must be less than 2**256. As\n * this is an integer division, the result is always rounded down.\n * This helps save on gas. Rounding is more expensive on gas.\n */\n function divideDecimal(uint256 x, uint256 y) internal pure returns (uint256) {\n /* Reintroduce the UNIT factor that will be divided out by y. */\n return x.mul(UNIT).div(y);\n }\n\n /**\n * @return The result of safely dividing x and y. The return value is as a rounded\n * decimal in the precision unit specified in the parameter.\n *\n * @dev y is divided after the product of x and the specified precision unit\n * is evaluated, so the product of x and the specified precision unit must\n * be less than 2**256. The result is rounded to the nearest increment.\n */\n function _divideDecimalRound(\n uint256 x,\n uint256 y,\n uint256 precisionUnit\n ) private pure returns (uint256) {\n uint256 resultTimesTen = x.mul(precisionUnit * 10).div(y);\n\n if (resultTimesTen % 10 >= 5) {\n resultTimesTen += 10;\n }\n\n return resultTimesTen / 10;\n }\n\n /**\n * @return The result of safely dividing x and y. The return value is as a rounded\n * standard precision decimal.\n *\n * @dev y is divided after the product of x and the standard precision unit\n * is evaluated, so the product of x and the standard precision unit must\n * be less than 2**256. The result is rounded to the nearest increment.\n */\n function divideDecimalRound(uint256 x, uint256 y) internal pure returns (uint256) {\n return _divideDecimalRound(x, y, UNIT);\n }\n\n /**\n * @return The result of safely dividing x and y. The return value is as a rounded\n * high precision decimal.\n *\n * @dev y is divided after the product of x and the high precision unit\n * is evaluated, so the product of x and the high precision unit must\n * be less than 2**256. The result is rounded to the nearest increment.\n */\n function divideDecimalRoundPrecise(uint256 x, uint256 y) internal pure returns (uint256) {\n return _divideDecimalRound(x, y, PRECISE_UNIT);\n }\n\n /**\n * @dev Convert a standard decimal representation to a high precision one.\n */\n function decimalToPreciseDecimal(uint256 i) internal pure returns (uint256) {\n return i.mul(UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR);\n }\n\n /**\n * @dev Convert a high precision decimal to a standard decimal representation.\n */\n function preciseDecimalToDecimal(uint256 i) internal pure returns (uint256) {\n uint256 quotientTimesTen = i / (UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR / 10);\n\n if (quotientTimesTen % 10 >= 5) {\n quotientTimesTen += 10;\n }\n\n return quotientTimesTen / 10;\n }\n}\n" + }, + "contracts/lib/PreciseUnitMath.sol": { + "content": "/*\n Copyright 2020 Set Labs Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\n\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\n\n/**\n * @title PreciseUnitMath\n * @author Set Protocol\n *\n * Arithmetic for fixed-point numbers with 18 decimals of precision. Some functions taken from\n * dYdX's BaseMath library.\n *\n * CHANGELOG:\n * - 9/21/20: Added safePower function\n */\nlibrary PreciseUnitMath {\n using SafeMath for uint256;\n using SignedSafeMath for int256;\n\n // The number One in precise units.\n uint256 internal constant PRECISE_UNIT = 10**18;\n int256 internal constant PRECISE_UNIT_INT = 10**18;\n\n // Max unsigned integer value\n uint256 internal constant MAX_UINT_256 = type(uint256).max;\n // Max and min signed integer value\n int256 internal constant MAX_INT_256 = type(int256).max;\n int256 internal constant MIN_INT_256 = type(int256).min;\n\n /**\n * @dev Getter function since constants can't be read directly from libraries.\n */\n function preciseUnit() internal pure returns (uint256) {\n return PRECISE_UNIT;\n }\n\n /**\n * @dev Getter function since constants can't be read directly from libraries.\n */\n function preciseUnitInt() internal pure returns (int256) {\n return PRECISE_UNIT_INT;\n }\n\n /**\n * @dev Getter function since constants can't be read directly from libraries.\n */\n function maxUint256() internal pure returns (uint256) {\n return MAX_UINT_256;\n }\n\n /**\n * @dev Getter function since constants can't be read directly from libraries.\n */\n function maxInt256() internal pure returns (int256) {\n return MAX_INT_256;\n }\n\n /**\n * @dev Getter function since constants can't be read directly from libraries.\n */\n function minInt256() internal pure returns (int256) {\n return MIN_INT_256;\n }\n\n /**\n * @dev Multiplies value a by value b (result is rounded down). It's assumed that the value b is the significand\n * of a number with 18 decimals precision.\n */\n function preciseMul(uint256 a, uint256 b) internal pure returns (uint256) {\n return a.mul(b).div(PRECISE_UNIT);\n }\n\n /**\n * @dev Multiplies value a by value b (result is rounded towards zero). It's assumed that the value b is the\n * significand of a number with 18 decimals precision.\n */\n function preciseMul(int256 a, int256 b) internal pure returns (int256) {\n return a.mul(b).div(PRECISE_UNIT_INT);\n }\n\n /**\n * @dev Multiplies value a by value b (result is rounded up). It's assumed that the value b is the significand\n * of a number with 18 decimals precision.\n */\n function preciseMulCeil(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0 || b == 0) {\n return 0;\n }\n return a.mul(b).sub(1).div(PRECISE_UNIT).add(1);\n }\n\n /**\n * @dev Divides value a by value b (result is rounded down).\n */\n function preciseDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n return a.mul(PRECISE_UNIT).div(b);\n }\n\n /**\n * @dev Divides value a by value b (result is rounded towards 0).\n */\n function preciseDiv(int256 a, int256 b) internal pure returns (int256) {\n return a.mul(PRECISE_UNIT_INT).div(b);\n }\n\n /**\n * @dev Divides value a by value b (result is rounded up or away from 0).\n */\n function preciseDivCeil(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b != 0, 'Cant divide by 0');\n\n return a > 0 ? a.mul(PRECISE_UNIT).sub(1).div(b).add(1) : 0;\n }\n\n /**\n * @dev Divides value a by value b (result is rounded down - positive numbers toward 0 and negative away from 0).\n */\n function divDown(int256 a, int256 b) internal pure returns (int256) {\n require(b != 0, 'Cant divide by 0');\n require(a != MIN_INT_256 || b != -1, 'Invalid input');\n\n int256 result = a.div(b);\n if (a ^ b < 0 && a % b != 0) {\n result -= 1;\n }\n\n return result;\n }\n\n /**\n * @dev Multiplies value a by value b where rounding is towards the lesser number.\n * (positive values are rounded towards zero and negative values are rounded away from 0).\n */\n function conservativePreciseMul(int256 a, int256 b) internal pure returns (int256) {\n return divDown(a.mul(b), PRECISE_UNIT_INT);\n }\n\n /**\n * @dev Divides value a by value b where rounding is towards the lesser number.\n * (positive values are rounded towards zero and negative values are rounded away from 0).\n */\n function conservativePreciseDiv(int256 a, int256 b) internal pure returns (int256) {\n return divDown(a.mul(PRECISE_UNIT_INT), b);\n }\n\n /**\n * @dev Performs the power on a specified value, reverts on overflow.\n */\n function safePower(uint256 a, uint256 pow) internal pure returns (uint256) {\n require(a > 0, 'Value must be positive');\n\n uint256 result = 1;\n for (uint256 i = 0; i < pow; i++) {\n uint256 previousResult = result;\n\n // Using safemath multiplication prevents overflows\n result = previousResult.mul(a);\n }\n\n return result;\n }\n}\n" + }, + "contracts/lib/Math.sol": { + "content": "/*\n Original version by Synthetix.io\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\n\n Adapted by Babylon Finance.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\n\n// Libraries\nimport './SafeDecimalMath.sol';\n\n// https://docs.synthetix.io/contracts/source/libraries/math\nlibrary Math {\n using SafeMath for uint256;\n using SafeDecimalMath for uint256;\n\n /**\n * @dev Uses \"exponentiation by squaring\" algorithm where cost is 0(logN)\n * vs 0(N) for naive repeated multiplication.\n * Calculates x^n with x as fixed-point and n as regular unsigned int.\n * Calculates to 18 digits of precision with SafeDecimalMath.unit()\n */\n function powDecimal(uint256 x, uint256 n) internal pure returns (uint256) {\n // https://mpark.github.io/programming/2014/08/18/exponentiation-by-squaring/\n\n uint256 result = SafeDecimalMath.unit();\n while (n > 0) {\n if (n % 2 != 0) {\n result = result.multiplyDecimal(x);\n }\n x = x.multiplyDecimal(x);\n n /= 2;\n }\n return result;\n }\n\n function abs(int256 x) internal pure returns (int256) {\n return x >= 0 ? x : -x;\n }\n}\n" + }, + "contracts/lib/Safe3296.sol": { + "content": "/*\n Copyright 2021 Babylon Finance.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\n\nimport '@openzeppelin/contracts/math/SafeMath.sol';\n\nlibrary Safe3296 {\n using SafeMath for uint256;\n\n /**\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint32\n *\n * @dev internal function to convert from uint256 to uint32\n */\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2**32, errorMessage);\n return uint32(n);\n }\n\n /**\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint96\n *\n * @dev internal function to convert from uint256 to uint96\n */\n function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2**96, errorMessage);\n return uint96(n);\n }\n\n /**\n * INTERNAL FUNCTION. Internal function to add two uint96 numbers\n *\n * @dev internal safe math function to add two uint96 numbers\n */\n function add96(\n uint96 a,\n uint96 b,\n string memory errorMessage\n ) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n /**\n * INTERNAL FUNCTION. Internal function to subtract two uint96 numbers\n *\n * @dev internal safe math function to subtract two uint96 numbers\n */\n function sub96(\n uint96 a,\n uint96 b,\n string memory errorMessage\n ) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n}\n" + }, + "contracts/lib/BabylonErrors.sol": { + "content": "/*\n Original version by Synthetix.io\n https://docs.synthetix.io/contracts/source/libraries/safedecimalmath\n\n Adapted by Babylon Finance.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\n\n// solhint-disable\n\n/**\n * @notice Forked from https://github.com/balancer-labs/balancer-core-v2/blob/master/contracts/lib/helpers/BalancerErrors.sol\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 // 'BAB#{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 \"BAB#\" part is a known constant\n // (0x42414223): 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(0x42414223000000, 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 // Max deposit limit needs to be under the limit\n uint256 internal constant MAX_DEPOSIT_LIMIT = 0;\n // Creator needs to deposit\n uint256 internal constant MIN_CONTRIBUTION = 1;\n // Min Garden token supply >= 0\n uint256 internal constant MIN_TOKEN_SUPPLY = 2;\n // Deposit hardlock needs to be at least 1 block\n uint256 internal constant DEPOSIT_HARDLOCK = 3;\n // Needs to be at least the minimum\n uint256 internal constant MIN_LIQUIDITY = 4;\n // _reserveAssetQuantity is not equal to msg.value\n uint256 internal constant MSG_VALUE_DO_NOT_MATCH = 5;\n // Withdrawal amount has to be equal or less than msg.sender balance\n uint256 internal constant MSG_SENDER_TOKENS_DO_NOT_MATCH = 6;\n // Tokens are staked\n uint256 internal constant TOKENS_STAKED = 7;\n // Balance too low\n uint256 internal constant BALANCE_TOO_LOW = 8;\n // msg.sender doesn't have enough tokens\n uint256 internal constant MSG_SENDER_TOKENS_TOO_LOW = 9;\n // There is an open redemption window already\n uint256 internal constant REDEMPTION_OPENED_ALREADY = 10;\n // Cannot request twice in the same window\n uint256 internal constant ALREADY_REQUESTED = 11;\n // Rewards and profits already claimed\n uint256 internal constant ALREADY_CLAIMED = 12;\n // Value have to be greater than zero\n uint256 internal constant GREATER_THAN_ZERO = 13;\n // Must be reserve asset\n uint256 internal constant MUST_BE_RESERVE_ASSET = 14;\n // Only contributors allowed\n uint256 internal constant ONLY_CONTRIBUTOR = 15;\n // Only controller allowed\n uint256 internal constant ONLY_CONTROLLER = 16;\n // Only creator allowed\n uint256 internal constant ONLY_CREATOR = 17;\n // Only keeper allowed\n uint256 internal constant ONLY_KEEPER = 18;\n // Fee is too high\n uint256 internal constant FEE_TOO_HIGH = 19;\n // Only strategy allowed\n uint256 internal constant ONLY_STRATEGY = 20;\n // Only active allowed\n uint256 internal constant ONLY_ACTIVE = 21;\n // Only inactive allowed\n uint256 internal constant ONLY_INACTIVE = 22;\n // Address should be not zero address\n uint256 internal constant ADDRESS_IS_ZERO = 23;\n // Not within range\n uint256 internal constant NOT_IN_RANGE = 24;\n // Value is too low\n uint256 internal constant VALUE_TOO_LOW = 25;\n // Value is too high\n uint256 internal constant VALUE_TOO_HIGH = 26;\n // Only strategy or protocol allowed\n uint256 internal constant ONLY_STRATEGY_OR_CONTROLLER = 27;\n // Normal withdraw possible\n uint256 internal constant NORMAL_WITHDRAWAL_POSSIBLE = 28;\n // User does not have permissions to join garden\n uint256 internal constant USER_CANNOT_JOIN = 29;\n // User does not have permissions to add strategies in garden\n uint256 internal constant USER_CANNOT_ADD_STRATEGIES = 30;\n // Only Protocol or garden\n uint256 internal constant ONLY_PROTOCOL_OR_GARDEN = 31;\n // Only Strategist\n uint256 internal constant ONLY_STRATEGIST = 32;\n // Only Integration\n uint256 internal constant ONLY_INTEGRATION = 33;\n // Only garden and data not set\n uint256 internal constant ONLY_GARDEN_AND_DATA_NOT_SET = 34;\n // Only active garden\n uint256 internal constant ONLY_ACTIVE_GARDEN = 35;\n // Contract is not a garden\n uint256 internal constant NOT_A_GARDEN = 36;\n // Not enough tokens\n uint256 internal constant STRATEGIST_TOKENS_TOO_LOW = 37;\n // Stake is too low\n uint256 internal constant STAKE_HAS_TO_AT_LEAST_ONE = 38;\n // Duration must be in range\n uint256 internal constant DURATION_MUST_BE_IN_RANGE = 39;\n // Max Capital Requested\n uint256 internal constant MAX_CAPITAL_REQUESTED = 41;\n // Votes are already resolved\n uint256 internal constant VOTES_ALREADY_RESOLVED = 42;\n // Voting window is closed\n uint256 internal constant VOTING_WINDOW_IS_OVER = 43;\n // Strategy needs to be active\n uint256 internal constant STRATEGY_NEEDS_TO_BE_ACTIVE = 44;\n // Max capital reached\n uint256 internal constant MAX_CAPITAL_REACHED = 45;\n // Capital is less then rebalance\n uint256 internal constant CAPITAL_IS_LESS_THAN_REBALANCE = 46;\n // Strategy is in cooldown period\n uint256 internal constant STRATEGY_IN_COOLDOWN = 47;\n // Strategy is not executed\n uint256 internal constant STRATEGY_IS_NOT_EXECUTED = 48;\n // Strategy is not over yet\n uint256 internal constant STRATEGY_IS_NOT_OVER_YET = 49;\n // Strategy is already finalized\n uint256 internal constant STRATEGY_IS_ALREADY_FINALIZED = 50;\n // No capital to unwind\n uint256 internal constant STRATEGY_NO_CAPITAL_TO_UNWIND = 51;\n // Strategy needs to be inactive\n uint256 internal constant STRATEGY_NEEDS_TO_BE_INACTIVE = 52;\n // Duration needs to be less\n uint256 internal constant DURATION_NEEDS_TO_BE_LESS = 53;\n // Can't sweep reserve asset\n uint256 internal constant CANNOT_SWEEP_RESERVE_ASSET = 54;\n // Voting window is opened\n uint256 internal constant VOTING_WINDOW_IS_OPENED = 55;\n // Strategy is executed\n uint256 internal constant STRATEGY_IS_EXECUTED = 56;\n // Min Rebalance Capital\n uint256 internal constant MIN_REBALANCE_CAPITAL = 57;\n // Not a valid strategy NFT\n uint256 internal constant NOT_STRATEGY_NFT = 58;\n // Garden Transfers Disabled\n uint256 internal constant GARDEN_TRANSFERS_DISABLED = 59;\n // Tokens are hardlocked\n uint256 internal constant TOKENS_HARDLOCKED = 60;\n // Max contributors reached\n uint256 internal constant MAX_CONTRIBUTORS = 61;\n // BABL Transfers Disabled\n uint256 internal constant BABL_TRANSFERS_DISABLED = 62;\n // Strategy duration range error\n uint256 internal constant DURATION_RANGE = 63;\n // Checks the min amount of voters\n uint256 internal constant MIN_VOTERS_CHECK = 64;\n // Ge contributor power error\n uint256 internal constant CONTRIBUTOR_POWER_CHECK_WINDOW = 65;\n // Not enough reserve set aside\n uint256 internal constant NOT_ENOUGH_RESERVE = 66;\n // Garden is already public\n uint256 internal constant GARDEN_ALREADY_PUBLIC = 67;\n // Withdrawal with penalty\n uint256 internal constant WITHDRAWAL_WITH_PENALTY = 68;\n // Withdrawal with penalty\n uint256 internal constant ONLY_MINING_ACTIVE = 69;\n // Overflow in supply\n uint256 internal constant OVERFLOW_IN_SUPPLY = 70;\n // Overflow in power\n uint256 internal constant OVERFLOW_IN_POWER = 71;\n // Not a system contract\n uint256 internal constant NOT_A_SYSTEM_CONTRACT = 72;\n // Strategy vs Garden mismatch\n uint256 internal constant STRATEGY_GARDEN_MISMATCH = 73;\n // Minimum quarters is 1\n uint256 internal constant QUARTERS_MIN_1 = 74;\n // Too many strategy operations\n uint256 internal constant TOO_MANY_OPS = 75;\n // Only operations\n uint256 internal constant ONLY_OPERATION = 76;\n // Strat params wrong length\n uint256 internal constant STRAT_PARAMS_LENGTH = 77;\n // Garden params wrong length\n uint256 internal constant GARDEN_PARAMS_LENGTH = 78;\n // Token names too long\n uint256 internal constant NAME_TOO_LONG = 79;\n // Contributor power overflows over garden power\n uint256 internal constant CONTRIBUTOR_POWER_OVERFLOW = 80;\n // Contributor power window out of bounds\n uint256 internal constant CONTRIBUTOR_POWER_CHECK_DEPOSITS = 81;\n}\n" + }, + "contracts/interfaces/IRewardsDistributor.sol": { + "content": "/*\n Copyright 2021 Babylon Finance.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\n\n/**\n * @title IRewardsDistributor\n * @author Babylon Finance\n *\n * Interface for the distribute rewards of the BABL Mining Program.\n */\n\ninterface IRewardsDistributor {\n // Structs\n struct PrincipalPerTimestamp {\n uint256 principal;\n uint256 time;\n uint256 timeListPointer;\n }\n\n function protocolPrincipal() external view returns (uint256);\n\n function pid() external view returns (uint256);\n\n // solhint-disable-next-line\n function EPOCH_DURATION() external pure returns (uint256);\n\n // solhint-disable-next-line\n function START_TIME() external view returns (uint256);\n\n // solhint-disable-next-line\n function Q1_REWARDS() external pure returns (uint256);\n\n // solhint-disable-next-line\n function DECAY_RATE() external pure returns (uint256);\n\n function addProtocolPrincipal(uint256 _capital) external;\n\n function substractProtocolPrincipal(uint256 _capital) external;\n\n function getStrategyRewards(address _strategy) external returns (uint96);\n\n function sendTokensToContributor(address _to, uint96 _amount) external;\n\n function getRewards(\n address _garden,\n address _contributor,\n address[] calldata _finalizedStrategies\n ) external view returns (uint256, uint96);\n\n function getContributorPower(\n address _garden,\n address _contributor,\n uint256 _from,\n uint256 _to\n ) external view returns (uint256);\n\n /**\n function getContributor(address _garden, address _contributor)\n external\n view\n returns (\n uint256,\n uint256,\n uint256[] memory,\n uint256\n );\n */\n function updateGardenPower(address _garden, uint256 _pid) external;\n\n function setContributorTimestampParams(\n address _garden,\n address _contributor,\n uint256 _previousBalance,\n bool _depositOrWithdraw,\n uint256 _pid\n ) external;\n\n function tokenSupplyPerQuarter(uint256 quarter) external view returns (uint96);\n\n function checkProtocol(uint256 _time)\n external\n view\n returns (\n uint256 principal,\n uint256 time,\n uint256 quarterBelonging,\n uint256 timeListPointer,\n uint256 power\n );\n\n function checkQuarter(uint256 _num)\n external\n view\n returns (\n uint256 quarterPrincipal,\n uint256 quarterNumber,\n uint256 quarterPower,\n uint96 supplyPerQuarter\n );\n}\n" + }, + "contracts/interfaces/IPriceOracle.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Modified from (Set Protocol IPriceOracle)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\npragma solidity 0.7.6;\n\n/**\n * @title IPriceOracle\n * @author Babylon Finance\n *\n * Interface for interacting with PriceOracle\n */\ninterface IPriceOracle {\n /* ============ Functions ============ */\n\n function getPrice(address _assetOne, address _assetTwo) external view returns (uint256);\n\n function updateAdapters(address _assetOne, address _assetTwo) external;\n}\n" + }, + "contracts/token/TimeLockRegistry.sol": { + "content": "/*\n Copyright 2021 Babylon Finance.\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\npragma experimental ABIEncoderV2;\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\n\nimport {TimeLockedToken} from './TimeLockedToken.sol';\nimport {AddressArrayUtils} from '../lib/AddressArrayUtils.sol';\n\n/**\n * @title TimeLockRegistry\n * @notice Register Lockups for TimeLocked ERC20 Token BABL (e.g. vesting)\n * @author Babylon Finance\n * @dev This contract allows owner to register distributions for a TimeLockedToken\n *\n * To register a distribution, register method should be called by the owner.\n * claim() should be called only by the BABL Token smartcontract (modifier onlyBABLToken)\n * when any account registered to receive tokens make its own claim\n * If case of a mistake, owner can cancel registration before the claim is done by the account\n *\n * Note this contract address must be setup in the TimeLockedToken's contract pointing\n * to interact with (e.g. setTimeLockRegistry() function)\n */\n\ncontract TimeLockRegistry is Ownable {\n using SafeMath for uint256;\n using Address for address;\n using AddressArrayUtils for address[];\n\n /* ============ Events ============ */\n\n event Register(address receiver, uint256 distribution);\n event Cancel(address receiver, uint256 distribution);\n event Claim(address account, uint256 distribution);\n\n /* ============ Modifiers ============ */\n\n modifier onlyBABLToken() {\n require(msg.sender == address(token), 'only BABL Token');\n _;\n }\n\n /* ============ State Variables ============ */\n\n // time locked token\n TimeLockedToken public token;\n\n /**\n * @notice The profile of each token owner under vesting conditions and its special conditions\n * @param receiver Account being registered\n * @param investorType Indicates whether or not is a Team member (true = team member / advisor, false = private investor)\n * @param vestingStarting Date When the vesting begins for such token owner\n * @param distribution Tokens amount that receiver is due to get\n */\n struct Registration {\n address receiver;\n uint256 distribution;\n bool investorType;\n uint256 vestingStartingDate;\n }\n\n /**\n * @notice The profile of each token owner under vesting conditions and its special conditions\n * @param team Indicates whether or not is a Team member (true = team member / advisor, false = private investor)\n * @param vestingBegin When the vesting begins for such token owner\n * @param vestingEnd When the vesting ends for such token owner\n * @param lastClaim When the last claim was done\n */\n struct TokenVested {\n bool team;\n bool cliff;\n uint256 vestingBegin;\n uint256 vestingEnd;\n uint256 lastClaim;\n }\n\n /// @notice A record of token owners under vesting conditions for each account, by index\n mapping(address => TokenVested) public tokenVested;\n\n // mapping from token owners under vesting conditions to BABL due amount (e.g. SAFT addresses, team members, advisors)\n mapping(address => uint256) public registeredDistributions;\n\n // array of all registrations\n address[] public registrations;\n\n // total amount of tokens registered\n uint256 public totalTokens;\n\n // vesting for Team Members\n uint256 private teamVesting = 365 days * 4;\n\n // vesting for Investors and Advisors\n uint256 private investorVesting = 365 days * 3;\n\n /* ============ Functions ============ */\n\n /* ============ Constructor ============ */\n\n /**\n * @notice Construct a new Time Lock Registry and gives ownership to sender\n * @param _token TimeLockedToken contract to use in this registry\n */\n constructor(TimeLockedToken _token) {\n token = _token;\n }\n\n /* ============ External Functions ============ */\n\n /* ============ External Getter Functions ============ */\n\n /**\n * Gets registrations\n *\n * @return address[] Returns list of registrations\n */\n\n function getRegistrations() external view returns (address[] memory) {\n return registrations;\n }\n\n /* =========== Token related Gov Functions ====== */\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION\n *\n * @notice Register multiple investors/team in a batch\n * @param _registrations Registrations to process\n */\n function registerBatch(Registration[] memory _registrations) external onlyOwner {\n for (uint256 i = 0; i < _registrations.length; i++) {\n register(\n _registrations[i].receiver,\n _registrations[i].distribution,\n _registrations[i].investorType,\n _registrations[i].vestingStartingDate\n );\n }\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION\n *\n * @notice Register new account under vesting conditions (Team, Advisors, Investors e.g. SAFT purchaser)\n * @param receiver Address belonging vesting conditions\n * @param distribution Tokens amount that receiver is due to get\n */\n function register(\n address receiver,\n uint256 distribution,\n bool investorType,\n uint256 vestingStartingDate\n ) public onlyOwner {\n require(receiver != address(0), 'TimeLockRegistry::register: cannot register the zero address');\n require(\n receiver != address(this),\n 'TimeLockRegistry::register: Time Lock Registry contract cannot be an investor'\n );\n require(distribution != 0, 'TimeLockRegistry::register: Distribution = 0');\n require(\n registeredDistributions[receiver] == 0,\n 'TimeLockRegistry::register:Distribution for this address is already registered'\n );\n require(block.timestamp >= 1614553200, 'Cannot register earlier than March 2021'); // 1614553200 is UNIX TIME of 2021 March the 1st\n require(totalTokens.add(distribution) <= IERC20(token).balanceOf(address(this)), 'Not enough tokens');\n\n totalTokens = totalTokens.add(distribution);\n // register distribution\n registeredDistributions[receiver] = distribution;\n registrations.push(receiver);\n\n // register token vested conditions\n TokenVested storage newTokenVested = tokenVested[receiver];\n newTokenVested.team = investorType;\n newTokenVested.vestingBegin = vestingStartingDate;\n\n if (newTokenVested.team == true) {\n newTokenVested.vestingEnd = vestingStartingDate.add(teamVesting);\n } else {\n newTokenVested.vestingEnd = vestingStartingDate.add(investorVesting);\n }\n newTokenVested.lastClaim = vestingStartingDate;\n\n tokenVested[receiver] = newTokenVested;\n\n // emit register event\n emit Register(receiver, distribution);\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel distribution registration in case of mistake and before a claim is done\n *\n * @notice Cancel distribution registration\n * @dev A claim has not to be done earlier\n * @param receiver Address that should have it's distribution removed\n * @return Whether or not it succeeded\n */\n function cancelRegistration(address receiver) external onlyOwner returns (bool) {\n require(registeredDistributions[receiver] != 0, 'Not registered');\n\n // get amount from distributions\n uint256 amount = registeredDistributions[receiver];\n\n // set distribution mapping to 0\n delete registeredDistributions[receiver];\n\n // set tokenVested mapping to 0\n delete tokenVested[receiver];\n\n // remove from the list of all registrations\n registrations.remove(receiver);\n\n // decrease total tokens\n totalTokens = totalTokens.sub(amount);\n\n // emit cancel event\n emit Cancel(receiver, amount);\n\n return true;\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Cancel distribution registration in case of mistake and before a claim is done\n *\n * @notice Cancel already delivered tokens. It might only apply when non-completion of vesting period of Team members or Advisors\n * @dev An automatic override allowance is granted during the claim process\n * @param account Address that should have it's distribution removed\n * @return Whether or not it succeeded\n */\n function cancelDeliveredTokens(address account) external onlyOwner returns (bool) {\n uint256 loosingAmount = token.cancelVestedTokens(account);\n\n // emit cancel event\n emit Cancel(account, loosingAmount);\n return true;\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Recover tokens in Time Lock Registry smartcontract address by the owner\n *\n * @notice Send tokens from smartcontract address to the owner.\n * It might only apply after a cancellation of vested tokens\n * @param amount Amount to be recovered by the owner of the Time Lock Registry smartcontract from its balance\n * @return Whether or not it succeeded\n */\n function transferToOwner(uint256 amount) external onlyOwner returns (bool) {\n SafeERC20.safeTransfer(token, msg.sender, amount);\n return true;\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Claim locked tokens by the registered account\n *\n * @notice Claim tokens due amount.\n * @dev Claim is done by the user in the TimeLocked contract and the contract is the only allowed to call\n * this function on behalf of the user to make the claim\n * @return The amount of tokens registered and delivered after the claim\n */\n function claim(address _receiver) external onlyBABLToken returns (uint256) {\n require(registeredDistributions[_receiver] != 0, 'Not registered');\n\n // get amount from distributions\n uint256 amount = registeredDistributions[_receiver];\n tokenVested[_receiver].lastClaim = block.timestamp;\n\n // set distribution mapping to 0\n delete registeredDistributions[_receiver];\n\n // decrease total tokens\n totalTokens = totalTokens.sub(amount);\n\n // register lockup in TimeLockedToken\n // this will transfer funds from this contract and lock them for sender\n token.registerLockup(\n _receiver,\n amount,\n tokenVested[_receiver].team,\n tokenVested[_receiver].vestingBegin,\n tokenVested[_receiver].vestingEnd,\n tokenVested[_receiver].lastClaim\n );\n\n // set tokenVested mapping to 0\n delete tokenVested[_receiver];\n\n // emit claim event\n emit Claim(_receiver, amount);\n\n return amount;\n }\n\n /* ============ Getter Functions ============ */\n\n function checkVesting(address address_)\n external\n view\n returns (\n bool team,\n uint256 start,\n uint256 end,\n uint256 last\n )\n {\n return (\n tokenVested[address_].team,\n tokenVested[address_].vestingBegin,\n tokenVested[address_].vestingEnd,\n tokenVested[address_].lastClaim\n );\n }\n\n function checkRegisteredDistribution(address address_) external view returns (uint256 amount) {\n return registeredDistributions[address_];\n }\n}\n" + }, + "contracts/token/VoteToken.sol": { + "content": "/*\n Copyright 2021 Babylon Finance.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\n\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\nimport {IVoteToken} from '../interfaces/IVoteToken.sol';\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {Context} from '@openzeppelin/contracts/utils/Context.sol';\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\n\n/**\n * @title VoteToken\n * @notice Custom token which tracks voting power for governance\n * @dev This is an abstraction of a fork of the Compound governance contract\n * VoteToken is used by BABL to allow tracking voting power\n * Checkpoints are created every time state is changed which record voting power\n * Inherits standard ERC20 behavior\n */\n\nabstract contract VoteToken is Context, ERC20, Ownable, IVoteToken, ReentrancyGuard {\n using SafeMath for uint256;\n using Address for address;\n\n /* ============ Events ============ */\n\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);\n\n /* ============ Modifiers ============ */\n\n /* ============ State Variables ============ */\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256('EIP712Domain(string name,uint256 chainId,address verifyingContract)');\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH =\n keccak256('Delegation(address delegatee,uint256 nonce,uint256 expiry)');\n\n /// @dev A record of votes checkpoints for each account, by index\n mapping(address => address) public delegates;\n\n /// @notice A checkpoint for marking number of votes from a given block\n struct Checkpoint {\n uint32 fromBlock;\n uint96 votes;\n }\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping(address => uint32) public numCheckpoints;\n\n /// @notice A record of states for signing / validating signatures\n mapping(address => uint256) public nonces;\n\n /* ============ Functions ============ */\n\n /* ============ Constructor ============ */\n\n constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {}\n\n /* ============ External Functions ============ */\n\n /* =========== Token related Gov Functions ====== */\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Delegating votes from msg.sender to delegatee\n *\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n\n function delegate(address delegatee) external override {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Delegate votes using signature to 'delegatee'\n *\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n\n function delegateBySig(\n address delegatee,\n uint256 nonce,\n uint256 expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external override {\n bytes32 domainSeparator =\n keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name())), getChainId(), address(this)));\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\n bytes32 digest = keccak256(abi.encodePacked('\\x19\\x01', domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), 'VoteToken::delegateBySig: invalid signature');\n require(nonce == nonces[signatory].add(1), 'VoteToken::delegateBySig: invalid nonce');\n nonces[signatory]++;\n require(block.timestamp <= expiry, 'VoteToken::delegateBySig: signature expired');\n return _delegate(signatory, delegatee);\n }\n\n /**\n * GOVERNANCE FUNCTION. Check Delegate votes using signature to 'delegatee'\n *\n * @notice Get current voting power for an account\n * @param account Account to get voting power for\n * @return Voting power for an account\n */\n function getCurrentVotes(address account) external view virtual override returns (uint96) {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n /**\n * GOVERNANCE FUNCTION. Get voting power at a specific block for an account\n *\n * @param account Account to get voting power for\n * @param blockNumber Block to get voting power at\n * @return Voting power for an account at specific block\n */\n function getPriorVotes(address account, uint256 blockNumber) external view virtual override returns (uint96) {\n require(blockNumber < block.number, 'BABLToken::getPriorVotes: not yet determined');\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlock > blockNumber) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlock == blockNumber) {\n return cp.votes;\n } else if (cp.fromBlock < blockNumber) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n function getMyDelegatee() external view override returns (address) {\n return delegates[msg.sender];\n }\n\n function getDelegatee(address account) external view override returns (address) {\n return delegates[account];\n }\n\n function getCheckpoints(address account, uint32 id)\n external\n view\n override\n returns (uint32 fromBlock, uint96 votes)\n {\n Checkpoint storage getCheckpoint = checkpoints[account][id];\n return (getCheckpoint.fromBlock, getCheckpoint.votes);\n }\n\n function getNumberOfCheckpoints(address account) external view override returns (uint32) {\n return numCheckpoints[account];\n }\n\n /* ============ Internal Only Function ============ */\n\n /**\n * GOVERNANCE FUNCTION. Make a delegation\n *\n * @dev Internal function to delegate voting power to an account\n * @param delegator The address of the account delegating votes from\n * @param delegatee The address to delegate votes to\n */\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint96 delegatorBalance = safe96(_balanceOf(delegator), 'VoteToken::_delegate: uint96 overflow');\n delegates[delegator] = delegatee;\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _balanceOf(address account) internal view virtual returns (uint256) {\n return balanceOf(account);\n }\n\n /**\n * GOVERNANCE FUNCTION. Move the delegates\n *\n * @dev Internal function to move delegates between accounts\n * @param srcRep The address of the account delegating votes from\n * @param dstRep The address of the account delegating votes to\n * @param amount The voting power to move\n */\n function _moveDelegates(\n address srcRep,\n address dstRep,\n uint96 amount\n ) internal {\n if (srcRep != dstRep && amount > 0) {\n // It must not revert but do nothing in cases of address(0) being part of the move\n // Sub voting amount to source in case it is not the zero address (e.g. transfers)\n if (srcRep != address(0)) {\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint96 srcRepNew = sub96(srcRepOld, amount, 'VoteToken::_moveDelegates: vote amount underflows');\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n if (dstRep != address(0)) {\n // Add it to destination in case it is not the zero address (e.g. any transfer of tokens or delegations except a first mint to a specific address)\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint96 dstRepNew = add96(dstRepOld, amount, 'VoteToken::_moveDelegates: vote amount overflows');\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n /**\n * GOVERNANCE FUNCTION. Internal function to write a checkpoint for voting power\n *\n * @dev internal function to write a checkpoint for voting power\n * @param delegatee The address of the account delegating votes to\n * @param nCheckpoints The num checkpoint\n * @param oldVotes The previous voting power\n * @param newVotes The new voting power\n */\n function _writeCheckpoint(\n address delegatee,\n uint32 nCheckpoints,\n uint96 oldVotes,\n uint96 newVotes\n ) internal {\n uint32 blockNumber = safe32(block.number, 'VoteToken::_writeCheckpoint: block number exceeds 32 bits');\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\n }\n\n /**\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint32\n *\n * @dev internal function to convert from uint256 to uint32\n */\n function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2**32, errorMessage);\n return uint32(n);\n }\n\n /**\n * INTERNAL FUNCTION. Internal function to convert from uint256 to uint96\n *\n * @dev internal function to convert from uint256 to uint96\n */\n function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2**96, errorMessage);\n return uint96(n);\n }\n\n /**\n * INTERNAL FUNCTION. Internal function to add two uint96 numbers\n *\n * @dev internal safe math function to add two uint96 numbers\n */\n function add96(\n uint96 a,\n uint96 b,\n string memory errorMessage\n ) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n /**\n * INTERNAL FUNCTION. Internal function to subtract two uint96 numbers\n *\n * @dev internal safe math function to subtract two uint96 numbers\n */\n function sub96(\n uint96 a,\n uint96 b,\n string memory errorMessage\n ) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n /**\n * INTERNAL FUNCTION. Internal function to get chain ID\n *\n * @dev internal function to get chain ID\n */\n function getChainId() internal pure returns (uint256) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n" + }, + "@openzeppelin/contracts/math/SignedSafeMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @title SignedSafeMath\n * @dev Signed math operations with safety checks that revert on error.\n */\nlibrary SignedSafeMath {\n int256 constant private _INT256_MIN = -2**255;\n\n /**\n * @dev Returns the multiplication of two signed integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n *\n * - Multiplication cannot overflow.\n */\n function mul(int256 a, int256 b) internal pure returns (int256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n require(!(a == -1 && b == _INT256_MIN), \"SignedSafeMath: multiplication overflow\");\n\n int256 c = a * b;\n require(c / a == b, \"SignedSafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two signed integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(int256 a, int256 b) internal pure returns (int256) {\n require(b != 0, \"SignedSafeMath: division by zero\");\n require(!(b == -1 && a == _INT256_MIN), \"SignedSafeMath: division overflow\");\n\n int256 c = a / b;\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two signed integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot 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), \"SignedSafeMath: subtraction overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the addition of two signed integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n *\n * - Addition cannot 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), \"SignedSafeMath: addition overflow\");\n\n return c;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../../utils/Context.sol\";\nimport \"./IERC20.sol\";\nimport \"../../math/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 Context, 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_) public {\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 virtual 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 virtual 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 virtual returns (uint8) {\n return _decimals;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\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(address sender, address recipient, uint256 amount) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n _balances[sender] = _balances[sender].sub(amount, \"ERC20: transfer amount 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), \"ERC20: mint to the 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), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n _balances[account] = _balances[account].sub(amount, \"ERC20: burn amount exceeds balance\");\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(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the 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 virtual {\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(address from, address to, uint256 amount) internal virtual { }\n}\n" + }, + "contracts/interfaces/IVoteToken.sol": { + "content": "/*\n Copyright 2021 Babylon Finance.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\n\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\n\ninterface IVoteToken {\n function delegate(address delegatee) external;\n\n function delegateBySig(\n address delegatee,\n uint256 nonce,\n uint256 expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n function getCurrentVotes(address account) external view returns (uint96);\n\n function getPriorVotes(address account, uint256 blockNumber) external view returns (uint96);\n\n function getMyDelegatee() external view returns (address);\n\n function getDelegatee(address account) external view returns (address);\n\n function getCheckpoints(address account, uint32 id) external view returns (uint32 fromBlock, uint96 votes);\n\n function getNumberOfCheckpoints(address account) external view returns (uint32);\n}\n\ninterface IVoteTokenWithERC20 is IVoteToken, IERC20 {}\n" + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\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 () internal {\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 // On the first call to nonReentrant, _notEntered will be true\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _status = _ENTERED;\n\n _;\n\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" + }, + "contracts/strategies/Strategy.sol": { + "content": "/*\n Copyright 2021 Babylon Finance.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\npragma solidity 0.7.6;\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\n\nimport {Initializable} from '@openzeppelin/contracts-upgradeable/proxy/Initializable.sol';\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\n\nimport {Errors, _require} from '../lib/BabylonErrors.sol';\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\nimport {SafeDecimalMath} from '../lib/SafeDecimalMath.sol';\nimport {Math} from '../lib/Math.sol';\nimport {AddressArrayUtils} from '../lib/AddressArrayUtils.sol';\n\nimport {IWETH} from '../interfaces/external/weth/IWETH.sol';\nimport {IBabController} from '../interfaces/IBabController.sol';\nimport {IGarden} from '../interfaces/IGarden.sol';\nimport {ITradeIntegration} from '../interfaces/ITradeIntegration.sol';\nimport {IOperation} from '../interfaces/IOperation.sol';\nimport {IIntegration} from '../interfaces/IIntegration.sol';\nimport {IPriceOracle} from '../interfaces/IPriceOracle.sol';\nimport {IStrategy} from '../interfaces/IStrategy.sol';\nimport {IStrategyNFT} from '../interfaces/IStrategyNFT.sol';\nimport {IRewardsDistributor} from '../interfaces/IRewardsDistributor.sol';\n\n/**\n * @title Strategy\n * @author Babylon Finance\n *\n * Base Strategy contract. Belongs to a garden. Abstract.\n * Will be extended from specific strategy contracts.\n */\ncontract Strategy is ReentrancyGuard, IStrategy, Initializable {\n using SignedSafeMath for int256;\n using SafeMath for uint256;\n using SafeCast for uint256;\n using SafeCast for int256;\n using PreciseUnitMath for int256;\n using PreciseUnitMath for uint256;\n using SafeDecimalMath for int256;\n using SafeDecimalMath for uint256;\n using Math for int256;\n using Math for uint256;\n using AddressArrayUtils for address[];\n using Address for address;\n using SafeERC20 for IERC20;\n\n /* ============ Events ============ */\n event Invoked(address indexed _target, uint256 indexed _value, bytes _data, bytes _returnValue);\n event StrategyVoted(address indexed _garden, uint256 _absoluteVotes, int256 _totalVotes, uint256 _timestamp);\n event StrategyExecuted(address indexed _garden, uint256 _capital, uint256 _fee, uint256 timestamp);\n event StrategyFinalized(address indexed _garden, uint256 _capitalReturned, uint256 _fee, uint256 timestamp);\n event StrategyReduced(address indexed _garden, uint256 _amountReduced, uint256 timestamp);\n event StrategyExpired(address indexed _garden, uint256 _timestamp);\n event StrategyDeleted(address indexed _garden, uint256 _timestamp);\n event StrategyDurationChanged(uint256 _newDuration, uint256 _oldDuration);\n\n /* ============ Modifiers ============ */\n /**\n * Throws if the sender is not the creator of the strategy\n */\n modifier onlyGovernorOrGarden {\n _require(\n (msg.sender == address(garden) && IBabController(controller).isSystemContract(address(garden))) ||\n msg.sender == controller.owner(),\n Errors.ONLY_PROTOCOL_OR_GARDEN\n );\n _;\n }\n\n modifier onlyStrategist {\n _require(msg.sender == strategist, Errors.ONLY_STRATEGIST);\n _;\n }\n\n modifier onlyContributor {\n _require(\n IERC20(address(garden)).balanceOf(msg.sender) > 0 &&\n IBabController(controller).isSystemContract(address(garden)),\n Errors.ONLY_CONTRIBUTOR\n );\n _;\n }\n\n /**\n * Throws if the sender is not a Garden's integration or integration not enabled\n */\n modifier onlyIntegration() {\n // Internal function used to reduce bytecode size\n _require(\n controller.isValidIntegration(IIntegration(msg.sender).getName(), msg.sender),\n Errors.ONLY_INTEGRATION\n );\n _;\n }\n\n /**\n * Throws if the sender is not a Garden's integration or integration not enabled\n */\n modifier onlyOperation() {\n bool found = false;\n for (uint8 i = 0; i < opTypes.length; i++) {\n found = found || msg.sender == controller.enabledOperations(opTypes[i]);\n }\n // Internal function used to reduce bytecode size\n _require(found, Errors.ONLY_OPERATION);\n _;\n }\n\n /**\n * Throws if the garden is not the caller or data is already set\n */\n modifier onlyGardenAndNotSet() {\n _require(\n msg.sender == address(garden) && !dataSet && IBabController(controller).isSystemContract(address(garden)),\n Errors.ONLY_GARDEN_AND_DATA_NOT_SET\n );\n _;\n }\n\n /**\n * Throws if the garden is not active\n */\n modifier onlyActiveGarden() {\n _require(\n garden.active() == true && IBabController(controller).isSystemContract(address(garden)),\n Errors.ONLY_ACTIVE_GARDEN\n );\n _;\n }\n\n /**\n * Throws if the sender is not a keeper in the protocol\n * @param _fee The fee paid to keeper to compensate the gas cost\n */\n modifier onlyKeeper(uint256 _fee) {\n _require(controller.isValidKeeper(msg.sender), Errors.ONLY_KEEPER);\n // We assume that calling keeper functions should be less expensive than 1 million gas and the gas price should be lower than 1000 gwei.\n _require(_fee <= MAX_KEEPER_FEE, Errors.FEE_TOO_HIGH);\n _;\n }\n\n /* ============ Constants ============ */\n\n uint256 internal constant SLIPPAGE_ALLOWED = 5e16; // 1%\n uint256 internal constant HUNDRED_PERCENT = 1e18; // 100%\n uint256 internal constant MAX_CANDIDATE_PERIOD = 7 days;\n uint256 internal constant MIN_VOTERS_TO_BECOME_ACTIVE = 2;\n uint256 internal constant ABSOLUTE_MIN_REBALANCE = 1e18;\n address private constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\n\n // Max Operations\n uint256 internal constant MAX_OPERATIONS = 6;\n\n // Keeper max fee\n uint256 internal constant MAX_KEEPER_FEE = (1e6 * 1e3 gwei);\n\n // Quadratic penalty for looses\n uint256 internal constant STAKE_QUADRATIC_PENALTY_FOR_LOSSES = 175e16; // 1.75e18\n\n /* ============ Structs ============ */\n\n /* ============ State Variables ============ */\n\n // Babylon Controller Address\n IBabController public controller;\n\n // Type of operation.\n // 0 = BuyOperation\n // 1 = LiquidityOperation\n // 2 = VaultOperation\n // 3 = LendOperation\n\n // Asset Status\n // 0 = Liquid\n // 1 = Put as collateral\n // 2 = Borrowed\n // 3 = staked\n\n // Types and data for the operations of this strategy\n uint8[] public override opTypes;\n address[] public override opIntegrations;\n address[] public override opDatas;\n\n // Garden that these strategies belong to\n IGarden public override garden;\n\n address public override strategist; // Address of the strategist that submitted the bet\n\n uint256 public override enteredAt; // Timestamp when the strategy was submitted\n uint256 public override enteredCooldownAt; // Timestamp when the strategy reached quorum\n uint256 public override executedAt; // Timestamp when the strategy was executed\n uint256 public override updatedAt; // Timestamp of last capital allocation update\n uint256 public override exitedAt; // Timestamp when the strategy was submitted\n\n address[] public voters; // Addresses with the voters\n int256 public override totalVotes; // Total votes staked\n uint256 public override absoluteTotalVotes; // Absolute number of votes staked\n uint256 public override totalPositiveVotes; // Total positive votes endorsing the strategy execution\n uint256 public override totalNegativeVotes; // Total negative votes against the strategy execution\n bool public override finalized; // Flag that indicates whether we exited the strategy\n bool public override active; // Whether the strategy has met the voting quorum\n bool public dataSet;\n\n uint256 public override duration; // Duration of the bet\n uint256 public override stake; // Amount of stake by the strategist (in reserve asset) needs to be positive\n uint256 public override maxCapitalRequested; // Amount of max capital to allocate\n uint256 public override capitalAllocated; // Current amount of capital allocated\n uint256 public override expectedReturn; // Expect return by this strategy\n uint256 public override capitalReturned; // Actual return by this strategy\n uint256 public override minRebalanceCapital; // Min amount of capital so that it is worth to rebalance the capital here\n address[] public tokensNeeded; // Positions that need to be taken prior to enter the strategy\n uint256[] public tokenAmountsNeeded; // Amount of these positions\n\n uint256 public override strategyRewards; // Rewards allocated for this strategy updated on finalized\n uint256 public override rewardsTotalOverhead; // Potential extra amount we are giving in BABL rewards\n\n // Voters mapped to their votes.\n mapping(address => int256) public votes;\n\n /* ============ Constructor ============ */\n\n /**\n * Initializes the strategy for a garden\n *\n * @param _strategist Address of the strategist\n * @param _garden Address of the garden\n * @param _controller Address of the controller\n * @param _maxCapitalRequested Max Capital requested denominated in the reserve asset (0 to be unlimited)\n * @param _stake Stake with garden participations absolute amounts 1e18\n * @param _strategyDuration Strategy duration in seconds\n * @param _expectedReturn Expected return\n * @param _minRebalanceCapital Min capital that makes executing the strategy worth it\n */\n function initialize(\n address _strategist,\n address _garden,\n address _controller,\n uint256 _maxCapitalRequested,\n uint256 _stake,\n uint256 _strategyDuration,\n uint256 _expectedReturn,\n uint256 _minRebalanceCapital\n ) external override initializer {\n controller = IBabController(_controller);\n\n _require(controller.isSystemContract(_garden), Errors.NOT_A_GARDEN);\n garden = IGarden(_garden);\n uint256 strategistUnlockedBalance =\n IERC20(address(garden)).balanceOf(_strategist).sub(garden.getLockedBalance(_strategist));\n _require(IERC20(address(garden)).balanceOf(_strategist) > 0, Errors.STRATEGIST_TOKENS_TOO_LOW);\n _require(strategistUnlockedBalance >= _stake, Errors.TOKENS_STAKED);\n // TODO: adjust this calc\n _require(_stake > 0, Errors.STAKE_HAS_TO_AT_LEAST_ONE);\n _require(\n _strategyDuration >= garden.minStrategyDuration() && _strategyDuration <= garden.maxStrategyDuration(),\n Errors.DURATION_MUST_BE_IN_RANGE\n );\n _require(_minRebalanceCapital >= ABSOLUTE_MIN_REBALANCE, Errors.MIN_REBALANCE_CAPITAL);\n _require(_maxCapitalRequested >= _minRebalanceCapital, Errors.MAX_CAPITAL_REQUESTED);\n\n strategist = _strategist;\n enteredAt = block.timestamp;\n stake = _stake;\n duration = _strategyDuration;\n expectedReturn = _expectedReturn;\n capitalAllocated = 0;\n minRebalanceCapital = _minRebalanceCapital;\n maxCapitalRequested = _maxCapitalRequested;\n totalVotes = _stake.toInt256();\n votes[_strategist] = _stake.toInt256();\n absoluteTotalVotes = _stake;\n dataSet = false;\n }\n\n /* ============ External Functions ============ */\n\n /**\n * Sets the data for the operations of this strategy\n * @param _opTypes An array with the op types\n * @param _opIntegrations Addresses with the integration for each op\n * @param _opDatas Bytes with the params for the op in the same position in the opTypes array\n */\n function setData(\n uint8[] calldata _opTypes,\n address[] calldata _opIntegrations,\n address[] calldata _opDatas\n ) external override onlyGardenAndNotSet {\n _require(\n (_opTypes.length == _opIntegrations.length) && (_opIntegrations.length == _opDatas.length),\n Errors.TOO_MANY_OPS\n );\n _require(_opDatas.length < MAX_OPERATIONS && _opDatas.length > 0, Errors.TOO_MANY_OPS);\n for (uint256 i = 0; i < _opTypes.length; i++) {\n IOperation(controller.enabledOperations(_opTypes[i])).validateOperation(\n _opDatas[i],\n garden,\n _opIntegrations[i],\n i\n );\n _require(\n controller.isValidIntegration(IIntegration(_opIntegrations[i]).getName(), _opIntegrations[i]),\n Errors.ONLY_INTEGRATION\n );\n }\n\n opTypes = _opTypes;\n opIntegrations = _opIntegrations;\n opDatas = _opDatas;\n dataSet = true;\n }\n\n /**\n * Adds off-chain voting results on-chain.\n * @param _voters An array of garden member who voted on strategy.\n * @param _votes An array of votes by on strategy by garden members.\n * Votes can be positive or negative.\n * @param _absoluteTotalVotes Absolute number of votes. _absoluteTotalVotes = abs(upvotes) + abs(downvotes).\n * @param _totalVotes Total number of votes. _totalVotes = upvotes + downvotes.\n * @param _fee The fee paid to keeper to compensate the gas cost\n */\n function resolveVoting(\n address[] calldata _voters,\n int256[] calldata _votes,\n uint256 _absoluteTotalVotes,\n int256 _totalVotes,\n uint256 _fee\n ) external override onlyKeeper(_fee) onlyActiveGarden {\n _require(\n _voters.length >= (garden.totalContributors() == 1 ? 1 : MIN_VOTERS_TO_BECOME_ACTIVE),\n Errors.MIN_VOTERS_CHECK\n );\n _require(!active && !finalized, Errors.VOTES_ALREADY_RESOLVED);\n _require(block.timestamp.sub(enteredAt) <= MAX_CANDIDATE_PERIOD, Errors.VOTING_WINDOW_IS_OVER);\n active = true;\n\n // Set votes data\n for (uint256 i = 0; i < _voters.length; i++) {\n votes[_voters[i]] = _votes[i];\n }\n totalPositiveVotes = _absoluteTotalVotes.toInt256().add(_totalVotes).div(2).toUint256();\n totalNegativeVotes = _absoluteTotalVotes.toInt256().sub(_totalVotes).div(2).toUint256();\n voters = _voters;\n absoluteTotalVotes = absoluteTotalVotes + _absoluteTotalVotes;\n totalVotes = totalVotes + _totalVotes;\n\n // Initializes cooldown\n enteredCooldownAt = block.timestamp;\n emit StrategyVoted(address(garden), _absoluteTotalVotes, _totalVotes, block.timestamp);\n garden.payKeeper(msg.sender, _fee);\n }\n\n /**\n * Executes an strategy that has been activated and gone through the cooldown period.\n * Keeper will validate that quorum is reached, cacluates all the voting data and push it.\n * @param _capital The capital to allocate to this strategy.\n * @param _fee The fee paid to keeper to compensate the gas cost.\n */\n function executeStrategy(uint256 _capital, uint256 _fee)\n external\n override\n onlyKeeper(_fee)\n nonReentrant\n onlyActiveGarden\n {\n _require(active, Errors.STRATEGY_NEEDS_TO_BE_ACTIVE);\n _require(capitalAllocated.add(_capital) <= maxCapitalRequested, Errors.MAX_CAPITAL_REACHED);\n _require(_capital >= minRebalanceCapital, Errors.CAPITAL_IS_LESS_THAN_REBALANCE);\n _require(\n block.timestamp.sub(enteredCooldownAt) >= garden.strategyCooldownPeriod(),\n Errors.STRATEGY_IN_COOLDOWN\n );\n\n // Execute enter operation\n garden.allocateCapitalToStrategy(_capital);\n capitalAllocated = capitalAllocated.add(_capital);\n _enterStrategy(_capital);\n\n // Add to Rewards Distributor an update of the Protocol Principal for BABL Mining Rewards calculations\n IRewardsDistributor rewardsDistributor = IRewardsDistributor(IBabController(controller).rewardsDistributor());\n // Sets the executed timestamp on first execution\n if (executedAt == 0) {\n executedAt = block.timestamp;\n } else {\n // Updating allocation - we need to consider the difference for the calculation\n // We control the potential overhead in BABL Rewards calculations to keep control\n // and avoid distributing a wrong number (e.g. flash loans)\n if (_hasMiningStarted()) {\n // The Mining program has not started on time for this strategy\n rewardsTotalOverhead = rewardsTotalOverhead.add(_capital.mul(block.timestamp.sub(updatedAt)));\n }\n }\n if (_hasMiningStarted()) {\n // The Mining program has not started on time for this strategy\n rewardsDistributor.addProtocolPrincipal(_capital);\n }\n garden.payKeeper(msg.sender, _fee);\n updatedAt = block.timestamp;\n emit StrategyExecuted(address(garden), _capital, _fee, block.timestamp);\n }\n\n /**\n * Exits from an executed strategy.\n * Returns balance back to the garden and sets the capital aside for withdrawals in ETH.\n * Pays the keeper.\n * Updates the reserve asset position accordingly.\n * @param _fee The fee paid to keeper to compensate the gas cost\n * @param _tokenURI URL with the JSON for the strategy\n */\n function finalizeStrategy(uint256 _fee, string memory _tokenURI)\n external\n override\n onlyKeeper(_fee)\n nonReentrant\n onlyActiveGarden\n {\n _require(executedAt > 0, Errors.STRATEGY_IS_NOT_EXECUTED);\n _require(block.timestamp > executedAt.add(duration), Errors.STRATEGY_IS_NOT_OVER_YET);\n _require(!finalized, Errors.STRATEGY_IS_ALREADY_FINALIZED);\n // Execute exit operations\n _exitStrategy(HUNDRED_PERCENT);\n // Mark as finalized\n finalized = true;\n active = false;\n exitedAt = block.timestamp;\n updatedAt = exitedAt;\n // Mint NFT\n IStrategyNFT(IBabController(controller).strategyNFT()).grantStrategyNFT(strategist, _tokenURI);\n // Pay Keeper Fee\n garden.payKeeper(msg.sender, _fee);\n // Transfer rewards\n _transferStrategyPrincipal(_fee);\n // Send rest to garden if any\n _sendReserveAssetToGarden();\n emit StrategyFinalized(address(garden), capitalReturned, _fee, block.timestamp);\n }\n\n /**\n * Partially unwinds an strategy.\n * Triggered from an immediate withdraw in the Garden.\n * @param _amountToUnwind The amount of capital to unwind\n */\n function unwindStrategy(uint256 _amountToUnwind) external override onlyGovernorOrGarden nonReentrant {\n _require(active && !finalized, Errors.STRATEGY_NEEDS_TO_BE_ACTIVE);\n _require(_amountToUnwind <= capitalAllocated.sub(minRebalanceCapital), Errors.STRATEGY_NO_CAPITAL_TO_UNWIND);\n // Exits and enters the strategy\n _exitStrategy(_amountToUnwind.preciseDiv(capitalAllocated));\n updatedAt = block.timestamp;\n capitalAllocated = capitalAllocated.sub(_amountToUnwind);\n // Removes protocol principal for the calculation of rewards\n IRewardsDistributor rewardsDistributor = IRewardsDistributor(IBabController(controller).rewardsDistributor());\n if (_hasMiningStarted()) {\n // Only if the Mining program started on time for this strategy\n rewardsDistributor.substractProtocolPrincipal(_amountToUnwind);\n }\n // Send the amount back to the warden for the immediate withdrawal\n // TODO: Transfer the precise value; not entire balance\n IERC20(garden.reserveAsset()).safeTransfer(\n address(garden),\n IERC20(garden.reserveAsset()).balanceOf(address(this))\n );\n emit StrategyReduced(address(garden), _amountToUnwind, block.timestamp);\n }\n\n /**\n * Expires a candidate that has spent more than CANDIDATE_PERIOD without\n * reaching quorum\n * @param _fee The keeper fee\n */\n function expireStrategy(uint256 _fee) external onlyKeeper(_fee) nonReentrant onlyActiveGarden {\n _require(!active, Errors.STRATEGY_NEEDS_TO_BE_INACTIVE);\n _require(block.timestamp.sub(enteredAt) > MAX_CANDIDATE_PERIOD, Errors.VOTING_WINDOW_IS_OPENED);\n // pay keeper before expiring strategy\n garden.payKeeper(msg.sender, _fee);\n _deleteCandidateStrategy();\n emit StrategyExpired(address(garden), block.timestamp);\n }\n\n /**\n * Delete a candidate strategy by the strategist\n */\n function deleteCandidateStrategy() external onlyStrategist {\n _deleteCandidateStrategy();\n emit StrategyDeleted(address(garden), block.timestamp);\n }\n\n /**\n * Lets the strategist change the duration of the strategy\n * @param _newDuration New duration of the strategy\n */\n function changeStrategyDuration(uint256 _newDuration) external override onlyStrategist {\n _require(!finalized, Errors.STRATEGY_IS_ALREADY_FINALIZED);\n _require(_newDuration < duration, Errors.DURATION_NEEDS_TO_BE_LESS);\n _require(_newDuration >= garden.minStrategyDuration(), Errors.DURATION_NEEDS_TO_BE_LESS);\n emit StrategyDurationChanged(_newDuration, duration);\n duration = _newDuration;\n }\n\n /**\n * Any tokens (other than the target) that are sent here by mistake are recoverable by contributors\n * Converts it to the reserve asset and sends it to the garden.\n * @param _token Address of the token to sweep\n */\n function sweep(address _token) external onlyContributor {\n _require(_token != garden.reserveAsset(), Errors.CANNOT_SWEEP_RESERVE_ASSET);\n _require(!active, Errors.STRATEGY_NEEDS_TO_BE_INACTIVE);\n\n uint256 balance = IERC20(_token).balanceOf(address(this));\n _require(balance > 0, Errors.BALANCE_TOO_LOW);\n\n _trade(_token, balance, garden.reserveAsset());\n // Send reserve asset to garden\n _sendReserveAssetToGarden();\n }\n\n /**\n * Helper to invoke Approve on ERC20 from integrations in the strategy context\n */\n function invokeApprove(\n address _spender,\n address _asset,\n uint256 _quantity\n ) external override onlyIntegration {\n IERC20(_asset).approve(_spender, _quantity);\n }\n\n /**\n * Helper to invoke a call to an external contract from integrations in the strategy context\n * @param _target Address of the smart contract to call\n * @param _value Quantity of Ether to provide the call (typically 0)\n * @param _data Encoded function selector and arguments\n * @return _returnValue Bytes encoded return value\n */\n function invokeFromIntegration(\n address _target,\n uint256 _value,\n bytes calldata _data\n ) external override onlyIntegration returns (bytes memory) {\n return _invoke(_target, _value, _data);\n }\n\n /**\n * Function that calculates the price using the oracle and executes a trade.\n * Must call the exchange to get the price and pass minReceiveQuantity accordingly.\n * @param _sendToken Token to exchange\n * @param _sendQuantity Amount of tokens to send\n * @param _receiveToken Token to receive\n */\n function trade(\n address _sendToken,\n uint256 _sendQuantity,\n address _receiveToken\n ) external override onlyOperation returns (uint256) {\n return _trade(_sendToken, _sendQuantity, _receiveToken);\n }\n\n /**\n * Deposits or withdraws weth from an operation in this context\n * @param _isDeposit Wether is a deposit or withdraw\n * @param _wethAmount Amount to deposit or withdraw\n */\n function handleWeth(bool _isDeposit, uint256 _wethAmount) external override onlyOperation {\n if (_isDeposit) {\n IWETH(WETH).deposit{value: _wethAmount}();\n return;\n }\n IWETH(WETH).withdraw(_wethAmount);\n }\n\n /* ============ External Getter Functions ============ */\n\n /**\n * Returns whether this strategy is currently active or not\n */\n function isStrategyActive() public view override returns (bool) {\n return executedAt > 0 && exitedAt == 0;\n }\n\n /**\n * Returns the number of operations in this strategy\n */\n function getOperationsCount() external view override returns (uint256) {\n return opTypes.length;\n }\n\n /**\n * Get the non-state related details of a Strategy\n *\n */\n function getStrategyDetails()\n external\n view\n override\n returns (\n address,\n address,\n uint256,\n uint256,\n uint256,\n int256,\n uint256,\n uint256,\n uint256,\n uint256,\n uint256,\n uint256,\n address,\n uint256\n )\n {\n return (\n address(this),\n strategist,\n opIntegrations.length,\n stake,\n absoluteTotalVotes,\n totalVotes,\n capitalAllocated,\n capitalReturned,\n duration,\n expectedReturn,\n maxCapitalRequested,\n minRebalanceCapital,\n IBabController(controller).strategyNFT(),\n enteredAt\n );\n }\n\n /**\n * Get the state of a Strategy\n *\n */\n function getStrategyState()\n external\n view\n override\n returns (\n address,\n bool,\n bool,\n bool,\n uint256,\n uint256,\n uint256\n )\n {\n return (address(this), active, dataSet, finalized, executedAt, exitedAt, updatedAt);\n }\n\n /**\n * Get the operation params by index\n *\n */\n function getOperationByIndex(uint8 _index)\n external\n view\n override\n returns (\n uint8,\n address,\n address\n )\n {\n return (opTypes[_index], opIntegrations[_index], opDatas[_index]);\n }\n\n /**\n * Gets the NAV of assets under management.\n * It is the sum of the NAV of all the operations\n *\n * @return _nav NAV of the strategy\n */\n function getNAV() public view override returns (uint256) {\n uint256 nav = 0;\n for (uint256 i = 0; i < opTypes.length; i++) {\n IOperation operation = IOperation(IBabController(controller).enabledOperations(uint256(opTypes[i])));\n nav = nav.add(operation.getNAV(opDatas[i], garden, opIntegrations[i]));\n }\n return nav;\n }\n\n /**\n * Gets the votes casted by the contributor in this strategy\n *\n * @param _address Address of the contributor\n * @return _votes Number of votes cast\n */\n function getUserVotes(address _address) external view override returns (int256) {\n return votes[_address];\n }\n\n /* ============ Internal Functions ============ */\n\n /**\n * Enters the strategy.\n * Executes all the operations in order\n * @param _capital Amount of capital that the strategy receives\n */\n function _enterStrategy(uint256 _capital) internal {\n uint256 capitalForNexOperation = _capital;\n address assetAccumulated = garden.reserveAsset();\n uint8 assetStatus = 0; // liquid\n for (uint256 i = 0; i < opTypes.length; i++) {\n IOperation operation = IOperation(IBabController(controller).enabledOperations(opTypes[i]));\n (assetAccumulated, capitalForNexOperation, assetStatus) = operation.executeOperation(\n assetAccumulated,\n capitalForNexOperation,\n assetStatus,\n opDatas[i],\n garden,\n opIntegrations[i]\n );\n }\n }\n\n /**\n * Exits the strategy.\n * Exists all the operations starting by the end.\n * @param _percentage of capital to exit from the strategy\n */\n function _exitStrategy(uint256 _percentage) internal {\n for (uint256 i = opTypes.length; i > 0; i--) {\n IOperation operation = IOperation(IBabController(controller).enabledOperations(opTypes[i - 1]));\n operation.exitOperation(_percentage, opDatas[i - 1], garden, opIntegrations[i - 1]);\n }\n }\n\n /**\n * Deletes this strategy and returns the stake to the strategist\n */\n function _deleteCandidateStrategy() internal {\n _require(executedAt == 0, Errors.STRATEGY_IS_EXECUTED);\n _require(!finalized, Errors.STRATEGY_IS_ALREADY_FINALIZED);\n\n IGarden(garden).expireCandidateStrategy(address(this));\n // TODO: Call selfdestruct??\n }\n\n /**\n * Low level function that allows an integration to make an arbitrary function\n * call to any contract from the garden (garden as msg.sender).\n *\n * @param _target Address of the smart contract to call\n * @param _value Quantity of Ether to provide the call (typically 0)\n * @param _data Encoded function selector and arguments\n * @return _returnValue Bytes encoded return value\n */\n function _invoke(\n address _target,\n uint256 _value,\n bytes memory _data\n ) internal returns (bytes memory _returnValue) {\n _returnValue = _target.functionCallWithValue(_data, _value);\n emit Invoked(_target, _value, _data, _returnValue);\n return _returnValue;\n }\n\n function _sendReserveAssetToGarden() private {\n uint256 remainingReserve = IERC20(garden.reserveAsset()).balanceOf(address(this));\n // Sends the rest back if any\n IERC20(garden.reserveAsset()).safeTransfer(address(garden), remainingReserve);\n }\n\n /**\n * Function that calculates the price using the oracle and executes a trade.\n * Must call the exchange to get the price and pass minReceiveQuantity accordingly.\n * @param _sendToken Token to exchange\n * @param _sendQuantity Amount of tokens to send\n * @param _receiveToken Token to receive\n */\n function _trade(\n address _sendToken,\n uint256 _sendQuantity,\n address _receiveToken\n ) internal returns (uint256) {\n address tradeIntegration = IBabController(controller).defaultTradeIntegration();\n // Uses on chain oracle for all internal strategy operations to avoid attacks // Updates UniSwap TWAP\n IPriceOracle oracle = IPriceOracle(IBabController(controller).priceOracle());\n uint256 pricePerTokenUnit = oracle.getPrice(_sendToken, _receiveToken);\n uint256 exactAmount = _sendQuantity.preciseMul(pricePerTokenUnit);\n uint256 minAmountExpected = exactAmount.sub(exactAmount.preciseMul(SLIPPAGE_ALLOWED));\n ITradeIntegration(tradeIntegration).trade(\n address(this),\n _sendToken,\n _sendQuantity,\n _receiveToken,\n minAmountExpected\n );\n return minAmountExpected;\n }\n\n function _transferStrategyPrincipal(uint256 _fee) internal {\n capitalReturned = IERC20(garden.reserveAsset()).balanceOf(address(this)).sub(_fee);\n address reserveAsset = garden.reserveAsset();\n int256 reserveAssetDelta = capitalReturned.toInt256().sub(capitalAllocated.toInt256());\n uint256 protocolProfits = 0;\n // Strategy returns were positive\n uint256 profits = capitalReturned > capitalAllocated ? capitalReturned.sub(capitalAllocated) : 0; // in reserve asset (weth)\n if (capitalReturned >= capitalAllocated) {\n // Send weth performance fee to the protocol\n protocolProfits = IBabController(controller).protocolPerformanceFee().preciseMul(profits);\n IERC20(reserveAsset).safeTransferFrom(\n address(this),\n IBabController(controller).treasury(),\n protocolProfits\n );\n reserveAssetDelta = reserveAssetDelta.add(int256(-protocolProfits));\n } else {\n // Returns were negative\n // Burn strategist stake and add the amount to the garden\n uint256 burningAmount =\n (stake.sub(capitalReturned.preciseDiv(capitalAllocated).preciseMul(stake))).multiplyDecimal(\n STAKE_QUADRATIC_PENALTY_FOR_LOSSES\n );\n if (IERC20(address(garden)).balanceOf(strategist) < burningAmount) {\n // Avoid underflow burning more than its balance\n burningAmount = IERC20(address(garden)).balanceOf(strategist);\n }\n\n garden.burnStrategistStake(strategist, burningAmount);\n reserveAssetDelta = reserveAssetDelta.add(int256(burningAmount));\n }\n // Return the balance back to the garden\n IERC20(reserveAsset).safeTransferFrom(address(this), address(garden), capitalReturned.sub(protocolProfits));\n // Start a redemption window in the garden with the capital plus the profits for the lps\n (, , uint256 lpsProfitSharing) = IBabController(controller).getProfitSharing();\n garden.startWithdrawalWindow(\n capitalReturned.sub(profits).add((profits).preciseMul(lpsProfitSharing)),\n profits.sub(profits.preciseMul(lpsProfitSharing)).sub(protocolProfits),\n reserveAssetDelta,\n address(this)\n );\n IRewardsDistributor rewardsDistributor = IRewardsDistributor(IBabController(controller).rewardsDistributor());\n // Substract the Principal in the Rewards Distributor to update the Protocol power value\n if (_hasMiningStarted()) {\n // Only if the Mining program started on time for this strategy\n rewardsDistributor.substractProtocolPrincipal(capitalAllocated);\n }\n strategyRewards = rewardsDistributor.getStrategyRewards(address(this)); // Must be zero in case the mining program didnt started on time\n }\n\n function _getPrice(address _assetOne, address _assetTwo) internal view returns (uint256) {\n IPriceOracle oracle = IPriceOracle(IBabController(controller).priceOracle());\n return oracle.getPrice(_assetOne, _assetTwo);\n }\n\n function _hasMiningStarted() internal view returns (bool) {\n IRewardsDistributor rewardsDistributor = IRewardsDistributor(IBabController(controller).rewardsDistributor());\n uint256 rewardsStartTime = rewardsDistributor.START_TIME();\n bool miningStarted = ((enteredAt > rewardsStartTime) && (rewardsStartTime != 0));\n return miningStarted;\n }\n\n // solhint-disable-next-line\n receive() external payable {}\n}\n" + }, + "@openzeppelin/contracts/utils/SafeCast.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\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 /**\n * @dev Returns the downcasted uint128 from uint256, reverting on\n * overflow (when the input is greater than largest uint128).\n *\n * Counterpart to Solidity's `uint128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n */\n function toUint128(uint256 value) internal pure returns (uint128) {\n require(value < 2**128, \"SafeCast: value doesn\\'t fit in 128 bits\");\n return uint128(value);\n }\n\n /**\n * @dev Returns the downcasted uint64 from uint256, reverting on\n * overflow (when the input is greater than largest uint64).\n *\n * Counterpart to Solidity's `uint64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n */\n function toUint64(uint256 value) internal pure returns (uint64) {\n require(value < 2**64, \"SafeCast: value doesn\\'t fit in 64 bits\");\n return uint64(value);\n }\n\n /**\n * @dev Returns the downcasted uint32 from uint256, reverting on\n * overflow (when the input is greater than largest uint32).\n *\n * Counterpart to Solidity's `uint32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n */\n function toUint32(uint256 value) internal pure returns (uint32) {\n require(value < 2**32, \"SafeCast: value doesn\\'t fit in 32 bits\");\n return uint32(value);\n }\n\n /**\n * @dev Returns the downcasted uint16 from uint256, reverting on\n * overflow (when the input is greater than largest uint16).\n *\n * Counterpart to Solidity's `uint16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n */\n function toUint16(uint256 value) internal pure returns (uint16) {\n require(value < 2**16, \"SafeCast: value doesn\\'t fit in 16 bits\");\n return uint16(value);\n }\n\n /**\n * @dev Returns the downcasted uint8 from uint256, reverting on\n * overflow (when the input is greater than largest uint8).\n *\n * Counterpart to Solidity's `uint8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits.\n */\n function toUint8(uint256 value) internal pure returns (uint8) {\n require(value < 2**8, \"SafeCast: value doesn\\'t fit in 8 bits\");\n return uint8(value);\n }\n\n /**\n * @dev Converts a signed int256 into an unsigned uint256.\n *\n * Requirements:\n *\n * - input must be greater than or equal to 0.\n */\n function toUint256(int256 value) internal pure returns (uint256) {\n require(value >= 0, \"SafeCast: value must be positive\");\n return uint256(value);\n }\n\n /**\n * @dev Returns the downcasted int128 from int256, reverting on\n * overflow (when the input is less than smallest int128 or\n * greater than largest int128).\n *\n * Counterpart to Solidity's `int128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n *\n * _Available since v3.1._\n */\n function toInt128(int256 value) internal pure returns (int128) {\n require(value >= -2**127 && value < 2**127, \"SafeCast: value doesn\\'t fit in 128 bits\");\n return int128(value);\n }\n\n /**\n * @dev Returns the downcasted int64 from int256, reverting on\n * overflow (when the input is less than smallest int64 or\n * greater than largest int64).\n *\n * Counterpart to Solidity's `int64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n *\n * _Available since v3.1._\n */\n function toInt64(int256 value) internal pure returns (int64) {\n require(value >= -2**63 && value < 2**63, \"SafeCast: value doesn\\'t fit in 64 bits\");\n return int64(value);\n }\n\n /**\n * @dev Returns the downcasted int32 from int256, reverting on\n * overflow (when the input is less than smallest int32 or\n * greater than largest int32).\n *\n * Counterpart to Solidity's `int32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n *\n * _Available since v3.1._\n */\n function toInt32(int256 value) internal pure returns (int32) {\n require(value >= -2**31 && value < 2**31, \"SafeCast: value doesn\\'t fit in 32 bits\");\n return int32(value);\n }\n\n /**\n * @dev Returns the downcasted int16 from int256, reverting on\n * overflow (when the input is less than smallest int16 or\n * greater than largest int16).\n *\n * Counterpart to Solidity's `int16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n *\n * _Available since v3.1._\n */\n function toInt16(int256 value) internal pure returns (int16) {\n require(value >= -2**15 && value < 2**15, \"SafeCast: value doesn\\'t fit in 16 bits\");\n return int16(value);\n }\n\n /**\n * @dev Returns the downcasted int8 from int256, reverting on\n * overflow (when the input is less than smallest int8 or\n * greater than largest int8).\n *\n * Counterpart to Solidity's `int8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits.\n *\n * _Available since v3.1._\n */\n function toInt8(int256 value) internal pure returns (int8) {\n require(value >= -2**7 && value < 2**7, \"SafeCast: value doesn\\'t fit in 8 bits\");\n return int8(value);\n }\n\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, \"SafeCast: value doesn't fit in an int256\");\n return int256(value);\n }\n}\n" + }, + "contracts/interfaces/external/weth/IWETH.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.7.0 <0.9.0;\n\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\n\ninterface IWETH is IERC20 {\n function deposit() external payable;\n\n function withdraw(uint256 wad) external;\n}\n" + }, + "contracts/interfaces/ITradeIntegration.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\npragma solidity 0.7.6;\n\n/**\n * @title ITrade\n * @author Babylon Finance\n *\n * Interface for trading protocol integrations\n */\ninterface ITradeIntegration {\n function trade(\n address _strategy,\n address _sendToken,\n uint256 _sendQuantity,\n address _receiveToken,\n uint256 _minReceiveQuantity\n ) external;\n\n function getConversionRates(\n address _sourceToken,\n address _destinationToken,\n uint256 _sourceQuantity\n ) external returns (uint256, uint256);\n}\n" + }, + "contracts/interfaces/IOperation.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\npragma solidity 0.7.6;\n\nimport {IGarden} from './IGarden.sol';\nimport {IStrategy} from './IStrategy.sol';\n\n/**\n * @title IOperation\n * @author Babylon Finance\n *\n * Interface for an strategy operation\n */\ninterface IOperation {\n function validateOperation(\n address _data,\n IGarden _garden,\n address _integration,\n uint256 _index\n ) external view;\n\n function executeOperation(\n address _asset,\n uint256 _capital,\n uint8 _assetStatus,\n address _data,\n IGarden _garden,\n address _integration\n )\n external\n returns (\n address,\n uint256,\n uint8\n );\n\n function exitOperation(\n uint256 _percentage,\n address _data,\n IGarden _garden,\n address _integration\n ) external;\n\n function getNAV(\n address _data,\n IGarden _garden,\n address _integration\n ) external view returns (uint256);\n\n function getName() external view returns (string memory);\n}\n" + }, + "contracts/interfaces/IStrategyNFT.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\npragma solidity 0.7.6;\n\nimport {IGarden} from './IGarden.sol';\nimport {IBabController} from './IBabController.sol';\n\n/**\n * @title IStrategyNFT\n * @author Babylon Finance\n *\n * Interface for operating with a Strategy NFT.\n */\ninterface IStrategyNFT {\n struct StratDetail {\n string name;\n string symbol;\n uint256 tokenId;\n }\n\n function grantStrategyNFT(address _user, string memory _strategyTokenURI) external returns (uint256);\n\n function saveStrategyNameAndSymbol(\n address _strategy,\n string memory _name,\n string memory _symbol\n ) external;\n\n function getStrategyTokenURI(address _stratgy) external view returns (string memory);\n\n function getStrategyName(address _strategy) external view returns (string memory);\n}\n" + }, + "contracts/strategies/StrategyFactory.sol": { + "content": "/*\n Copyright 2021 Babylon Finance.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\n\nimport {Clones} from '@openzeppelin/contracts/proxy/Clones.sol';\n\nimport {IStrategy} from '../interfaces/IStrategy.sol';\nimport {IStrategyNFT} from '../interfaces/IStrategyNFT.sol';\nimport {IBabController} from '../interfaces/IBabController.sol';\nimport {IStrategyFactory} from '../interfaces/IStrategyFactory.sol';\nimport {Strategy} from './Strategy.sol';\n\n/**\n * @title StrategyFactory\n * @author Babylon Finance\n *\n * Factory to create investment strategy contracts\n */\ncontract StrategyFactory is IStrategyFactory {\n address private immutable controller;\n address payable private immutable strategy;\n\n constructor(address _controller) {\n require(_controller != address(0), 'Controller is zero');\n\n controller = _controller;\n strategy = address(new Strategy());\n }\n\n /**\n * Creates a new investment strategy using minimal proxies\n *\n * @param _name Name of the strategy\n * @param _symbol Symbol of the strategy\n * @param _strategist Address of the strategist\n * @param _garden Address of the garden\n * @param _stratParams Strat Params\n */\n function createStrategy(\n string memory _name,\n string memory _symbol,\n address _strategist,\n address _garden,\n uint256[] calldata _stratParams\n ) external override returns (address) {\n address payable clone = payable(Clones.clone(strategy));\n IStrategy(clone).initialize(\n _strategist,\n _garden,\n controller,\n _stratParams[0],\n _stratParams[1],\n _stratParams[2],\n _stratParams[3],\n _stratParams[4]\n );\n IStrategyNFT(IBabController(controller).strategyNFT()).saveStrategyNameAndSymbol(clone, _name, _symbol);\n return clone;\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/Clones.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for\n * deploying minimal proxy contracts, also known as \"clones\".\n *\n * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies\n * > a minimal bytecode implementation that delegates all calls to a known, fixed address.\n *\n * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`\n * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the\n * deterministic method.\n *\n * _Available since v3.4._\n */\nlibrary Clones {\n /**\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `master`.\n *\n * This function uses the create opcode, which should never revert.\n */\n function clone(address master) internal returns (address instance) {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\n mstore(add(ptr, 0x14), shl(0x60, master))\n mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\n instance := create(0, ptr, 0x37)\n }\n require(instance != address(0), \"ERC1167: create failed\");\n }\n\n /**\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `master`.\n *\n * This function uses the create2 opcode and a `salt` to deterministically deploy\n * the clone. Using the same `master` and `salt` multiple time will revert, since\n * the clones cannot be deployed twice at the same address.\n */\n function cloneDeterministic(address master, bytes32 salt) internal returns (address instance) {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\n mstore(add(ptr, 0x14), shl(0x60, master))\n mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)\n instance := create2(0, ptr, 0x37, salt)\n }\n require(instance != address(0), \"ERC1167: create2 failed\");\n }\n\n /**\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\n */\n function predictDeterministicAddress(address master, bytes32 salt, address deployer) internal pure returns (address predicted) {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)\n mstore(add(ptr, 0x14), shl(0x60, master))\n mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000)\n mstore(add(ptr, 0x38), shl(0x60, deployer))\n mstore(add(ptr, 0x4c), salt)\n mstore(add(ptr, 0x6c), keccak256(ptr, 0x37))\n predicted := keccak256(add(ptr, 0x37), 0x55)\n }\n }\n\n /**\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\n */\n function predictDeterministicAddress(address master, bytes32 salt) internal view returns (address predicted) {\n return predictDeterministicAddress(master, salt, address(this));\n }\n}\n" + }, + "contracts/interfaces/IStrategyFactory.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\npragma solidity 0.7.6;\n\nimport {IIntegration} from './IIntegration.sol';\n\n/**\n * @title IStrategyFactory\n * @author Babylon Finance\n *\n * Interface for the strategy factory\n */\ninterface IStrategyFactory {\n function createStrategy(\n string memory _name,\n string memory _symbol,\n address _strategist,\n address _garden,\n uint256[] calldata _stratParams\n ) external returns (address);\n}\n" + }, + "contracts/mocks/BabControllerV2Mock.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\n\nimport {OwnableUpgradeable} from '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';\nimport {AddressUpgradeable} from '@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol';\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport {IGarden} from '../interfaces/IGarden.sol';\nimport {IGardenFactory} from '../interfaces/IGardenFactory.sol';\nimport {IIntegration} from '../interfaces/IIntegration.sol';\nimport {AddressArrayUtils} from '../lib/AddressArrayUtils.sol';\n\n/**\n * @title BabController\n * @author Babylon Finance Protocol\n *\n * BabController is a smart contract used to deploy new gardens contracts and house the\n * integrations and resources of the system.\n */\ncontract BabControllerV2Mock is OwnableUpgradeable {\n using AddressArrayUtils for address[];\n using AddressUpgradeable for address;\n using SafeMath for uint256;\n\n /* ============ Events ============ */\n /* ============ Modifiers ============ */\n\n /* ============ State Variables ============ */\n address public constant UNISWAP_FACTORY = 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f;\n address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\n uint8 public constant MAX_OPERATIONS = 20;\n\n // List of enabled Communities\n address[] public gardens;\n address[] public reserveAssets;\n address public uniswapFactory;\n address public gardenValuer;\n address public priceOracle;\n address public gardenFactory;\n address public rewardsDistributor;\n address public ishtarGate;\n address public strategyFactory;\n address public gardenNFT;\n address public strategyNFT;\n\n // Mapping of integration name => integration address\n mapping(bytes32 => address) private enabledIntegrations;\n // Address of the default trade integration used by the protocol\n address public defaultTradeIntegration;\n // Mapping of valid operations\n address[MAX_OPERATIONS] public enabledOperations;\n\n // Mappings to check whether address is valid Garden or Reserve Asset\n mapping(address => bool) public isGarden;\n mapping(address => bool) public validReserveAsset;\n\n // Mapping to check whitelisted assets\n mapping(address => bool) public assetWhitelist;\n\n // Mapping to check keepers\n mapping(address => bool) public keeperList;\n\n // Mapping of minimum liquidity per reserve asset\n mapping(address => uint256) public minLiquidityPerReserve;\n\n // Recipient of protocol fees\n address public treasury;\n\n // Strategy cooldown period\n uint256 public constant MIN_COOLDOWN_PERIOD = 6 hours;\n uint256 public constant MAX_COOLDOWN_PERIOD = 7 days;\n\n // Strategy Profit Sharing\n uint256 public strategistProfitPercentage; // (0.01% = 1e14, 1% = 1e16)\n uint256 public stewardsProfitPercentage; // (0.01% = 1e14, 1% = 1e16)\n uint256 public lpsProfitPercentage; //\n\n // Strategy BABL Rewards Sharing\n uint256 public strategistBABLPercentage; // (0.01% = 1e14, 1% = 1e16)\n uint256 public stewardsBABLPercentage; // (0.01% = 1e14, 1% = 1e16)\n uint256 public lpsBABLPercentage; //\n\n uint256 public gardenCreatorBonus;\n\n // Enable Transfer of ERC20 gardenTokens\n // Only members can transfer tokens until the protocol is fully decentralized\n bool public gardenTokensTransfersEnabled;\n\n // Enable and starts the BABL Mining program within Rewards Distributor contract\n bool public bablMiningProgramEnabled;\n // Enable public gardens\n bool public allowPublicGardens;\n\n uint256 public protocolPerformanceFee; // 5% (0.01% = 1e14, 1% = 1e16) on profits\n uint256 public protocolManagementFee; // 0.5% (0.01% = 1e14, 1% = 1e16)\n uint256 public protocolDepositGardenTokenFee; // 0 (0.01% = 1e14, 1% = 1e16)\n uint256 public protocolWithdrawalGardenTokenFee; // 0 (0.01% = 1e14, 1% = 1e16)\n\n // Maximum number of contributors per garden\n uint256 public maxContributorsPerGarden;\n\n // Enable garden creations to be fully open to the public (no need of Ishtar gate anymore)\n bool public gardenCreationIsOpen;\n\n bool public newVar;\n\n /* ============ Constructor ============ */\n\n /**\n * Initializes the initial fee recipient on deployment.\n */\n function initialize() public {\n OwnableUpgradeable.__Ownable_init();\n\n // vars init values has to be set in initialize due to how upgrade proxy pattern works\n protocolManagementFee = 5e15; // 0.5% (0.01% = 1e14, 1% = 1e16)\n protocolPerformanceFee = 5e16; // 5% (0.01% = 1e14, 1% = 1e16) on profits\n protocolDepositGardenTokenFee = 0; // 0% (0.01% = 1e14, 1% = 1e16) on profits\n protocolWithdrawalGardenTokenFee = 0; // 0% (0.01% = 1e14, 1% = 1e16) on profits\n gardenTokensTransfersEnabled = false;\n bablMiningProgramEnabled = false;\n\n strategistProfitPercentage = 10e16;\n stewardsProfitPercentage = 5e16;\n lpsProfitPercentage = 80e16;\n\n strategistBABLPercentage = 8e16;\n stewardsBABLPercentage = 17e16;\n lpsBABLPercentage = 75e16;\n\n gardenCreatorBonus = 15e16;\n maxContributorsPerGarden = 100;\n gardenCreationIsOpen = false;\n }\n\n /* ============ External Functions ============ */\n\n function newMethod() public pure returns (string memory) {\n return 'foobar';\n }\n}\n" + }, + "contracts/gardens/GardenFactory.sol": { + "content": "/*\n Copyright 2021 Babylon Finance.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\nimport {Clones} from '@openzeppelin/contracts/proxy/Clones.sol';\n\nimport {IGardenFactory} from '../interfaces/IGardenFactory.sol';\nimport {IBabController} from '../interfaces/IBabController.sol';\nimport {Garden} from './Garden.sol';\nimport {GardenNFT} from './GardenNFT.sol';\n\n/**\n * @title GardenFactory\n * @author Babylon Finance\n *\n * Factory to create garden contracts\n */\ncontract GardenFactory is IGardenFactory {\n address private immutable controller;\n address private immutable garden;\n\n constructor(address _controller) {\n require(_controller != address(0), 'Controller is zero');\n\n controller = _controller;\n garden = address(new Garden());\n }\n\n /**\n * Creates a garden using minimal proxies\n * @param _reserveAsset Address of the reserve asset ERC20\n * @param _creator Address of the creator\n * @param _name Name of the Garden\n * @param _symbol Symbol of the Garden\n * @param _tokenURI URL of the garden NFT JSON\n * @param _seed Seed to regenerate the garden NFT\n * @param _gardenParams Array of numeric params in the garden\n * @param _initialContribution Initial Contribution by the Gardener\n */\n function createGarden(\n address _reserveAsset,\n address _creator,\n string memory _name,\n string memory _symbol,\n string memory _tokenURI,\n uint256 _seed,\n uint256[] calldata _gardenParams,\n uint256 _initialContribution\n ) external override returns (address) {\n require(msg.sender == controller, 'Only the controller can create gardens');\n address payable clone = payable(Clones.clone(garden));\n Garden(clone).initialize(\n _reserveAsset,\n controller,\n _creator,\n _name,\n _symbol,\n _gardenParams,\n _initialContribution\n );\n GardenNFT(IBabController(controller).gardenNFT()).saveGardenURIAndSeed(clone, _tokenURI, _seed);\n return clone;\n }\n}\n" + }, + "contracts/gardens/Garden.sol": { + "content": "/*\n Copyright 2021 Babylon Finance.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\n\n//\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\nimport {ERC20Upgradeable} from '@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol';\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {SafeDecimalMath} from '../lib/SafeDecimalMath.sol';\nimport {Safe3296} from '../lib/Safe3296.sol';\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\n\nimport {Errors, _require} from '../lib/BabylonErrors.sol';\nimport {AddressArrayUtils} from '../lib/AddressArrayUtils.sol';\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\nimport {Math} from '../lib/Math.sol';\n\nimport {IRewardsDistributor} from '../interfaces/IRewardsDistributor.sol';\nimport {IBabController} from '../interfaces/IBabController.sol';\nimport {IStrategyFactory} from '../interfaces/IStrategyFactory.sol';\nimport {IGardenValuer} from '../interfaces/IGardenValuer.sol';\nimport {IStrategy} from '../interfaces/IStrategy.sol';\nimport {IGarden} from '../interfaces/IGarden.sol';\nimport {IGardenNFT} from '../interfaces/IGardenNFT.sol';\nimport {IIshtarGate} from '../interfaces/IIshtarGate.sol';\nimport {IWETH} from '../interfaces/external/weth/IWETH.sol';\n\n/**\n * @title BaseGarden\n * @author Babylon Finance\n *\n * Class that holds common garden-related state and functions\n */\ncontract Garden is ERC20Upgradeable, ReentrancyGuard, IGarden {\n using SafeCast for int256;\n using SignedSafeMath for int256;\n using PreciseUnitMath for int256;\n using SafeDecimalMath for int256;\n\n using SafeCast for uint256;\n using SafeMath for uint256;\n using PreciseUnitMath for uint256;\n using SafeDecimalMath for uint256;\n\n using Address for address;\n using AddressArrayUtils for address[];\n\n using SafeERC20 for IERC20;\n\n /* ============ Events ============ */\n event GardenDeposit(\n address indexed _to,\n uint256 reserveToken,\n uint256 reserveTokenQuantity,\n uint256 protocolFees,\n uint256 timestamp\n );\n event GardenWithdrawal(\n address indexed _from,\n address indexed _to,\n uint256 reserveToken,\n uint256 reserveTokenQuantity,\n uint256 protocolFees,\n uint256 timestamp\n );\n\n event RewardsForContributor(address indexed _contributor, uint256 indexed _amount);\n event BABLRewardsForContributor(address indexed _contributor, uint96 _rewards);\n\n /* ============ State Constants ============ */\n\n // Wrapped ETH address\n address private constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\n uint256 public constant EARLY_WITHDRAWAL_PENALTY = 15e16;\n uint256 public constant MAX_TOTAL_STRATEGIES = 20; // Max number of strategies\n uint256 private constant TEN_PERCENT = 1e17;\n uint256 private constant MAX_KEEPER_FEE = (1e6 * 1e3 gwei);\n\n /* ============ Structs ============ */\n\n struct Contributor {\n uint256 lastDepositAt;\n uint256 initialDepositAt;\n uint256 claimedAt;\n uint256 claimedBABL;\n uint256 claimedRewards;\n uint256 withdrawnSince;\n }\n\n /* ============ State Variables ============ */\n\n // Reserve Asset of the garden\n address public override reserveAsset;\n\n // Address of the controller\n address public override controller;\n\n // The person that creates the garden\n address public override creator;\n // Whether the garden is currently active or not\n bool public override active;\n bool public override guestListEnabled;\n\n // Keeps track of the reserve balance. In case we receive some through other means\n uint256 public override principal;\n uint256 public override reserveAssetRewardsSetAside;\n uint256 public override reserveAssetPrincipalWindow;\n int256 public override absoluteReturns; // Total profits or losses of this garden\n\n // Indicates the minimum liquidity the asset needs to have to be tradable by this garden\n uint256 public override minLiquidityAsset;\n\n uint256 public depositHardlock; // Window of time after deposits when withdraws are disabled for that user\n // Window of time after an investment strategy finishes when the capital is available for withdrawals\n uint256 public withdrawalWindowAfterStrategyCompletes;\n uint256 public withdrawalsOpenUntil; // Indicates until when the withdrawals are open and the ETH is set aside\n\n // Contributors\n mapping(address => Contributor) public contributors;\n uint256 public override totalContributors;\n uint256 public override maxContributors;\n uint256 public maxDepositLimit; // Limits the amount of deposits\n\n uint256 public override gardenInitializedAt; // Garden Initialized at timestamp\n // Number of garden checkpoints used to control de garden power and each contributor power with accuracy avoiding flash loans and related attack vectors\n uint256 public pid;\n\n // Min contribution in the garden\n uint256 public override minContribution; //wei\n uint256 public minGardenTokenSupply;\n\n // Strategies variables\n uint256 public override totalStake;\n uint256 public override minVotersQuorum = TEN_PERCENT; // 10%. (0.01% = 1e14, 1% = 1e16)\n uint256 public override minStrategyDuration; // Min duration for an strategy\n uint256 public override maxStrategyDuration; // Max duration for an strategy\n // Window for the strategy to cooldown after approval before receiving capital\n uint256 public override strategyCooldownPeriod;\n\n address[] private strategies; // Strategies that are either in candidate or active state\n address[] private finalizedStrategies; // Strategies that have finalized execution\n mapping(address => bool) public strategyMapping;\n mapping(address => bool) public override isGardenStrategy; // Security control mapping\n\n // Keeper debt in reserve asset if any, repaid upon every strategy finalization\n uint256 public keeperDebt;\n\n /* ============ Constructor ============ */\n\n /**\n * When a new Garden is created.\n * All parameter validations are on the BabController contract. Validations are performed already on the\n * BabController.\n * WARN: If the reserve Asset is different than WETH the gardener needs to have approved the controller.\n *\n * @param _reserveAsset Address of the reserve asset ERC20\n * @param _controller Address of the controller\n * @param _creator Address of the creator\n * @param _name Name of the Garden\n * @param _symbol Symbol of the Garden\n * @param _gardenParams Array of numeric garden params\n * @param _initialContribution Initial Contribution by the Gardener\n */\n function initialize(\n address _reserveAsset,\n address _controller,\n address _creator,\n string memory _name,\n string memory _symbol,\n uint256[] calldata _gardenParams,\n uint256 _initialContribution\n ) public payable initializer {\n _require(bytes(_name).length < 50, Errors.NAME_TOO_LONG);\n _require(_creator != address(0), Errors.ADDRESS_IS_ZERO);\n _require(_controller != address(0), Errors.ADDRESS_IS_ZERO);\n _require(ERC20Upgradeable(_reserveAsset).decimals() > 0, Errors.ADDRESS_IS_ZERO);\n _require(_gardenParams.length == 9, Errors.GARDEN_PARAMS_LENGTH);\n _require(IBabController(_controller).isValidReserveAsset(_reserveAsset), Errors.MUST_BE_RESERVE_ASSET);\n __ERC20_init(_name, _symbol);\n\n controller = _controller;\n reserveAsset = _reserveAsset;\n creator = _creator;\n maxContributors = IBabController(_controller).maxContributorsPerGarden();\n guestListEnabled = true;\n\n _start(\n _initialContribution,\n _gardenParams[0],\n _gardenParams[1],\n _gardenParams[2],\n _gardenParams[3],\n _gardenParams[4],\n _gardenParams[5],\n _gardenParams[6],\n _gardenParams[7],\n _gardenParams[8]\n );\n active = true;\n }\n\n /* ============ External Functions ============ */\n\n /**\n * FUND LEAD ONLY. Starts the Garden with allowed reserve assets,\n * fees and issuance premium. Only callable by the Garden's creator\n *\n * @param _creatorDeposit Deposit by the creator\n * @param _maxDepositLimit Max deposit limit\n * @param _minGardenTokenSupply Min garden token supply\n * @param _minLiquidityAsset Number that represents min amount of liquidity denominated in ETH\n * @param _depositHardlock Number that represents the time deposits are locked for an user after he deposits\n * @param _minContribution Min contribution to the garden\n * @param _strategyCooldownPeriod How long after the strategy has been activated, will it be ready to be executed\n * @param _minVotersQuorum Percentage of votes needed to activate an strategy (0.01% = 1e14, 1% = 1e16)\n * @param _minStrategyDuration Min duration of an strategy\n * @param _maxStrategyDuration Max duration of an strategy\n */\n function _start(\n uint256 _creatorDeposit,\n uint256 _maxDepositLimit,\n uint256 _minGardenTokenSupply,\n uint256 _minLiquidityAsset,\n uint256 _depositHardlock,\n uint256 _minContribution,\n uint256 _strategyCooldownPeriod,\n uint256 _minVotersQuorum,\n uint256 _minStrategyDuration,\n uint256 _maxStrategyDuration\n ) private {\n _require(_minContribution > 0, Errors.MIN_CONTRIBUTION);\n _require(_creatorDeposit >= _minContribution, Errors.MIN_CONTRIBUTION);\n _require(_creatorDeposit >= _minGardenTokenSupply, Errors.MIN_LIQUIDITY);\n _require(_creatorDeposit <= _maxDepositLimit, Errors.MAX_DEPOSIT_LIMIT);\n _require(_maxDepositLimit <= (reserveAsset == WETH ? 1e22 : 1e25), Errors.MAX_DEPOSIT_LIMIT);\n IBabController babController = IBabController(controller);\n _require(_minGardenTokenSupply > 0, Errors.MIN_TOKEN_SUPPLY);\n _require(_depositHardlock > 0, Errors.DEPOSIT_HARDLOCK);\n _require(_minLiquidityAsset >= babController.minLiquidityPerReserve(reserveAsset), Errors.MIN_LIQUIDITY);\n _require(\n _strategyCooldownPeriod <= IBabController(controller).getMaxCooldownPeriod() &&\n _strategyCooldownPeriod >= IBabController(controller).getMinCooldownPeriod(),\n Errors.NOT_IN_RANGE\n );\n _require(_minVotersQuorum >= TEN_PERCENT && _minVotersQuorum <= TEN_PERCENT.mul(5), Errors.VALUE_TOO_LOW);\n _require(_maxStrategyDuration >= _minStrategyDuration, Errors.DURATION_RANGE);\n _require(_minStrategyDuration >= 1 days && _maxStrategyDuration <= 500 days, Errors.DURATION_RANGE);\n minContribution = _minContribution;\n strategyCooldownPeriod = _strategyCooldownPeriod;\n minVotersQuorum = _minVotersQuorum;\n minStrategyDuration = _minStrategyDuration;\n maxStrategyDuration = _maxStrategyDuration;\n minGardenTokenSupply = _minGardenTokenSupply;\n maxDepositLimit = _maxDepositLimit;\n gardenInitializedAt = block.timestamp;\n minLiquidityAsset = _minLiquidityAsset;\n depositHardlock = _depositHardlock;\n withdrawalWindowAfterStrategyCompletes = 7 days;\n }\n\n /**\n * Deposits the reserve asset into the garden and mints the Garden token of the given quantity\n * to the specified _to address.\n * WARN: If the reserve Asset is different than WETH the sender needs to have approved the garden.\n *\n * @param _reserveAssetQuantity Quantity of the reserve asset that are received\n * @param _minGardenTokenReceiveQuantity Min quantity of Garden token to receive after issuance\n * @param _to Address to mint Garden tokens to\n */\n function deposit(\n uint256 _reserveAssetQuantity,\n uint256 _minGardenTokenReceiveQuantity,\n address _to\n ) external payable override nonReentrant {\n _onlyActive();\n _require(\n !guestListEnabled ||\n IIshtarGate(IBabController(controller).ishtarGate()).canJoinAGarden(address(this), msg.sender) ||\n creator == _to,\n Errors.USER_CANNOT_JOIN\n );\n // if deposit limit is 0, then there is no deposit limit\n if (maxDepositLimit > 0) {\n _require(principal.add(_reserveAssetQuantity) <= maxDepositLimit, Errors.MAX_DEPOSIT_LIMIT);\n }\n _require(totalContributors <= maxContributors, Errors.MAX_CONTRIBUTORS);\n _receiveReserveAsset(_reserveAssetQuantity);\n\n (uint256 protocolFees, uint256 netFlowQuantity) = _getFees(_reserveAssetQuantity, true);\n\n // gardenTokenQuantity has to be at least _minGardenTokenReceiveQuantity\n _require(netFlowQuantity >= _minGardenTokenReceiveQuantity, Errors.MIN_TOKEN_SUPPLY);\n\n // Send Protocol Fee\n payProtocolFeeFromGarden(reserveAsset, protocolFees);\n\n // Mint tokens\n _mintGardenTokens(_to, netFlowQuantity, principal.add(netFlowQuantity), protocolFees);\n\n // Check that total supply is greater than min supply needed for issuance\n _require(totalSupply() >= minGardenTokenSupply, Errors.MIN_TOKEN_SUPPLY);\n }\n\n /**\n * Withdraws the ETH relative to the token participation in the garden and sends it back to the sender.\n *\n * @param _gardenTokenQuantity Quantity of the garden token to withdrawal\n * @param _minReserveReceiveQuantity Min quantity of reserve asset to receive\n * @param _to Address to send component assets to\n * @param _withPenalty Whether or not this is an immediate withdrawal\n */\n function withdraw(\n uint256 _gardenTokenQuantity,\n uint256 _minReserveReceiveQuantity,\n address payable _to,\n bool _withPenalty\n ) external override nonReentrant {\n _onlyContributor();\n if (!_withPenalty) {\n // Requests an immediate withdrawal taking the EARLY_WITHDRAWAL_PENALTY that stays invested.\n return _withdraw(_gardenTokenQuantity, _minReserveReceiveQuantity, _to);\n }\n // Check that cannot do a normal withdrawal\n _require(!_canWithdrawReserveAmount(msg.sender, _gardenTokenQuantity), Errors.NORMAL_WITHDRAWAL_POSSIBLE);\n uint256 netReserveFlows = _gardenTokenQuantity.sub(_gardenTokenQuantity.preciseMul(EARLY_WITHDRAWAL_PENALTY));\n (, uint256 largestCapital, address maxStrategy) = _getActiveCapital();\n // Check that strategy has enough capital to support the withdrawal\n _require(\n IStrategy(maxStrategy).minRebalanceCapital() <= largestCapital.sub(netReserveFlows),\n Errors.WITHDRAWAL_WITH_PENALTY\n );\n IStrategy(maxStrategy).unwindStrategy(netReserveFlows);\n // We burn their penalty\n _burn(msg.sender, _gardenTokenQuantity.preciseMul(EARLY_WITHDRAWAL_PENALTY));\n // TODO: replace the 1\n _withdraw(netReserveFlows, 1, _to);\n }\n\n /**\n * User can claim the rewards from the strategies that his principal\n * was invested in.\n */\n function claimReturns(address[] calldata _finalizedStrategies) external override nonReentrant {\n _onlyContributor();\n Contributor storage contributor = contributors[msg.sender];\n _require(block.timestamp > contributor.claimedAt, Errors.ALREADY_CLAIMED); // race condition check\n\n IRewardsDistributor rewardsDistributor = IRewardsDistributor(IBabController(controller).rewardsDistributor());\n (uint256 reserveRewards, uint256 bablRewards) =\n rewardsDistributor.getRewards(address(this), msg.sender, _finalizedStrategies);\n\n if (reserveRewards > 0 && address(this).balance >= reserveRewards) {\n contributor.claimedRewards = contributor.claimedRewards.add(reserveRewards); // Rewards claimed properly\n // Send ETH\n Address.sendValue(msg.sender, reserveRewards);\n reserveAssetRewardsSetAside = reserveAssetRewardsSetAside.sub(reserveRewards);\n emit RewardsForContributor(msg.sender, reserveRewards);\n contributor.claimedAt = block.timestamp; // Checkpoint of this claim\n }\n if (bablRewards > 0) {\n contributor.claimedBABL = contributor.claimedBABL.add(bablRewards); // BABL Rewards claimed properly\n // Send BABL rewards\n\n rewardsDistributor.sendTokensToContributor(msg.sender, uint96(bablRewards));\n emit BABLRewardsForContributor(msg.sender, uint96(bablRewards));\n contributor.claimedAt = block.timestamp; // Checkpoint of this claim\n }\n }\n\n /**\n * When an strategy finishes execution, we want to make that eth available for withdrawals\n * from members of the garden.\n *\n * @param _amount Amount of Reserve Asset to set aside until the window ends\n * @param _rewards Amount of Reserve Asset to set aside forever\n * @param _returns Profits or losses that the strategy received\n */\n function startWithdrawalWindow(\n uint256 _amount,\n uint256 _rewards,\n int256 _returns,\n address _strategy\n ) external override {\n _require(\n (strategyMapping[msg.sender] && address(IStrategy(msg.sender).garden()) == address(this)),\n Errors.ONLY_STRATEGY\n );\n // Updates reserve asset\n principal = principal.toInt256().add(_returns).toUint256();\n if (withdrawalsOpenUntil > block.timestamp) {\n withdrawalsOpenUntil = block.timestamp.add(\n withdrawalWindowAfterStrategyCompletes.sub(withdrawalsOpenUntil.sub(block.timestamp))\n );\n } else {\n withdrawalsOpenUntil = block.timestamp.add(withdrawalWindowAfterStrategyCompletes);\n }\n reserveAssetRewardsSetAside = reserveAssetRewardsSetAside.add(_rewards);\n reserveAssetPrincipalWindow = reserveAssetPrincipalWindow.add(_amount);\n // Mark strategy as finalized\n absoluteReturns = absoluteReturns.add(_returns);\n strategies = strategies.remove(_strategy);\n finalizedStrategies.push(_strategy);\n strategyMapping[_strategy] = false;\n }\n\n /**\n * Pays gas costs back to the keeper from executing transactions including the past debt\n * @param _keeper Keeper that executed the transaction\n * @param _fee The fee paid to keeper to compensate the gas cost\n */\n function payKeeper(address payable _keeper, uint256 _fee) external override {\n _require(IBabController(controller).isValidKeeper(_keeper), Errors.ONLY_KEEPER);\n _onlyStrategy();\n keeperDebt = keeperDebt.add(_fee);\n // Pay Keeper in Reserve Asset\n if (keeperDebt > 0 && IERC20(reserveAsset).balanceOf(address(this)) >= keeperDebt) {\n IERC20(reserveAsset).safeTransfer(_keeper, keeperDebt);\n principal = principal.sub(keeperDebt);\n keeperDebt = 0;\n }\n }\n\n /* ============ External Functions ============ */\n\n /**\n * Makes a previously private garden public\n */\n function makeGardenPublic() external override {\n _require(msg.sender == creator, Errors.ONLY_CREATOR);\n _require(guestListEnabled && IBabController(controller).allowPublicGardens(), Errors.GARDEN_ALREADY_PUBLIC);\n guestListEnabled = false;\n }\n\n /**\n * PRIVILEGED Manager, protocol FUNCTION. When a Garden is active, deposits are enabled.\n */\n function setActive(bool _newValue) external override {\n _require(msg.sender == controller, Errors.ONLY_CONTROLLER);\n _require(active != _newValue, Errors.ONLY_INACTIVE);\n active = _newValue;\n }\n\n /* ============ Strategy Functions ============ */\n /**\n * Creates a new strategy calling the factory and adds it to the array\n * @param _name Name of the strategy\n * @param _symbol Symbol of the strategy\n * @param _stratParams Num params for the strategy\n * @param _opTypes Type for every operation in the strategy\n * @param _opIntegrations Integration to use for every operation\n * @param _opDatas Param for every operation in the strategy\n */\n function addStrategy(\n string memory _name,\n string memory _symbol,\n uint256[] calldata _stratParams,\n uint8[] calldata _opTypes,\n address[] calldata _opIntegrations,\n address[] calldata _opDatas\n ) external override {\n _onlyActive();\n _onlyContributor();\n _require(\n IIshtarGate(IBabController(controller).ishtarGate()).canAddStrategiesInAGarden(address(this), msg.sender),\n Errors.USER_CANNOT_ADD_STRATEGIES\n );\n _require(strategies.length < MAX_TOTAL_STRATEGIES, Errors.VALUE_TOO_HIGH);\n _require(_stratParams.length == 5, Errors.STRAT_PARAMS_LENGTH);\n address strategy =\n IStrategyFactory(IBabController(controller).strategyFactory()).createStrategy(\n _name,\n _symbol,\n msg.sender,\n address(this),\n _stratParams\n );\n strategyMapping[strategy] = true;\n totalStake = totalStake.add(_stratParams[1]);\n strategies.push(strategy);\n IStrategy(strategy).setData(_opTypes, _opIntegrations, _opDatas);\n isGardenStrategy[strategy] = true;\n }\n\n /**\n * Rebalances available capital of the garden between the strategies that are active.\n * We enter into the strategy and add it to the executed strategies array.\n * @param _fee The fee paid to keeper to compensate the gas cost for each strategy executed\n */\n function rebalanceStrategies(uint256 _fee) external override {\n _onlyActive();\n _require(IBabController(controller).isValidKeeper(msg.sender), Errors.ONLY_KEEPER);\n // We assume that calling keeper functions should be less expensive\n // than 1 million gas and the gas price should be lower than 1000 gwei.\n _require(_fee <= MAX_KEEPER_FEE, Errors.FEE_TOO_HIGH);\n\n uint256 liquidReserveAsset = ERC20Upgradeable(reserveAsset).balanceOf(address(this));\n for (uint256 i = 0; i < strategies.length; i++) {\n IStrategy strategy = IStrategy(strategies[i]);\n uint256 percentage = strategy.totalVotes().toUint256().preciseDiv(totalStake);\n uint256 toAllocate = liquidReserveAsset.preciseMul(percentage);\n if (\n block.timestamp < strategy.executedAt().add(strategy.duration()).sub(1 days) &&\n toAllocate >= strategy.minRebalanceCapital() &&\n toAllocate.add(strategy.capitalAllocated()) <= strategy.maxCapitalRequested()\n ) {\n strategy.executeStrategy(toAllocate, _fee);\n }\n }\n }\n\n /**\n * Allocates garden capital to an strategy\n *\n * @param _capital Amount of capital to allocate to the strategy\n */\n function allocateCapitalToStrategy(uint256 _capital) external override {\n _onlyStrategy();\n _onlyActive();\n _reenableReserveForStrategies();\n uint256 liquidReserveAsset = IERC20(reserveAsset).balanceOf(address(this)).sub(reserveAssetPrincipalWindow);\n uint256 protocolMgmtFee = IBabController(controller).protocolManagementFee().preciseMul(_capital);\n _require(_capital.add(protocolMgmtFee) <= liquidReserveAsset, Errors.MIN_LIQUIDITY);\n\n // Take protocol mgmt fee\n payProtocolFeeFromGarden(reserveAsset, protocolMgmtFee);\n\n // Send Capital to strategy\n IERC20(reserveAsset).safeTransfer(msg.sender, _capital);\n }\n\n // Any tokens (other than the target) that are sent here by mistake are recoverable by the protocol\n function sweep(address _token) external {\n _require(_token != reserveAsset, Errors.MUST_BE_RESERVE_ASSET);\n uint256 balance = IERC20(_token).balanceOf(address(this));\n payProtocolFeeFromGarden(_token, balance);\n }\n\n /*\n * Remove an expire candidate from the strategy Array\n * @param _strategy Strategy to remove\n */\n function expireCandidateStrategy(address _strategy) external override {\n _onlyStrategy();\n strategies = strategies.remove(_strategy);\n strategyMapping[_strategy] = false;\n }\n\n /*\n * Burns the stake of the strategist of a given strategy\n * @param _strategy Strategy\n */\n function burnStrategistStake(address _strategist, uint256 _amount) external override {\n _onlyStrategy();\n if (_amount >= balanceOf(_strategist)) {\n // Avoid underflow condition\n _amount = balanceOf(_strategist);\n }\n _burn(_strategist, _amount);\n }\n\n /* ============ External Getter Functions ============ */\n\n /**\n * Gets current strategies\n *\n * @return address[] Returns list of addresses\n */\n\n function getStrategies() external view override returns (address[] memory) {\n return strategies;\n }\n\n /**\n * Gets finalized strategies\n *\n * @return address[] Returns list of addresses\n */\n\n function getFinalizedStrategies() external view override returns (address[] memory) {\n return finalizedStrategies;\n }\n\n function isStrategyActiveInGarden(address _strategy) external view override returns (bool) {\n return strategyMapping[_strategy];\n }\n\n function getContributor(address _contributor)\n external\n view\n override\n returns (\n uint256,\n uint256,\n uint256,\n uint256,\n uint256,\n uint256\n )\n {\n Contributor storage contributor = contributors[_contributor];\n return (\n contributor.lastDepositAt,\n contributor.initialDepositAt,\n contributor.claimedAt,\n contributor.claimedBABL,\n contributor.claimedRewards,\n contributor.withdrawnSince\n );\n }\n\n /**\n * Get the expected reserve asset to be withdrawaled\n *\n * @param _gardenTokenQuantity Quantity of Garden tokens to withdrawal\n *\n * @return uint256 Expected reserve asset quantity withdrawaled\n */\n function getExpectedReserveWithdrawalQuantity(uint256 _gardenTokenQuantity)\n external\n view\n override\n returns (uint256)\n {\n (, uint256 netReserveFlows) =\n _getFees(_getWithdrawalReserveQuantity(reserveAsset, _gardenTokenQuantity), false);\n\n return netReserveFlows;\n }\n\n /**\n * Checks balance locked for strategists and voters in active strategies\n *\n * @param _contributor Address of the account\n *\n * @return uint256 Returns the amount of locked garden tokens for the account\n */\n function getLockedBalance(address _contributor) external view override returns (uint256) {\n uint256 lockedAmount;\n for (uint256 i = 0; i < strategies.length; i++) {\n IStrategy strategy = IStrategy(strategies[i]);\n uint256 votes = uint256(Math.abs(strategy.getUserVotes(_contributor)));\n if (votes > 0) {\n lockedAmount = lockedAmount.add(votes);\n }\n }\n // Avoid overflows if off-chain voting system fails\n if (balanceOf(_contributor) < lockedAmount) lockedAmount = balanceOf(_contributor);\n return lockedAmount;\n }\n\n function getGardenTokenMintQuantity(\n uint256 _reserveAssetQuantity,\n bool isDeposit // Value of reserve asset net of fees\n ) public view override returns (uint256) {\n // Get valuation of the Garden with the quote asset as the reserve asset.\n // Reverts if price is not found\n uint256 baseUnits = uint256(10)**ERC20Upgradeable(reserveAsset).decimals();\n uint256 normalizedReserveQuantity = _reserveAssetQuantity.preciseDiv(baseUnits);\n // First deposit\n if (totalSupply() == 0) {\n return normalizedReserveQuantity;\n }\n uint256 gardenValuationPerToken =\n IGardenValuer(IBabController(controller).gardenValuer()).calculateGardenValuation(\n address(this),\n reserveAsset\n );\n if (isDeposit) {\n gardenValuationPerToken = gardenValuationPerToken.sub(normalizedReserveQuantity.preciseDiv(totalSupply()));\n }\n return normalizedReserveQuantity.preciseDiv(gardenValuationPerToken);\n }\n\n // solhint-disable-next-line\n receive() external payable {}\n\n /* ============ Modifiers ============ */\n\n // Replaced by internal functions due to contract size limit of 24KB\n\n /* ============ Internal Functions ============ */\n\n function _onlyContributor() private view {\n _require(balanceOf(msg.sender) > 0, Errors.ONLY_CONTRIBUTOR);\n }\n\n /**\n * Throws if the sender is not an strategy of this garden\n */\n function _onlyStrategy() private view {\n _require(strategyMapping[msg.sender], Errors.ONLY_STRATEGY);\n }\n\n /**\n * Throws if the garden is not active\n */\n function _onlyActive() private view {\n _require(active, Errors.ONLY_ACTIVE);\n }\n\n /**\n * Function that mints the appropriate garden tokens along with the Garden NFT\n * @param _to Address to mint the tokens\n * @param _reserveAssetQuantity Amount of garden tokens\n * @param _newPrincipal New principal for that user\n * @param _protocolFees Protocol Fees Paid\n */\n function _mintGardenTokens(\n address _to,\n uint256 _reserveAssetQuantity,\n uint256 _newPrincipal,\n uint256 _protocolFees\n ) private {\n uint256 previousBalance = balanceOf(_to);\n _mint(_to, getGardenTokenMintQuantity(_reserveAssetQuantity, true));\n _updateContributorDepositInfo(_to, previousBalance);\n principal = _newPrincipal;\n // Mint the garden NFT\n IGardenNFT(IBabController(controller).gardenNFT()).grantGardenNFT(_to);\n _require(totalSupply() > 0, Errors.MIN_LIQUIDITY);\n emit GardenDeposit(_to, msg.value, _reserveAssetQuantity, _protocolFees, block.timestamp);\n }\n\n /**\n * When the window of withdrawals finishes, we need to make the capital available again for investments\n * We still keep the profits aside.\n */\n function _reenableReserveForStrategies() private {\n if (block.timestamp >= withdrawalsOpenUntil) {\n withdrawalsOpenUntil = 0;\n reserveAssetPrincipalWindow = 0;\n }\n }\n\n /**\n * Check if the fund has reserve amount available for withdrawals.\n * If it returns false, reserve pool would be available.\n * @param _contributor Address of the contributors\n * @param _amount Amount of ETH to withdraw\n */\n function _canWithdrawReserveAmount(address _contributor, uint256 _amount) private view returns (bool) {\n // Reserve rewards cannot be withdrawn. Only claimed\n uint256 liquidReserve = IERC20(reserveAsset).balanceOf(address(this));\n _require(liquidReserve >= _amount, Errors.NOT_ENOUGH_RESERVE);\n\n // Withdrawal open\n if (block.timestamp <= withdrawalsOpenUntil) {\n // There is a window but there is more than needed\n if (liquidReserve > reserveAssetPrincipalWindow.add(_amount)) {\n return true;\n }\n IRewardsDistributor rewardsDistributor =\n IRewardsDistributor(IBabController(controller).rewardsDistributor());\n // Pro rata withdrawals\n uint256 contributorPower =\n rewardsDistributor.getContributorPower(\n address(this),\n _contributor,\n contributors[_contributor].initialDepositAt,\n block.timestamp\n );\n return reserveAssetPrincipalWindow.preciseMul(contributorPower) >= _amount;\n } else {\n // Not in a withdrawal window. Check that there is enough reserve\n return liquidReserve >= _amount;\n }\n }\n\n /**\n * Gets the total active capital currently invested in strategies\n *\n * @return uint256 Total amount active\n * @return uint256 Total amount active in the largest strategy\n * @return address Address of the largest strategy\n */\n function _getActiveCapital()\n private\n view\n returns (\n uint256,\n uint256,\n address\n )\n {\n uint256 totalActiveCapital;\n uint256 maxAllocation;\n address maxStrategy = address(0);\n for (uint8 i = 0; i < strategies.length; i++) {\n IStrategy strategy = IStrategy(strategies[i]);\n if (strategy.isStrategyActive()) {\n uint256 allocation = strategy.capitalAllocated();\n totalActiveCapital = totalActiveCapital.add(allocation);\n if (allocation > maxAllocation) {\n maxAllocation = allocation;\n maxStrategy = strategies[i];\n }\n }\n }\n return (totalActiveCapital, maxAllocation, maxStrategy);\n }\n\n /**\n * Pays the _feeQuantity from the _garden denominated in _token to the protocol fee recipient\n * @param _token Address of the token to pay with\n * @param _feeQuantity Fee to transfer\n */\n function payProtocolFeeFromGarden(address _token, uint256 _feeQuantity) private {\n IERC20(_token).safeTransfer(IBabController(controller).treasury(), _feeQuantity);\n }\n\n // Disable garden token transfers. Allow minting and burning.\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 _amount\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, _amount);\n _require(\n from == address(0) ||\n to == address(0) ||\n (IBabController(controller).gardenTokensTransfersEnabled() && !guestListEnabled),\n Errors.GARDEN_TRANSFERS_DISABLED\n );\n }\n\n /**\n * Aux function to withdraw from a garden\n */\n function _withdraw(\n uint256 _gardenTokenQuantity,\n uint256 _minReserveReceiveQuantity,\n address payable _to\n ) private {\n // Withdrawal amount has to be equal or less than msg.sender balance\n _require(_gardenTokenQuantity <= balanceOf(msg.sender), Errors.MSG_SENDER_TOKENS_DO_NOT_MATCH);\n // Flashloan protection\n _require(\n block.timestamp.sub(contributors[msg.sender].lastDepositAt) >= depositHardlock,\n Errors.DEPOSIT_HARDLOCK\n );\n _require(\n _gardenTokenQuantity <= balanceOf(msg.sender).sub(this.getLockedBalance(msg.sender)),\n Errors.TOKENS_STAKED\n ); // Strategists and Voters cannot withdraw locked stake while in active strategies\n\n _reenableReserveForStrategies();\n uint256 reserveAssetQuantity = _getWithdrawalReserveQuantity(reserveAsset, _gardenTokenQuantity);\n\n (uint256 protocolFees, uint256 netFlowQuantity) = _getFees(reserveAssetQuantity, false);\n\n uint256 newGardenTokenSupply = totalSupply().sub(_gardenTokenQuantity);\n\n _require(_canWithdrawReserveAmount(msg.sender, netFlowQuantity), Errors.MIN_LIQUIDITY);\n\n // Check that new supply is more than min supply needed for withdrawal\n // Note: A min supply amount is needed to avoid division by 0 when withdrawaling garden token to 0\n _require(newGardenTokenSupply >= minGardenTokenSupply, Errors.MIN_TOKEN_SUPPLY);\n _require(netFlowQuantity >= _minReserveReceiveQuantity, Errors.MIN_TOKEN_SUPPLY);\n\n _burn(msg.sender, _gardenTokenQuantity);\n\n if (reserveAsset == WETH) {\n // Check that the withdrawal is possible\n // Unwrap WETH if ETH balance lower than netFlowQuantity\n if (address(this).balance < netFlowQuantity) {\n IWETH(WETH).withdraw(netFlowQuantity.sub(address(this).balance));\n }\n // Send ETH\n Address.sendValue(_to, netFlowQuantity);\n } else {\n // Ssend reserve asset\n IERC20(reserveAsset).safeTransfer(msg.sender, netFlowQuantity);\n }\n\n _updateContributorWithdrawalInfo(netFlowQuantity);\n payProtocolFeeFromGarden(reserveAsset, protocolFees);\n\n uint256 outflow = netFlowQuantity.add(protocolFees);\n\n // Required withdrawable quantity is greater than existing collateral\n _require(principal >= outflow, Errors.BALANCE_TOO_LOW);\n principal = principal.sub(outflow);\n\n emit GardenWithdrawal(msg.sender, _to, netFlowQuantity, _gardenTokenQuantity, protocolFees, block.timestamp);\n }\n\n function _receiveReserveAsset(uint256 _reserveAssetQuantity) private {\n _require(_reserveAssetQuantity >= minContribution, Errors.MIN_CONTRIBUTION);\n // If reserve asset is WETH wrap it\n uint256 reserveAssetBalance = IERC20(reserveAsset).balanceOf(address(this));\n if (reserveAsset == WETH && msg.value > 0) {\n IWETH(WETH).deposit{value: msg.value}();\n } else {\n // Transfer ERC20 to the garden\n IERC20(reserveAsset).safeTransferFrom(msg.sender, address(this), _reserveAssetQuantity);\n }\n // Make sure we received the reserve asset\n _require(\n IERC20(reserveAsset).balanceOf(address(this)).sub(reserveAssetBalance) == _reserveAssetQuantity,\n Errors.MSG_VALUE_DO_NOT_MATCH\n );\n }\n\n /**\n * Returns the fees attributed to the manager and the protocol. The fees are calculated as follows:\n *\n * Protocol Fee = (% direct fee %) * reserveAssetQuantity\n *\n * @param _reserveAssetQuantity Quantity of reserve asset to calculate fees from\n * @param _isDeposit Boolean that is true when it is a deposit\n *\n * @return uint256 Fees paid to the protocol in reserve asset\n * @return uint256 Net reserve to user net of fees\n */\n function _getFees(uint256 _reserveAssetQuantity, bool _isDeposit) private view returns (uint256, uint256) {\n // Get protocol fee percentages\n uint256 protocolFeePercentage =\n _isDeposit\n ? IBabController(controller).protocolDepositGardenTokenFee()\n : IBabController(controller).protocolWithdrawalGardenTokenFee();\n\n // Calculate total notional fees\n uint256 protocolFees = protocolFeePercentage.preciseMul(_reserveAssetQuantity);\n return (protocolFees, _reserveAssetQuantity.sub(protocolFees));\n }\n\n function _getWithdrawalReserveQuantity(address _reserveAsset, uint256 _gardenTokenQuantity)\n private\n view\n returns (uint256)\n {\n // Get valuation of the Garden with the quote asset as the reserve asset. Returns value in precise units (10e18)\n // Reverts if price is not found\n uint256 gardenValuationPerToken =\n IGardenValuer(IBabController(controller).gardenValuer()).calculateGardenValuation(\n address(this),\n _reserveAsset\n );\n\n uint256 totalWithdrawalValueInPreciseUnits = _gardenTokenQuantity.preciseMul(gardenValuationPerToken);\n uint256 prePremiumReserveQuantity =\n totalWithdrawalValueInPreciseUnits.preciseMul(10**ERC20Upgradeable(_reserveAsset).decimals());\n\n return prePremiumReserveQuantity;\n }\n\n /**\n * Updates the contributor info in the array\n */\n function _updateContributorDepositInfo(address _contributor, uint256 previousBalance) private {\n Contributor storage contributor = contributors[_contributor];\n // If new contributor, create one, increment count, and set the current TS\n if (previousBalance == 0 || contributor.initialDepositAt == 0) {\n _require(totalContributors < maxContributors, Errors.MAX_CONTRIBUTORS);\n totalContributors = totalContributors.add(1);\n contributor.initialDepositAt = block.timestamp;\n }\n // We make checkpoints around contributor deposits to avoid fast loans and give the right rewards afterwards\n\n contributor.lastDepositAt = block.timestamp;\n IRewardsDistributor rewardsDistributor = IRewardsDistributor(IBabController(controller).rewardsDistributor());\n rewardsDistributor.updateGardenPower(address(this), pid);\n rewardsDistributor.setContributorTimestampParams(address(this), _contributor, previousBalance, true, pid); // true = deposit\n pid++;\n }\n\n /**\n * Updates the contributor info in the array\n */\n function _updateContributorWithdrawalInfo(uint256 _netflowQuantity) private {\n Contributor storage contributor = contributors[msg.sender];\n // If sold everything\n if (balanceOf(msg.sender) == 0) {\n contributor.lastDepositAt = 0;\n contributor.initialDepositAt = 0;\n contributor.withdrawnSince = 0;\n //delete contributor.timeListPointer;\n totalContributors = totalContributors.sub(1);\n } else {\n contributor.withdrawnSince = contributor.withdrawnSince.add(_netflowQuantity);\n }\n IRewardsDistributor rewardsDistributor = IRewardsDistributor(IBabController(controller).rewardsDistributor());\n rewardsDistributor.updateGardenPower(address(this), pid);\n rewardsDistributor.setContributorTimestampParams(address(this), msg.sender, 0, false, pid); // false = withdraw\n pid++;\n }\n}\n" + }, + "contracts/gardens/GardenNFT.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\n\n//\nimport {ERC721} from '@openzeppelin/contracts/token/ERC721/ERC721.sol';\nimport {Counters} from '@openzeppelin/contracts/utils/Counters.sol';\nimport {IBabController} from '../interfaces/IBabController.sol';\nimport {IGarden} from '../interfaces/IGarden.sol';\nimport {IGardenNFT} from '../interfaces/IGardenNFT.sol';\n\n/**\n * @title GardenNFT\n * @author Babylon Finance\n *\n * Contract the NFT for each Garden\n */\ncontract GardenNFT is ERC721, IGardenNFT {\n using Counters for Counters.Counter;\n\n /* ============ Events ============ */\n\n event GardenNFTAwarded(address indexed _member, uint256 indexed _newItemId);\n\n /* ============ Modifiers ============ */\n\n modifier onlyGarden {\n require(\n controller.isSystemContract(msg.sender) && IGarden(msg.sender).controller() == address(controller),\n 'Only the garden can mint the NFT'\n );\n _;\n }\n\n /* ============ State Variables ============ */\n\n // Address of the Controller contract\n IBabController public controller;\n\n Counters.Counter private _tokenIds;\n mapping(address => string) public override gardenTokenURIs;\n mapping(address => uint256) public override gardenSeeds;\n\n /* ============ Constructor ============ */\n\n /**\n * Sets the protocol controller\n *\n * @param _controller Address of controller contract\n * @param _name Name of the garden\n * @param _symbol Symbol of the garden\n */\n constructor(\n address _controller,\n string memory _name,\n string memory _symbol\n ) ERC721(_name, _symbol) {\n require(address(_controller) != address(0), 'Controller must exist');\n controller = IBabController(_controller);\n }\n\n /* ============ External Functions ============ */\n\n /**\n * Awards the garden NFT to a user and gives him access to a specific garden\n *\n * @param _user Address of the user\n */\n function grantGardenNFT(address _user) external override onlyGarden returns (uint256) {\n require(address(_user) != address(0), 'User must exist');\n _tokenIds.increment();\n uint256 newItemId = _tokenIds.current();\n _safeMint(_user, newItemId);\n _setTokenURI(newItemId, gardenTokenURIs[msg.sender]);\n emit GardenNFTAwarded(_user, newItemId);\n return newItemId;\n }\n\n /**\n * Saves the Garden URI and seed\n *\n * @param _garden Address of the garden\n * @param _gardenTokenURI Garden Token URI\n */\n function saveGardenURIAndSeed(\n address _garden,\n string memory _gardenTokenURI,\n uint256 _seed\n ) external override {\n require(controller.isSystemContract(msg.sender), 'Only a system contract can call this');\n gardenTokenURIs[_garden] = _gardenTokenURI;\n gardenSeeds[_garden] = _seed;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../../utils/ContextUpgradeable.sol\";\nimport \"./IERC20Upgradeable.sol\";\nimport \"../../math/SafeMathUpgradeable.sol\";\nimport \"../../proxy/Initializable.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 ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable {\n using SafeMathUpgradeable 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 function __ERC20_init(string memory name_, string memory symbol_) internal initializer {\n __Context_init_unchained();\n __ERC20_init_unchained(name_, symbol_);\n }\n\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {\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 virtual 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 virtual 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 virtual returns (uint8) {\n return _decimals;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual 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(_msgSender(), 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(_msgSender(), 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(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\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(_msgSender(), spender, _allowances[_msgSender()][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(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\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(address sender, address recipient, uint256 amount) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n _balances[sender] = _balances[sender].sub(amount, \"ERC20: transfer amount 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), \"ERC20: mint to the 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), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n _balances[account] = _balances[account].sub(amount, \"ERC20: burn amount exceeds balance\");\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(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the 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 virtual {\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(address from, address to, uint256 amount) internal virtual { }\n uint256[44] private __gap;\n}\n" + }, + "contracts/interfaces/IGardenValuer.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\npragma solidity 0.7.6;\n\ninterface IGardenValuer {\n function calculateGardenValuation(address _garden, address _quoteAsset) external view returns (uint256);\n\n function getLossesGarden(address _garden, uint256 _since) external view returns (uint256);\n}\n" + }, + "contracts/interfaces/IGardenNFT.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\npragma solidity 0.7.6;\n\nimport {IGarden} from './IGarden.sol';\nimport {IBabController} from './IBabController.sol';\n\n/**\n * @title IGardenNFT\n * @author Babylon Finance\n *\n * Interface for operating with a Garden NFT.\n */\ninterface IGardenNFT {\n function grantGardenNFT(address _user) external returns (uint256);\n\n function saveGardenURIAndSeed(\n address _garden,\n string memory _gardenTokenURI,\n uint256 _seed\n ) external;\n\n function gardenTokenURIs(address _garden) external view returns (string memory);\n\n function gardenSeeds(address _garden) external view returns (uint256);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Upgradeable {\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(address sender, address recipient, uint256 amount) 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" + }, + "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\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 SafeMathUpgradeable {\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n\n /**\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n *\n * _Available since v3.4._\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n *\n * _Available since v3.4._\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\n\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, \"SafeMath: addition overflow\");\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 require(b <= a, \"SafeMath: subtraction overflow\");\n return a - b;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n *\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) return 0;\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b > 0, \"SafeMath: division by zero\");\n return a / b;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * reverting when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b > 0, \"SafeMath: modulo by zero\");\n return a % b;\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 * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {trySub}.\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {tryDiv}.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n return a / b;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * reverting with custom message when dividing by zero.\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {tryMod}.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n return a % b;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/ERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../../utils/Context.sol\";\nimport \"./IERC721.sol\";\nimport \"./IERC721Metadata.sol\";\nimport \"./IERC721Enumerable.sol\";\nimport \"./IERC721Receiver.sol\";\nimport \"../../introspection/ERC165.sol\";\nimport \"../../math/SafeMath.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/EnumerableSet.sol\";\nimport \"../../utils/EnumerableMap.sol\";\nimport \"../../utils/Strings.sol\";\n\n/**\n * @title ERC721 Non-Fungible Token Standard basic implementation\n * @dev see https://eips.ethereum.org/EIPS/eip-721\n */\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {\n using SafeMath for uint256;\n using Address for address;\n using EnumerableSet for EnumerableSet.UintSet;\n using EnumerableMap for EnumerableMap.UintToAddressMap;\n using Strings for uint256;\n\n // Equals to `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`\n // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector`\n bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;\n\n // Mapping from holder address to their (enumerable) set of owned tokens\n mapping (address => EnumerableSet.UintSet) private _holderTokens;\n\n // Enumerable mapping from token ids to their owners\n EnumerableMap.UintToAddressMap private _tokenOwners;\n\n // Mapping from token ID to approved address\n mapping (uint256 => address) private _tokenApprovals;\n\n // Mapping from owner to operator approvals\n mapping (address => mapping (address => bool)) private _operatorApprovals;\n\n // Token name\n string private _name;\n\n // Token symbol\n string private _symbol;\n\n // Optional mapping for token URIs\n mapping (uint256 => string) private _tokenURIs;\n\n // Base URI\n string private _baseURI;\n\n /*\n * bytes4(keccak256('balanceOf(address)')) == 0x70a08231\n * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e\n * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3\n * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc\n * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465\n * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5\n * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd\n * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e\n * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde\n *\n * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^\n * 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd\n */\n bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;\n\n /*\n * bytes4(keccak256('name()')) == 0x06fdde03\n * bytes4(keccak256('symbol()')) == 0x95d89b41\n * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd\n *\n * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f\n */\n bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f;\n\n /*\n * bytes4(keccak256('totalSupply()')) == 0x18160ddd\n * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59\n * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7\n *\n * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63\n */\n bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;\n\n /**\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\n */\n constructor (string memory name_, string memory symbol_) public {\n _name = name_;\n _symbol = symbol_;\n\n // register the supported interfaces to conform to ERC721 via ERC165\n _registerInterface(_INTERFACE_ID_ERC721);\n _registerInterface(_INTERFACE_ID_ERC721_METADATA);\n _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE);\n }\n\n /**\n * @dev See {IERC721-balanceOf}.\n */\n function balanceOf(address owner) public view virtual override returns (uint256) {\n require(owner != address(0), \"ERC721: balance query for the zero address\");\n return _holderTokens[owner].length();\n }\n\n /**\n * @dev See {IERC721-ownerOf}.\n */\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\n return _tokenOwners.get(tokenId, \"ERC721: owner query for nonexistent token\");\n }\n\n /**\n * @dev See {IERC721Metadata-name}.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev See {IERC721Metadata-symbol}.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev See {IERC721Metadata-tokenURI}.\n */\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n require(_exists(tokenId), \"ERC721Metadata: URI query for nonexistent token\");\n\n string memory _tokenURI = _tokenURIs[tokenId];\n string memory base = baseURI();\n\n // If there is no base URI, return the token URI.\n if (bytes(base).length == 0) {\n return _tokenURI;\n }\n // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).\n if (bytes(_tokenURI).length > 0) {\n return string(abi.encodePacked(base, _tokenURI));\n }\n // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI.\n return string(abi.encodePacked(base, tokenId.toString()));\n }\n\n /**\n * @dev Returns the base URI set via {_setBaseURI}. This will be\n * automatically added as a prefix in {tokenURI} to each token's URI, or\n * to the token ID if no specific URI is set for that token ID.\n */\n function baseURI() public view virtual returns (string memory) {\n return _baseURI;\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\n */\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\n return _holderTokens[owner].at(index);\n }\n\n /**\n * @dev See {IERC721Enumerable-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds\n return _tokenOwners.length();\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenByIndex}.\n */\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\n (uint256 tokenId, ) = _tokenOwners.at(index);\n return tokenId;\n }\n\n /**\n * @dev See {IERC721-approve}.\n */\n function approve(address to, uint256 tokenId) public virtual override {\n address owner = ERC721.ownerOf(tokenId);\n require(to != owner, \"ERC721: approval to current owner\");\n\n require(_msgSender() == owner || ERC721.isApprovedForAll(owner, _msgSender()),\n \"ERC721: approve caller is not owner nor approved for all\"\n );\n\n _approve(to, tokenId);\n }\n\n /**\n * @dev See {IERC721-getApproved}.\n */\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\n require(_exists(tokenId), \"ERC721: approved query for nonexistent token\");\n\n return _tokenApprovals[tokenId];\n }\n\n /**\n * @dev See {IERC721-setApprovalForAll}.\n */\n function setApprovalForAll(address operator, bool approved) public virtual override {\n require(operator != _msgSender(), \"ERC721: approve to caller\");\n\n _operatorApprovals[_msgSender()][operator] = approved;\n emit ApprovalForAll(_msgSender(), operator, approved);\n }\n\n /**\n * @dev See {IERC721-isApprovedForAll}.\n */\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\n return _operatorApprovals[owner][operator];\n }\n\n /**\n * @dev See {IERC721-transferFrom}.\n */\n function transferFrom(address from, address to, uint256 tokenId) public virtual override {\n //solhint-disable-next-line max-line-length\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: transfer caller is not owner nor approved\");\n\n _transfer(from, to, tokenId);\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override {\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: transfer caller is not owner nor approved\");\n _safeTransfer(from, to, tokenId, _data);\n }\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * `_data` is additional data, it has no specified format and it is sent in call to `to`.\n *\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\n * implement alternative mechanisms to perform token transfer, such as signature-based.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual {\n _transfer(from, to, tokenId);\n require(_checkOnERC721Received(from, to, tokenId, _data), \"ERC721: transfer to non ERC721Receiver implementer\");\n }\n\n /**\n * @dev Returns whether `tokenId` exists.\n *\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\n *\n * Tokens start existing when they are minted (`_mint`),\n * and stop existing when they are burned (`_burn`).\n */\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\n return _tokenOwners.contains(tokenId);\n }\n\n /**\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\n require(_exists(tokenId), \"ERC721: operator query for nonexistent token\");\n address owner = ERC721.ownerOf(tokenId);\n return (spender == owner || getApproved(tokenId) == spender || ERC721.isApprovedForAll(owner, spender));\n }\n\n /**\n * @dev Safely mints `tokenId` and transfers it to `to`.\n *\n * Requirements:\n d*\n * - `tokenId` must not exist.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function _safeMint(address to, uint256 tokenId) internal virtual {\n _safeMint(to, tokenId, \"\");\n }\n\n /**\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\n */\n function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual {\n _mint(to, tokenId);\n require(_checkOnERC721Received(address(0), to, tokenId, _data), \"ERC721: transfer to non ERC721Receiver implementer\");\n }\n\n /**\n * @dev Mints `tokenId` and transfers it to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\n * - `to` cannot be the zero address.\n *\n * Emits a {Transfer} event.\n */\n function _mint(address to, uint256 tokenId) internal virtual {\n require(to != address(0), \"ERC721: mint to the zero address\");\n require(!_exists(tokenId), \"ERC721: token already minted\");\n\n _beforeTokenTransfer(address(0), to, tokenId);\n\n _holderTokens[to].add(tokenId);\n\n _tokenOwners.set(tokenId, to);\n\n emit Transfer(address(0), to, tokenId);\n }\n\n /**\n * @dev Destroys `tokenId`.\n * The approval is cleared when the token is burned.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n *\n * Emits a {Transfer} event.\n */\n function _burn(uint256 tokenId) internal virtual {\n address owner = ERC721.ownerOf(tokenId); // internal owner\n\n _beforeTokenTransfer(owner, address(0), tokenId);\n\n // Clear approvals\n _approve(address(0), tokenId);\n\n // Clear metadata (if any)\n if (bytes(_tokenURIs[tokenId]).length != 0) {\n delete _tokenURIs[tokenId];\n }\n\n _holderTokens[owner].remove(tokenId);\n\n _tokenOwners.remove(tokenId);\n\n emit Transfer(owner, address(0), tokenId);\n }\n\n /**\n * @dev Transfers `tokenId` from `from` to `to`.\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n *\n * Emits a {Transfer} event.\n */\n function _transfer(address from, address to, uint256 tokenId) internal virtual {\n require(ERC721.ownerOf(tokenId) == from, \"ERC721: transfer of token that is not own\"); // internal owner\n require(to != address(0), \"ERC721: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, tokenId);\n\n // Clear approvals from the previous owner\n _approve(address(0), tokenId);\n\n _holderTokens[from].remove(tokenId);\n _holderTokens[to].add(tokenId);\n\n _tokenOwners.set(tokenId, to);\n\n emit Transfer(from, to, tokenId);\n }\n\n /**\n * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {\n require(_exists(tokenId), \"ERC721Metadata: URI set of nonexistent token\");\n _tokenURIs[tokenId] = _tokenURI;\n }\n\n /**\n * @dev Internal function to set the base URI for all token IDs. It is\n * automatically added as a prefix to the value returned in {tokenURI},\n * or to the token ID if {tokenURI} is empty.\n */\n function _setBaseURI(string memory baseURI_) internal virtual {\n _baseURI = baseURI_;\n }\n\n /**\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\n * The call is not executed if the target address is not a contract.\n *\n * @param from address representing the previous owner of the given token ID\n * @param to target address that will receive the tokens\n * @param tokenId uint256 ID of the token to be transferred\n * @param _data bytes optional data to send along with the call\n * @return bool whether the call correctly returned the expected magic value\n */\n function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data)\n private returns (bool)\n {\n if (!to.isContract()) {\n return true;\n }\n bytes memory returndata = to.functionCall(abi.encodeWithSelector(\n IERC721Receiver(to).onERC721Received.selector,\n _msgSender(),\n from,\n tokenId,\n _data\n ), \"ERC721: transfer to non ERC721Receiver implementer\");\n bytes4 retval = abi.decode(returndata, (bytes4));\n return (retval == _ERC721_RECEIVED);\n }\n\n /**\n * @dev Approve `to` to operate on `tokenId`\n *\n * Emits an {Approval} event.\n */\n function _approve(address to, uint256 tokenId) internal virtual {\n _tokenApprovals[tokenId] = to;\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId); // internal owner\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting\n * and burning.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\n * transferred to `to`.\n * - When `from` is zero, `tokenId` will be minted for `to`.\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { }\n}\n" + }, + "@openzeppelin/contracts/utils/Counters.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"../math/SafeMath.sol\";\n\n/**\n * @title Counters\n * @author Matt Condon (@shrugs)\n * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\n *\n * Include with `using Counters for Counters.Counter;`\n * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath}\n * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never\n * directly accessed.\n */\nlibrary Counters {\n using SafeMath for uint256;\n\n struct Counter {\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n // this feature: see https://github.com/ethereum/solidity/issues/4637\n uint256 _value; // default: 0\n }\n\n function current(Counter storage counter) internal view returns (uint256) {\n return counter._value;\n }\n\n function increment(Counter storage counter) internal {\n // The {SafeMath} overflow check can be skipped here, see the comment at the top\n counter._value += 1;\n }\n\n function decrement(Counter storage counter) internal {\n counter._value = counter._value.sub(1);\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/IERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\n\nimport \"../../introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in ``owner``'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 tokenId) external;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool _approved) external;\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\n\nimport \"./IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Metadata is IERC721 {\n\n /**\n * @dev Returns the token collection name.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the token collection symbol.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n */\n function tokenURI(uint256 tokenId) external view returns (string memory);\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.2 <0.8.0;\n\nimport \"./IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Enumerable is IERC721 {\n\n /**\n * @dev Returns the total amount of tokens stored by the contract.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns a token ID owned by `owner` at a given `index` of its token list.\n * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.\n */\n function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);\n\n /**\n * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.\n * Use along with {totalSupply} to enumerate all tokens.\n */\n function tokenByIndex(uint256 index) external view returns (uint256);\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721Receiver {\n /**\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n * by `operator` from `from`, this function is called.\n *\n * It must return its Solidity selector to confirm the token transfer.\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n *\n * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.\n */\n function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);\n}\n" + }, + "@openzeppelin/contracts/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts may inherit from this and call {_registerInterface} to declare\n * their support of an interface.\n */\nabstract contract ERC165 is IERC165 {\n /*\n * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7\n */\n bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;\n\n /**\n * @dev Mapping of interface ids to whether or not it's supported.\n */\n mapping(bytes4 => bool) private _supportedInterfaces;\n\n constructor () internal {\n // Derived contracts need only register support for their own interfaces,\n // we register support for ERC165 itself here\n _registerInterface(_INTERFACE_ID_ERC165);\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n *\n * Time complexity O(1), guaranteed to always use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return _supportedInterfaces[interfaceId];\n }\n\n /**\n * @dev Registers the contract as an implementer of the interface defined by\n * `interfaceId`. Support of the actual ERC165 interface is automatic and\n * registering its interface id is not required.\n *\n * See {IERC165-supportsInterface}.\n *\n * Requirements:\n *\n * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).\n */\n function _registerInterface(bytes4 interfaceId) internal virtual {\n require(interfaceId != 0xffffffff, \"ERC165: invalid interface id\");\n _supportedInterfaces[interfaceId] = true;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/EnumerableSet.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\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 // To implement this library for multiple types with as little code\n // repetition as possible, we write it in terms of a generic Set type with\n // bytes32 values.\n // The Set implementation uses private functions, and user-facing\n // implementations (such as AddressSet) are just wrappers around the\n // underlying Set.\n // This means that we can only create new EnumerableSets for types that fit\n // in bytes32.\n\n struct Set {\n // Storage of set values\n bytes32[] _values;\n\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 (bytes32 => 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(Set storage set, bytes32 value) private 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(Set storage set, bytes32 value) private 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) { // 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 bytes32 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(Set storage set, bytes32 value) private 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(Set storage set) private 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(Set storage set, uint256 index) private view returns (bytes32) {\n require(set._values.length > index, \"EnumerableSet: index out of bounds\");\n return set._values[index];\n }\n\n // Bytes32Set\n\n struct Bytes32Set {\n Set _inner;\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(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _add(set._inner, value);\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(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _remove(set._inner, value);\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n return _contains(set._inner, value);\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(Bytes32Set storage set) internal view returns (uint256) {\n return _length(set._inner);\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(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n return _at(set._inner, index);\n }\n\n // AddressSet\n\n struct AddressSet {\n Set _inner;\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 return _add(set._inner, bytes32(uint256(uint160(value))));\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 return _remove(set._inner, bytes32(uint256(uint160(value))));\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 _contains(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(AddressSet storage set) internal view returns (uint256) {\n return _length(set._inner);\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 return address(uint160(uint256(_at(set._inner, index))));\n }\n\n\n // UintSet\n\n struct UintSet {\n Set _inner;\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(UintSet storage set, uint256 value) internal returns (bool) {\n return _add(set._inner, bytes32(value));\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(UintSet storage set, uint256 value) internal returns (bool) {\n return _remove(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n return _contains(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function length(UintSet storage set) internal view returns (uint256) {\n return _length(set._inner);\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(UintSet storage set, uint256 index) internal view returns (uint256) {\n return uint256(_at(set._inner, index));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/EnumerableMap.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\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 *\n * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are\n * supported.\n */\nlibrary EnumerableMap {\n // To implement this library for multiple types with as little code\n // repetition as possible, we write it in terms of a generic Map type with\n // bytes32 keys and values.\n // The Map implementation uses private functions, and user-facing\n // implementations (such as Uint256ToAddressMap) are just wrappers around\n // the underlying Map.\n // This means that we can only create new EnumerableMaps for types that fit\n // in bytes32.\n\n struct MapEntry {\n bytes32 _key;\n bytes32 _value;\n }\n\n struct Map {\n // Storage of map keys and values\n MapEntry[] _entries;\n\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 (bytes32 => 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(Map storage map, bytes32 key, bytes32 value) private 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 if (keyIndex == 0) { // Equivalent to !contains(map, key)\n map._entries.push(MapEntry({ _key: key, _value: value }));\n // The entry is stored at length-1, but we add 1 to all indexes\n // and use 0 as a sentinel value\n map._indexes[key] = map._entries.length;\n return true;\n } else {\n map._entries[keyIndex - 1]._value = value;\n return false;\n }\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(Map storage map, bytes32 key) private 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 if (keyIndex != 0) { // Equivalent to contains(map, key)\n // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one\n // in the array, and then remove the last entry (sometimes called as 'swap and pop').\n // This modifies the order of the array, as noted in {at}.\n\n uint256 toDeleteIndex = keyIndex - 1;\n uint256 lastIndex = map._entries.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 MapEntry 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 map._entries.pop();\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(Map storage map, bytes32 key) private 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(Map storage map) private view returns (uint256) {\n return map._entries.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(Map storage map, uint256 index) private view returns (bytes32, bytes32) {\n require(map._entries.length > index, \"EnumerableMap: index out of bounds\");\n\n MapEntry storage entry = map._entries[index];\n return (entry._key, entry._value);\n }\n\n /**\n * @dev Tries to returns the value associated with `key`. O(1).\n * Does not revert if `key` is not in the map.\n */\n function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) {\n uint256 keyIndex = map._indexes[key];\n if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key)\n return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based\n }\n\n /**\n * @dev Returns the value associated with `key`. O(1).\n *\n * Requirements:\n *\n * - `key` must be in the map.\n */\n function _get(Map storage map, bytes32 key) private view returns (bytes32) {\n uint256 keyIndex = map._indexes[key];\n require(keyIndex != 0, \"EnumerableMap: nonexistent key\"); // Equivalent to contains(map, key)\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\n }\n\n /**\n * @dev Same as {_get}, with a custom error message when `key` is not in the map.\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {_tryGet}.\n */\n function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) {\n uint256 keyIndex = map._indexes[key];\n require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key)\n return map._entries[keyIndex - 1]._value; // All indexes are 1-based\n }\n\n // UintToAddressMap\n\n struct UintToAddressMap {\n Map _inner;\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(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) {\n return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the key was removed from the map, that is if it was present.\n */\n function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) {\n return _remove(map._inner, bytes32(key));\n }\n\n /**\n * @dev Returns true if the key is in the map. O(1).\n */\n function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) {\n return _contains(map._inner, bytes32(key));\n }\n\n /**\n * @dev Returns the number of elements in the map. O(1).\n */\n function length(UintToAddressMap storage map) internal view returns (uint256) {\n return _length(map._inner);\n }\n\n /**\n * @dev Returns the element 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 *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) {\n (bytes32 key, bytes32 value) = _at(map._inner, index);\n return (uint256(key), address(uint160(uint256(value))));\n }\n\n /**\n * @dev Tries to returns the value associated with `key`. O(1).\n * Does not revert if `key` is not in the map.\n *\n * _Available since v3.4._\n */\n function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) {\n (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key));\n return (success, address(uint160(uint256(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.\n */\n function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {\n return address(uint160(uint256(_get(map._inner, bytes32(key)))));\n }\n\n /**\n * @dev Same as {get}, with a custom error message when `key` is not in the map.\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {tryGet}.\n */\n function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) {\n return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage))));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n /**\n * @dev Converts a `uint256` to its ASCII `string` representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n uint256 index = digits - 1;\n temp = value;\n while (temp != 0) {\n buffer[index--] = bytes1(uint8(48 + temp % 10));\n temp /= 10;\n }\n return string(buffer);\n }\n}\n" + }, + "@openzeppelin/contracts/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "contracts/Treasury.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Modified from (Set Protocol SetValuer)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\n\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport {IBabController} from './interfaces/IBabController.sol';\n\n/**\n * @title Treasury\n * @author Babylon Finance\n *\n * Contract that will receive the fees earned by the protocol.\n * Governance will be able to send funds from the treasury.\n */\ncontract Treasury is Ownable, ReentrancyGuard {\n using SafeERC20 for IERC20;\n using Address for address;\n /* ============ Events ============ */\n\n event TreasuryFundsSent(address _asset, uint256 _amount, address _to);\n\n /* ============ State Variables ============ */\n\n // Address of the Controller contract\n IBabController public controller;\n\n /* ============ Constructor ============ */\n\n /**\n * Sets the protocol controller\n *\n * @param _controller Address of controller contract\n */\n constructor(IBabController _controller) {\n require(address(_controller) != address(0), 'Controller must exist');\n controller = _controller;\n }\n\n /* ============ External Functions ============ */\n\n /**\n * GOVERNANCE FUNCTION: Send an asset amount to an address\n *\n * @param _asset Address of the asset to send\n * @param _amount Amount to send of the asset\n * @param _to Address to send the assets to\n */\n function sendTreasuryFunds(\n address _asset,\n uint256 _amount,\n address _to\n ) external onlyOwner nonReentrant {\n require(_asset != address(0), 'Asset must exist');\n require(_to != address(0), 'Target address must exist');\n IERC20(_asset).safeTransferFrom(address(this), _to, _amount);\n emit TreasuryFundsSent(_asset, _amount, _to);\n }\n\n /**\n * GOVERNANCE FUNCTION: Send an ETH amount to an address\n *\n * @param _amount Amount to send of the asset\n * @param _to Address to send the assets to\n */\n function sendTreasuryETH(uint256 _amount, address payable _to) external onlyOwner nonReentrant {\n require(_to != address(0), 'Target address must exist');\n require(address(this).balance >= _amount, 'Not enough funds in treasury');\n Address.sendValue(_to, _amount);\n emit TreasuryFundsSent(address(0), _amount, _to);\n }\n\n // Can receive ETH\n // solhint-disable-next-line\n receive() external payable {}\n}\n" + }, + "contracts/token/BABLToken.sol": { + "content": "/*\n Copyright 2021 Babylon Finance.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {TimeLockedToken} from './TimeLockedToken.sol';\nimport {Address} from '@openzeppelin/contracts/utils/Address.sol';\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport {TimeLockRegistry} from './TimeLockRegistry.sol';\nimport {IBabController} from '../interfaces/IBabController.sol';\n\n/**\n * @title BABL Token\n * @dev The BABLToken contract is ERC20 using 18 decimals as a standard\n * Is Ownable to transfer ownership to Governor Alpha for Decentralized Governance\n * It overrides the mint and maximum supply to control the timing and maximum cap allowed along the time.\n */\n\ncontract BABLToken is TimeLockedToken {\n using SafeMath for uint256;\n using Address for address;\n\n /* ============ Events ============ */\n\n /// @notice An event that emitted when a new mint ocurr\n event MintedNewTokens(address account, uint256 tokensminted);\n\n /// @notice An event thats emitted when maxSupplyAllowed changes\n event MaxSupplyChanged(uint256 previousMaxValue, uint256 newMaxValue);\n\n /// @notice An event that emitted when maxSupplyAllowedAfter changes\n event MaxSupplyAllowedAfterChanged(uint256 previousAllowedAfterValue, uint256 newAllowedAfterValue);\n\n /* ============ Modifiers ============ */\n\n /* ============ State Variables ============ */\n\n /// @dev EIP-20 token name for this token\n string private constant NAME = 'Babylon.Finance';\n\n /// @dev EIP-20 token symbol for this token\n string private constant SYMBOL = 'BABL';\n\n /// @dev Maximum number of tokens in circulation of 1 million for the first 8 years (using 18 decimals as ERC20 standard)\n uint256 public maxSupplyAllowed = 1_000_000e18; //\n\n /// @notice The timestamp after which a change on maxSupplyAllowed may occur\n uint256 public maxSupplyAllowedAfter;\n\n /// @notice Cap on the percentage of maxSupplyAllowed that can be increased per year after maxSupplyAllowedAfter\n uint8 public constant MAX_SUPPLY_CAP = 5;\n\n /// @notice Cap on the percentage of totalSupply that can be minted at each mint after the initial 1 Million BABL\n uint8 public constant MINT_CAP = 2;\n\n /// @notice The timestamp after which minting may occur after FIRST_EPOCH_MINT (8 years)\n uint256 public mintingAllowedAfter;\n\n /// @notice The timestamp of BABL Token deployment\n uint256 public BABLTokenDeploymentTimestamp;\n\n /// @dev First Epoch Mint where no more than 1 Million BABL can be minted (>= 8 Years)\n uint32 private constant FIRST_EPOCH_MINT = 365 days * 8;\n\n /// @dev Minimum time between mints after\n uint32 private constant MIN_TIME_BETWEEN_MINTS = 365 days;\n\n /* ============ Functions ============ */\n\n /* ============ Constructor ============ */\n\n /**\n * @notice Construct a new BABL token and gives ownership to sender\n */\n constructor(TimeLockRegistry newTimeLockRegistry, IBabController newController) TimeLockedToken(NAME, SYMBOL) {\n // Timestamp of contract deployment\n BABLTokenDeploymentTimestamp = block.timestamp;\n\n // Set-up the minimum time of 8 years to wait until the maxSupplyAllowed can be changed (it will also include a max cap)\n maxSupplyAllowedAfter = block.timestamp.add(FIRST_EPOCH_MINT);\n\n //Starting with a maxSupplyAllowed of 1 million for the first 8 years\n _mint(msg.sender, 1_000_000e18);\n\n //Set-up the minimum time of 8 years for additional mints\n mintingAllowedAfter = block.timestamp.add(FIRST_EPOCH_MINT);\n\n // Set the Time Lock Registry\n timeLockRegistry = newTimeLockRegistry;\n\n // Set the Babylon Controller\n controller = newController;\n }\n\n /* ============ External Functions ============ */\n\n /* =========== Token related Gov Functions ====== */\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Allows to mint new tokens\n *\n * @notice Mint new BABL tokens. Initial 1 Million BABL. After 8 years new BABL could be minted by governance decision\n * @dev MINT_CAP The new maximum limit, limited by a 2% cap of totalSupply for each new mint and always limited by maxSupplyAllowed.\n * mintingAllowedAfter Defines the next time allowed for a new mint\n * @param _to The address of the destination account that will receive the new BABL tokens\n * @param _amount The number of tokens to be minted\n * @return Whether or not the mint succeeded\n */\n function mint(address _to, uint256 _amount) external onlyOwner returns (bool) {\n require(totalSupply().add(_amount) <= maxSupplyAllowed, 'BABLToken::mint: max supply exceeded');\n require(\n block.timestamp >= BABLTokenDeploymentTimestamp.add(FIRST_EPOCH_MINT),\n 'BABLToken::mint: minting not allowed after the FIRST_EPOCH_MINT has passed >= 8 years'\n );\n require(_amount > 0, 'BABLToken::mint: mint should be higher than zero');\n require(\n block.timestamp >= mintingAllowedAfter,\n 'BABLToken::mint: minting not allowed yet because mintingAllowedAfter'\n );\n require(_to != address(0), 'BABLToken::mint: cannot transfer to the zero address');\n require(_to != address(this), 'BABLToken::mint: cannot mint to the address of this contract');\n\n // set-up the new time where a new (the next) mint can be allowed\n mintingAllowedAfter = block.timestamp.add(MIN_TIME_BETWEEN_MINTS);\n\n // mint the amount\n uint96 amount = safe96(_amount, 'BABLToken::mint: amount exceeds 96 bits');\n\n // After FIRST_EPOCH_MINT (8 years) a MINT_CAP applies\n require(\n amount <= totalSupply().mul(MINT_CAP).div(100),\n 'BABLToken::mint: exceeded mint cap of 2% of total supply'\n );\n _mint(_to, amount);\n\n emit MintedNewTokens(_to, amount);\n\n // move delegates to add voting power to the destination\n _moveDelegates(address(0), delegates[_to], amount);\n\n return true;\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Allows governance to change maxSupplyAllowed\n *\n * @notice Set-up a greater maxSupplyAllowed value to allow more tokens to be minted\n * @param newMaxSupply The new maximum limit, limited by a maximum of 5% cap per year\n * @param newMaxSupplyAllowedAfter The new waiting period to change the maxSupplyAllowed limited for a minimum of 1 year\n * @return Whether or not the changeMaxSupply succeeded\n */\n function changeMaxSupply(uint256 newMaxSupply, uint256 newMaxSupplyAllowedAfter) external onlyOwner returns (bool) {\n require(\n block.timestamp >= BABLTokenDeploymentTimestamp.add(FIRST_EPOCH_MINT),\n 'BABLToken::changeMaxSupply: a change on maxSupplyAllowed not allowed until 8 years after deployment'\n );\n require(\n block.timestamp >= maxSupplyAllowedAfter,\n 'BABLToken::changeMaxSupply: a change on maxSupplyAllowed not allowed yet'\n );\n\n // update the amount\n require(\n newMaxSupply > maxSupplyAllowed,\n 'BABLToken::changeMaxSupply: changeMaxSupply should be higher than previous value'\n );\n uint256 limitedNewSupply = maxSupplyAllowed.add(maxSupplyAllowed.mul(MAX_SUPPLY_CAP).div(100));\n require(newMaxSupply <= limitedNewSupply, 'BABLToken::changeMaxSupply: exceeded of allowed 5% cap');\n emit MaxSupplyChanged(maxSupplyAllowed, newMaxSupply);\n maxSupplyAllowed = safe96(newMaxSupply, 'BABLToken::changeMaxSupply: potential max amount exceeds 96 bits');\n\n // update the new waiting time until a new change could be done >= 1 year since this change\n uint256 futureTime = block.timestamp.add(365 days);\n require(\n newMaxSupplyAllowedAfter >= futureTime,\n 'BABLToken::changeMaxSupply: the newMaxSupplyAllowedAfter should be at least 1 year in the future'\n );\n emit MaxSupplyAllowedAfterChanged(maxSupplyAllowedAfter, newMaxSupplyAllowedAfter);\n maxSupplyAllowedAfter = safe96(\n newMaxSupplyAllowedAfter,\n 'BABLToken::changeMaxSupply: new newMaxSupplyAllowedAfter exceeds 96 bits'\n );\n\n return true;\n }\n\n /**\n * PUBLIC FUNCTION. Get the value of maxSupplyAllowed\n *\n * @return Returns the value of maxSupplyAllowed at the time\n */\n function maxSupply() external view returns (uint96, uint256) {\n uint96 safeMaxSupply =\n safe96(maxSupplyAllowed, 'BABLToken::maxSupplyAllowed: maxSupplyAllowed exceeds 96 bits'); // Overflow check\n return (safeMaxSupply, maxSupplyAllowedAfter);\n }\n}\n" + }, + "contracts/strategies/operations/LendOperation.sol": { + "content": "/*\n Copyright 2021 Babylon Finance.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {Operation} from './Operation.sol';\nimport {IGarden} from '../../interfaces/IGarden.sol';\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\nimport {ILendIntegration} from '../../interfaces/ILendIntegration.sol';\n\n/**\n * @title LendOperatin\n * @author Babylon Finance\n *\n * Executes a lend operation\n */\ncontract LendOperation is Operation {\n using SafeMath for uint256;\n using PreciseUnitMath for uint256;\n\n /* ============ Constructor ============ */\n\n /**\n * Creates the integration\n *\n * @param _name Name of the integration\n * @param _controller Address of the controller\n */\n constructor(string memory _name, address _controller) Operation(_name, _controller) {}\n\n /**\n * Sets operation data for the lend operation\n *\n * @param _data Operation data\n */\n function validateOperation(\n address _data,\n IGarden _garden,\n address, /* _integration */\n uint256 /* _index */\n ) external view override onlyStrategy {\n require(_data != _garden.reserveAsset(), 'Receive token must be different');\n }\n\n /**\n * Executes the lend operation\n * @param _capital Amount of capital received from the garden\n */\n function executeOperation(\n address _asset,\n uint256 _capital,\n uint8, /* _assetStatus */\n address _data,\n IGarden, /* _garden */\n address _integration\n )\n external\n override\n onlyStrategy\n returns (\n address,\n uint256,\n uint8\n )\n {\n address assetToken = _data;\n if (assetToken != _asset) {\n IStrategy(msg.sender).trade(_asset, _capital, assetToken);\n }\n uint256 numTokensToSupply = IERC20(assetToken).balanceOf(msg.sender);\n uint256 exactAmount = ILendIntegration(_integration).getExpectedShares(assetToken, numTokensToSupply);\n uint256 minAmountExpected = exactAmount.sub(exactAmount.preciseMul(SLIPPAGE_ALLOWED));\n ILendIntegration(_integration).supplyTokens(msg.sender, assetToken, numTokensToSupply, minAmountExpected);\n return (assetToken, numTokensToSupply, 1); // put as collateral\n }\n\n /**\n * Exits the lend operation.\n * @param _percentage of capital to exit from the strategy\n */\n function exitOperation(\n uint256 _percentage,\n address _data,\n IGarden _garden,\n address _integration\n ) external override onlyStrategy {\n require(_percentage <= HUNDRED_PERCENT, 'Unwind Percentage <= 100%');\n address assetToken = _data;\n uint256 numTokensToRedeem =\n IERC20(ILendIntegration(_integration).getInvestmentToken(assetToken)).balanceOf(msg.sender).preciseMul(\n _percentage\n );\n ILendIntegration(_integration).redeemTokens(\n msg.sender,\n assetToken,\n numTokensToRedeem,\n ILendIntegration(_integration).getExchangeRatePerToken(assetToken).mul(\n numTokensToRedeem.sub(numTokensToRedeem.preciseMul(SLIPPAGE_ALLOWED))\n )\n );\n if (assetToken != _garden.reserveAsset()) {\n IStrategy(msg.sender).trade(assetToken, IERC20(assetToken).balanceOf(msg.sender), _garden.reserveAsset());\n }\n }\n\n /**\n * Gets the NAV of the lend op in the reserve asset\n *\n * @return _nav NAV of the strategy\n */\n function getNAV(\n address _assetToken,\n IGarden _garden,\n address _integration\n ) external view override onlyStrategy returns (uint256) {\n if (!IStrategy(msg.sender).isStrategyActive()) {\n return 0;\n }\n uint256 numTokensToRedeem =\n IERC20(ILendIntegration(_integration).getInvestmentToken(_assetToken)).balanceOf(msg.sender);\n uint256 assetTokensAmount =\n ILendIntegration(_integration).getExchangeRatePerToken(_assetToken).mul(numTokensToRedeem);\n uint256 price = _getPrice(_garden.reserveAsset(), _assetToken);\n uint256 NAV = _normalizeDecimals(_assetToken, assetTokensAmount).preciseDiv(price);\n require(NAV != 0, 'NAV has to be bigger 0');\n return NAV;\n }\n}\n" + }, + "contracts/strategies/operations/Operation.sol": { + "content": "/*\n Copyright 2021 Babylon Finance.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\n\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {IGarden} from '../../interfaces/IGarden.sol';\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\nimport {IOperation} from '../../interfaces/IOperation.sol';\nimport {ITradeIntegration} from '../../interfaces/ITradeIntegration.sol';\nimport {IPriceOracle} from '../../interfaces/IPriceOracle.sol';\nimport {IBabController} from '../../interfaces/IBabController.sol';\n\n/**\n * @title LongStrategy\n * @author Babylon Finance\n *\n * Holds the data for a long strategy\n */\nabstract contract Operation is IOperation {\n using SafeMath for uint256;\n /* ============ Modifiers ============ */\n\n modifier onlyStrategy() {\n IStrategy strategy = IStrategy(msg.sender);\n IGarden garden = strategy.garden();\n require(IBabController(controller).isSystemContract(address(garden)), 'Only a garden can call this');\n require(garden.isStrategyActiveInGarden(msg.sender), 'Sender must be a strategy');\n _;\n }\n\n /* ============ State Variables ============ */\n uint256 internal constant SLIPPAGE_ALLOWED = 1e16; // 1%\n uint256 internal constant HUNDRED_PERCENT = 1e18; // 100%\n address internal constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\n\n // Address of the controller\n address public controller;\n // Name of the operation\n string public name;\n\n /* ============ Constructor ============ */\n\n /**\n * Creates the integration\n *\n * @param _name Name of the integration\n * @param _controller Address of the controller\n */\n constructor(string memory _name, address _controller) {\n require(_controller != address(0), 'Controller must be defined');\n name = _name;\n controller = _controller;\n }\n\n /* ============ Virtual External Functions ============ */\n\n function validateOperation(\n address _data,\n IGarden _garden,\n address _integration,\n uint256 _index\n ) external view virtual override;\n\n function executeOperation(\n address _asset,\n uint256 _capital,\n uint8 _assetStatus,\n address _data,\n IGarden _garden,\n address _integration\n )\n external\n virtual\n override\n returns (\n address,\n uint256,\n uint8\n );\n\n function exitOperation(\n uint256 _percentage,\n address _data,\n IGarden _garden,\n address _integration\n ) external virtual override;\n\n function getNAV(\n address _data,\n IGarden _garden,\n address _integration\n ) external view virtual override returns (uint256);\n\n /* ============ External Functions ============ */\n\n /**\n * Returns the name of the operation\n */\n function getName() external view override returns (string memory) {\n return name;\n }\n\n /**\n * Returns the price of the pair through the price oracle\n */\n function _getPrice(address _assetOne, address _assetTwo) internal view returns (uint256) {\n IPriceOracle oracle = IPriceOracle(IBabController(controller).priceOracle());\n return oracle.getPrice(_assetOne, _assetTwo);\n }\n\n function _normalizeDecimals(address _asset, uint256 _quantity) internal view returns (uint256) {\n uint8 tokenDecimals = ERC20(_asset).decimals();\n return tokenDecimals != 18 ? _quantity.mul(10**(18 - tokenDecimals)) : _quantity;\n }\n}\n" + }, + "contracts/interfaces/ILendIntegration.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\npragma solidity 0.7.6;\n\n/**\n * @title ILendIntegration\n * @author Babylon Finance\n *\n * Interface for lending integrations such as Compound, Aave.\n */\ninterface ILendIntegration {\n function supplyTokens(\n address _strategy,\n address _assetToken,\n uint256 _numTokensToSupply,\n uint256 _minAmountExpected\n ) external;\n\n function redeemTokens(\n address _strategy,\n address _assetToken,\n uint256 _numTokensToRedeem,\n uint256 _minAmountExpected\n ) external;\n\n function getExpectedShares(address _assetToken, uint256 _numTokensToSupply) external view returns (uint256);\n\n function getExchangeRatePerToken(address _assetToken) external view returns (uint256);\n\n function getInvestmentToken(address _assetToken) external view returns (address);\n}\n" + }, + "contracts/integrations/lend/LendIntegration.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\n\nimport {IGarden} from '../../interfaces/IGarden.sol';\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\nimport {IBabController} from '../../interfaces/IBabController.sol';\nimport {ILendIntegration} from '../../interfaces/ILendIntegration.sol';\n\nimport {BaseIntegration} from '../BaseIntegration.sol';\n\n/**\n * @title LendIntegration\n * @author Babylon Finance Protocol\n *\n * Base class for integration with passive investments like Yearn, Indexed\n */\nabstract contract LendIntegration is BaseIntegration, ReentrancyGuard, ILendIntegration {\n using SafeMath for uint256;\n using SafeCast for uint256;\n\n /* ============ Struct ============ */\n struct InvestmentInfo {\n IStrategy strategy; // Strategy address\n IGarden garden; // Garden address\n address assetToken;\n address investment; // Investment address\n uint256 investmentTokensInTransaction; // Investment tokens affected by this transaction\n uint256 investmentTokensInGarden; // Investment tokens garden balance\n uint256 limitDepositTokenQuantity; // Limit deposit/withdrawal token amount\n }\n\n /* ============ Events ============ */\n\n event TokensSupplied(\n address indexed garden,\n address indexed strategy,\n address indexed assetToken,\n uint256 numTokensToSupply\n );\n\n event TokensRedeemed(\n address indexed garden,\n address indexed strategy,\n address indexed assetToken,\n uint256 numTokensToRedeem,\n uint256 protocolFee\n );\n\n /* ============ Constructor ============ */\n\n /**\n * Creates the integration\n *\n * @param _name Name of the integration\n * @param _weth Address of the WETH ERC20\n * @param _controller Address of the controller\n */\n constructor(\n string memory _name,\n address _weth,\n address _controller\n ) BaseIntegration(_name, _weth, _controller) {}\n\n /* ============ External Functions ============ */\n function getInvestmentToken(address _assetToken) external view override returns (address) {\n return _getInvestmentToken(_assetToken);\n }\n\n /**\n * Checks whether an investment address is valid\n *\n * @param _investmentAddress Investment address to check\n * @return bool True if the address is a investment\n */\n function isInvestment(address _investmentAddress) external view returns (bool) {\n return _isInvestment(_investmentAddress);\n }\n\n function supplyTokens(\n address _strategy,\n address _assetToken,\n uint256 _numTokensToSupply,\n uint256 _minAmountExpected\n ) external override {\n InvestmentInfo memory investmentInfo =\n _createInvestmentInfo(\n _strategy,\n _assetToken,\n _getInvestmentToken(_assetToken),\n _numTokensToSupply,\n _minAmountExpected\n );\n\n _validatePreJoinInvestmentData(investmentInfo);\n\n investmentInfo.strategy.invokeApprove(_getSpender(_assetToken), _assetToken, _numTokensToSupply);\n\n (address targetInvestment, uint256 callValue, bytes memory methodData) =\n _getSupplyCalldata(_strategy, _assetToken, _numTokensToSupply);\n\n investmentInfo.strategy.invokeFromIntegration(targetInvestment, callValue, methodData);\n _validatePostEnterInvestmentData(investmentInfo);\n\n emit TokensSupplied(\n address(investmentInfo.garden),\n address(investmentInfo.strategy),\n _assetToken,\n _numTokensToSupply\n );\n }\n\n function redeemTokens(\n address _strategy,\n address _assetToken,\n uint256 _numTokensToRedeem,\n uint256 _minAmountExpected\n ) external override {\n InvestmentInfo memory investmentInfo =\n _createInvestmentInfo(\n _strategy,\n _assetToken,\n _getInvestmentToken(_assetToken),\n _numTokensToRedeem,\n _minAmountExpected\n );\n\n _validatePreExitInvestmentData(investmentInfo);\n\n (address targetInvestment, uint256 callValue, bytes memory methodData) =\n _getRedeemCalldata(_strategy, _assetToken, _numTokensToRedeem);\n\n investmentInfo.strategy.invokeFromIntegration(targetInvestment, callValue, methodData);\n\n _validatePostExitInvestmentData(investmentInfo);\n\n emit TokensSupplied(\n address(investmentInfo.garden),\n address(investmentInfo.strategy),\n _assetToken,\n _numTokensToRedeem\n );\n }\n\n function getExchangeRatePerToken(address _assetToken) external view override returns (uint256) {\n return _getExchangeRatePerToken(_assetToken);\n }\n\n /**\n * Gets the amount of cTokens expected to get after depositing ERC20 asset.\n *\n * @param _numTokensToSupply Amount of ERC20 tokens to supply\n * @return uint256 Amount of supply tokens to receive\n */\n function getExpectedShares(address _assetToken, uint256 _numTokensToSupply)\n external\n view\n override\n returns (uint256)\n {\n return _getExpectedShares(_assetToken, _numTokensToSupply);\n }\n\n /* ============ Internal Functions ============ */\n\n /**\n * Validate pre investment join data. Check investment is valid, token quantity is valid.\n *\n * @param _investmentInfo Struct containing investment information used in internal functions\n */\n function _validatePreJoinInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\n require(_isInvestment(_investmentInfo.assetToken), 'The investment address is not valid');\n require(\n _investmentInfo.investmentTokensInTransaction > 0,\n 'Min investment tokens to receive must be greater than 0'\n );\n }\n\n /**\n * Validate post enter investment data. Check investment is valid, token quantity is valid.\n *\n * @param _investmentInfo Struct containing investment information used in internal functions\n */\n function _validatePostEnterInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\n require(\n (IERC20(_investmentInfo.investment).balanceOf(address(_investmentInfo.strategy)) >\n _investmentInfo.investmentTokensInGarden),\n 'The garden did not receive the investment tokens'\n );\n }\n\n /**\n * Validate post exit investment data. Check investment is valid, token quantity is valid.\n *\n * @param _investmentInfo Struct containing investment information used in internal functions\n */\n function _validatePostExitInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\n require(\n IERC20(_investmentInfo.investment).balanceOf(address(_investmentInfo.strategy)) ==\n _investmentInfo.investmentTokensInGarden - _investmentInfo.investmentTokensInTransaction,\n 'The garden did not return the investment tokens'\n );\n }\n\n /**\n * Validate pre investment data. Check investment is valid, token quantity is valid.\n *\n * @param _investmentInfo Struct containing investment information used in internal functions\n */\n function _validatePreExitInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\n require(_isInvestment(_investmentInfo.assetToken), 'The investment address is not valid');\n require(\n _investmentInfo.investmentTokensInTransaction > 0,\n 'Investment tokens to exchange must be greater than 0'\n );\n require(\n _investmentInfo.investmentTokensInGarden >= _investmentInfo.investmentTokensInTransaction,\n 'The garden does not have enough investment tokens'\n );\n }\n\n function _isInvestment(\n address //_investmentAddress\n ) internal view virtual returns (bool);\n\n /**\n * Create and return InvestmentInfo struct\n *\n * return InvestmentInfo Struct containing data for the investment\n */\n function _createInvestmentInfo(\n address _strategy,\n address _assetToken,\n address _investmentToken,\n uint256 _investmentTokensInTransaction,\n uint256 _limitDepositToken\n ) internal view returns (InvestmentInfo memory) {\n InvestmentInfo memory investmentInfo;\n investmentInfo.strategy = IStrategy(_strategy);\n investmentInfo.garden = IGarden(investmentInfo.strategy.garden());\n investmentInfo.assetToken = _assetToken;\n investmentInfo.investment = _investmentToken;\n investmentInfo.investmentTokensInGarden = IERC20(_investmentToken).balanceOf(_strategy);\n investmentInfo.investmentTokensInTransaction = _investmentTokensInTransaction;\n investmentInfo.limitDepositTokenQuantity = _limitDepositToken;\n\n return investmentInfo;\n }\n\n function _getExpectedShares(address, uint256) internal view virtual returns (uint256);\n\n function _getExchangeRatePerToken(address) internal view virtual returns (uint256);\n\n function _getRedeemCalldata(\n address, /* _strategy */\n address, /* _assetToken */\n uint256 /* _numTokensToSupply */\n )\n internal\n view\n virtual\n returns (\n address,\n uint256,\n bytes memory\n );\n\n /**\n * Returns calldata for supplying tokens.\n *\n * hparam _strategy Address of the strat\n * hparam _assetToken Address of the token\n * hparam _numTokensToSupply Number of tokens\n *\n * @return address Target contract address\n * @return uint256 Call value\n * @return bytes Trade calldata\n */\n function _getSupplyCalldata(\n address, /* _strategy */\n address, /* _assetToken */\n uint256 /* _numTokensToSupply */\n )\n internal\n view\n virtual\n returns (\n address,\n uint256,\n bytes memory\n );\n\n function _getSpender(\n address //_investmentAddress\n ) internal view virtual returns (address);\n\n function _getInvestmentToken(\n address //_investmentAddress\n ) internal view virtual returns (address);\n}\n" + }, + "contracts/integrations/BaseIntegration.sol": { + "content": "/*\n Copyright 2021 Babylon Finance.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\nimport {IBabController} from '../interfaces/IBabController.sol';\nimport {IIntegration} from '../interfaces/IIntegration.sol';\nimport {IStrategy} from '../interfaces/IStrategy.sol';\nimport {IGarden} from '../interfaces/IGarden.sol';\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\n\n/**\n * @title BaseIntegration\n * @author Babylon Finance\n *\n * Abstract class that houses common Integration-related state and functions.\n */\nabstract contract BaseIntegration {\n using SafeCast for int256;\n using SafeMath for uint256;\n using SignedSafeMath for int256;\n using PreciseUnitMath for uint256;\n\n /* ============ Modifiers ============ */\n\n modifier onlySystemContract() {\n require(IBabController(controller).isSystemContract(msg.sender), 'Only system can call this');\n _;\n }\n\n /* ============ State Variables ============ */\n\n // Address of the controller\n address public controller;\n // Wrapped ETH address\n address public immutable weth;\n // Name of the integration\n string public name;\n mapping(address => bool) public initializedByGarden;\n\n /* ============ Constructor ============ */\n\n /**\n * Creates the integration\n *\n * @param _name Name of the integration\n * @param _weth Address of the WETH ERC20\n * @param _controller Address of the controller\n */\n\n constructor(\n string memory _name,\n address _weth,\n address _controller\n ) {\n require(_controller != address(0), 'Controller must be defined');\n name = _name;\n controller = _controller;\n weth = _weth;\n }\n\n /* ============ External Functions ============ */\n\n /**\n * Returns the name of the integration\n */\n function getName() external view returns (string memory) {\n return name;\n }\n}\n" + }, + "contracts/integrations/lend/CompoundLendIntegration.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport {ICToken} from '../../interfaces/external/compound/ICToken.sol';\nimport {IGarden} from '../../interfaces/IGarden.sol';\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\nimport {IBabController} from '../../interfaces/IBabController.sol';\nimport {LendIntegration} from './LendIntegration.sol';\n\n/**\n * @title CompoundLendIntegration\n * @author Babylon Finance Protocol\n *\n * Compound lend integration.\n */\ncontract CompoundLendIntegration is LendIntegration {\n using SafeMath for uint256;\n using SafeCast for uint256;\n\n /* ============ Modifiers ============ */\n\n /**\n * Throws if the sender is not the protocol\n */\n modifier onlyProtocol() {\n require(msg.sender == controller, 'Only controller can call this');\n _;\n }\n\n /* ============ Constant ============ */\n\n address internal constant cETH = 0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5;\n // Mapping of asset addresses to cToken addresses\n mapping(address => address) public assetToCToken;\n\n /* ============ Struct ============ */\n\n /* ============ Events ============ */\n\n /* ============ Constructor ============ */\n\n /**\n * Creates the integration\n *\n * @param _weth Address of the WETH ERC20\n * @param _controller Address of the controller\n */\n constructor(address _controller, address _weth) LendIntegration('compoundlend', _weth, _controller) {\n assetToCToken[0x6B175474E89094C44Da98b954EedeAC495271d0F] = 0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643; // DAI\n assetToCToken[0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984] = 0x35A18000230DA775CAc24873d00Ff85BccdeD550; // UNI\n assetToCToken[0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2] = 0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5; // WETH\n assetToCToken[0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48] = 0x39AA39c021dfbaE8faC545936693aC917d5E7563; // USDC\n assetToCToken[0xdAC17F958D2ee523a2206206994597C13D831ec7] = 0xf650C3d88D12dB855b8bf7D11Be6C55A4e07dCC9; // USDT\n assetToCToken[0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599] = 0xC11b1268C1A384e55C48c2391d8d480264A3A7F4; // WBTC\n assetToCToken[0xc00e94Cb662C3520282E6f5717214004A7f26888] = 0x70e36f6BF80a52b3B46b3aF8e106CC0ed743E8e4; // COMP\n }\n\n /* ============ External Functions ============ */\n\n // Governance function\n function updateCTokenMapping(address _assetAddress, address _cTokenAddress) external onlyProtocol {\n assetToCToken[_assetAddress] = _cTokenAddress;\n }\n\n /* ============ Internal Functions ============ */\n\n function _isInvestment(address _assetToken) internal view override returns (bool) {\n return assetToCToken[_assetToken] != address(0);\n }\n\n function _getExpectedShares(address _assetToken, uint256 _numTokensToSupply)\n internal\n view\n override\n returns (uint256)\n {\n uint256 oneCTokenInUderlying = _getExchangeRatePerToken(_assetToken);\n return oneCTokenInUderlying.mul(_numTokensToSupply).div(10**18);\n }\n\n // TODO: Test this\n function _getExchangeRatePerToken(address _assetToken) internal view override returns (uint256) {\n address cToken = assetToCToken[_assetToken];\n uint256 exchangeRateCurrent = ICToken(cToken).exchangeRateStored();\n // TODO: exchangeRateCurrent reverts wit no reason. Super strange.\n // uint256 exchangeRateCurrent = ICToken(cToken).exchangeRateCurrent();\n uint8 assetDecimals = ERC20(_assetToken).decimals();\n // cTokens always have 8 decimals.\n if (assetDecimals < 8) {\n uint256 mantissa = 8 - assetDecimals;\n return exchangeRateCurrent.mul(10**mantissa);\n } else {\n uint256 mantissa = assetDecimals - 8;\n return exchangeRateCurrent.div(10**mantissa);\n }\n }\n\n function _getRedeemCalldata(\n address, /* _strategy */\n address _assetToken,\n uint256 _numTokensToSupply\n )\n internal\n view\n override\n returns (\n address,\n uint256,\n bytes memory\n )\n {\n // Encode method data for Garden to invoke\n bytes memory methodData = abi.encodeWithSignature('redeem(uint256)', _numTokensToSupply);\n\n return (assetToCToken[_assetToken], 0, methodData);\n }\n\n /**\n * Returns calldata for supplying tokens.\n *\n * @return address Target contract address\n * @return uint256 Call value\n * @return bytes Trade calldata\n */\n function _getSupplyCalldata(\n address, /* _strategy */\n address _assetToken,\n uint256 _numTokensToSupply\n )\n internal\n view\n override\n returns (\n address,\n uint256,\n bytes memory\n )\n {\n // Encode method data for Garden to invoke\n bytes memory methodData = abi.encodeWithSignature('mint(uint256)', _numTokensToSupply);\n // If it is ETH, send the value\n return (assetToCToken[_assetToken], assetToCToken[_assetToken] == cETH ? _numTokensToSupply : 0, methodData);\n }\n\n function _getSpender(address _assetToken) internal view override returns (address) {\n return assetToCToken[_assetToken];\n }\n\n function _getInvestmentToken(address _assetToken) internal view override returns (address) {\n return assetToCToken[_assetToken];\n }\n}\n" + }, + "contracts/interfaces/external/compound/ICToken.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.7.0 <0.9.0;\n\ninterface ICToken {\n function mint(uint256 mintAmount) external returns (uint256);\n\n function redeem(uint256 redeemTokens) external returns (uint256);\n\n function redeemUnderlying(uint256 redeemAmount) external returns (uint256);\n\n function borrow(uint256 borrowAmount) external returns (uint256);\n\n function repayBorrow(uint256 repayAmount) external returns (uint256);\n\n function exchangeRateStored() external view returns (uint256);\n\n function balanceOf(address _owner) external view returns (uint256);\n\n function underlying() external view returns (address);\n\n function getAccountSnapshot(address account)\n external\n view\n returns (\n uint256,\n uint256,\n uint256,\n uint256\n );\n\n function repayBorrowBehalf(address borrower, uint256 amount) external payable returns (uint256);\n\n function borrowBalanceCurrent(address account) external view returns (uint256);\n\n function exchangeRateCurrent() external returns (uint256);\n\n function supplyRatePerBlock() external returns (uint256);\n}\n" + }, + "contracts/strategies/StrategyNFT.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\n\nimport {ERC721} from '@openzeppelin/contracts/token/ERC721/ERC721.sol';\nimport {Counters} from '@openzeppelin/contracts/utils/Counters.sol';\nimport {IBabController} from '../interfaces/IBabController.sol';\nimport {IGarden} from '../interfaces/IGarden.sol';\nimport {IStrategy} from '../interfaces/IStrategy.sol';\nimport {IStrategyNFT} from '../interfaces/IStrategyNFT.sol';\n\n/**\n * @title StrategyNFT\n * @author Babylon Finance\n *\n * Contract the NFT for each Strategy\n */\ncontract StrategyNFT is ERC721, IStrategyNFT {\n using Counters for Counters.Counter;\n\n /* ============ Events ============ */\n\n event StrategyNFTAwarded(address indexed _member, uint256 indexed _newItemId);\n\n /* ============ Modifiers ============ */\n\n modifier onlyStrategy {\n IStrategy strategy = IStrategy(msg.sender);\n require(\n IGarden(strategy.garden()).isStrategyActiveInGarden(msg.sender) && controller.isSystemContract(msg.sender),\n 'Only the strategy can mint the NFT'\n );\n _;\n }\n\n /* ============ State Variables ============ */\n\n // Address of the Controller contract\n IBabController public controller;\n\n mapping(address => StratDetail) public stratDetails;\n\n Counters.Counter private _tokenIds;\n\n /* ============ Constructor ============ */\n\n /**\n * Sets the protocol controller\n *\n * @param _controller Address of controller contract\n * @param _name Name of the garden\n * @param _symbol Symbol of the garden\n */\n constructor(\n address _controller,\n string memory _name,\n string memory _symbol\n ) ERC721(_name, _symbol) {\n require(address(_controller) != address(0), 'Controller must exist');\n require(bytes(_name).length < 50, 'Strategy Name is too long');\n controller = IBabController(_controller);\n }\n\n /* ============ External Functions ============ */\n\n /**\n * Awards the garden NFT to a user and gives him access to a specific garden\n *\n * @param _user Address of the user\n * @param _strategyTokenURI Strategy token URI\n */\n function grantStrategyNFT(address _user, string memory _strategyTokenURI)\n external\n override\n onlyStrategy\n returns (uint256)\n {\n require(address(_user) != address(0), 'User must exist');\n _tokenIds.increment();\n uint256 newItemId = _tokenIds.current();\n _safeMint(_user, newItemId);\n _setTokenURI(newItemId, _strategyTokenURI);\n stratDetails[msg.sender].tokenId = newItemId;\n emit StrategyNFTAwarded(_user, newItemId);\n return newItemId;\n }\n\n /**\n * Saves the name an symbol for a new created strategy\n *\n * @param _strategy Address of the strategy\n * @param _name Strategy Name\n * @param _symbol Strategy Symbol\n */\n function saveStrategyNameAndSymbol(\n address _strategy,\n string memory _name,\n string memory _symbol\n ) external override {\n require(controller.isSystemContract(msg.sender), 'Only a system contract can call this');\n StratDetail storage stratDetail = stratDetails[_strategy];\n stratDetail.name = _name;\n stratDetail.symbol = _symbol;\n }\n\n function getStrategyTokenURI(address _strategy) external view override returns (string memory) {\n return tokenURI(stratDetails[_strategy].tokenId);\n }\n\n function getStrategyName(address _strategy) external view override returns (string memory) {\n return stratDetails[_strategy].name;\n }\n}\n" + }, + "contracts/strategies/operations/DepositVaultOperation.sol": { + "content": "/*\n Copyright 2021 Babylon Finance.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {Operation} from './Operation.sol';\nimport {IGarden} from '../../interfaces/IGarden.sol';\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\nimport {IPassiveIntegration} from '../../interfaces/IPassiveIntegration.sol';\n\n/**\n * @title DepositVaultOperation\n * @author Babylon Finance\n *\n * Executes a deposit vault operation\n */\ncontract DepositVaultOperation is Operation {\n using SafeMath for uint256;\n using PreciseUnitMath for uint256;\n\n /* ============ Constructor ============ */\n\n /**\n * Creates the integration\n *\n * @param _name Name of the integration\n * @param _controller Address of the controller\n */\n constructor(string memory _name, address _controller) Operation(_name, _controller) {}\n\n /**\n * Sets operation data for the deposit vault operation\n *\n * @param _data Operation data\n */\n function validateOperation(\n address _data,\n IGarden, /* _garden */\n address _integration,\n uint256 /* _index */\n ) external view override onlyStrategy {\n require(IPassiveIntegration(_integration).isInvestment(_data), 'Must be a valid yield vault');\n }\n\n /**\n * Executes the deposit vault operation\n * @param _capital Amount of capital received from the garden\n */\n function executeOperation(\n address _asset,\n uint256 _capital,\n uint8, /* _assetStatus */\n address _data,\n IGarden, /* _garden */\n address _integration\n )\n external\n override\n onlyStrategy\n returns (\n address,\n uint256,\n uint8\n )\n {\n address yieldVault = _data;\n address vaultAsset = IPassiveIntegration(_integration).getInvestmentAsset(yieldVault);\n if (vaultAsset != _asset) {\n IStrategy(msg.sender).trade(_asset, _capital, vaultAsset);\n }\n uint256 exactAmount = IPassiveIntegration(_integration).getExpectedShares(yieldVault, _capital);\n uint256 minAmountExpected = exactAmount.sub(exactAmount.preciseMul(SLIPPAGE_ALLOWED));\n IPassiveIntegration(_integration).enterInvestment(\n msg.sender,\n yieldVault,\n minAmountExpected,\n vaultAsset,\n IERC20(vaultAsset).balanceOf(msg.sender)\n );\n return (yieldVault, IERC20(yieldVault).balanceOf(msg.sender), 0); // liquid\n }\n\n /**\n * Exits the deposit vault operation.\n * @param _percentage of capital to exit from the strategy\n */\n function exitOperation(\n uint256 _percentage,\n address _data,\n IGarden _garden,\n address _integration\n ) external override onlyStrategy {\n require(_percentage <= HUNDRED_PERCENT, 'Unwind Percentage <= 100%');\n address yieldVault = _data;\n address vaultAsset = IPassiveIntegration(_integration).getInvestmentAsset(yieldVault);\n uint256 amountVault = IERC20(yieldVault).balanceOf(msg.sender).preciseMul(_percentage);\n IPassiveIntegration(_integration).exitInvestment(\n msg.sender,\n yieldVault,\n amountVault,\n vaultAsset,\n IPassiveIntegration(_integration).getPricePerShare(yieldVault).mul(\n amountVault.sub(amountVault.preciseMul(SLIPPAGE_ALLOWED))\n )\n );\n if (vaultAsset != _garden.reserveAsset()) {\n IStrategy(msg.sender).trade(vaultAsset, IERC20(vaultAsset).balanceOf(msg.sender), _garden.reserveAsset());\n }\n }\n\n /**\n * Gets the NAV of the deposit vault op in the reserve asset\n *\n * @return _nav NAV of the strategy\n */\n function getNAV(\n address _data,\n IGarden _garden,\n address _integration\n ) external view override returns (uint256) {\n if (!IStrategy(msg.sender).isStrategyActive()) {\n return 0;\n }\n address vaultAsset = IPassiveIntegration(_integration).getInvestmentAsset(_data);\n uint256 price = _getPrice(_garden.reserveAsset(), vaultAsset);\n uint256 NAV =\n IPassiveIntegration(_integration).getPricePerShare(_data).mul(IERC20(_data).balanceOf(msg.sender)).div(\n price\n );\n require(NAV != 0, 'NAV has to be bigger 0');\n return NAV;\n }\n}\n" + }, + "contracts/interfaces/IPassiveIntegration.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\npragma solidity 0.7.6;\n\n/**\n * @title IPassiveIntegration\n * @author Babylon Finance\n *\n * Interface for passive investments protocol integrations\n */\ninterface IPassiveIntegration {\n function enterInvestment(\n address _strategy,\n address _investmentAddress,\n uint256 _investmentTokensOut,\n address _tokenIn,\n uint256 _maxAmountIn\n ) external;\n\n function exitInvestment(\n address _strategy,\n address _investmentAddress,\n uint256 _investmentTokenIn,\n address _tokenOut,\n uint256 _minAmountOut\n ) external;\n\n function isInvestment(address _investmentAddress) external view returns (bool);\n\n function getExpectedShares(address _investmentAddress, uint256 _ethAmount) external view returns (uint256);\n\n function getPricePerShare(address _investmentAddress) external view returns (uint256);\n\n function getInvestmentAsset(address _investmentAddress) external view returns (address);\n}\n" + }, + "contracts/integrations/passive/PassiveIntegration.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\n\nimport {IPassiveIntegration} from '../../interfaces/IPassiveIntegration.sol';\nimport {IGarden} from '../../interfaces/IGarden.sol';\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\nimport {IBabController} from '../../interfaces/IBabController.sol';\nimport {BaseIntegration} from '../BaseIntegration.sol';\n\n/**\n * @title PassiveIntegration\n * @author Babylon Finance Protocol\n *\n * Base class for integration with passive investments like Yearn, Indexed\n */\nabstract contract PassiveIntegration is BaseIntegration, ReentrancyGuard, IPassiveIntegration {\n using SafeMath for uint256;\n using SafeCast for uint256;\n\n /* ============ Struct ============ */\n\n struct InvestmentInfo {\n IStrategy strategy; // Strategy address\n IGarden garden; // Garden address\n address investment; // Investment address\n uint256 totalSupply; // Total Supply of the investment\n uint256 investmentTokensInTransaction; // Investment tokens affected by this transaction\n uint256 investmentTokensInGarden; // Investment tokens garden balance\n uint256 limitDepositTokenQuantity; // Limit deposit/withdrawal token amount\n }\n\n /* ============ Events ============ */\n\n event InvestmentEntered(\n address indexed garden,\n address indexed strategy,\n address indexed investment,\n address tokenIn,\n uint256 investmentTokensOut\n );\n\n event InvestmentExited(\n address indexed garden,\n address indexed strategy,\n address indexed investment,\n uint256 investmentTokensOut\n );\n\n /* ============ Constructor ============ */\n\n /**\n * Creates the integration\n *\n * @param _name Name of the integration\n * @param _weth Address of the WETH ERC20\n * @param _controller Address of the controller\n */\n constructor(\n string memory _name,\n address _weth,\n address _controller\n ) BaseIntegration(_name, _weth, _controller) {}\n\n /* ============ External Functions ============ */\n\n /**\n * Deposits tokens into an investment\n *\n * @param _strategy Address of the strategy\n * @param _investmentAddress Address of the investment token to join\n * @param _investmentTokensOut Min amount of investment tokens to receive\n * @param _tokenIn Token aaddress to deposit\n * @param _maxAmountIn Max amount of the token to deposit\n */\n function enterInvestment(\n address _strategy,\n address _investmentAddress,\n uint256 _investmentTokensOut,\n address _tokenIn,\n uint256 _maxAmountIn\n ) external override nonReentrant onlySystemContract {\n InvestmentInfo memory investmentInfo =\n _createInvestmentInfo(_strategy, _investmentAddress, _investmentTokensOut, _tokenIn, _maxAmountIn);\n _validatePreJoinInvestmentData(investmentInfo);\n // Approve spending of the token\n investmentInfo.strategy.invokeApprove(_getSpender(_investmentAddress), _tokenIn, _maxAmountIn);\n (address targetInvestment, uint256 callValue, bytes memory methodData) =\n _getEnterInvestmentCalldata(_strategy, _investmentAddress, _investmentTokensOut, _tokenIn, _maxAmountIn);\n investmentInfo.strategy.invokeFromIntegration(targetInvestment, callValue, methodData);\n _validatePostEnterInvestmentData(investmentInfo);\n\n emit InvestmentEntered(\n address(investmentInfo.garden),\n address(investmentInfo.strategy),\n _investmentAddress,\n _tokenIn,\n _investmentTokensOut\n );\n }\n\n /**\n * Exits an outside passive investment\n *\n * @param _strategy Address of the strategy\n * @param _investmentAddress Address of the investment token to join\n * @param _investmentTokenIn Quantity of investment tokens to return\n * @param _tokenOut Token address to withdraw\n * @param _minAmountOut Min token quantities to receive from the investment\n */\n function exitInvestment(\n address _strategy,\n address _investmentAddress,\n uint256 _investmentTokenIn,\n address _tokenOut,\n uint256 _minAmountOut\n ) external override nonReentrant onlySystemContract {\n InvestmentInfo memory investmentInfo =\n _createInvestmentInfo(_strategy, _investmentAddress, _investmentTokenIn, _tokenOut, _minAmountOut);\n _validatePreExitInvestmentData(investmentInfo);\n // Approve spending of the investment token\n investmentInfo.strategy.invokeApprove(_getSpender(_investmentAddress), _investmentAddress, _investmentTokenIn);\n\n (address targetInvestment, uint256 callValue, bytes memory methodData) =\n _getExitInvestmentCalldata(_strategy, _investmentAddress, _investmentTokenIn, _tokenOut, _minAmountOut);\n investmentInfo.strategy.invokeFromIntegration(targetInvestment, callValue, methodData);\n _validatePostExitInvestmentData(investmentInfo);\n\n emit InvestmentExited(\n address(investmentInfo.garden),\n address(investmentInfo.strategy),\n investmentInfo.investment,\n _investmentTokenIn\n );\n }\n\n /**\n * Checks whether an investment address is valid\n *\n * @param _investmentAddress Investment address to check\n * @return bool True if the address is a investment\n */\n function isInvestment(address _investmentAddress) external view override returns (bool) {\n return _isInvestment(_investmentAddress);\n }\n\n /**\n * Gets the amount of shares expected to get after depositing _ethAmount\n *\n * @param _investmentAddress Investment address to check\n * @param _ethAmount Amount of eth to invest\n * @return uint256 Amount of investment shares to receive\n */\n function getExpectedShares(address _investmentAddress, uint256 _ethAmount)\n external\n view\n override\n returns (uint256)\n {\n return _getExpectedShares(_investmentAddress, _ethAmount);\n }\n\n /**\n * Gets how much eth one unit of the investment is worth\n *\n * @param _investmentAddress Investment address to check\n * @return uint256 Returns the price in ETH of an investment share\n */\n function getPricePerShare(address _investmentAddress) external view override returns (uint256) {\n return _getPricePerShare(_investmentAddress);\n }\n\n /**\n * Gets the asset needed to enter the investment\n *\n * @return address Returns the asset that this investment needs\n */\n function getInvestmentAsset(address _investmentAddress) external view override returns (address) {\n return _getInvestmentAsset(_investmentAddress);\n }\n\n /* ============ Internal Functions ============ */\n\n /**\n * Create and return InvestmentInfo struct\n *\n * @param _strategy Address of the strategy\n * @param _investment Address of the investment\n * @param _investmentTokensInTransaction Number of investment tokens involved\n * hparam _tokenIn Addresseses of the deposit token\n * @param _limitDepositToken Limit quantity of the deposit/withdrawal token\n *\n * return InvestmentInfo Struct containing data for the investment\n */\n function _createInvestmentInfo(\n address _strategy,\n address _investment,\n uint256 _investmentTokensInTransaction,\n address, /*_tokenIn*/\n uint256 _limitDepositToken\n ) internal view returns (InvestmentInfo memory) {\n InvestmentInfo memory investmentInfo;\n investmentInfo.strategy = IStrategy(_strategy);\n investmentInfo.garden = IGarden(investmentInfo.strategy.garden());\n investmentInfo.investment = _investment;\n investmentInfo.totalSupply = IERC20(_investment).totalSupply();\n investmentInfo.investmentTokensInGarden = IERC20(_investment).balanceOf(_strategy);\n investmentInfo.investmentTokensInTransaction = _investmentTokensInTransaction;\n investmentInfo.limitDepositTokenQuantity = _limitDepositToken;\n\n return investmentInfo;\n }\n\n /**\n * Validate pre investment join data. Check investment is valid, token quantity is valid.\n *\n * @param _investmentInfo Struct containing investment information used in internal functions\n */\n function _validatePreJoinInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\n require(_isInvestment(_investmentInfo.investment), 'The investment address is not valid');\n require(\n _investmentInfo.investmentTokensInTransaction > 0,\n 'Min investment tokens to receive must be greater than 0'\n );\n }\n\n /**\n * Validate pre investment data. Check investment is valid, token quantity is valid.\n *\n * @param _investmentInfo Struct containing investment information used in internal functions\n */\n function _validatePreExitInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\n require(_isInvestment(_investmentInfo.investment), 'The investment address is not valid');\n require(\n _investmentInfo.investmentTokensInTransaction > 0,\n 'Investment tokens to exchange must be greater than 0'\n );\n require(\n _investmentInfo.investmentTokensInGarden >= _investmentInfo.investmentTokensInTransaction,\n 'The garden does not have enough investment tokens'\n );\n }\n\n /**\n * Validate post enter investment data. Check investment is valid, token quantity is valid.\n *\n * @param _investmentInfo Struct containing investment information used in internal functions\n */\n function _validatePostEnterInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\n require(\n (IERC20(_investmentInfo.investment).balanceOf(address(_investmentInfo.strategy)) >\n _investmentInfo.investmentTokensInGarden),\n 'The garden did not receive the investment tokens'\n );\n }\n\n /**\n * Validate post exit investment data. Check investment is valid, token quantity is valid.\n *\n * @param _investmentInfo Struct containing investment information used in internal functions\n */\n function _validatePostExitInvestmentData(InvestmentInfo memory _investmentInfo) internal view {\n require(\n IERC20(_investmentInfo.investment).balanceOf(address(_investmentInfo.strategy)) ==\n _investmentInfo.investmentTokensInGarden - _investmentInfo.investmentTokensInTransaction,\n 'The garden did not return the investment tokens'\n );\n }\n\n /**\n * Return join investment calldata which is already generated from the investment API\n *\n * hparam _strategy Address of the strategy\n * hparam _investmentAddress Address of the investment\n * hparam _investmentTokensOut Amount of investment tokens to send\n * hparam _tokenIn Addresses of tokens to send to the investment\n * hparam _maxAmountIn Amounts of tokens to send to the investment\n *\n * @return address Target contract address\n * @return uint256 Call value\n * @return bytes Trade calldata\n */\n function _getEnterInvestmentCalldata(\n address, /* _strategy */\n address, /* _investmentAddress */\n uint256, /* _investmentTokensOut */\n address, /* _tokenIn */\n uint256 /* _maxAmountIn */\n )\n internal\n view\n virtual\n returns (\n address,\n uint256,\n bytes memory\n );\n\n /**\n * Return exit investment calldata which is already generated from the investment API\n *\n * hparam _strategy Address of the strategy\n * hparam _investmentAddress Address of the investment\n * hparam _investmentTokensIn Amount of investment tokens to receive\n * hparam _tokenOut Addresses of token to receive\n * hparam _minAmountOut Amount of investment tokens to receive\n *\n * @return address Target contract address\n * @return uint256 Call value\n * @return bytes Trade calldata\n */\n function _getExitInvestmentCalldata(\n address, /*_strategy */\n address, /*_investmentAddress */\n uint256, /*_investmentTokensIn */\n address, /*_tokenOut */\n uint256 /* _minAmountOut */\n )\n internal\n view\n virtual\n returns (\n address,\n uint256,\n bytes memory\n );\n\n function _isInvestment(\n address //_investmentAddress\n ) internal view virtual returns (bool);\n\n function _getExpectedShares(\n address, //_investmentAddress\n uint256 // _ethAmount\n ) internal view virtual returns (uint256);\n\n function _getPricePerShare(\n address //_investmentAddress\n ) internal view virtual returns (uint256);\n\n function _getInvestmentAsset(\n address //_investmentAddress\n ) internal view virtual returns (address);\n\n function _getSpender(\n address //_investmentAddress\n ) internal view virtual returns (address);\n}\n" + }, + "contracts/integrations/passive/YearnVaultIntegration.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\nimport {PassiveIntegration} from './PassiveIntegration.sol';\nimport {YRegistry} from '../../interfaces/external/yearn/YRegistry.sol';\nimport {IVault} from '../../interfaces/external/yearn/IVault.sol';\n\n/**\n * @title YearnIntegration\n * @author Babylon Finance Protocol\n *\n * Yearn v2 Vault Integration\n */\ncontract YearnVaultIntegration is PassiveIntegration {\n using SafeMath for uint256;\n using PreciseUnitMath for uint256;\n\n /* ============ State Variables ============ */\n\n // Address of Kyber Network Proxy\n YRegistry public yearnv2Registry;\n\n /* ============ Constructor ============ */\n\n /**\n * Creates the integration\n *\n * @param _controller Address of the controller\n * @param _weth Address of the WETH ERC20\n * @param _yearnRegistryAddress Address of Balancer core factory address\n */\n constructor(\n address _controller,\n address _weth,\n address _yearnRegistryAddress\n ) PassiveIntegration('yearnvaults', _weth, _controller) {\n yearnv2Registry = YRegistry(_yearnRegistryAddress);\n }\n\n /* ============ Internal Functions ============ */\n\n function _isInvestment(address _investmentAddress) internal view override returns (bool) {\n (address _controller, , , , ) = yearnv2Registry.getVaultInfo(_investmentAddress);\n return _controller != address(0);\n }\n\n function _getSpender(address _investmentAddress) internal pure override returns (address) {\n return _investmentAddress;\n }\n\n function _getExpectedShares(address _investmentAddress, uint256 _ethAmount)\n internal\n view\n override\n returns (uint256)\n {\n return _ethAmount.preciseDiv(IVault(_investmentAddress).getPricePerFullShare());\n }\n\n function _getPricePerShare(address _investmentAddress) internal view override returns (uint256) {\n return IVault(_investmentAddress).getPricePerFullShare();\n }\n\n function _getInvestmentAsset(address _investmentAddress) internal view override returns (address) {\n return IVault(_investmentAddress).token();\n }\n\n /**\n * Return join investment calldata which is already generated from the investment API\n *\n * hparam _strategy Address of the strategy\n * @param _investmentAddress Address of the vault\n * hparam _investmentTokensOut Amount of investment tokens to send\n * hparam _tokenIn Addresses of tokens to send to the investment\n * @param _maxAmountIn Amounts of tokens to send to the investment\n *\n * @return address Target contract address\n * @return uint256 Call value\n * @return bytes Trade calldata\n */\n function _getEnterInvestmentCalldata(\n address, /* _strategy */\n address _investmentAddress,\n uint256, /* _investmentTokensOut */\n address, /* _tokenIn */\n uint256 _maxAmountIn\n )\n internal\n pure\n override\n returns (\n address,\n uint256,\n bytes memory\n )\n {\n // Encode method data for Garden to invoke\n bytes memory methodData = abi.encodeWithSignature('deposit(uint256)', _maxAmountIn);\n\n return (_investmentAddress, 0, methodData);\n }\n\n /**\n * Return exit investment calldata which is already generated from the investment API\n *\n * hparam _strategy Address of the strategy\n * @param _investmentAddress Address of the investment\n * @param _investmentTokensIn Amount of investment tokens to receive\n * hparam _tokenOut Addresses of tokens to receive\n * hparam _minAmountOut Amounts of investment tokens to receive\n *\n * @return address Target contract address\n * @return uint256 Call value\n * @return bytes Trade calldata\n */\n function _getExitInvestmentCalldata(\n address, /* _strategy */\n address _investmentAddress,\n uint256 _investmentTokensIn,\n address, /* _tokenOut */\n uint256 /* _minAmountOut */\n )\n internal\n pure\n override\n returns (\n address,\n uint256,\n bytes memory\n )\n {\n // Encode method data for Garden to invoke\n bytes memory methodData = abi.encodeWithSignature('withdraw(uint256)', _investmentTokensIn);\n\n return (_investmentAddress, 0, methodData);\n }\n}\n" + }, + "contracts/interfaces/external/yearn/YRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.7.0 <0.9.0;\n\ninterface YRegistry {\n function getName() external pure returns (string memory);\n\n function getVault(uint256 index) external view returns (address vault);\n\n function getVaultsLength() external view returns (uint256);\n\n function getVaults() external view returns (address[] memory);\n\n function getVaultInfo(address _vault)\n external\n view\n returns (\n address controller,\n address token,\n address strategy,\n bool isWrapped,\n bool isDelegated\n );\n\n function getVaultsInfo()\n external\n view\n returns (\n address[] memory vaultsAddresses,\n address[] memory controllerArray,\n address[] memory tokenArray,\n address[] memory strategyArray,\n bool[] memory isWrappedArray,\n bool[] memory isDelegatedArray\n );\n}\n" + }, + "contracts/interfaces/external/yearn/IVault.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.7.0 <0.9.0;\n\ninterface IVault {\n function token() external view returns (address);\n\n function underlying() external view returns (address);\n\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n\n function decimals() external view returns (uint8);\n\n function controller() external view returns (address);\n\n function governance() external view returns (address);\n\n function getPricePerFullShare() external view returns (uint256);\n\n function deposit(uint256) external;\n\n function depositAll() external;\n\n function withdraw(uint256) external;\n\n function withdrawAll() external;\n\n function balanceOf(address) external view returns (uint256);\n}\n" + }, + "contracts/strategies/operations/BuyOperation.sol": { + "content": "/*\n Copyright 2021 Babylon Finance.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport {Operation} from './Operation.sol';\nimport {IGarden} from '../../interfaces/IGarden.sol';\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\nimport {ITradeIntegration} from '../../interfaces/ITradeIntegration.sol';\n\n/**\n * @title BuyOperation\n * @author Babylon Finance\n *\n * Executes a buy operation\n */\ncontract BuyOperation is Operation {\n using PreciseUnitMath for uint256;\n\n /* ============ Constructor ============ */\n\n /**\n * Creates the integration\n *\n * @param _name Name of the integration\n * @param _controller Address of the controller\n */\n constructor(string memory _name, address _controller) Operation(_name, _controller) {}\n\n /**\n * Sets operation data for the buy operation\n *\n * @param _data Operation data\n */\n function validateOperation(\n address _data,\n IGarden _garden,\n address, /* _integration */\n uint256 /* _index */\n ) external view override onlyStrategy {\n require(_data != _garden.reserveAsset(), 'Receive token must be different');\n }\n\n /**\n * Executes the buy operation\n * @param _capital Amount of capital received from the garden\n */\n function executeOperation(\n address _asset,\n uint256 _capital,\n uint8, /* _assetStatus */\n address _data,\n IGarden, /* _garden */\n address /* _integration */\n )\n external\n override\n onlyStrategy\n returns (\n address,\n uint256,\n uint8\n )\n {\n IStrategy(msg.sender).trade(_asset, _capital, _data);\n return (_data, IERC20(_data).balanceOf(address(msg.sender)), 0); // liquid\n }\n\n /**\n * Exits the buy operation.\n * @param _percentage of capital to exit from the strategy\n */\n function exitOperation(\n uint256 _percentage,\n address _data,\n IGarden _garden,\n address /* _integration */\n ) external override onlyStrategy {\n require(_percentage <= 100e18, 'Unwind Percentage <= 100%');\n IStrategy(msg.sender).trade(\n _data,\n IERC20(_data).balanceOf(address(msg.sender)).preciseMul(_percentage),\n _garden.reserveAsset()\n );\n }\n\n /**\n * Gets the NAV of the buy op in the reserve asset\n *\n * @return _nav NAV of the strategy\n */\n function getNAV(\n address _data,\n IGarden _garden,\n address /* _integration */\n ) external view override returns (uint256) {\n if (!IStrategy(msg.sender).isStrategyActive()) {\n return 0;\n }\n uint256 price = _getPrice(_garden.reserveAsset(), _data);\n uint256 NAV = _normalizeDecimals(_data, IERC20(_data).balanceOf(msg.sender)).preciseDiv(price);\n require(NAV != 0, 'NAV has to be bigger 0');\n return NAV;\n }\n}\n" + }, + "contracts/PriceOracle.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Modified from (Set Protocol SetValuer)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\n\nimport {AddressArrayUtils} from './lib/AddressArrayUtils.sol';\nimport {PreciseUnitMath} from './lib/PreciseUnitMath.sol';\n\nimport {IBabController} from './interfaces/IBabController.sol';\nimport {IUniswapAnchoredView} from './interfaces/external/compound/IUniswapAnchoredView.sol';\nimport {IOracleAdapter} from './interfaces/IOracleAdapter.sol';\nimport {IPriceOracle} from './interfaces/IPriceOracle.sol';\n\n/**\n * @title PriceOracle\n * @author Babylon Finance\n *\n * Contract that returns the price for any given asset pair. Price is retrieved either directly from an oracle,\n * calculated using common asset pairs, or uses external data to calculate price.\n * Note: Prices are returned in preciseUnits (i.e. 18 decimals of precision)\n */\ncontract PriceOracle is Ownable, IPriceOracle {\n using PreciseUnitMath for uint256;\n using AddressArrayUtils for address[];\n\n /* ============ Events ============ */\n\n event AdapterAdded(address _adapter);\n event AdapterRemoved(address _adapter);\n\n /* ============ State Variables ============ */\n\n // Address of the Controller contract\n IBabController public controller;\n\n address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\n mapping(address => bool) public uniswapAssets;\n\n // Address of uniswap anchored view contract. See https://compound.finance/docs/prices#price\n address public immutable uniswapAnchoredView;\n\n // List of IOracleAdapters used to return prices of third party protocols (e.g. Uniswap, Compound, Balancer)\n address[] public adapters;\n\n /* ============ Constructor ============ */\n\n /**\n * Set state variables and map asset pairs to their oracles\n *\n * @param _controller Address of controller contract\n * @param _uniswapAnchoredView Address of the uniswap anchored view that compound maintains\n * @param _adapters List of adapters used to price assets created by other protocols\n */\n constructor(\n IBabController _controller,\n address _uniswapAnchoredView,\n address[] memory _adapters\n ) {\n controller = _controller;\n uniswapAnchoredView = _uniswapAnchoredView;\n adapters = _adapters;\n\n uniswapAssets[0x6B175474E89094C44Da98b954EedeAC495271d0F] = true; // dai\n uniswapAssets[0x1985365e9f78359a9B6AD760e32412f4a445E862] = true; // rep\n uniswapAssets[0xE41d2489571d322189246DaFA5ebDe1F4699F498] = true; // zrx\n uniswapAssets[0x0D8775F648430679A709E98d2b0Cb6250d2887EF] = true; // bat\n uniswapAssets[0xdd974D5C2e2928deA5F71b9825b8b646686BD200] = true; // knc\n uniswapAssets[0x514910771AF9Ca656af840dff83E8264EcF986CA] = true; // link\n uniswapAssets[0xc00e94Cb662C3520282E6f5717214004A7f26888] = true; // comp\n uniswapAssets[0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48] = true; // USDC\n uniswapAssets[0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984] = true; // uni\n uniswapAssets[address(0)] = true; // eth\n uniswapAssets[WETH] = true; // weth\n }\n\n /* ============ External Functions ============ */\n\n /**\n * SYSTEM-ONLY PRIVELEGE: Find price of passed asset pair, if possible. The steps it takes are:\n * 1) Check to see if a direct or inverse oracle of the pair exists,\n * 2) If not, use masterQuoteAsset to link pairs together (i.e. BTC/ETH and ETH/USDC\n * could be used to calculate BTC/USDC).\n * 3) If not, check oracle adapters in case one or more of the assets needs external protocol data\n * to price.\n * 4) If all steps fail, revert.\n *\n * @param _assetOne Address of first asset in pair\n * @param _assetTwo Address of second asset in pair\n * @return Price of asset pair to 18 decimals of precision\n */\n function getPrice(address _assetOne, address _assetTwo) external view override returns (uint256) {\n require(controller.isSystemContract(msg.sender) || msg.sender == owner(), 'Caller must be system contract');\n // Same asset. Returns base unit\n if (_assetOne == _assetTwo) {\n return 10**18;\n }\n\n bool priceFound;\n uint256 price;\n\n (priceFound, price) = _getPriceFromUniswapAnchoredView(_assetOne, _assetTwo);\n if (!priceFound) {\n (priceFound, price) = _getPriceFromAdapters(_assetOne, _assetTwo);\n }\n\n require(priceFound, 'Price not found');\n return price;\n }\n\n /**\n * GOVERNANCE FUNCTION: Add new oracle adapter.\n *\n * @param _adapter Address of new adapter\n */\n function addAdapter(address _adapter) external onlyOwner {\n require(!adapters.contains(_adapter), 'Adapter already exists');\n adapters.push(_adapter);\n\n emit AdapterAdded(_adapter);\n }\n\n /**\n * GOVERNANCE FUNCTION: Remove oracle adapter.\n *\n * @param _adapter Address of adapter to remove\n */\n function removeAdapter(address _adapter) external onlyOwner {\n adapters = adapters.remove(_adapter);\n\n emit AdapterRemoved(_adapter);\n }\n\n /* ============ External View Functions ============ */\n\n /**\n * Returns an array of adapters\n */\n function getAdapters() external view returns (address[] memory) {\n return adapters;\n }\n\n /**\n * Calls the update function in every adapter.\n * e.g Uniswap TWAP\n * @param _assetOne First Asset of the pair\n * @param _assetTwo Second Asset of the pair\n */\n function updateAdapters(address _assetOne, address _assetTwo) external override {\n for (uint256 i = 0; i < adapters.length; i += 1) {\n IOracleAdapter(adapters[i]).update(_assetOne, _assetTwo);\n }\n }\n\n /* ============ Internal Functions ============ */\n\n /**\n * Try to calculate asset pair price by getting each asset in the pair's price relative to USD.\n * Both prices must exist otherwise function returns false and no price.\n *\n * @param _assetOne Address of first asset in pair\n * @param _assetTwo Address of second asset in pair\n * @return bool Boolean indicating if oracle exists\n * @return uint256 Price of asset pair to 18 decimal precision (if exists, otherwise 0)\n */\n function _getPriceFromUniswapAnchoredView(address _assetOne, address _assetTwo)\n internal\n view\n returns (bool, uint256)\n {\n if (uniswapAssets[_assetOne] && uniswapAssets[_assetTwo]) {\n IUniswapAnchoredView anchoredView = IUniswapAnchoredView(uniswapAnchoredView);\n string memory symbol1 = _assetOne == WETH ? 'ETH' : ERC20(_assetOne).symbol();\n string memory symbol2 = _assetTwo == WETH ? 'ETH' : ERC20(_assetTwo).symbol();\n uint256 assetOnePrice = anchoredView.price(symbol1);\n uint256 assetTwoPrice = anchoredView.price(symbol2);\n\n if (assetOnePrice > 0 && assetTwoPrice > 0) {\n return (true, assetOnePrice.preciseDiv(assetTwoPrice));\n }\n }\n\n return (false, 0);\n }\n\n /**\n * Scan adapters to see if one or more of the assets needs external protocol data to be priced. If\n * does not exist return false and no price.\n *\n * @param _assetOne Address of first asset in pair\n * @param _assetTwo Address of second asset in pair\n * @return bool Boolean indicating if oracle exists\n * @return uint256 Price of asset pair to 18 decimal precision (if exists, otherwise 0)\n */\n function _getPriceFromAdapters(address _assetOne, address _assetTwo) internal view returns (bool, uint256) {\n for (uint256 i = 0; i < adapters.length; i++) {\n (bool priceFound, uint256 price) = IOracleAdapter(adapters[i]).getPrice(_assetOne, _assetTwo);\n\n if (priceFound) {\n return (priceFound, price);\n }\n }\n\n return (false, 0);\n }\n}\n" + }, + "contracts/interfaces/external/compound/IUniswapAnchoredView.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Modified from (Set Protocol IOracleAdapter)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\npragma solidity 0.7.6;\n\n/**\n * @title IOracleAdapter\n * @author Babylon Finance\n *\n * Interface for calling an oracle adapter.\n */\ninterface IUniswapAnchoredView {\n function price(string memory symbol) external view returns (uint256);\n}\n" + }, + "contracts/interfaces/IOracleAdapter.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Modified from (Set Protocol IOracleAdapter)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\npragma solidity 0.7.6;\n\n/**\n * @title IOracleAdapter\n * @author Babylon Finance\n *\n * Interface for calling an oracle adapter.\n */\ninterface IOracleAdapter {\n /**\n * Function for retrieving a price that requires sourcing data from outside protocols to calculate.\n *\n * @param _assetOne First asset in pair\n * @param _assetTwo Second asset in pair\n * @return Boolean indicating if oracle exists\n * @return Current price of asset represented in uint256\n */\n function getPrice(address _assetOne, address _assetTwo) external view returns (bool, uint256);\n\n function update(address _assetOne, address _assetTwo) external;\n}\n" + }, + "contracts/oracle_adapter/UniswapTWAPV3.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Modified from Uniswap TWAPs\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\nimport '@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol';\nimport '@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol';\nimport '@uniswap/v3-core/contracts/libraries/TickMath.sol';\n\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\n\nimport {IBabController} from '../interfaces/IBabController.sol';\nimport {IOracleAdapter} from '../interfaces/IOracleAdapter.sol';\n\n/**\n * @title UniswapTWAPV3\n * @author Babylon Finance Protocol\n *\n * Uses uniswap V3 to get the price of a token pair\n */\ncontract UniswapTWAPV3 is Ownable, IOracleAdapter {\n using PreciseUnitMath for int256;\n using PreciseUnitMath for uint256;\n using SafeMath for uint256;\n\n /* ============ State Variables ============ */\n\n // Instance of the Controller contract\n IBabController public controller;\n\n // Name to identify this adapter\n string public constant name = 'uniswapTwapV3';\n\n // Address of Uniswap factory\n IUniswapV3Factory public immutable factory;\n\n address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\n\n // the desired seconds agos array passed to the observe method\n uint32[] public secondsAgo = new uint32[](2);\n uint32 public constant SECONDS_GRANULARITY = 30;\n\n uint24 private constant FEE_LOW = 500;\n uint24 private constant FEE_MEDIUM = 3000;\n uint24 private constant FEE_HIGH = 10000;\n int24 private maxTwapDeviation = 100;\n uint160 private maxLiquidityDeviationFactor = 50;\n int24 private baseThreshold = 1000;\n\n /* ============ Constructor ============ */\n\n /**\n * Set state variables\n *\n * @param _controller Instance of controller contract\n * @param _factory Address of Uniswap factory\n */\n constructor(address _controller, address _factory) {\n factory = IUniswapV3Factory(_factory);\n controller = IBabController(_controller);\n secondsAgo[0] = SECONDS_GRANULARITY;\n secondsAgo[1] = 0;\n }\n\n /* ============ External Functions ============ */\n\n /**\n * Returns the amount out corresponding to the amount in for a given token\n * @param tokenIn Address of the first token\n * @param tokenOut Address of the second token\n * @return found Whether or not the price as found\n * @return amountOut How many tokenOut are one tokenIn\n */\n function getPrice(address tokenIn, address tokenOut)\n external\n view\n override\n returns (bool found, uint256 amountOut)\n {\n uint160 sqrtPriceX96;\n int24 tick;\n bool found = false;\n // We try the low pool first\n IUniswapV3Pool pool = IUniswapV3Pool(factory.getPool(tokenIn, tokenOut, FEE_LOW));\n if (address(pool) != address(0)) {\n (sqrtPriceX96, tick, , , , , ) = pool.slot0();\n found = _checkPrice(tick, pool);\n }\n if (!found) {\n pool = IUniswapV3Pool(factory.getPool(tokenIn, tokenOut, FEE_MEDIUM));\n if (address(pool) != address(0)) {\n (sqrtPriceX96, tick, , , , , ) = pool.slot0();\n found = _checkPrice(tick, pool);\n }\n }\n if (!found) {\n pool = IUniswapV3Pool(factory.getPool(tokenIn, tokenOut, FEE_HIGH));\n if (address(pool) != address(0)) {\n (sqrtPriceX96, tick, , , , , ) = pool.slot0();\n found = _checkPrice(tick, pool);\n }\n }\n // No valid price\n if (!found) {\n return (false, 0);\n }\n\n uint256 price =\n uint256(sqrtPriceX96).mul(uint256(sqrtPriceX96)).mul(10**ERC20(pool.token0()).decimals()) >> (96 * 2);\n if (pool.token0() == tokenOut) {\n return (true, uint256(1e18).preciseDiv(price));\n } else {\n return (true, price);\n }\n }\n\n function update(address tokenA, address tokenB) external override {}\n\n /* ============ Internal Functions ============ */\n\n /// @dev Revert if current price is too close to min or max ticks allowed\n /// by Uniswap, or if it deviates too much from the TWAP. Should be called\n /// whenever base and limit ranges are updated. In practice, prices should\n /// only become this extreme if there's no liquidity in the Uniswap pool.\n function _checkPrice(int24 mid, IUniswapV3Pool _pool) internal view returns (bool) {\n int24 tickSpacing = _pool.tickSpacing();\n // TODO: Add the other param from charm\n if (mid < TickMath.MIN_TICK + baseThreshold + tickSpacing) {\n // \"price too low\"\n return false;\n }\n if (mid > TickMath.MAX_TICK - baseThreshold - tickSpacing) {\n // \"price too high\"\n return false;\n }\n\n // Check TWAP deviation. This check prevents price manipulation before\n // the rebalance and also avoids rebalancing when price has just spiked.\n (int56 twap, ) = _getTwap(_pool);\n int56 deviation = mid > twap ? mid - twap : twap - mid;\n // Fail twap check\n return deviation < maxTwapDeviation;\n }\n\n // given the cumulative prices of the start and end of a period, and the length of the period, compute the average\n // price in terms of how much amount out is received for the amount in\n function _getTwap(IUniswapV3Pool _pool) private view returns (int56 amountOut, uint160 liquidity) {\n (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s) =\n _pool.observe(secondsAgo);\n liquidity =\n (secondsPerLiquidityCumulativeX128s[1] - secondsPerLiquidityCumulativeX128s[0]) /\n SECONDS_GRANULARITY;\n amountOut = (tickCumulatives[1] - tickCumulatives[0]) / SECONDS_GRANULARITY;\n }\n}\n" + }, + "@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol": { + "content": "// SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity >=0.5.0;\n\n/// @title The interface for the Uniswap V3 Factory\n/// @notice The Uniswap V3 Factory facilitates creation of Uniswap V3 pools and control over the protocol fees\ninterface IUniswapV3Factory {\n /// @notice Emitted when the owner of the factory is changed\n /// @param oldOwner The owner before the owner was changed\n /// @param newOwner The owner after the owner was changed\n event OwnerChanged(address indexed oldOwner, address indexed newOwner);\n\n /// @notice Emitted when a pool is created\n /// @param token0 The first token of the pool by address sort order\n /// @param token1 The second token of the pool by address sort order\n /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip\n /// @param tickSpacing The minimum number of ticks between initialized ticks\n /// @param pool The address of the created pool\n event PoolCreated(\n address indexed token0,\n address indexed token1,\n uint24 indexed fee,\n int24 tickSpacing,\n address pool\n );\n\n /// @notice Emitted when a new fee amount is enabled for pool creation via the factory\n /// @param fee The enabled fee, denominated in hundredths of a bip\n /// @param tickSpacing The minimum number of ticks between initialized ticks for pools created with the given fee\n event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing);\n\n /// @notice Returns the current owner of the factory\n /// @dev Can be changed by the current owner via setOwner\n /// @return The address of the factory owner\n function owner() external view returns (address);\n\n /// @notice Returns the tick spacing for a given fee amount, if enabled, or 0 if not enabled\n /// @dev A fee amount can never be removed, so this value should be hard coded or cached in the calling context\n /// @param fee The enabled fee, denominated in hundredths of a bip. Returns 0 in case of unenabled fee\n /// @return The tick spacing\n function feeAmountTickSpacing(uint24 fee) external view returns (int24);\n\n /// @notice Returns the pool address for a given pair of tokens and a fee, or address 0 if it does not exist\n /// @dev tokenA and tokenB may be passed in either token0/token1 or token1/token0 order\n /// @param tokenA The contract address of either token0 or token1\n /// @param tokenB The contract address of the other token\n /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip\n /// @return pool The pool address\n function getPool(\n address tokenA,\n address tokenB,\n uint24 fee\n ) external view returns (address pool);\n\n /// @notice Creates a pool for the given two tokens and fee\n /// @param tokenA One of the two tokens in the desired pool\n /// @param tokenB The other of the two tokens in the desired pool\n /// @param fee The desired fee for the pool\n /// @dev tokenA and tokenB may be passed in either order: token0/token1 or token1/token0. tickSpacing is retrieved\n /// from the fee. The call will revert if the pool already exists, the fee is invalid, or the token arguments\n /// are invalid.\n /// @return pool The address of the newly created pool\n function createPool(\n address tokenA,\n address tokenB,\n uint24 fee\n ) external returns (address pool);\n\n /// @notice Updates the owner of the factory\n /// @dev Must be called by the current owner\n /// @param _owner The new owner of the factory\n function setOwner(address _owner) external;\n\n /// @notice Enables a fee amount with the given tickSpacing\n /// @dev Fee amounts may never be removed once enabled\n /// @param fee The fee amount to enable, denominated in hundredths of a bip (i.e. 1e-6)\n /// @param tickSpacing The spacing between ticks to be enforced for all pools created with the given fee amount\n function enableFeeAmount(uint24 fee, int24 tickSpacing) external;\n}\n" + }, + "@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol": { + "content": "// SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity >=0.5.0;\n\nimport './pool/IUniswapV3PoolImmutables.sol';\nimport './pool/IUniswapV3PoolState.sol';\nimport './pool/IUniswapV3PoolDerivedState.sol';\nimport './pool/IUniswapV3PoolActions.sol';\nimport './pool/IUniswapV3PoolOwnerActions.sol';\nimport './pool/IUniswapV3PoolEvents.sol';\n\n/// @title The interface for a Uniswap V3 Pool\n/// @notice A Uniswap pool facilitates swapping and automated market making between any two assets that strictly conform\n/// to the ERC20 specification\n/// @dev The pool interface is broken up into many smaller pieces\ninterface IUniswapV3Pool is\n IUniswapV3PoolImmutables,\n IUniswapV3PoolState,\n IUniswapV3PoolDerivedState,\n IUniswapV3PoolActions,\n IUniswapV3PoolOwnerActions,\n IUniswapV3PoolEvents\n{\n\n}\n" + }, + "@uniswap/v3-core/contracts/libraries/TickMath.sol": { + "content": "// SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity >=0.5.0;\n\n/// @title Math library for computing sqrt prices from ticks and vice versa\n/// @notice Computes sqrt price for ticks of size 1.0001, i.e. sqrt(1.0001^tick) as fixed point Q64.96 numbers. Supports\n/// prices between 2**-128 and 2**128\nlibrary TickMath {\n /// @dev The minimum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**-128\n int24 internal constant MIN_TICK = -887272;\n /// @dev The maximum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**128\n int24 internal constant MAX_TICK = -MIN_TICK;\n\n /// @dev The minimum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MIN_TICK)\n uint160 internal constant MIN_SQRT_RATIO = 4295128739;\n /// @dev The maximum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MAX_TICK)\n uint160 internal constant MAX_SQRT_RATIO = 1461446703485210103287273052203988822378723970342;\n\n /// @notice Calculates sqrt(1.0001^tick) * 2^96\n /// @dev Throws if |tick| > max tick\n /// @param tick The input tick for the above formula\n /// @return sqrtPriceX96 A Fixed point Q64.96 number representing the sqrt of the ratio of the two assets (token1/token0)\n /// at the given tick\n function getSqrtRatioAtTick(int24 tick) internal pure returns (uint160 sqrtPriceX96) {\n uint256 absTick = tick < 0 ? uint256(-int256(tick)) : uint256(int256(tick));\n require(absTick <= uint256(MAX_TICK), 'T');\n\n uint256 ratio = absTick & 0x1 != 0 ? 0xfffcb933bd6fad37aa2d162d1a594001 : 0x100000000000000000000000000000000;\n if (absTick & 0x2 != 0) ratio = (ratio * 0xfff97272373d413259a46990580e213a) >> 128;\n if (absTick & 0x4 != 0) ratio = (ratio * 0xfff2e50f5f656932ef12357cf3c7fdcc) >> 128;\n if (absTick & 0x8 != 0) ratio = (ratio * 0xffe5caca7e10e4e61c3624eaa0941cd0) >> 128;\n if (absTick & 0x10 != 0) ratio = (ratio * 0xffcb9843d60f6159c9db58835c926644) >> 128;\n if (absTick & 0x20 != 0) ratio = (ratio * 0xff973b41fa98c081472e6896dfb254c0) >> 128;\n if (absTick & 0x40 != 0) ratio = (ratio * 0xff2ea16466c96a3843ec78b326b52861) >> 128;\n if (absTick & 0x80 != 0) ratio = (ratio * 0xfe5dee046a99a2a811c461f1969c3053) >> 128;\n if (absTick & 0x100 != 0) ratio = (ratio * 0xfcbe86c7900a88aedcffc83b479aa3a4) >> 128;\n if (absTick & 0x200 != 0) ratio = (ratio * 0xf987a7253ac413176f2b074cf7815e54) >> 128;\n if (absTick & 0x400 != 0) ratio = (ratio * 0xf3392b0822b70005940c7a398e4b70f3) >> 128;\n if (absTick & 0x800 != 0) ratio = (ratio * 0xe7159475a2c29b7443b29c7fa6e889d9) >> 128;\n if (absTick & 0x1000 != 0) ratio = (ratio * 0xd097f3bdfd2022b8845ad8f792aa5825) >> 128;\n if (absTick & 0x2000 != 0) ratio = (ratio * 0xa9f746462d870fdf8a65dc1f90e061e5) >> 128;\n if (absTick & 0x4000 != 0) ratio = (ratio * 0x70d869a156d2a1b890bb3df62baf32f7) >> 128;\n if (absTick & 0x8000 != 0) ratio = (ratio * 0x31be135f97d08fd981231505542fcfa6) >> 128;\n if (absTick & 0x10000 != 0) ratio = (ratio * 0x9aa508b5b7a84e1c677de54f3e99bc9) >> 128;\n if (absTick & 0x20000 != 0) ratio = (ratio * 0x5d6af8dedb81196699c329225ee604) >> 128;\n if (absTick & 0x40000 != 0) ratio = (ratio * 0x2216e584f5fa1ea926041bedfe98) >> 128;\n if (absTick & 0x80000 != 0) ratio = (ratio * 0x48a170391f7dc42444e8fa2) >> 128;\n\n if (tick > 0) ratio = type(uint256).max / ratio;\n\n // this divides by 1<<32 rounding up to go from a Q128.128 to a Q128.96.\n // we then downcast because we know the result always fits within 160 bits due to our tick input constraint\n // we round up in the division so getTickAtSqrtRatio of the output price is always consistent\n sqrtPriceX96 = uint160((ratio >> 32) + (ratio % (1 << 32) == 0 ? 0 : 1));\n }\n\n /// @notice Calculates the greatest tick value such that getRatioAtTick(tick) <= ratio\n /// @dev Throws in case sqrtPriceX96 < MIN_SQRT_RATIO, as MIN_SQRT_RATIO is the lowest value getRatioAtTick may\n /// ever return.\n /// @param sqrtPriceX96 The sqrt ratio for which to compute the tick as a Q64.96\n /// @return tick The greatest tick for which the ratio is less than or equal to the input ratio\n function getTickAtSqrtRatio(uint160 sqrtPriceX96) internal pure returns (int24 tick) {\n // second inequality must be < because the price can never reach the price at the max tick\n require(sqrtPriceX96 >= MIN_SQRT_RATIO && sqrtPriceX96 < MAX_SQRT_RATIO, 'R');\n uint256 ratio = uint256(sqrtPriceX96) << 32;\n\n uint256 r = ratio;\n uint256 msb = 0;\n\n assembly {\n let f := shl(7, gt(r, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF))\n msb := or(msb, f)\n r := shr(f, r)\n }\n assembly {\n let f := shl(6, gt(r, 0xFFFFFFFFFFFFFFFF))\n msb := or(msb, f)\n r := shr(f, r)\n }\n assembly {\n let f := shl(5, gt(r, 0xFFFFFFFF))\n msb := or(msb, f)\n r := shr(f, r)\n }\n assembly {\n let f := shl(4, gt(r, 0xFFFF))\n msb := or(msb, f)\n r := shr(f, r)\n }\n assembly {\n let f := shl(3, gt(r, 0xFF))\n msb := or(msb, f)\n r := shr(f, r)\n }\n assembly {\n let f := shl(2, gt(r, 0xF))\n msb := or(msb, f)\n r := shr(f, r)\n }\n assembly {\n let f := shl(1, gt(r, 0x3))\n msb := or(msb, f)\n r := shr(f, r)\n }\n assembly {\n let f := gt(r, 0x1)\n msb := or(msb, f)\n }\n\n if (msb >= 128) r = ratio >> (msb - 127);\n else r = ratio << (127 - msb);\n\n int256 log_2 = (int256(msb) - 128) << 64;\n\n assembly {\n r := shr(127, mul(r, r))\n let f := shr(128, r)\n log_2 := or(log_2, shl(63, f))\n r := shr(f, r)\n }\n assembly {\n r := shr(127, mul(r, r))\n let f := shr(128, r)\n log_2 := or(log_2, shl(62, f))\n r := shr(f, r)\n }\n assembly {\n r := shr(127, mul(r, r))\n let f := shr(128, r)\n log_2 := or(log_2, shl(61, f))\n r := shr(f, r)\n }\n assembly {\n r := shr(127, mul(r, r))\n let f := shr(128, r)\n log_2 := or(log_2, shl(60, f))\n r := shr(f, r)\n }\n assembly {\n r := shr(127, mul(r, r))\n let f := shr(128, r)\n log_2 := or(log_2, shl(59, f))\n r := shr(f, r)\n }\n assembly {\n r := shr(127, mul(r, r))\n let f := shr(128, r)\n log_2 := or(log_2, shl(58, f))\n r := shr(f, r)\n }\n assembly {\n r := shr(127, mul(r, r))\n let f := shr(128, r)\n log_2 := or(log_2, shl(57, f))\n r := shr(f, r)\n }\n assembly {\n r := shr(127, mul(r, r))\n let f := shr(128, r)\n log_2 := or(log_2, shl(56, f))\n r := shr(f, r)\n }\n assembly {\n r := shr(127, mul(r, r))\n let f := shr(128, r)\n log_2 := or(log_2, shl(55, f))\n r := shr(f, r)\n }\n assembly {\n r := shr(127, mul(r, r))\n let f := shr(128, r)\n log_2 := or(log_2, shl(54, f))\n r := shr(f, r)\n }\n assembly {\n r := shr(127, mul(r, r))\n let f := shr(128, r)\n log_2 := or(log_2, shl(53, f))\n r := shr(f, r)\n }\n assembly {\n r := shr(127, mul(r, r))\n let f := shr(128, r)\n log_2 := or(log_2, shl(52, f))\n r := shr(f, r)\n }\n assembly {\n r := shr(127, mul(r, r))\n let f := shr(128, r)\n log_2 := or(log_2, shl(51, f))\n r := shr(f, r)\n }\n assembly {\n r := shr(127, mul(r, r))\n let f := shr(128, r)\n log_2 := or(log_2, shl(50, f))\n }\n\n int256 log_sqrt10001 = log_2 * 255738958999603826347141; // 128.128 number\n\n int24 tickLow = int24((log_sqrt10001 - 3402992956809132418596140100660247210) >> 128);\n int24 tickHi = int24((log_sqrt10001 + 291339464771989622907027621153398088495) >> 128);\n\n tick = tickLow == tickHi ? tickLow : getSqrtRatioAtTick(tickHi) <= sqrtPriceX96 ? tickHi : tickLow;\n }\n}\n" + }, + "@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolImmutables.sol": { + "content": "// SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity >=0.5.0;\n\n/// @title Pool state that never changes\n/// @notice These parameters are fixed for a pool forever, i.e., the methods will always return the same values\ninterface IUniswapV3PoolImmutables {\n /// @notice The contract that deployed the pool, which must adhere to the IUniswapV3Factory interface\n /// @return The contract address\n function factory() external view returns (address);\n\n /// @notice The first of the two tokens of the pool, sorted by address\n /// @return The token contract address\n function token0() external view returns (address);\n\n /// @notice The second of the two tokens of the pool, sorted by address\n /// @return The token contract address\n function token1() external view returns (address);\n\n /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6\n /// @return The fee\n function fee() external view returns (uint24);\n\n /// @notice The pool tick spacing\n /// @dev Ticks can only be used at multiples of this value, minimum of 1 and always positive\n /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ...\n /// This value is an int24 to avoid casting even though it is always positive.\n /// @return The tick spacing\n function tickSpacing() external view returns (int24);\n\n /// @notice The maximum amount of position liquidity that can use any tick in the range\n /// @dev This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and\n /// also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool\n /// @return The max amount of liquidity per tick\n function maxLiquidityPerTick() external view returns (uint128);\n}\n" + }, + "@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolState.sol": { + "content": "// SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity >=0.5.0;\n\n/// @title Pool state that can change\n/// @notice These methods compose the pool's state, and can change with any frequency including multiple times\n/// per transaction\ninterface IUniswapV3PoolState {\n /// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas\n /// when accessed externally.\n /// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value\n /// tick The current tick of the pool, i.e. according to the last tick transition that was run.\n /// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick\n /// boundary.\n /// observationIndex The index of the last oracle observation that was written,\n /// observationCardinality The current maximum number of observations stored in the pool,\n /// observationCardinalityNext The next maximum number of observations, to be updated when the observation.\n /// feeProtocol The protocol fee for both tokens of the pool.\n /// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0\n /// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee.\n /// unlocked Whether the pool is currently locked to reentrancy\n function slot0()\n external\n view\n returns (\n uint160 sqrtPriceX96,\n int24 tick,\n uint16 observationIndex,\n uint16 observationCardinality,\n uint16 observationCardinalityNext,\n uint8 feeProtocol,\n bool unlocked\n );\n\n /// @notice The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool\n /// @dev This value can overflow the uint256\n function feeGrowthGlobal0X128() external view returns (uint256);\n\n /// @notice The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool\n /// @dev This value can overflow the uint256\n function feeGrowthGlobal1X128() external view returns (uint256);\n\n /// @notice The amounts of token0 and token1 that are owed to the protocol\n /// @dev Protocol fees will never exceed uint128 max in either token\n function protocolFees() external view returns (uint128 token0, uint128 token1);\n\n /// @notice The currently in range liquidity available to the pool\n /// @dev This value has no relationship to the total liquidity across all ticks\n function liquidity() external view returns (uint128);\n\n /// @notice Look up information about a specific tick in the pool\n /// @param tick The tick to look up\n /// @return liquidityGross the total amount of position liquidity that uses the pool either as tick lower or\n /// tick upper,\n /// liquidityNet how much liquidity changes when the pool price crosses the tick,\n /// feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0,\n /// feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1,\n /// tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick\n /// secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick,\n /// secondsOutside the seconds spent on the other side of the tick from the current tick,\n /// initialized Set to true if the tick is initialized, i.e. liquidityGross is greater than 0, otherwise equal to false.\n /// Outside values can only be used if the tick is initialized, i.e. if liquidityGross is greater than 0.\n /// In addition, these values are only relative and must be used only in comparison to previous snapshots for\n /// a specific position.\n function ticks(int24 tick)\n external\n view\n returns (\n uint128 liquidityGross,\n int128 liquidityNet,\n uint256 feeGrowthOutside0X128,\n uint256 feeGrowthOutside1X128,\n int56 tickCumulativeOutside,\n uint160 secondsPerLiquidityOutsideX128,\n uint32 secondsOutside,\n bool initialized\n );\n\n /// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information\n function tickBitmap(int16 wordPosition) external view returns (uint256);\n\n /// @notice Returns the information about a position by the position's key\n /// @param key The position's key is a hash of a preimage composed by the owner, tickLower and tickUpper\n /// @return _liquidity The amount of liquidity in the position,\n /// Returns feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke,\n /// Returns feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke,\n /// Returns tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke,\n /// Returns tokensOwed1 the computed amount of token1 owed to the position as of the last mint/burn/poke\n function positions(bytes32 key)\n external\n view\n returns (\n uint128 _liquidity,\n uint256 feeGrowthInside0LastX128,\n uint256 feeGrowthInside1LastX128,\n uint128 tokensOwed0,\n uint128 tokensOwed1\n );\n\n /// @notice Returns data about a specific observation index\n /// @param index The element of the observations array to fetch\n /// @dev You most likely want to use #observe() instead of this method to get an observation as of some amount of time\n /// ago, rather than at a specific index in the array.\n /// @return blockTimestamp The timestamp of the observation,\n /// Returns tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp,\n /// Returns secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp,\n /// Returns initialized whether the observation has been initialized and the values are safe to use\n function observations(uint256 index)\n external\n view\n returns (\n uint32 blockTimestamp,\n int56 tickCumulative,\n uint160 secondsPerLiquidityCumulativeX128,\n bool initialized\n );\n}\n" + }, + "@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolDerivedState.sol": { + "content": "// SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity >=0.5.0;\n\n/// @title Pool state that is not stored\n/// @notice Contains view functions to provide information about the pool that is computed rather than stored on the\n/// blockchain. The functions here may have variable gas costs.\ninterface IUniswapV3PoolDerivedState {\n /// @notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp\n /// @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing\n /// the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick,\n /// you must call it with secondsAgos = [3600, 0].\n /// @dev The time weighted average tick represents the geometric time weighted average price of the pool, in\n /// log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.\n /// @param secondsAgos From how long ago each cumulative tick and liquidity value should be returned\n /// @return tickCumulatives Cumulative tick values as of each `secondsAgos` from the current block timestamp\n /// @return secondsPerLiquidityCumulativeX128s Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block\n /// timestamp\n function observe(uint32[] calldata secondsAgos)\n external\n view\n returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s);\n\n /// @notice Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range\n /// @dev Snapshots must only be compared to other snapshots, taken over a period for which a position existed.\n /// I.e., snapshots cannot be compared if a position is not held for the entire period between when the first\n /// snapshot is taken and the second snapshot is taken.\n /// @param tickLower The lower tick of the range\n /// @param tickUpper The upper tick of the range\n /// @return tickCumulativeInside The snapshot of the tick accumulator for the range\n /// @return secondsPerLiquidityInsideX128 The snapshot of seconds per liquidity for the range\n /// @return secondsInside The snapshot of seconds per liquidity for the range\n function snapshotCumulativesInside(int24 tickLower, int24 tickUpper)\n external\n view\n returns (\n int56 tickCumulativeInside,\n uint160 secondsPerLiquidityInsideX128,\n uint32 secondsInside\n );\n}\n" + }, + "@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolActions.sol": { + "content": "// SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity >=0.5.0;\n\n/// @title Permissionless pool actions\n/// @notice Contains pool methods that can be called by anyone\ninterface IUniswapV3PoolActions {\n /// @notice Sets the initial price for the pool\n /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value\n /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96\n function initialize(uint160 sqrtPriceX96) external;\n\n /// @notice Adds liquidity for the given recipient/tickLower/tickUpper position\n /// @dev The caller of this method receives a callback in the form of IUniswapV3MintCallback#uniswapV3MintCallback\n /// in which they must pay any token0 or token1 owed for the liquidity. The amount of token0/token1 due depends\n /// on tickLower, tickUpper, the amount of liquidity, and the current price.\n /// @param recipient The address for which the liquidity will be created\n /// @param tickLower The lower tick of the position in which to add liquidity\n /// @param tickUpper The upper tick of the position in which to add liquidity\n /// @param amount The amount of liquidity to mint\n /// @param data Any data that should be passed through to the callback\n /// @return amount0 The amount of token0 that was paid to mint the given amount of liquidity. Matches the value in the callback\n /// @return amount1 The amount of token1 that was paid to mint the given amount of liquidity. Matches the value in the callback\n function mint(\n address recipient,\n int24 tickLower,\n int24 tickUpper,\n uint128 amount,\n bytes calldata data\n ) external returns (uint256 amount0, uint256 amount1);\n\n /// @notice Collects tokens owed to a position\n /// @dev Does not recompute fees earned, which must be done either via mint or burn of any amount of liquidity.\n /// Collect must be called by the position owner. To withdraw only token0 or only token1, amount0Requested or\n /// amount1Requested may be set to zero. To withdraw all tokens owed, caller may pass any value greater than the\n /// actual tokens owed, e.g. type(uint128).max. Tokens owed may be from accumulated swap fees or burned liquidity.\n /// @param recipient The address which should receive the fees collected\n /// @param tickLower The lower tick of the position for which to collect fees\n /// @param tickUpper The upper tick of the position for which to collect fees\n /// @param amount0Requested How much token0 should be withdrawn from the fees owed\n /// @param amount1Requested How much token1 should be withdrawn from the fees owed\n /// @return amount0 The amount of fees collected in token0\n /// @return amount1 The amount of fees collected in token1\n function collect(\n address recipient,\n int24 tickLower,\n int24 tickUpper,\n uint128 amount0Requested,\n uint128 amount1Requested\n ) external returns (uint128 amount0, uint128 amount1);\n\n /// @notice Burn liquidity from the sender and account tokens owed for the liquidity to the position\n /// @dev Can be used to trigger a recalculation of fees owed to a position by calling with an amount of 0\n /// @dev Fees must be collected separately via a call to #collect\n /// @param tickLower The lower tick of the position for which to burn liquidity\n /// @param tickUpper The upper tick of the position for which to burn liquidity\n /// @param amount How much liquidity to burn\n /// @return amount0 The amount of token0 sent to the recipient\n /// @return amount1 The amount of token1 sent to the recipient\n function burn(\n int24 tickLower,\n int24 tickUpper,\n uint128 amount\n ) external returns (uint256 amount0, uint256 amount1);\n\n /// @notice Swap token0 for token1, or token1 for token0\n /// @dev The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback\n /// @param recipient The address to receive the output of the swap\n /// @param zeroForOne The direction of the swap, true for token0 to token1, false for token1 to token0\n /// @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative)\n /// @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this\n /// value after the swap. If one for zero, the price cannot be greater than this value after the swap\n /// @param data Any data to be passed through to the callback\n /// @return amount0 The delta of the balance of token0 of the pool, exact when negative, minimum when positive\n /// @return amount1 The delta of the balance of token1 of the pool, exact when negative, minimum when positive\n function swap(\n address recipient,\n bool zeroForOne,\n int256 amountSpecified,\n uint160 sqrtPriceLimitX96,\n bytes calldata data\n ) external returns (int256 amount0, int256 amount1);\n\n /// @notice Receive token0 and/or token1 and pay it back, plus a fee, in the callback\n /// @dev The caller of this method receives a callback in the form of IUniswapV3FlashCallback#uniswapV3FlashCallback\n /// @dev Can be used to donate underlying tokens pro-rata to currently in-range liquidity providers by calling\n /// with 0 amount{0,1} and sending the donation amount(s) from the callback\n /// @param recipient The address which will receive the token0 and token1 amounts\n /// @param amount0 The amount of token0 to send\n /// @param amount1 The amount of token1 to send\n /// @param data Any data to be passed through to the callback\n function flash(\n address recipient,\n uint256 amount0,\n uint256 amount1,\n bytes calldata data\n ) external;\n\n /// @notice Increase the maximum number of price and liquidity observations that this pool will store\n /// @dev This method is no-op if the pool already has an observationCardinalityNext greater than or equal to\n /// the input observationCardinalityNext.\n /// @param observationCardinalityNext The desired minimum number of observations for the pool to store\n function increaseObservationCardinalityNext(uint16 observationCardinalityNext) external;\n}\n" + }, + "@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolOwnerActions.sol": { + "content": "// SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity >=0.5.0;\n\n/// @title Permissioned pool actions\n/// @notice Contains pool methods that may only be called by the factory owner\ninterface IUniswapV3PoolOwnerActions {\n /// @notice Set the denominator of the protocol's % share of the fees\n /// @param feeProtocol0 new protocol fee for token0 of the pool\n /// @param feeProtocol1 new protocol fee for token1 of the pool\n function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external;\n\n /// @notice Collect the protocol fee accrued to the pool\n /// @param recipient The address to which collected protocol fees should be sent\n /// @param amount0Requested The maximum amount of token0 to send, can be 0 to collect fees in only token1\n /// @param amount1Requested The maximum amount of token1 to send, can be 0 to collect fees in only token0\n /// @return amount0 The protocol fee collected in token0\n /// @return amount1 The protocol fee collected in token1\n function collectProtocol(\n address recipient,\n uint128 amount0Requested,\n uint128 amount1Requested\n ) external returns (uint128 amount0, uint128 amount1);\n}\n" + }, + "@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolEvents.sol": { + "content": "// SPDX-License-Identifier: GPL-2.0-or-later\npragma solidity >=0.5.0;\n\n/// @title Events emitted by a pool\n/// @notice Contains all events emitted by the pool\ninterface IUniswapV3PoolEvents {\n /// @notice Emitted exactly once by a pool when #initialize is first called on the pool\n /// @dev Mint/Burn/Swap cannot be emitted by the pool before Initialize\n /// @param sqrtPriceX96 The initial sqrt price of the pool, as a Q64.96\n /// @param tick The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool\n event Initialize(uint160 sqrtPriceX96, int24 tick);\n\n /// @notice Emitted when liquidity is minted for a given position\n /// @param sender The address that minted the liquidity\n /// @param owner The owner of the position and recipient of any minted liquidity\n /// @param tickLower The lower tick of the position\n /// @param tickUpper The upper tick of the position\n /// @param amount The amount of liquidity minted to the position range\n /// @param amount0 How much token0 was required for the minted liquidity\n /// @param amount1 How much token1 was required for the minted liquidity\n event Mint(\n address sender,\n address indexed owner,\n int24 indexed tickLower,\n int24 indexed tickUpper,\n uint128 amount,\n uint256 amount0,\n uint256 amount1\n );\n\n /// @notice Emitted when fees are collected by the owner of a position\n /// @dev Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees\n /// @param owner The owner of the position for which fees are collected\n /// @param tickLower The lower tick of the position\n /// @param tickUpper The upper tick of the position\n /// @param amount0 The amount of token0 fees collected\n /// @param amount1 The amount of token1 fees collected\n event Collect(\n address indexed owner,\n address recipient,\n int24 indexed tickLower,\n int24 indexed tickUpper,\n uint128 amount0,\n uint128 amount1\n );\n\n /// @notice Emitted when a position's liquidity is removed\n /// @dev Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect\n /// @param owner The owner of the position for which liquidity is removed\n /// @param tickLower The lower tick of the position\n /// @param tickUpper The upper tick of the position\n /// @param amount The amount of liquidity to remove\n /// @param amount0 The amount of token0 withdrawn\n /// @param amount1 The amount of token1 withdrawn\n event Burn(\n address indexed owner,\n int24 indexed tickLower,\n int24 indexed tickUpper,\n uint128 amount,\n uint256 amount0,\n uint256 amount1\n );\n\n /// @notice Emitted by the pool for any swaps between token0 and token1\n /// @param sender The address that initiated the swap call, and that received the callback\n /// @param recipient The address that received the output of the swap\n /// @param amount0 The delta of the token0 balance of the pool\n /// @param amount1 The delta of the token1 balance of the pool\n /// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96\n /// @param liquidity The liquidity of the pool after the swap\n /// @param tick The log base 1.0001 of price of the pool after the swap\n event Swap(\n address indexed sender,\n address indexed recipient,\n int256 amount0,\n int256 amount1,\n uint160 sqrtPriceX96,\n uint128 liquidity,\n int24 tick\n );\n\n /// @notice Emitted by the pool for any flashes of token0/token1\n /// @param sender The address that initiated the swap call, and that received the callback\n /// @param recipient The address that received the tokens from flash\n /// @param amount0 The amount of token0 that was flashed\n /// @param amount1 The amount of token1 that was flashed\n /// @param paid0 The amount of token0 paid for the flash, which can exceed the amount0 plus the fee\n /// @param paid1 The amount of token1 paid for the flash, which can exceed the amount1 plus the fee\n event Flash(\n address indexed sender,\n address indexed recipient,\n uint256 amount0,\n uint256 amount1,\n uint256 paid0,\n uint256 paid1\n );\n\n /// @notice Emitted by the pool for increases to the number of observations that can be stored\n /// @dev observationCardinalityNext is not the observation cardinality until an observation is written at the index\n /// just before a mint/swap/burn.\n /// @param observationCardinalityNextOld The previous value of the next observation cardinality\n /// @param observationCardinalityNextNew The updated value of the next observation cardinality\n event IncreaseObservationCardinalityNext(\n uint16 observationCardinalityNextOld,\n uint16 observationCardinalityNextNew\n );\n\n /// @notice Emitted when the protocol fee is changed by the pool\n /// @param feeProtocol0Old The previous value of the token0 protocol fee\n /// @param feeProtocol1Old The previous value of the token1 protocol fee\n /// @param feeProtocol0New The updated value of the token0 protocol fee\n /// @param feeProtocol1New The updated value of the token1 protocol fee\n event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New);\n\n /// @notice Emitted when the collected protocol fees are withdrawn by the factory owner\n /// @param sender The address that collects the protocol fees\n /// @param recipient The address that receives the collected protocol fees\n /// @param amount0 The amount of token0 protocol fees that is withdrawn\n /// @param amount0 The amount of token1 protocol fees that is withdrawn\n event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1);\n}\n" + }, + "contracts/strategies/operations/AddLiquidityOperation.sol": { + "content": "/*\n Copyright 2021 Babylon Finance.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\n\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {Operation} from './Operation.sol';\nimport {IGarden} from '../../interfaces/IGarden.sol';\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\nimport {IPoolIntegration} from '../../interfaces/IPoolIntegration.sol';\n\n/**\n * @title AddLiquidityOperation\n * @author Babylon Finance\n *\n * Executes a add liquidity operation\n */\ncontract AddLiquidityOperation is Operation {\n using SafeMath for uint256;\n using PreciseUnitMath for uint256;\n\n /* ============ Constructor ============ */\n\n /**\n * Creates the integration\n *\n * @param _name Name of the integration\n * @param _controller Address of the controller\n */\n constructor(string memory _name, address _controller) Operation(_name, _controller) {}\n\n /**\n * Sets operation data for the add liquidity operation\n *\n * @param _data Operation data\n */\n function validateOperation(\n address _data,\n IGarden, /* _garden */\n address _integration,\n uint256 /* _index */\n ) external view override onlyStrategy {\n require(IPoolIntegration(_integration).isPool(_data), 'Not a valid pool');\n }\n\n /**\n * Executes the add liquidity operation\n * @param _capital Amount of capital received from the garden\n */\n function executeOperation(\n address _asset,\n uint256 _capital,\n uint8, /* _assetStatus */\n address _pool,\n IGarden _garden,\n address _integration\n )\n external\n override\n onlyStrategy\n returns (\n address,\n uint256,\n uint8\n )\n {\n address[] memory poolTokens = IPoolIntegration(_integration).getPoolTokens(_pool);\n uint256[] memory _maxAmountsIn = new uint256[](poolTokens.length);\n uint256[] memory _poolWeights = IPoolIntegration(_integration).getPoolWeights(_pool);\n // Get the tokens needed to enter the pool\n for (uint256 i = 0; i < poolTokens.length; i++) {\n _maxAmountsIn[i] = _getMaxAmountTokenPool(_asset, _capital, _garden, _poolWeights[i], poolTokens[i]);\n }\n uint256 poolTokensOut = IPoolIntegration(_integration).getPoolTokensOut(_pool, poolTokens[0], _maxAmountsIn[0]);\n IPoolIntegration(_integration).joinPool(\n msg.sender,\n _pool,\n poolTokensOut.sub(poolTokensOut.preciseMul(SLIPPAGE_ALLOWED)),\n poolTokens,\n _maxAmountsIn\n );\n return (_pool, IERC20(_pool).balanceOf(msg.sender), 0); // liquid\n }\n\n /**\n * Exits the add liquidity operation.\n * @param _percentage of capital to exit from the strategy\n */\n function exitOperation(\n uint256 _percentage,\n address _data,\n IGarden _garden,\n address _integration\n ) external override onlyStrategy {\n require(_percentage <= 100e18, 'Unwind Percentage <= 100%');\n address pool = _data;\n address[] memory poolTokens = IPoolIntegration(_integration).getPoolTokens(pool);\n uint256 lpTokens = IERC20(pool).balanceOf(msg.sender).preciseMul(_percentage); // Sell all pool tokens\n uint256[] memory _minAmountsOut = IPoolIntegration(_integration).getPoolMinAmountsOut(pool, lpTokens);\n IPoolIntegration(_integration).exitPool(\n msg.sender,\n pool,\n lpTokens, // Sell all pool tokens\n poolTokens,\n _minAmountsOut\n );\n // Exit Pool tokens\n address reserveAsset = _garden.reserveAsset();\n for (uint256 i = 0; i < poolTokens.length; i++) {\n if (poolTokens[i] != reserveAsset) {\n if (poolTokens[i] == address(0)) {\n IStrategy(msg.sender).handleWeth(true, address(msg.sender).balance);\n poolTokens[i] = WETH;\n }\n if (poolTokens[i] != reserveAsset) {\n IStrategy(msg.sender).trade(\n poolTokens[i],\n IERC20(poolTokens[i]).balanceOf(msg.sender),\n reserveAsset\n );\n }\n }\n }\n }\n\n /**\n * Gets the NAV of the add liquidity op in the reserve asset\n *\n * @return _nav NAV of the strategy\n */\n function getNAV(\n address _data,\n IGarden _garden,\n address _integration\n ) external view override returns (uint256) {\n if (!IStrategy(msg.sender).isStrategyActive()) {\n return 0;\n }\n address pool = _data;\n address[] memory poolTokens = IPoolIntegration(_integration).getPoolTokens(pool);\n uint256 NAV;\n uint256 totalSupply = IERC20(pool).totalSupply();\n uint256 lpTokens = IERC20(pool).balanceOf(msg.sender);\n for (uint256 i = 0; i < poolTokens.length; i++) {\n uint256 price = _getPrice(_garden.reserveAsset(), poolTokens[i] != address(0) ? poolTokens[i] : WETH);\n uint256 balance = poolTokens[i] != address(0) ? IERC20(poolTokens[i]).balanceOf(pool) : pool.balance;\n NAV += balance.mul(lpTokens).div(totalSupply).preciseDiv(price);\n }\n require(NAV != 0, 'NAV has to be bigger 0');\n return NAV;\n }\n\n /* ============ Private Functions ============ */\n\n function _getMaxAmountTokenPool(\n address _asset,\n uint256 _capital,\n IGarden, /* _garden */\n uint256 _poolWeight,\n address _poolToken\n ) private returns (uint256) {\n uint256 normalizedAmount = _capital.preciseMul(_poolWeight);\n if (_poolToken != _asset && _poolToken != address(0)) {\n IStrategy(msg.sender).trade(_asset, normalizedAmount, _poolToken);\n return IERC20(_poolToken).balanceOf(msg.sender);\n }\n if (_poolToken == address(0)) {\n if (_asset != WETH) {\n IStrategy(msg.sender).trade(_asset, normalizedAmount, WETH);\n }\n // Convert WETH to ETH\n IStrategy(msg.sender).handleWeth(false, normalizedAmount);\n }\n return normalizedAmount;\n }\n}\n" + }, + "contracts/interfaces/IPoolIntegration.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\npragma solidity 0.7.6;\n\n/**\n * @title IPoolIntegration\n * @author Babylon Finance\n *\n * Interface for liquiditypool protocol integrations\n */\ninterface IPoolIntegration {\n function joinPool(\n address _strategy,\n address _poolAddress,\n uint256 _poolTokensOut,\n address[] memory _poolTokens,\n uint256[] memory _maxAmountsIn\n ) external;\n\n function exitPool(\n address _strategy,\n address _poolAddress,\n uint256 _poolTokensIn,\n address[] memory _poolTokens,\n uint256[] memory _minAmountsOut\n ) external;\n\n function getPoolTokens(address _poolAddress) external view returns (address[] memory);\n\n function getPoolWeights(address _poolAddress) external view returns (uint256[] memory);\n\n function getPoolTokensOut(\n address _poolAdress,\n address _tokenAddress,\n uint256 _maxAmountsIn\n ) external view returns (uint256);\n\n function getPoolMinAmountsOut(address _poolAddress, uint256 _poolTokenAmount)\n external\n view\n returns (uint256[] memory _minAmountsOut);\n\n function isPool(address _poolAddress) external view returns (bool);\n}\n" + }, + "contracts/integrations/pool/PoolIntegration.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\n\nimport {IPoolIntegration} from '../../interfaces/IPoolIntegration.sol';\nimport {IGarden} from '../../interfaces/IGarden.sol';\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\nimport {IBabController} from '../../interfaces/IBabController.sol';\n\nimport {BaseIntegration} from '../BaseIntegration.sol';\n\n/**\n * @title PoolIntegration\n * @author Babylon Finance Protocol\n *\n * Base class for integration with trading protocols\n */\nabstract contract PoolIntegration is BaseIntegration, ReentrancyGuard, IPoolIntegration {\n using SafeMath for uint256;\n using SafeCast for uint256;\n\n /* ============ Struct ============ */\n\n struct PoolInfo {\n IGarden garden; // Garden address\n IStrategy strategy; // Strategy address\n address pool; // Pool address\n uint256 totalSupply; // Total Supply of the pool\n uint256 poolTokensInTransaction; // Pool tokens affected by this transaction\n uint256 poolTokensInStrategy; // Pool tokens strategy balance\n uint256[] limitPoolTokenQuantities;\n }\n\n /* ============ Events ============ */\n\n event PoolEntered(address indexed _strategy, address indexed _garden, address _pool, uint256 _poolTokensOut);\n\n event PoolExited(address indexed _strategy, address indexed _garden, address _pool, uint256 _poolTokensIn);\n\n /* ============ Constants ============ */\n\n uint256 internal constant SLIPPAGE_ALLOWED = 1e16; // 1%\n\n /* ============ Constructor ============ */\n\n /**\n * Creates the integration\n *\n * @param _name Name of the integration\n * @param _weth Address of the WETH ERC20\n * @param _controller Address of the controller\n */\n constructor(\n string memory _name,\n address _weth,\n address _controller\n ) BaseIntegration(_name, _weth, _controller) {}\n\n /* ============ External Functions ============ */\n\n /**\n * Joins a pool\n *\n * @param _strategy Address of the strategy\n * @param _poolAddress Address of the pool token to join\n * @param _poolTokensOut Min amount of pool tokens to receive\n * @param _tokensIn Array of token addresses to deposit\n * @param _maxAmountsIn Array of max token quantities to pull out from the garden\n */\n function joinPool(\n address _strategy,\n address _poolAddress,\n uint256 _poolTokensOut,\n address[] calldata _tokensIn,\n uint256[] calldata _maxAmountsIn\n ) external override nonReentrant onlySystemContract {\n PoolInfo memory poolInfo = _createPoolInfo(_strategy, _poolAddress, _poolTokensOut, _tokensIn, _maxAmountsIn);\n _validatePreJoinPoolData(poolInfo);\n // Approve spending of the tokens\n for (uint256 i = 0; i < _tokensIn.length; i++) {\n // No need to approve ETH\n if (_tokensIn[i] != address(0)) {\n poolInfo.strategy.invokeApprove(_getSpender(_poolAddress), _tokensIn[i], _maxAmountsIn[i]);\n }\n }\n (address targetPool, uint256 callValue, bytes memory methodData) =\n _getJoinPoolCalldata(_strategy, _poolAddress, _poolTokensOut, _tokensIn, _maxAmountsIn);\n poolInfo.strategy.invokeFromIntegration(targetPool, callValue, methodData);\n poolInfo.poolTokensInTransaction = IERC20(poolInfo.pool).balanceOf(address(poolInfo.strategy)).sub(\n poolInfo.poolTokensInStrategy\n );\n _validatePostJoinPoolData(poolInfo);\n\n emit PoolEntered(address(poolInfo.strategy), address(poolInfo.garden), poolInfo.pool, _poolTokensOut);\n }\n\n /**\n * Exits a liquidity pool. Accrue protocol fee (if any)\n *\n * @param _strategy Address of the strategy\n * @param _poolAddress Address of the pool token to join\n * @param _poolTokensIn Pool tokens to exchange for the underlying tokens\n * @param _tokensOut Array of token addresses to withdraw\n * @param _minAmountsOut Array of min token quantities to receive from the pool\n */\n function exitPool(\n address _strategy,\n address _poolAddress,\n uint256 _poolTokensIn,\n address[] calldata _tokensOut,\n uint256[] calldata _minAmountsOut\n ) external override nonReentrant onlySystemContract {\n PoolInfo memory poolInfo = _createPoolInfo(_strategy, _poolAddress, _poolTokensIn, _tokensOut, _minAmountsOut);\n _validatePreExitPoolData(poolInfo);\n // Approve spending of the pool token\n poolInfo.strategy.invokeApprove(_getSpender(_poolAddress), _poolAddress, _poolTokensIn);\n\n (address targetPool, uint256 callValue, bytes memory methodData) =\n _getExitPoolCalldata(_strategy, _poolAddress, _poolTokensIn, _tokensOut, _minAmountsOut);\n poolInfo.strategy.invokeFromIntegration(targetPool, callValue, methodData);\n _validatePostExitPoolData(poolInfo);\n\n emit PoolExited(address(poolInfo.strategy), address(poolInfo.garden), poolInfo.pool, _poolTokensIn);\n }\n\n /**\n * Checks whether a pool address is valid\n *\n * @param _poolAddress Pool address to check\n * @return bool True if the address is a pool\n */\n function isPool(address _poolAddress) external view override returns (bool) {\n return _isPool(_poolAddress);\n }\n\n function getPoolTokens(\n address /* _poolAddress */\n ) external view virtual override returns (address[] memory);\n\n function getPoolWeights(\n address /*_poolAddress */\n ) external view virtual override returns (uint256[] memory);\n\n /* ============ Internal Functions ============ */\n\n /**\n * Create and return PoolInfo struct\n *\n * @param _strategy Address of the strategy\n * @param _pool Address of the pool\n * @param _poolTokensInTransaction Number of pool tokens involved\n * hparam _poolTokens Addresseses of the pool tokens\n * @param _limitPoolTokenQuantities Limit quantity of the pool tokens\n *\n * return PoolInfo Struct containing data for pool\n */\n function _createPoolInfo(\n address _strategy,\n address _pool,\n uint256 _poolTokensInTransaction,\n address[] calldata, /* _poolTokens */\n uint256[] calldata _limitPoolTokenQuantities\n ) internal view returns (PoolInfo memory) {\n PoolInfo memory poolInfo;\n poolInfo.strategy = IStrategy(_strategy);\n poolInfo.garden = IGarden(poolInfo.strategy.garden());\n poolInfo.pool = _pool;\n poolInfo.totalSupply = IERC20(_pool).totalSupply();\n poolInfo.poolTokensInStrategy = IERC20(_pool).balanceOf(_strategy);\n poolInfo.poolTokensInTransaction = _poolTokensInTransaction;\n poolInfo.limitPoolTokenQuantities = _limitPoolTokenQuantities;\n\n return poolInfo;\n }\n\n /**\n * Validate pre pool join data. Check pool is valid, token quantity is valid.\n *\n * @param _poolInfo Struct containing pool information used in internal functions\n */\n function _validatePreJoinPoolData(PoolInfo memory _poolInfo) internal view {\n require(_isPool(_poolInfo.pool), 'The pool address is not valid');\n require(_poolInfo.poolTokensInTransaction > 0, 'Min pool tokens to receive must be greater than 0');\n }\n\n /**\n * Validate pre pool data. Check pool is valid, token quantity is valid.\n *\n * @param _poolInfo Struct containing pool information used in internal functions\n */\n function _validatePreExitPoolData(PoolInfo memory _poolInfo) internal view {\n require(_isPool(_poolInfo.pool), 'The pool address is not valid');\n require(_poolInfo.poolTokensInTransaction > 0, 'Pool tokens to exchange must be greater than 0');\n require(\n _poolInfo.poolTokensInStrategy >= _poolInfo.poolTokensInTransaction,\n 'The strategy does not have enough pool tokens'\n );\n }\n\n /**\n * Validate post join pool data. Check pool is valid, token quantity is valid.\n *\n * @param _poolInfo Struct containing pool information used in internal functions\n */\n function _validatePostJoinPoolData(PoolInfo memory _poolInfo) internal view {\n require(\n (IERC20(_poolInfo.pool).balanceOf(address(_poolInfo.strategy)) > _poolInfo.poolTokensInStrategy),\n 'The strategy did not receive the pool tokens'\n );\n }\n\n /**\n * Validate post exit pool data. Check pool is valid, token quantity is valid.\n *\n * @param _poolInfo Struct containing pool information used in internal functions\n */\n function _validatePostExitPoolData(PoolInfo memory _poolInfo) internal view {\n require(\n IERC20(_poolInfo.pool).balanceOf(address(_poolInfo.strategy)) ==\n _poolInfo.poolTokensInStrategy - _poolInfo.poolTokensInTransaction,\n 'The strategy did not return the pool tokens'\n );\n // TODO: validate individual tokens received\n }\n\n /**\n * Return join pool calldata which is already generated from the pool API\n *\n * hparam _strategy Address of the strategy\n * hparam _poolAddress Address of the pool\n * hparam _poolTokensOut Amount of pool tokens to send\n * hparam _tokensIn Addresses of tokens to send to the pool\n * hparam _maxAmountsIn Amounts of tokens to send to the pool\n *\n * @return address Target contract address\n * @return uint256 Call value\n * @return bytes Trade calldata\n */\n function _getJoinPoolCalldata(\n address, /* _strategy */\n address, /* _poolAddress */\n uint256, /* _poolTokensOut */\n address[] calldata, /* _tokensIn */\n uint256[] calldata /* _maxAmountsIn */\n )\n internal\n view\n virtual\n returns (\n address,\n uint256,\n bytes memory\n );\n\n /**\n * Return exit pool calldata which is already generated from the pool API\n *\n * hparam _strategy Address of the strategy\n * hparam _poolAddress Address of the pool\n * hparam _poolTokensIn Amount of pool tokens to receive\n * hparam _tokensOut Addresses of tokens to receive\n * hparam _minAmountsOut Amounts of pool tokens to receive\n *\n * @return address Target contract address\n * @return uint256 Call value\n * @return bytes Trade calldata\n */\n function _getExitPoolCalldata(\n address, /* _strategy */\n address, /* _poolAddress */\n uint256, /* _poolTokensIn */\n address[] calldata, /* _tokensOut */\n uint256[] calldata /* _minAmountsOut */\n )\n internal\n view\n virtual\n returns (\n address,\n uint256,\n bytes memory\n );\n\n function _isPool(\n address /* _poolAddress */\n ) internal view virtual returns (bool);\n\n function _getSpender(\n address /* _poolAddress */\n ) internal view virtual returns (address);\n}\n" + }, + "contracts/integrations/pool/UniswapPoolIntegration.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';\nimport {PoolIntegration} from './PoolIntegration.sol';\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\nimport {IUniswapV2Router} from '../../interfaces/external/uniswap/IUniswapV2Router.sol';\n\n/**\n * @title BalancerIntegration\n * @author Babylon Finance Protocol\n *\n * Kyber protocol trade integration\n */\ncontract UniswapPoolIntegration is PoolIntegration {\n using SafeMath for uint256;\n using PreciseUnitMath for uint256;\n\n /* ============ State Variables ============ */\n\n // Address of Uniswap V2 Router\n IUniswapV2Router public uniRouter;\n\n /* ============ Constants ============ */\n\n uint8 public immutable MAX_DELTA_BLOCKS = 5;\n\n /* ============ Constructor ============ */\n\n /**\n * Creates the integration\n *\n * @param _controller Address of the controller\n * @param _weth Address of the WETH ERC20\n * @param _uniswapRouterAddress Address of Uniswap router\n */\n constructor(\n address _controller,\n address _weth,\n address _uniswapRouterAddress\n ) PoolIntegration('uniswap_pool', _weth, _controller) {\n uniRouter = IUniswapV2Router(_uniswapRouterAddress);\n }\n\n /* ============ External Functions ============ */\n\n function getPoolTokens(address _poolAddress) external view override returns (address[] memory) {\n address[] memory result = new address[](2);\n result[0] = IUniswapV2Pair(_poolAddress).token0();\n result[1] = IUniswapV2Pair(_poolAddress).token1();\n return result;\n }\n\n function getPoolWeights(\n address /* _poolAddress */\n ) external pure override returns (uint256[] memory) {\n uint256[] memory result = new uint256[](2);\n result[0] = 5e17; // 50%\n result[1] = 5e17; // 50%\n return result;\n }\n\n function getPoolTokensOut(\n address, /* _poolAddress */\n address, /* _poolToken */\n uint256 /* _maxAmountsIn */\n ) external pure override returns (uint256) {\n // return 1 since _poolTokensOut are not used\n return 1;\n }\n\n function getPoolMinAmountsOut(address _poolAddress, uint256 _liquidity)\n external\n view\n override\n returns (uint256[] memory _minAmountsOut)\n {\n uint256 totalSupply = IUniswapV2Pair(_poolAddress).totalSupply();\n uint256[] memory result = new uint256[](2);\n result[0] = IERC20(IUniswapV2Pair(_poolAddress).token0())\n .balanceOf(_poolAddress)\n .mul(_liquidity)\n .div(totalSupply)\n .preciseMul(1e18 - SLIPPAGE_ALLOWED);\n result[1] = IERC20(IUniswapV2Pair(_poolAddress).token1())\n .balanceOf(_poolAddress)\n .mul(_liquidity)\n .div(totalSupply)\n .preciseMul(1e18 - SLIPPAGE_ALLOWED);\n return result;\n }\n\n /* ============ Internal Functions ============ */\n\n function _isPool(address _poolAddress) internal pure override returns (bool) {\n return IUniswapV2Pair(_poolAddress).MINIMUM_LIQUIDITY() > 0;\n }\n\n function _getSpender(\n address //_poolAddress\n ) internal view override returns (address) {\n return address(uniRouter);\n }\n\n /**\n * Return join pool calldata which is already generated from the pool API\n *\n * @param _strategy Address of the strategy\n * hparam _poolAddress Address of the pool\n * hparam _poolTokensOut Amount of pool tokens to send\n * @param _tokensIn Addresses of tokens to send to the pool\n * @param _maxAmountsIn Amounts of tokens to send to the pool\n *\n * @return address Target contract address\n * @return uint256 Call value\n * @return bytes Trade calldata\n */\n function _getJoinPoolCalldata(\n address _strategy,\n address, /* _poolAddress */\n uint256, /* _poolTokensOut */\n address[] calldata _tokensIn,\n uint256[] calldata _maxAmountsIn\n )\n internal\n view\n override\n returns (\n address,\n uint256,\n bytes memory\n )\n {\n // Encode method data for Garden to invoke\n require(_tokensIn.length == 2, 'Two tokens required');\n require(_maxAmountsIn.length == 2, 'Two amounts required');\n return (address(uniRouter), 0, _getMethodData(_strategy, _tokensIn, _maxAmountsIn));\n }\n\n function _getMethodData(\n address _strategy,\n address[] calldata _tokensIn,\n uint256[] calldata _maxAmountsIn\n ) private view returns (bytes memory) {\n return\n abi.encodeWithSignature(\n 'addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)',\n _tokensIn[0],\n _tokensIn[1],\n _maxAmountsIn[0],\n _maxAmountsIn[1],\n _maxAmountsIn[0].sub(_maxAmountsIn[0].preciseMul(SLIPPAGE_ALLOWED)),\n _maxAmountsIn[1].sub(_maxAmountsIn[1].preciseMul(SLIPPAGE_ALLOWED)),\n _strategy,\n block.timestamp.add(MAX_DELTA_BLOCKS)\n );\n }\n\n /**\n * Return exit pool calldata which is already generated from the pool API\n *\n * @param _strategy Address of the strategy\n * hparam _poolAddress Address of the pool\n * @param _poolTokensIn Amount of pool tokens to liquidate\n * @param _tokensOut Addresses of tokens to receive\n * @param _minAmountsOut Amounts of tokens to receive\n *\n * @return address Target contract address\n * @return uint256 Call value\n * @return bytes Trade calldata\n */\n function _getExitPoolCalldata(\n address _strategy,\n address, /* _poolAddress */\n uint256 _poolTokensIn,\n address[] calldata _tokensOut,\n uint256[] calldata _minAmountsOut\n )\n internal\n view\n override\n returns (\n address,\n uint256,\n bytes memory\n )\n {\n require(_tokensOut.length == 2, 'Two tokens required');\n require(_minAmountsOut.length == 2, 'Two amounts required');\n // Encode method data for Garden to invoke\n bytes memory methodData =\n abi.encodeWithSignature(\n 'removeLiquidity(address,address,uint256,uint256,uint256,address,uint256)',\n _tokensOut[0],\n _tokensOut[1],\n _poolTokensIn,\n _minAmountsOut[0],\n _minAmountsOut[1],\n _strategy,\n block.timestamp.add(MAX_DELTA_BLOCKS)\n );\n\n return (address(uniRouter), 0, methodData);\n }\n}\n" + }, + "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol": { + "content": "pragma solidity >=0.5.0;\n\ninterface IUniswapV2Pair {\n event Approval(address indexed owner, address indexed spender, uint value);\n event Transfer(address indexed from, address indexed to, uint value);\n\n function name() external pure returns (string memory);\n function symbol() external pure returns (string memory);\n function decimals() external pure returns (uint8);\n function totalSupply() external view returns (uint);\n function balanceOf(address owner) external view returns (uint);\n function allowance(address owner, address spender) external view returns (uint);\n\n function approve(address spender, uint value) external returns (bool);\n function transfer(address to, uint value) external returns (bool);\n function transferFrom(address from, address to, uint value) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n function nonces(address owner) external view returns (uint);\n\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\n\n event Mint(address indexed sender, uint amount0, uint amount1);\n event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\n event Swap(\n address indexed sender,\n uint amount0In,\n uint amount1In,\n uint amount0Out,\n uint amount1Out,\n address indexed to\n );\n event Sync(uint112 reserve0, uint112 reserve1);\n\n function MINIMUM_LIQUIDITY() external pure returns (uint);\n function factory() external view returns (address);\n function token0() external view returns (address);\n function token1() external view returns (address);\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\n function price0CumulativeLast() external view returns (uint);\n function price1CumulativeLast() external view returns (uint);\n function kLast() external view returns (uint);\n\n function mint(address to) external returns (uint liquidity);\n function burn(address to) external returns (uint amount0, uint amount1);\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\n function skim(address to) external;\n function sync() external;\n\n function initialize(address, address) external;\n}\n" + }, + "contracts/interfaces/external/uniswap/IUniswapV2Router.sol": { + "content": "/*\n Copyright 2020 Set Labs Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\n\ninterface IUniswapV2Router {\n function factory() external pure returns (address);\n\n function WETH() external pure returns (address);\n\n function addLiquidity(\n address tokenA,\n address tokenB,\n uint256 amountADesired,\n uint256 amountBDesired,\n uint256 amountAMin,\n uint256 amountBMin,\n address to,\n uint256 deadline\n )\n external\n returns (\n uint256 amountA,\n uint256 amountB,\n uint256 liquidity\n );\n\n function addLiquidityETH(\n address token,\n uint256 amountTokenDesired,\n uint256 amountTokenMin,\n uint256 amountETHMin,\n address to,\n uint256 deadline\n )\n external\n payable\n returns (\n uint256 amountToken,\n uint256 amountETH,\n uint256 liquidity\n );\n\n function removeLiquidity(\n address tokenA,\n address tokenB,\n uint256 liquidity,\n uint256 amountAMin,\n uint256 amountBMin,\n address to,\n uint256 deadline\n ) external returns (uint256 amountA, uint256 amountB);\n\n function removeLiquidityETH(\n address token,\n uint256 liquidity,\n uint256 amountTokenMin,\n uint256 amountETHMin,\n address to,\n uint256 deadline\n ) external returns (uint256 amountToken, uint256 amountETH);\n\n function removeLiquidityWithPermit(\n address tokenA,\n address tokenB,\n uint256 liquidity,\n uint256 amountAMin,\n uint256 amountBMin,\n address to,\n uint256 deadline,\n bool approveMax,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external returns (uint256 amountA, uint256 amountB);\n\n function removeLiquidityETHWithPermit(\n address token,\n uint256 liquidity,\n uint256 amountTokenMin,\n uint256 amountETHMin,\n address to,\n uint256 deadline,\n bool approveMax,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external returns (uint256 amountToken, uint256 amountETH);\n\n function swapExactTokensForTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapTokensForExactTokens(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapExactETHForTokens(\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external payable returns (uint256[] memory amounts);\n\n function swapTokensForExactETH(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapExactTokensForETH(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapETHForExactTokens(\n uint256 amountOut,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external payable returns (uint256[] memory amounts);\n\n function quote(\n uint256 amountA,\n uint256 reserveA,\n uint256 reserveB\n ) external pure returns (uint256 amountB);\n\n function getAmountOut(\n uint256 amountIn,\n uint256 reserveIn,\n uint256 reserveOut\n ) external pure returns (uint256 amountOut);\n\n function getAmountIn(\n uint256 amountOut,\n uint256 reserveIn,\n uint256 reserveOut\n ) external pure returns (uint256 amountIn);\n\n function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts);\n\n function getAmountsIn(uint256 amountOut, address[] calldata path) external view returns (uint256[] memory amounts);\n}\n" + }, + "@uniswap/v2-periphery/contracts/libraries/UniswapV2Library.sol": { + "content": "pragma solidity >=0.5.0;\n\nimport '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';\n\nimport \"./SafeMath.sol\";\n\nlibrary UniswapV2Library {\n using SafeMath for uint;\n\n // returns sorted token addresses, used to handle return values from pairs sorted in this order\n function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {\n require(tokenA != tokenB, 'UniswapV2Library: IDENTICAL_ADDRESSES');\n (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);\n require(token0 != address(0), 'UniswapV2Library: ZERO_ADDRESS');\n }\n\n // calculates the CREATE2 address for a pair without making any external calls\n function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) {\n (address token0, address token1) = sortTokens(tokenA, tokenB);\n pair = address(uint(keccak256(abi.encodePacked(\n hex'ff',\n factory,\n keccak256(abi.encodePacked(token0, token1)),\n hex'96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f' // init code hash\n ))));\n }\n\n // fetches and sorts the reserves for a pair\n function getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) {\n (address token0,) = sortTokens(tokenA, tokenB);\n (uint reserve0, uint reserve1,) = IUniswapV2Pair(pairFor(factory, tokenA, tokenB)).getReserves();\n (reserveA, reserveB) = tokenA == token0 ? (reserve0, reserve1) : (reserve1, reserve0);\n }\n\n // given some amount of an asset and pair reserves, returns an equivalent amount of the other asset\n function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) {\n require(amountA > 0, 'UniswapV2Library: INSUFFICIENT_AMOUNT');\n require(reserveA > 0 && reserveB > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');\n amountB = amountA.mul(reserveB) / reserveA;\n }\n\n // given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset\n function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) {\n require(amountIn > 0, 'UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT');\n require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');\n uint amountInWithFee = amountIn.mul(997);\n uint numerator = amountInWithFee.mul(reserveOut);\n uint denominator = reserveIn.mul(1000).add(amountInWithFee);\n amountOut = numerator / denominator;\n }\n\n // given an output amount of an asset and pair reserves, returns a required input amount of the other asset\n function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn) {\n require(amountOut > 0, 'UniswapV2Library: INSUFFICIENT_OUTPUT_AMOUNT');\n require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');\n uint numerator = reserveIn.mul(amountOut).mul(1000);\n uint denominator = reserveOut.sub(amountOut).mul(997);\n amountIn = (numerator / denominator).add(1);\n }\n\n // performs chained getAmountOut calculations on any number of pairs\n function getAmountsOut(address factory, uint amountIn, address[] memory path) internal view returns (uint[] memory amounts) {\n require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');\n amounts = new uint[](path.length);\n amounts[0] = amountIn;\n for (uint i; i < path.length - 1; i++) {\n (uint reserveIn, uint reserveOut) = getReserves(factory, path[i], path[i + 1]);\n amounts[i + 1] = getAmountOut(amounts[i], reserveIn, reserveOut);\n }\n }\n\n // performs chained getAmountIn calculations on any number of pairs\n function getAmountsIn(address factory, uint amountOut, address[] memory path) internal view returns (uint[] memory amounts) {\n require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');\n amounts = new uint[](path.length);\n amounts[amounts.length - 1] = amountOut;\n for (uint i = path.length - 1; i > 0; i--) {\n (uint reserveIn, uint reserveOut) = getReserves(factory, path[i - 1], path[i]);\n amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut);\n }\n }\n}\n" + }, + "@uniswap/v2-periphery/contracts/libraries/SafeMath.sol": { + "content": "pragma solidity >=0.5.0;\n\n// a library for performing overflow-safe math, courtesy of DappHub (https://github.com/dapphub/ds-math)\n\nlibrary SafeMath {\n function add(uint x, uint y) internal pure returns (uint z) {\n require((z = x + y) >= x, 'ds-math-add-overflow');\n }\n\n function sub(uint x, uint y) internal pure returns (uint z) {\n require((z = x - y) <= x, 'ds-math-sub-underflow');\n }\n\n function mul(uint x, uint y) internal pure returns (uint z) {\n require(y == 0 || (z = x * y) / y == x, 'ds-math-mul-overflow');\n }\n}\n" + }, + "contracts/oracle_adapter/UniswapTWAP.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Modified from Uniswap TWAPs\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\nimport '@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol';\nimport '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';\nimport '@uniswap/v2-periphery/contracts/libraries/UniswapV2OracleLibrary.sol';\nimport '@uniswap/v2-periphery/contracts/libraries/UniswapV2Library.sol';\nimport '@uniswap/lib/contracts/libraries/FixedPoint.sol';\n\nimport {PreciseUnitMath} from '../lib/PreciseUnitMath.sol';\n\nimport {IBabController} from '../interfaces/IBabController.sol';\nimport {IOracleAdapter} from '../interfaces/IOracleAdapter.sol';\n\n/**\n * @title UniswapTWAP\n * @author Babylon Finance Protocol\n *\n * Sliding window oracle that uses observations collected over a window to provide moving price averages in the past\n * `windowSize` with a precision of `windowSize / granularity`\n * note this is a singleton oracle and only needs to be deployed once per desired parameters, which\n * differs from the simple oracle which must be deployed once per pair.\n */\ncontract UniswapTWAP is Ownable, IOracleAdapter {\n using FixedPoint for *;\n using SafeMath for uint256;\n using PreciseUnitMath for uint256;\n\n struct Observation {\n uint256 timestamp;\n uint256 price0Cumulative;\n uint256 price1Cumulative;\n }\n\n /* ============ State Variables ============ */\n\n // Instance of the Controller contract\n IBabController public controller;\n\n // Name to identify this adapter\n string public constant name = 'uniswapTwap';\n\n // Address of Uniswap factory\n address public immutable factory;\n // the desired amount of time over which the moving average should be computed, e.g. 24 hours\n uint256 public immutable windowSize;\n // the number of observations stored for each pair, i.e. how many price observations are stored for the window.\n // as granularity increases from 1, more frequent updates are needed, but moving averages become more precise.\n // averages are computed over intervals with sizes in the range:\n // [windowSize - (windowSize / granularity) * 2, windowSize]\n // e.g. if the window size is 24 hours, and the granularity is 24, the oracle will return the average price for\n // the period:\n // [now - [22 hours, 24 hours], now]\n uint8 public immutable granularity;\n // this is redundant with granularity and windowSize, but stored for gas savings & informational purposes.\n uint256 public immutable periodSize;\n\n // mapping from pair address to a list of price observations of that pair\n mapping(address => Observation[]) public pairObservations;\n\n /* ============ Constructor ============ */\n\n /**\n * Set state variables\n *\n * @param _controller Instance of controller contract\n * @param _factory Address of Uniswap factory\n * @param _windowSize Array of allowed Uniswap pools\n * @param _granularity Array of allowed Uniswap pools\n */\n constructor(\n address _controller,\n address _factory,\n uint256 _windowSize,\n uint8 _granularity\n ) {\n require(_granularity > 1, 'SlidingWindowOracle: GRANULARITY');\n require(\n (periodSize = _windowSize / _granularity) * _granularity == _windowSize,\n 'SlidingWindowOracle: WINDOW_NOT_EVENLY_DIVISIBLE'\n );\n factory = _factory;\n controller = IBabController(_controller);\n windowSize = _windowSize;\n granularity = _granularity;\n }\n\n /* ============ External Functions ============ */\n\n // returns the index of the observation corresponding to the given timestamp\n function observationIndexOf(uint256 timestamp) public view returns (uint8 index) {\n uint256 epochPeriod = timestamp / periodSize;\n return uint8(epochPeriod % granularity);\n }\n\n // update the cumulative price for the observation at the current timestamp. each observation is updated at most\n // once per epoch period.\n function update(address tokenA, address tokenB) external override {\n address pair = UniswapV2Library.pairFor(factory, tokenA, tokenB);\n\n // populate the array with empty observations (first call only)\n for (uint256 i = pairObservations[pair].length; i < granularity; i++) {\n pairObservations[pair].push();\n }\n // get the observation for the current period\n uint8 observationIndex = observationIndexOf(block.timestamp);\n Observation storage observation = pairObservations[pair][observationIndex];\n\n // we only want to commit updates once per period (i.e. windowSize / granularity)\n uint256 timeElapsed = block.timestamp - observation.timestamp;\n if (timeElapsed > periodSize) {\n (uint256 price0Cumulative, uint256 price1Cumulative, ) =\n UniswapV2OracleLibrary.currentCumulativePrices(pair);\n observation.timestamp = block.timestamp;\n observation.price0Cumulative = price0Cumulative;\n observation.price1Cumulative = price1Cumulative;\n }\n }\n\n // returns the amount out corresponding to the amount in for a given token using the moving average over the time\n // range [now - [windowSize, windowSize - periodSize * 2], now]\n // update must have been called for the bucket corresponding to timestamp `now - windowSize`\n function getPrice(address tokenIn, address tokenOut)\n external\n view\n override\n returns (bool found, uint256 amountOut)\n {\n address pair = UniswapV2Library.pairFor(factory, tokenIn, tokenOut);\n Observation storage firstObservation = getFirstObservationInWindow(pair);\n\n uint256 timeElapsed = block.timestamp - firstObservation.timestamp;\n require(timeElapsed <= windowSize, 'SlidingWindowOracle: MISSING_HISTORICAL_OBSERVATION');\n // should never happen.\n require(timeElapsed >= windowSize - periodSize * 2, 'SlidingWindowOracle: UNEXPECTED_TIME_ELAPSED');\n\n (uint256 price0Cumulative, uint256 price1Cumulative, ) = UniswapV2OracleLibrary.currentCumulativePrices(pair);\n (address token0, ) = UniswapV2Library.sortTokens(tokenIn, tokenOut);\n\n if (token0 == tokenIn) {\n return (true, computeAmountOut(firstObservation.price0Cumulative, price0Cumulative, timeElapsed));\n } else {\n return (true, computeAmountOut(firstObservation.price1Cumulative, price1Cumulative, timeElapsed));\n }\n }\n\n /* ============ Internal Functions ============ */\n\n // given the cumulative prices of the start and end of a period, and the length of the period, compute the average\n // price in terms of how much amount out is received for the amount in\n function computeAmountOut(\n uint256 priceCumulativeStart,\n uint256 priceCumulativeEnd,\n uint256 timeElapsed\n ) private pure returns (uint256 amountOut) {\n // overflow is desired.\n FixedPoint.uq112x112 memory priceAverage =\n FixedPoint.uq112x112(uint224((priceCumulativeEnd - priceCumulativeStart) / timeElapsed));\n amountOut = priceAverage.mul(1).decode144();\n amountOut = amountOut.preciseDiv(1);\n }\n\n // returns the observation from the oldest epoch (at the beginning of the window) relative to the current time\n function getFirstObservationInWindow(address pair) private view returns (Observation storage firstObservation) {\n uint8 observationIndex = observationIndexOf(block.timestamp);\n // no overflow issue. if observationIndex + 1 overflows, result is still zero.\n uint8 firstObservationIndex = (observationIndex + 1) % granularity;\n firstObservation = pairObservations[pair][firstObservationIndex];\n }\n}\n" + }, + "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol": { + "content": "pragma solidity >=0.5.0;\n\ninterface IUniswapV2Factory {\n event PairCreated(address indexed token0, address indexed token1, address pair, uint);\n\n function feeTo() external view returns (address);\n function feeToSetter() external view returns (address);\n\n function getPair(address tokenA, address tokenB) external view returns (address pair);\n function allPairs(uint) external view returns (address pair);\n function allPairsLength() external view returns (uint);\n\n function createPair(address tokenA, address tokenB) external returns (address pair);\n\n function setFeeTo(address) external;\n function setFeeToSetter(address) external;\n}\n" + }, + "@uniswap/v2-periphery/contracts/libraries/UniswapV2OracleLibrary.sol": { + "content": "pragma solidity >=0.5.0;\n\nimport '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';\nimport '@uniswap/lib/contracts/libraries/FixedPoint.sol';\n\n// library with helper methods for oracles that are concerned with computing average prices\nlibrary UniswapV2OracleLibrary {\n using FixedPoint for *;\n\n // helper function that returns the current block timestamp within the range of uint32, i.e. [0, 2**32 - 1]\n function currentBlockTimestamp() internal view returns (uint32) {\n return uint32(block.timestamp % 2 ** 32);\n }\n\n // produces the cumulative price using counterfactuals to save gas and avoid a call to sync.\n function currentCumulativePrices(\n address pair\n ) internal view returns (uint price0Cumulative, uint price1Cumulative, uint32 blockTimestamp) {\n blockTimestamp = currentBlockTimestamp();\n price0Cumulative = IUniswapV2Pair(pair).price0CumulativeLast();\n price1Cumulative = IUniswapV2Pair(pair).price1CumulativeLast();\n\n // if time has elapsed since the last update on the pair, mock the accumulated price values\n (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast) = IUniswapV2Pair(pair).getReserves();\n if (blockTimestampLast != blockTimestamp) {\n // subtraction overflow is desired\n uint32 timeElapsed = blockTimestamp - blockTimestampLast;\n // addition overflow is desired\n // counterfactual\n price0Cumulative += uint(FixedPoint.fraction(reserve1, reserve0)._x) * timeElapsed;\n // counterfactual\n price1Cumulative += uint(FixedPoint.fraction(reserve0, reserve1)._x) * timeElapsed;\n }\n }\n}\n" + }, + "@uniswap/lib/contracts/libraries/FixedPoint.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity >=0.4.0;\n\nimport './FullMath.sol';\nimport './Babylonian.sol';\nimport './BitMath.sol';\n\n// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))\nlibrary FixedPoint {\n // range: [0, 2**112 - 1]\n // resolution: 1 / 2**112\n struct uq112x112 {\n uint224 _x;\n }\n\n // range: [0, 2**144 - 1]\n // resolution: 1 / 2**112\n struct uq144x112 {\n uint256 _x;\n }\n\n uint8 public constant RESOLUTION = 112;\n uint256 public constant Q112 = 0x10000000000000000000000000000; // 2**112\n uint256 private constant Q224 = 0x100000000000000000000000000000000000000000000000000000000; // 2**224\n uint256 private constant LOWER_MASK = 0xffffffffffffffffffffffffffff; // decimal of UQ*x112 (lower 112 bits)\n\n // encode a uint112 as a UQ112x112\n function encode(uint112 x) internal pure returns (uq112x112 memory) {\n return uq112x112(uint224(x) << RESOLUTION);\n }\n\n // encodes a uint144 as a UQ144x112\n function encode144(uint144 x) internal pure returns (uq144x112 memory) {\n return uq144x112(uint256(x) << RESOLUTION);\n }\n\n // decode a UQ112x112 into a uint112 by truncating after the radix point\n function decode(uq112x112 memory self) internal pure returns (uint112) {\n return uint112(self._x >> RESOLUTION);\n }\n\n // decode a UQ144x112 into a uint144 by truncating after the radix point\n function decode144(uq144x112 memory self) internal pure returns (uint144) {\n return uint144(self._x >> RESOLUTION);\n }\n\n // multiply a UQ112x112 by a uint, returning a UQ144x112\n // reverts on overflow\n function mul(uq112x112 memory self, uint256 y) internal pure returns (uq144x112 memory) {\n uint256 z = 0;\n require(y == 0 || (z = self._x * y) / y == self._x, 'FixedPoint::mul: overflow');\n return uq144x112(z);\n }\n\n // multiply a UQ112x112 by an int and decode, returning an int\n // reverts on overflow\n function muli(uq112x112 memory self, int256 y) internal pure returns (int256) {\n uint256 z = FullMath.mulDiv(self._x, uint256(y < 0 ? -y : y), Q112);\n require(z < 2**255, 'FixedPoint::muli: overflow');\n return y < 0 ? -int256(z) : int256(z);\n }\n\n // multiply a UQ112x112 by a UQ112x112, returning a UQ112x112\n // lossy\n function muluq(uq112x112 memory self, uq112x112 memory other) internal pure returns (uq112x112 memory) {\n if (self._x == 0 || other._x == 0) {\n return uq112x112(0);\n }\n uint112 upper_self = uint112(self._x >> RESOLUTION); // * 2^0\n uint112 lower_self = uint112(self._x & LOWER_MASK); // * 2^-112\n uint112 upper_other = uint112(other._x >> RESOLUTION); // * 2^0\n uint112 lower_other = uint112(other._x & LOWER_MASK); // * 2^-112\n\n // partial products\n uint224 upper = uint224(upper_self) * upper_other; // * 2^0\n uint224 lower = uint224(lower_self) * lower_other; // * 2^-224\n uint224 uppers_lowero = uint224(upper_self) * lower_other; // * 2^-112\n uint224 uppero_lowers = uint224(upper_other) * lower_self; // * 2^-112\n\n // so the bit shift does not overflow\n require(upper <= uint112(-1), 'FixedPoint::muluq: upper overflow');\n\n // this cannot exceed 256 bits, all values are 224 bits\n uint256 sum = uint256(upper << RESOLUTION) + uppers_lowero + uppero_lowers + (lower >> RESOLUTION);\n\n // so the cast does not overflow\n require(sum <= uint224(-1), 'FixedPoint::muluq: sum overflow');\n\n return uq112x112(uint224(sum));\n }\n\n // divide a UQ112x112 by a UQ112x112, returning a UQ112x112\n function divuq(uq112x112 memory self, uq112x112 memory other) internal pure returns (uq112x112 memory) {\n require(other._x > 0, 'FixedPoint::divuq: division by zero');\n if (self._x == other._x) {\n return uq112x112(uint224(Q112));\n }\n if (self._x <= uint144(-1)) {\n uint256 value = (uint256(self._x) << RESOLUTION) / other._x;\n require(value <= uint224(-1), 'FixedPoint::divuq: overflow');\n return uq112x112(uint224(value));\n }\n\n uint256 result = FullMath.mulDiv(Q112, self._x, other._x);\n require(result <= uint224(-1), 'FixedPoint::divuq: overflow');\n return uq112x112(uint224(result));\n }\n\n // returns a UQ112x112 which represents the ratio of the numerator to the denominator\n // can be lossy\n function fraction(uint256 numerator, uint256 denominator) internal pure returns (uq112x112 memory) {\n require(denominator > 0, 'FixedPoint::fraction: division by zero');\n if (numerator == 0) return FixedPoint.uq112x112(0);\n\n if (numerator <= uint144(-1)) {\n uint256 result = (numerator << RESOLUTION) / denominator;\n require(result <= uint224(-1), 'FixedPoint::fraction: overflow');\n return uq112x112(uint224(result));\n } else {\n uint256 result = FullMath.mulDiv(numerator, Q112, denominator);\n require(result <= uint224(-1), 'FixedPoint::fraction: overflow');\n return uq112x112(uint224(result));\n }\n }\n\n // take the reciprocal of a UQ112x112\n // reverts on overflow\n // lossy\n function reciprocal(uq112x112 memory self) internal pure returns (uq112x112 memory) {\n require(self._x != 0, 'FixedPoint::reciprocal: reciprocal of zero');\n require(self._x != 1, 'FixedPoint::reciprocal: overflow');\n return uq112x112(uint224(Q224 / self._x));\n }\n\n // square root of a UQ112x112\n // lossy between 0/1 and 40 bits\n function sqrt(uq112x112 memory self) internal pure returns (uq112x112 memory) {\n if (self._x <= uint144(-1)) {\n return uq112x112(uint224(Babylonian.sqrt(uint256(self._x) << 112)));\n }\n\n uint8 safeShiftBits = 255 - BitMath.mostSignificantBit(self._x);\n safeShiftBits -= safeShiftBits % 2;\n return uq112x112(uint224(Babylonian.sqrt(uint256(self._x) << safeShiftBits) << ((112 - safeShiftBits) / 2)));\n }\n}\n" + }, + "@uniswap/lib/contracts/libraries/FullMath.sol": { + "content": "// SPDX-License-Identifier: CC-BY-4.0\npragma solidity >=0.4.0;\n\n// taken from https://medium.com/coinmonks/math-in-solidity-part-3-percents-and-proportions-4db014e080b1\n// license is CC-BY-4.0\nlibrary FullMath {\n function fullMul(uint256 x, uint256 y) internal pure returns (uint256 l, uint256 h) {\n uint256 mm = mulmod(x, y, uint256(-1));\n l = x * y;\n h = mm - l;\n if (mm < l) h -= 1;\n }\n\n function fullDiv(\n uint256 l,\n uint256 h,\n uint256 d\n ) private pure returns (uint256) {\n uint256 pow2 = d & -d;\n d /= pow2;\n l /= pow2;\n l += h * ((-pow2) / pow2 + 1);\n uint256 r = 1;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n return l * r;\n }\n\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 d\n ) internal pure returns (uint256) {\n (uint256 l, uint256 h) = fullMul(x, y);\n\n uint256 mm = mulmod(x, y, d);\n if (mm > l) h -= 1;\n l -= mm;\n\n if (h == 0) return l / d;\n\n require(h < d, 'FullMath: FULLDIV_OVERFLOW');\n return fullDiv(l, h, d);\n }\n}\n" + }, + "@uniswap/lib/contracts/libraries/Babylonian.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\npragma solidity >=0.4.0;\n\n// computes square roots using the babylonian method\n// https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method\nlibrary Babylonian {\n // credit for this implementation goes to\n // https://github.com/abdk-consulting/abdk-libraries-solidity/blob/master/ABDKMath64x64.sol#L687\n function sqrt(uint256 x) internal pure returns (uint256) {\n if (x == 0) return 0;\n // this block is equivalent to r = uint256(1) << (BitMath.mostSignificantBit(x) / 2);\n // however that code costs significantly more gas\n uint256 xx = x;\n uint256 r = 1;\n if (xx >= 0x100000000000000000000000000000000) {\n xx >>= 128;\n r <<= 64;\n }\n if (xx >= 0x10000000000000000) {\n xx >>= 64;\n r <<= 32;\n }\n if (xx >= 0x100000000) {\n xx >>= 32;\n r <<= 16;\n }\n if (xx >= 0x10000) {\n xx >>= 16;\n r <<= 8;\n }\n if (xx >= 0x100) {\n xx >>= 8;\n r <<= 4;\n }\n if (xx >= 0x10) {\n xx >>= 4;\n r <<= 2;\n }\n if (xx >= 0x8) {\n r <<= 1;\n }\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1; // Seven iterations should be enough\n uint256 r1 = x / r;\n return (r < r1 ? r : r1);\n }\n}\n" + }, + "@uniswap/lib/contracts/libraries/BitMath.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity >=0.5.0;\n\nlibrary BitMath {\n // returns the 0 indexed position of the most significant bit of the input x\n // s.t. x >= 2**msb and x < 2**(msb+1)\n function mostSignificantBit(uint256 x) internal pure returns (uint8 r) {\n require(x > 0, 'BitMath::mostSignificantBit: zero');\n\n if (x >= 0x100000000000000000000000000000000) {\n x >>= 128;\n r += 128;\n }\n if (x >= 0x10000000000000000) {\n x >>= 64;\n r += 64;\n }\n if (x >= 0x100000000) {\n x >>= 32;\n r += 32;\n }\n if (x >= 0x10000) {\n x >>= 16;\n r += 16;\n }\n if (x >= 0x100) {\n x >>= 8;\n r += 8;\n }\n if (x >= 0x10) {\n x >>= 4;\n r += 4;\n }\n if (x >= 0x4) {\n x >>= 2;\n r += 2;\n }\n if (x >= 0x2) r += 1;\n }\n\n // returns the 0 indexed position of the least significant bit of the input x\n // s.t. (x & 2**lsb) != 0 and (x & (2**(lsb) - 1)) == 0)\n // i.e. the bit at the index is set and the mask of all lower bits is 0\n function leastSignificantBit(uint256 x) internal pure returns (uint8 r) {\n require(x > 0, 'BitMath::leastSignificantBit: zero');\n\n r = 255;\n if (x & uint128(-1) > 0) {\n r -= 128;\n } else {\n x >>= 128;\n }\n if (x & uint64(-1) > 0) {\n r -= 64;\n } else {\n x >>= 64;\n }\n if (x & uint32(-1) > 0) {\n r -= 32;\n } else {\n x >>= 32;\n }\n if (x & uint16(-1) > 0) {\n r -= 16;\n } else {\n x >>= 16;\n }\n if (x & uint8(-1) > 0) {\n r -= 8;\n } else {\n x >>= 8;\n }\n if (x & 0xf > 0) {\n r -= 4;\n } else {\n x >>= 4;\n }\n if (x & 0x3 > 0) {\n r -= 2;\n } else {\n x >>= 2;\n }\n if (x & 0x1 > 0) r -= 1;\n }\n}\n" + }, + "contracts/IshtarGate.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\nimport {ERC721} from '@openzeppelin/contracts/token/ERC721/ERC721.sol';\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {Counters} from '@openzeppelin/contracts/utils/Counters.sol';\nimport {IBabController} from './interfaces/IBabController.sol';\nimport {IIshtarGate} from './interfaces/IIshtarGate.sol';\nimport {IGarden} from './interfaces/IGarden.sol';\n\n/**\n * @title IshtarGate\n * @author Babylon Finance\n *\n * Contract that implements guestlists for Babylon Finance using an NFT\n */\ncontract IshtarGate is ERC721, IIshtarGate, Ownable {\n using Counters for Counters.Counter;\n using SafeMath for uint256;\n\n /* ============ Events ============ */\n\n event IshtarGateAwarded(address indexed _member, uint256 indexed _newItemId);\n event GardenAccess(address indexed _member, address indexed _garden, uint8 _permission, uint256 _tokenId);\n event GardenCreationPower(address indexed _member, bool _creation, uint256 _tokenId);\n event GateURIUpdated(string indexed _newURI, string indexed _oldURI);\n\n /* ============ State Variables ============ */\n\n // Address of the Controller contract\n IBabController public controller;\n\n // Address of the Ishtar Gate JSON (Shared JSON)\n string public override tokenURI;\n\n uint256 public override maxNumberOfInvites;\n\n // Permissions by community user\n mapping(address => mapping(address => uint8)) public permissionsByCommunity;\n mapping(address => bool) public canCreateAGarden;\n mapping(address => uint256) public gardenAccessCount;\n\n uint8 public constant NONE = 0;\n uint8 public constant JUST_LP = 1;\n uint8 public constant STEWARD = 2;\n uint8 public constant STRATEGIST = 3;\n\n Counters.Counter private _tokenIds;\n\n /* ============ Modifiers ============ */\n\n modifier onlyGardenCreator(address _garden) {\n require(address(_garden) != address(0), 'Garden must exist');\n IGarden garden = IGarden(_garden);\n require(garden.controller() == address(controller), 'Controller must match');\n require(msg.sender == garden.creator(), 'Only creator can give access to garden');\n require(IBabController(controller).isSystemContract(address(_garden)));\n require(IBabController(controller).isGarden(address(_garden)));\n require(gardenAccessCount[_garden] <= maxNumberOfInvites, 'The number of contributors must be below the limit');\n _;\n }\n\n /* ============ Constructor ============ */\n\n /**\n * Sets the protocol controller\n *\n * @param _controller Address of controller contract\n * @param _tokenURI URL of the Ishtar Gate JSON metadata\n */\n constructor(IBabController _controller, string memory _tokenURI) ERC721('IshtarGate', 'ISHT') {\n require(address(_controller) != address(0), 'Controller must exist');\n controller = _controller;\n tokenURI = _tokenURI;\n maxNumberOfInvites = 10;\n }\n\n /* ============ External Functions ============ */\n\n /**\n * Changs the number of invites we are going to give per garden\n *\n * @param _maxNumberOfInvites New max number of invites per garden\n */\n function setMaxNumberOfInvites(uint256 _maxNumberOfInvites) external override onlyOwner {\n require(_maxNumberOfInvites > maxNumberOfInvites, 'Invites must be higher');\n maxNumberOfInvites = _maxNumberOfInvites;\n }\n\n /**\n * Updates the token URI of the gate NFT\n *\n * @param _tokenURI Address of the tokenURI\n */\n function updateGardenURI(string memory _tokenURI) external override onlyOwner {\n string memory oldURI = tokenURI;\n tokenURI = _tokenURI;\n emit GateURIUpdated(tokenURI, oldURI);\n }\n\n /**\n * Awards the ishtar gate to a user and gives him access to a specific garden\n *\n * @param _user Address of the user\n * @param _garden Community that the gate grants access to\n * @param _permission Permissions of what user can do in the community\n */\n function setGardenAccess(\n address _user,\n address _garden,\n uint8 _permission\n ) external override onlyGardenCreator(_garden) returns (uint256) {\n require(address(_user) != address(0), 'User must exist');\n return _setIndividualGardenAccess(_user, _garden, _permission);\n }\n\n /**\n * Awards the ishtar gate to a list of users with permissions to a specific garden\n *\n * @param _garden Community that the gate grants access to\n * @param _users Addresses of the users\n * @param _perms List of permissions of what each user can do in the community\n */\n function grantGardenAccessBatch(\n address _garden,\n address[] calldata _users,\n uint8[] calldata _perms\n ) external override onlyGardenCreator(_garden) returns (bool) {\n require(_users.length == _perms.length, 'Permissions and users must match');\n for (uint8 i = 0; i < _users.length; i++) {\n require(address(_users[i]) != address(0), 'User must exist');\n _setIndividualGardenAccess(_users[i], _garden, _perms[i]);\n }\n return true;\n }\n\n /**\n * Awards the ishtar gate to a user and give/remove him garden creation capabilities.\n *\n * @param _user Address of the user\n * @param _canCreate Boolean with permissions as to whether the user can create gardens\n */\n function setCreatorPermissions(address _user, bool _canCreate) external override onlyOwner returns (uint256) {\n return _setCreatorPermissions(_user, _canCreate);\n }\n\n /**\n * Awards the ishtar gate to a list of users with permissions to create gardens\n *\n * @param _users Addresses of the users\n * @param _perms Lists of booleans\n */\n function grantCreatorsInBatch(address[] calldata _users, bool[] calldata _perms)\n external\n override\n onlyOwner\n returns (bool)\n {\n require(_users.length == _perms.length, 'Permissions and users must match');\n for (uint8 i = 0; i < _users.length; i++) {\n _setCreatorPermissions(_users[i], _perms[i]);\n }\n return true;\n }\n\n /* ============ Getter Functions ============ */\n\n /**\n * Check if a user can create gardens\n *\n * @param _user Address of the user\n * @return _canCreate Whether or not the user can create\n */\n function canCreate(address _user) external view override returns (bool) {\n return balanceOf(_user) > 0 && canCreateAGarden[_user];\n }\n\n /**\n * Check if a user can join a specific garden\n *\n * @param _user Address of the user\n * @param _garden Address of the _garden\n * @return _canJoin Whether or not the user can join\n */\n function canJoinAGarden(address _garden, address _user) external view override returns (bool) {\n return\n balanceOf(_user) > 0 &&\n (permissionsByCommunity[_garden][_user] >= JUST_LP || IGarden(_garden).creator() == _user);\n }\n\n /**\n * Check if a user can vote in a specific garden\n *\n * @param _user Address of the user\n * @param _garden Address of the _garden\n * @return _canVote Whether or not the user can vote\n */\n function canVoteInAGarden(address _garden, address _user) external view override returns (bool) {\n return\n balanceOf(_user) > 0 &&\n (permissionsByCommunity[_garden][_user] >= STEWARD || IGarden(_garden).creator() == _user);\n }\n\n /**\n * Check if a user can add strategies in a specific garden\n *\n * @param _user Address of the user\n * @param _garden Address of the _garden\n * @return _canStrategize Whether or not the user can create strategies\n */\n function canAddStrategiesInAGarden(address _garden, address _user) external view override returns (bool) {\n return\n balanceOf(_user) > 0 &&\n (permissionsByCommunity[_garden][_user] >= STRATEGIST || IGarden(_garden).creator() == _user);\n }\n\n /* ============ Internal Functions ============ */\n\n /**\n * Gives a new gate to the user or retrieve the existing one\n *\n * @param _user Address of the user\n */\n function _createOrGetGateNFT(address _user) private returns (uint256) {\n uint256 newItemId = 0;\n if (balanceOf(_user) == 0) {\n _tokenIds.increment();\n newItemId = _tokenIds.current();\n _safeMint(_user, newItemId);\n _setTokenURI(newItemId, tokenURI);\n emit IshtarGateAwarded(_user, newItemId);\n } else {\n newItemId = tokenOfOwnerByIndex(_user, 0);\n }\n return newItemId;\n }\n\n /**\n * Awards the ishtar gate to a user and gives him access to a specific garden\n *\n * @param _user Address of the user\n * @param _garden Community that the gate grants access to\n * @param _permission Permissions of what user can do in the community\n */\n function _setIndividualGardenAccess(\n address _user,\n address _garden,\n uint8 _permission\n ) private returns (uint256) {\n require(_permission <= 3, 'Permission out of bounds');\n uint256 newItemId = _createOrGetGateNFT(_user);\n if (_permission > 0 && permissionsByCommunity[_garden][_user] == 0) {\n require(gardenAccessCount[_garden] < maxNumberOfInvites, 'Max Number of invites reached');\n gardenAccessCount[_garden] = gardenAccessCount[_garden].add(1);\n }\n if (_permission == 0 && permissionsByCommunity[_garden][_user] > 0) {\n gardenAccessCount[_garden] = gardenAccessCount[_garden].sub(1);\n }\n permissionsByCommunity[_garden][_user] = _permission;\n emit GardenAccess(_user, _garden, _permission, newItemId);\n return newItemId;\n }\n\n /**\n * Awards the ishtar gate to a user and give/remove him garden creation capabilities.\n *\n * @param _user Address of the user\n * @param _canCreate Boolean with permissions as to whether the user can create gardens\n */\n function _setCreatorPermissions(address _user, bool _canCreate) private returns (uint256) {\n require(address(_user) != address(0), 'User must exist');\n uint256 newItemId = _createOrGetGateNFT(_user);\n canCreateAGarden[_user] = _canCreate;\n emit GardenCreationPower(_user, _canCreate, newItemId);\n return newItemId;\n }\n}\n" + }, + "contracts/integrations/trade/TradeIntegration.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\n\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\nimport '@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol';\nimport '@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol';\n\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\nimport {ITradeIntegration} from '../../interfaces/ITradeIntegration.sol';\nimport {IGarden} from '../../interfaces/IGarden.sol';\nimport {IBabController} from '../../interfaces/IBabController.sol';\n\nimport {BaseIntegration} from '../BaseIntegration.sol';\n\n/**\n * @title BorrowIntetration\n * @author Babylon Finance Protocol\n *\n * Base class for integration with trading protocols\n */\nabstract contract TradeIntegration is BaseIntegration, ReentrancyGuard, ITradeIntegration {\n using SafeMath for uint256;\n using SafeCast for uint256;\n\n /* ============ Struct ============ */\n\n struct TradeInfo {\n IGarden garden; // Garden\n IStrategy strategy; // Strategy\n string exchangeName; // Which exchange to use\n address sendToken; // Address of token being sold\n address receiveToken; // Address of token being bought\n uint256 gardenTotalSupply; // Total supply of Garden in Precise Units (10^18)\n uint256 totalSendQuantity; // Total quantity of sold tokens\n uint256 totalMinReceiveQuantity; // Total minimum quantity of token to receive back\n uint256 preTradeSendTokenBalance; // Total initial balance of token being sold\n uint256 preTradeReceiveTokenBalance; // Total initial balance of token being bought\n }\n\n /* ============ Events ============ */\n\n event ComponentExchanged(\n IGarden indexed _garden,\n IStrategy indexed _strategy,\n address indexed _sendToken,\n address _receiveToken,\n string _exchangeName,\n uint256 _totalSendAmount,\n uint256 _totalReceiveAmount\n );\n\n uint24 private constant FEE_LOW = 500;\n uint24 private constant FEE_MEDIUM = 3000;\n uint24 private constant FEE_HIGH = 10000;\n\n /* ============ Constructor ============ */\n\n /**\n * Creates the integration\n *\n * @param _name Name of the integration\n * @param _weth Address of the WETH ERC20\n * @param _controller Address of the controller\n */\n constructor(\n string memory _name,\n address _weth,\n address _controller\n ) BaseIntegration(_name, _weth, _controller) {}\n\n /* ============ External Functions ============ */\n\n /**\n * Executes a trade on a supported DEX.\n * @dev\n *\n * @param _strategy Address of the strategy\n * @param _sendToken Address of the token to be sent to the exchange\n * @param _sendQuantity Units of reserve asset token sent to the exchange\n * @param _receiveToken Address of the token that will be received from the exchange\n * @param _minReceiveQuantity Min units of wanted token to be received from the exchange\n */\n function trade(\n address _strategy,\n address _sendToken,\n uint256 _sendQuantity,\n address _receiveToken,\n uint256 _minReceiveQuantity\n ) external override nonReentrant onlySystemContract {\n TradeInfo memory tradeInfo =\n _createTradeInfo(_strategy, name, _sendToken, _receiveToken, _sendQuantity, _minReceiveQuantity);\n _validatePreTradeData(tradeInfo, _sendQuantity);\n // Get spender address from exchange adapter and invoke approve for exact amount on sendToken\n tradeInfo.strategy.invokeApprove(_getSpender(), tradeInfo.sendToken, tradeInfo.totalSendQuantity);\n (address targetExchange, uint256 callValue, bytes memory methodData) =\n _getTradeCallData(_strategy, tradeInfo.sendToken, tradeInfo.totalSendQuantity, tradeInfo.receiveToken);\n tradeInfo.strategy.invokeFromIntegration(targetExchange, callValue, methodData);\n\n uint256 exchangedQuantity = _validatePostTrade(tradeInfo);\n uint256 newAmountSendTokens = tradeInfo.preTradeSendTokenBalance.sub(tradeInfo.totalSendQuantity);\n uint256 newAmountReceiveTokens = tradeInfo.preTradeReceiveTokenBalance.add(exchangedQuantity);\n emit ComponentExchanged(\n tradeInfo.garden,\n tradeInfo.strategy,\n _sendToken,\n _receiveToken,\n tradeInfo.exchangeName,\n newAmountSendTokens,\n newAmountReceiveTokens\n );\n }\n\n /* ============ Internal Functions ============ */\n\n /**\n * Create and return TradeInfo struct\n *\n * @param _strategy Address of the strategy\n * @param _exchangeName Human readable name of the exchange in the integrations registry\n * @param _sendToken Address of the token to be sent to the exchange\n * @param _receiveToken Address of the token that will be received from the exchange\n * @param _sendQuantity Units of token in SetToken sent to the exchange\n * @param _minReceiveQuantity Min units of token in SetToken to be received from the exchange\n *\n * return TradeInfo Struct containing data for trade\n */\n function _createTradeInfo(\n address _strategy,\n string memory _exchangeName,\n address _sendToken,\n address _receiveToken,\n uint256 _sendQuantity,\n uint256 _minReceiveQuantity\n ) internal view returns (TradeInfo memory) {\n TradeInfo memory tradeInfo;\n\n tradeInfo.strategy = IStrategy(_strategy);\n tradeInfo.garden = tradeInfo.strategy.garden();\n\n tradeInfo.exchangeName = _exchangeName;\n\n tradeInfo.sendToken = _sendToken;\n tradeInfo.receiveToken = _receiveToken;\n\n tradeInfo.gardenTotalSupply = ERC20(address(tradeInfo.strategy.garden())).totalSupply();\n\n tradeInfo.totalSendQuantity = _sendQuantity;\n\n tradeInfo.totalMinReceiveQuantity = _minReceiveQuantity;\n\n tradeInfo.preTradeSendTokenBalance = ERC20(_sendToken).balanceOf(_strategy);\n tradeInfo.preTradeReceiveTokenBalance = ERC20(_receiveToken).balanceOf(_strategy);\n\n return tradeInfo;\n }\n\n /**\n * Validate pre trade data. Check exchange is valid, token quantity is valid.\n *\n * @param _tradeInfo Struct containing trade information used in internal functions\n * @param _sendQuantity Units of token in SetToken sent to the exchange\n */\n function _validatePreTradeData(TradeInfo memory _tradeInfo, uint256 _sendQuantity) internal view {\n require(_tradeInfo.totalSendQuantity > 0, 'Token to sell must be nonzero');\n IUniswapV3Pool _pool = _getUniswapPoolWithMostLiquidity(_tradeInfo);\n\n uint256 minLiquidityReserveAsset = _tradeInfo.garden.minLiquidityAsset();\n uint256 poolLiquidity = uint256(_pool.liquidity());\n uint256 liquidityInReserve;\n\n if (_pool.token0() == _tradeInfo.garden.reserveAsset()) {\n liquidityInReserve = poolLiquidity.mul(poolLiquidity).div(ERC20(_pool.token1()).balanceOf(address(_pool)));\n }\n if (_pool.token1() == _tradeInfo.garden.reserveAsset()) {\n liquidityInReserve = poolLiquidity.mul(poolLiquidity).div(ERC20(_pool.token0()).balanceOf(address(_pool)));\n }\n require(liquidityInReserve >= minLiquidityReserveAsset, 'Not enough liquidity');\n require(\n ERC20(_tradeInfo.sendToken).balanceOf(address(_tradeInfo.strategy)) >= _sendQuantity,\n 'Garden needs to have enough liquid tokens'\n );\n }\n\n function _getUniswapPoolWithMostLiquidity(TradeInfo memory _tradeInfo) internal view returns (IUniswapV3Pool) {\n IUniswapV3Factory factory = IUniswapV3Factory(IBabController(controller).uniswapFactory());\n IUniswapV3Pool poolLow =\n IUniswapV3Pool(factory.getPool(_tradeInfo.sendToken, _tradeInfo.receiveToken, FEE_LOW));\n IUniswapV3Pool poolMedium =\n IUniswapV3Pool(factory.getPool(_tradeInfo.sendToken, _tradeInfo.receiveToken, FEE_MEDIUM));\n IUniswapV3Pool poolHigh =\n IUniswapV3Pool(factory.getPool(_tradeInfo.sendToken, _tradeInfo.receiveToken, FEE_HIGH));\n\n uint128 liquidityLow = poolLow.liquidity();\n uint128 liquidityMedium = poolMedium.liquidity();\n uint128 liquidityHigh = poolHigh.liquidity();\n if (liquidityLow > liquidityMedium && liquidityLow >= liquidityHigh) {\n return poolLow;\n }\n if (liquidityMedium > liquidityLow && liquidityMedium >= liquidityHigh) {\n return poolMedium;\n }\n return poolHigh;\n }\n\n /**\n * Validate post trade data.\n *\n * @param _tradeInfo Struct containing trade information used in internal functions\n * @return uint256 Total quantity of receive token that was exchanged\n */\n function _validatePostTrade(TradeInfo memory _tradeInfo) internal view returns (uint256) {\n uint256 exchangedQuantity =\n ERC20(_tradeInfo.receiveToken).balanceOf(address(_tradeInfo.strategy)).sub(\n _tradeInfo.preTradeReceiveTokenBalance\n );\n // Get reserve asset decimals\n uint8 tokenDecimals = ERC20(_tradeInfo.receiveToken).decimals();\n uint256 normalizedExchangedQuantity =\n tokenDecimals != 18 ? exchangedQuantity.mul(10**(18 - tokenDecimals)) : exchangedQuantity;\n require(normalizedExchangedQuantity >= _tradeInfo.totalMinReceiveQuantity, 'Slippage greater than allowed');\n\n return normalizedExchangedQuantity;\n }\n\n /**\n * Return exchange calldata which is already generated from the exchange API\n *\n * hparam _strategy Address of the strategy\n * hparam _sendToken Address of the token to be sent to the exchange\n * hparam _sendQuantity Units of reserve asset token sent to the exchange\n * hparam _receiveToken Address of the token that will be received from the exchange\n *\n * @return address Target contract address\n * @return uint256 Call value\n * @return bytes Trade calldata\n */\n function _getTradeCallData(\n address, /* _strategy */\n address, /* _sendToken */\n uint256, /*_sendQuantity */\n address /* _receiveToken */\n )\n internal\n view\n virtual\n returns (\n address,\n uint256,\n bytes memory\n );\n\n /**\n * Returns the address to approve source tokens to for trading. This is the TokenTaker address\n *\n * @return address Address of the contract to approve tokens to\n */\n function _getSpender() internal view virtual returns (address);\n}\n" + }, + "contracts/integrations/trade/OneInchTradeIntegration.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {IOneInchExchange} from '../../interfaces/external/1inch/IOneInchExchange.sol';\nimport {TradeIntegration} from './TradeIntegration.sol';\n\n/**\n * @title 1InchTradeIntegration\n * @author Babylon Finance Protocol\n *\n * 1Inch protocol trade integration\n */\ncontract OneInchTradeIntegration is TradeIntegration {\n using SafeMath for uint256;\n\n /* ============ Modifiers ============ */\n\n /**\n * Throws if the sender is not the protocol\n */\n modifier onlyProtocol() {\n require(msg.sender == controller, 'Only controller can call this');\n _;\n }\n\n /* ============ State Variables ============ */\n\n // Address of 1Inch exchange address\n address public oneInchExchangeAddress;\n\n /* ============ Constructor ============ */\n\n /**\n * Creates the integration\n *\n * @param _weth Address of the WETH ERC20\n * @param _controller Address of the controller\n * @param _oneInchExchangeAddress Address of 1inch exchange contract\n */\n constructor(\n address _controller,\n address _weth,\n address _oneInchExchangeAddress\n ) TradeIntegration('1inch', _weth, _controller) {\n oneInchExchangeAddress = _oneInchExchangeAddress;\n }\n\n /* ============ External Functions ============ */\n /**\n * Returns the conversion rate between the source token and the destination token\n * in 18 decimals, regardless of component token's decimals\n *\n * hparam _sourceToken Address of source token to be sold\n * hparam _destinationToken Address of destination token to buy\n * hparam _sourceQuantity Amount of source token to sell\n *\n * @return uint256 Conversion rate in wei\n * @return uint256 Slippage rate in wei\n */\n function getConversionRates(\n address,\n address,\n uint256\n ) external pure override returns (uint256, uint256) {\n revert('not implemented');\n return (0, 0);\n }\n\n function updateExchangeAddress(address _newExchangeAddress) public onlyProtocol {\n oneInchExchangeAddress = _newExchangeAddress;\n }\n\n /* ============ Internal Functions ============ */\n\n /**\n * Executes the trade through 1Inch.\n *\n * hparam _strategy Address of the strategy\n * @param _sendToken Address of the token to be sent to the exchange\n * @param _sendQuantity Units of reserve asset token sent to the exchange\n * @param _receiveToken Address of the token that will be received from the exchange\n */\n function _getTradeCallData(\n address, /*_strategy*/\n address _sendToken,\n uint256 _sendQuantity,\n address _receiveToken\n )\n internal\n view\n override\n returns (\n address,\n uint256,\n bytes memory\n )\n {\n (uint256 _returnAmount, uint256[] memory _distribution) =\n IOneInchExchange(oneInchExchangeAddress).getExpectedReturn(_sendToken, _receiveToken, _sendQuantity, 1, 0);\n\n bytes memory methodData =\n abi.encodeWithSignature(\n 'swap(address,address,uint256,uint256,uint256[],uint256)',\n _sendToken,\n _receiveToken,\n _sendQuantity,\n _returnAmount,\n _distribution,\n 0\n );\n return (oneInchExchangeAddress, 0, methodData);\n }\n\n /**\n * Returns the address to approve source tokens to for trading. This is the TokenTaker address\n *\n * @return address Address of the contract to approve tokens to\n */\n function _getSpender() internal view override returns (address) {\n return oneInchExchangeAddress;\n }\n}\n" + }, + "contracts/interfaces/external/1inch/IOneInchExchange.sol": { + "content": "pragma solidity >=0.7.0 <0.9.0;\n\ninterface IOneInchExchange {\n function swap(\n address fromToken,\n address destToken,\n uint256 amount,\n uint256 minReturn,\n uint256[] memory distribution,\n uint256 flags\n ) external payable returns (uint256);\n\n function getExpectedReturn(\n address fromToken,\n address destToken,\n uint256 amount,\n uint256 parts,\n uint256 flags\n ) external view returns (uint256 returnAmount, uint256[] memory distribution);\n}\n" + }, + "contracts/integrations/lend/AaveLendIntegration.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\n\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol';\n\nimport {AaveToken} from '../../interfaces/external/aave/AaveToken.sol';\nimport {ILendingPool} from '../../interfaces/external/aave/ILendingPool.sol';\nimport {ILendingPoolAddressesProvider} from '../../interfaces/external/aave/ILendingPoolAddressesProvider.sol';\nimport {IProtocolDataProvider} from '../../interfaces/external/aave/IProtocolDataProvider.sol';\n\nimport {IGarden} from '../../interfaces/IGarden.sol';\nimport {IStrategy} from '../../interfaces/IStrategy.sol';\nimport {IBabController} from '../../interfaces/IBabController.sol';\nimport {LendIntegration} from './LendIntegration.sol';\n\n/**\n * @title AaveLendIntegration\n * @author Babylon Finance Protocol\n *\n * Aave lend integration.\n */\ncontract AaveLendIntegration is LendIntegration {\n using SafeMath for uint256;\n using SafeCast for uint256;\n\n /* ============ Constant ============ */\n\n ILendingPool constant lendingPool = ILendingPool(address(0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9)); // Mainnet\n IProtocolDataProvider constant dataProvider =\n IProtocolDataProvider(address(0x057835Ad21a177dbdd3090bB1CAE03EaCF78Fc6d)); // Mainnet\n\n /* ============ Struct ============ */\n\n /* ============ Events ============ */\n\n /* ============ Constructor ============ */\n\n /**\n * Creates the integration\n *\n * @param _weth Address of the WETH ERC20\n * @param _controller Address of the controller\n */\n constructor(address _controller, address _weth) LendIntegration('aavelend', _weth, _controller) {}\n\n /* ============ External Functions ============ */\n\n /* ============ Internal Functions ============ */\n\n function _isInvestment(address _assetToken) internal view override returns (bool) {\n (address aTokenAddress, , ) = dataProvider.getReserveTokensAddresses(_assetToken);\n return aTokenAddress != address(0);\n }\n\n function _getExpectedShares(\n address, /* _assetToken */\n uint256 _numTokensToSupply\n ) internal pure override returns (uint256) {\n // love it 😍\n return _numTokensToSupply;\n }\n\n function _getExchangeRatePerToken(\n address /* _assetToken */\n ) internal pure override returns (uint256) {\n // love it 😍\n return 1;\n }\n\n /**\n * Returns calldata for supplying tokens.\n *\n * @return address Target contract address\n * @return uint256 Call value\n * @return bytes Trade calldata\n */\n function _getSupplyCalldata(\n address _strategy,\n address _assetToken,\n uint256 _numTokensToSupply\n )\n internal\n pure\n override\n returns (\n address,\n uint256,\n bytes memory\n )\n {\n // Encode method data for Garden to invoke\n bytes memory methodData =\n abi.encodeWithSignature(\n 'deposit(address,uint256,address,uint16)',\n _assetToken,\n _numTokensToSupply,\n _strategy,\n 0\n );\n return (address(lendingPool), 0, methodData);\n }\n\n /**\n * Returns calldata for redeeming the collateral\n *\n * @return address Target contract address\n * @return uint256 Call value\n * @return bytes Trade calldata\n */\n function _getRedeemCalldata(\n address _strategy,\n address _assetToken,\n uint256 _numTokensToSupply\n )\n internal\n pure\n override\n returns (\n address,\n uint256,\n bytes memory\n )\n {\n // Encode method data for Garden to invoke\n bytes memory methodData =\n abi.encodeWithSignature('withdraw(address,uint256,address)', _assetToken, _numTokensToSupply, _strategy);\n return (address(lendingPool), 0, methodData);\n }\n\n function _getSpender(\n address /* _investmentAddress */\n ) internal pure override returns (address) {\n return address(lendingPool);\n }\n\n function _getInvestmentToken(address _assetToken) internal view override returns (address) {\n (address aTokenAddress, , ) = dataProvider.getReserveTokensAddresses(_assetToken);\n return aTokenAddress;\n }\n}\n" + }, + "contracts/interfaces/external/aave/AaveToken.sol": { + "content": "pragma solidity >=0.7.0 <0.9.0;\n\ninterface AaveToken {\n function underlyingAssetAddress() external view returns (address);\n}\n" + }, + "contracts/interfaces/external/aave/ILendingPool.sol": { + "content": "// SPDX-License-Identifier: agpl-3.0\npragma solidity >=0.7.0 <0.9.0;\npragma experimental ABIEncoderV2;\n\nimport {ILendingPoolAddressesProvider} from './ILendingPoolAddressesProvider.sol';\nimport {DataTypes} from './DataTypes.sol';\n\ninterface ILendingPool {\n /**\n * @dev Emitted on deposit()\n * @param reserve The address of the underlying asset of the reserve\n * @param user The address initiating the deposit\n * @param onBehalfOf The beneficiary of the deposit, receiving the aTokens\n * @param amount The amount deposited\n * @param referral The referral code used\n **/\n event Deposit(\n address indexed reserve,\n address user,\n address indexed onBehalfOf,\n uint256 amount,\n uint16 indexed referral\n );\n\n /**\n * @dev Emitted on withdraw()\n * @param reserve The address of the underlyng asset being withdrawn\n * @param user The address initiating the withdrawal, owner of aTokens\n * @param to Address that will receive the underlying\n * @param amount The amount to be withdrawn\n **/\n event Withdraw(address indexed reserve, address indexed user, address indexed to, uint256 amount);\n\n /**\n * @dev Emitted on borrow() and flashLoan() when debt needs to be opened\n * @param reserve The address of the underlying asset being borrowed\n * @param user The address of the user initiating the borrow(), receiving the gardens on borrow() or just\n * initiator of the transaction on flashLoan()\n * @param onBehalfOf The address that will be getting the debt\n * @param amount The amount borrowed out\n * @param borrowRateMode The rate mode: 1 for Stable, 2 for Variable\n * @param borrowRate The numeric rate at which the user has borrowed\n * @param referral The referral code used\n **/\n event Borrow(\n address indexed reserve,\n address user,\n address indexed onBehalfOf,\n uint256 amount,\n uint256 borrowRateMode,\n uint256 borrowRate,\n uint16 indexed referral\n );\n\n /**\n * @dev Emitted on repay()\n * @param reserve The address of the underlying asset of the reserve\n * @param user The beneficiary of the repayment, getting his debt reduced\n * @param repayer The address of the user initiating the repay(), providing the gardens\n * @param amount The amount repaid\n **/\n event Repay(address indexed reserve, address indexed user, address indexed repayer, uint256 amount);\n\n /**\n * @dev Emitted on swapBorrowRateMode()\n * @param reserve The address of the underlying asset of the reserve\n * @param user The address of the user swapping his rate mode\n * @param rateMode The rate mode that the user wants to swap to\n **/\n event Swap(address indexed reserve, address indexed user, uint256 rateMode);\n\n /**\n * @dev Emitted on setUserUseReserveAsCollateral()\n * @param reserve The address of the underlying asset of the reserve\n * @param user The address of the user enabling the usage as collateral\n **/\n event ReserveUsedAsCollateralEnabled(address indexed reserve, address indexed user);\n\n /**\n * @dev Emitted on setUserUseReserveAsCollateral()\n * @param reserve The address of the underlying asset of the reserve\n * @param user The address of the user enabling the usage as collateral\n **/\n event ReserveUsedAsCollateralDisabled(address indexed reserve, address indexed user);\n\n /**\n * @dev Emitted on rebalanceStableBorrowRate()\n * @param reserve The address of the underlying asset of the reserve\n * @param user The address of the user for which the rebalance has been executed\n **/\n event RebalanceStableBorrowRate(address indexed reserve, address indexed user);\n\n /**\n * @dev Emitted on flashLoan()\n * @param target The address of the flash loan receiver contract\n * @param initiator The address initiating the flash loan\n * @param asset The address of the asset being flash borrowed\n * @param amount The amount flash borrowed\n * @param premium The fee flash borrowed\n * @param referralCode The referral code used\n **/\n event FlashLoan(\n address indexed target,\n address indexed initiator,\n address indexed asset,\n uint256 amount,\n uint256 premium,\n uint16 referralCode\n );\n\n /**\n * @dev Emitted when the pause is triggered.\n */\n event Paused();\n\n /**\n * @dev Emitted when the pause is lifted.\n */\n event Unpaused();\n\n /**\n * @dev Emitted when a borrower is liquidated. This event is emitted by the LendingPool via\n * LendingPoolCollateral manager using a DELEGATECALL\n * This allows to have the events in the generated ABI for LendingPool.\n * @param collateralAsset The address of the underlying asset used as collateral, to receive as result of the liquidation\n * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation\n * @param user The address of the borrower getting liquidated\n * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover\n * @param liquidatedCollateralAmount The amount of collateral received by the liiquidator\n * @param liquidator The address of the liquidator\n * @param receiveAToken `true` if the liquidators wants to receive the collateral aTokens, `false` if he wants\n * to receive the underlying collateral asset directly\n **/\n event LiquidationCall(\n address indexed collateralAsset,\n address indexed debtAsset,\n address indexed user,\n uint256 debtToCover,\n uint256 liquidatedCollateralAmount,\n address liquidator,\n bool receiveAToken\n );\n\n /**\n * @dev Emitted when the state of a reserve is updated. NOTE: This event is actually declared\n * in the ReserveLogic library and emitted in the updateInterestRates() function. Since the function is internal,\n * the event will actually be fired by the LendingPool contract. The event is therefore replicated here so it\n * gets added to the LendingPool ABI\n * @param reserve The address of the underlying asset of the reserve\n * @param liquidityRate The new liquidity rate\n * @param stableBorrowRate The new stable borrow rate\n * @param variableBorrowRate The new variable borrow rate\n * @param liquidityIndex The new liquidity index\n * @param variableBorrowIndex The new variable borrow index\n **/\n event ReserveDataUpdated(\n address indexed reserve,\n uint256 liquidityRate,\n uint256 stableBorrowRate,\n uint256 variableBorrowRate,\n uint256 liquidityIndex,\n uint256 variableBorrowIndex\n );\n\n /**\n * @dev Deposits an `amount` of underlying asset into the reserve, receiving in return overlying aTokens.\n * - E.g. User deposits 100 USDC and gets in return 100 aUSDC\n * @param asset The address of the underlying asset to deposit\n * @param amount The amount to be deposited\n * @param onBehalfOf The address that will receive the aTokens, same as msg.sender if the user\n * wants to receive them on his own wallet, or a different address if the beneficiary of aTokens\n * is a different wallet\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\n * 0 if the action is executed directly by the user, without any middle-man\n **/\n function deposit(\n address asset,\n uint256 amount,\n address onBehalfOf,\n uint16 referralCode\n ) external;\n\n /**\n * @dev Withdraws an `amount` of underlying asset from the reserve, burning the equivalent aTokens owned\n * E.g. User has 100 aUSDC, calls withdraw() and receives 100 USDC, burning the 100 aUSDC\n * @param asset The address of the underlying asset to withdraw\n * @param amount The underlying amount to be withdrawn\n * - Send the value type(uint256).max in order to withdraw the whole aToken balance\n * @param to Address that will receive the underlying, same as msg.sender if the user\n * wants to receive it on his own wallet, or a different address if the beneficiary is a\n * different wallet\n * @return The final amount withdrawn\n **/\n function withdraw(\n address asset,\n uint256 amount,\n address to\n ) external returns (uint256);\n\n /**\n * @dev Allows users to borrow a specific `amount` of the reserve underlying asset, provided that the borrower\n * already deposited enough collateral, or he was given enough allowance by a credit delegator on the\n * corresponding debt token (StableDebtToken or VariableDebtToken)\n * - E.g. User borrows 100 USDC passing as `onBehalfOf` his own address, receiving the 100 USDC in his wallet\n * and 100 stable/variable debt tokens, depending on the `interestRateMode`\n * @param asset The address of the underlying asset to borrow\n * @param amount The amount to be borrowed\n * @param interestRateMode The interest rate mode at which the user wants to borrow: 1 for Stable, 2 for Variable\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\n * 0 if the action is executed directly by the user, without any middle-man\n * @param onBehalfOf Address of the user who will receive the debt. Should be the address of the borrower itself\n * calling the function if he wants to borrow against his own collateral, or the address of the credit delegator\n * if he has been given credit delegation allowance\n **/\n function borrow(\n address asset,\n uint256 amount,\n uint256 interestRateMode,\n uint16 referralCode,\n address onBehalfOf\n ) external;\n\n /**\n * @notice Repays a borrowed `amount` on a specific reserve, burning the equivalent debt tokens owned\n * - E.g. User repays 100 USDC, burning 100 variable/stable debt tokens of the `onBehalfOf` address\n * @param asset The address of the borrowed underlying asset previously borrowed\n * @param amount The amount to repay\n * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode`\n * @param rateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable\n * @param onBehalfOf Address of the user who will get his debt reduced/removed. Should be the address of the\n * user calling the function if he wants to reduce/remove his own debt, or the address of any other\n * other borrower whose debt should be removed\n * @return The final amount repaid\n **/\n function repay(\n address asset,\n uint256 amount,\n uint256 rateMode,\n address onBehalfOf\n ) external returns (uint256);\n\n /**\n * @dev Allows a borrower to swap his debt between stable and variable mode, or viceversa\n * @param asset The address of the underlying asset borrowed\n * @param rateMode The rate mode that the user wants to swap to\n **/\n function swapBorrowRateMode(address asset, uint256 rateMode) external;\n\n /**\n * @dev Rebalances the stable interest rate of a user to the current stable rate defined on the reserve.\n * - Users can be rebalanced if the following conditions are satisfied:\n * 1. Usage ratio is above 95%\n * 2. the current deposit APY is below REBALANCE_UP_THRESHOLD * maxVariableBorrowRate, which means that too much has been\n * borrowed at a stable rate and depositors are not earning enough\n * @param asset The address of the underlying asset borrowed\n * @param user The address of the user to be rebalanced\n **/\n function rebalanceStableBorrowRate(address asset, address user) external;\n\n /**\n * @dev Allows depositors to enable/disable a specific deposited asset as collateral\n * @param asset The address of the underlying asset deposited\n * @param useAsCollateral `true` if the user wants to use the deposit as collateral, `false` otherwise\n **/\n function setUserUseReserveAsCollateral(address asset, bool useAsCollateral) external;\n\n /**\n * @dev Function to liquidate a non-healthy position collateral-wise, with Health Factor below 1\n * - The caller (liquidator) covers `debtToCover` amount of debt of the user getting liquidated, and receives\n * a proportionally amount of the `collateralAsset` plus a bonus to cover market risk\n * @param collateralAsset The address of the underlying asset used as collateral, to receive as result of the liquidation\n * @param debtAsset The address of the underlying borrowed asset to be repaid with the liquidation\n * @param user The address of the borrower getting liquidated\n * @param debtToCover The debt amount of borrowed `asset` the liquidator wants to cover\n * @param receiveAToken `true` if the liquidators wants to receive the collateral aTokens, `false` if he wants\n * to receive the underlying collateral asset directly\n **/\n function liquidationCall(\n address collateralAsset,\n address debtAsset,\n address user,\n uint256 debtToCover,\n bool receiveAToken\n ) external;\n\n /**\n * @dev Allows smartcontracts to access the liquidity of the pool within one transaction,\n * as long as the amount taken plus a fee is returned.\n * IMPORTANT There are security concerns for developers of flashloan receiver contracts that must be kept into consideration.\n * For further details please visit https://developers.aave.com\n * @param receiverAddress The address of the contract receiving the gardens, implementing the IFlashLoanReceiver interface\n * @param assets The addresses of the assets being flash-borrowed\n * @param amounts The amounts amounts being flash-borrowed\n * @param modes Types of the debt to open if the flash loan is not returned:\n * 0 -> Don't open any debt, just revert if gardens can't be transferred from the receiver\n * 1 -> Open debt at stable rate for the value of the amount flash-borrowed to the `onBehalfOf` address\n * 2 -> Open debt at variable rate for the value of the amount flash-borrowed to the `onBehalfOf` address\n * @param onBehalfOf The address that will receive the debt in the case of using on `modes` 1 or 2\n * @param params Variadic packed params to pass to the receiver as extra information\n * @param referralCode Code used to register the integrator originating the operation, for potential rewards.\n * 0 if the action is executed directly by the user, without any middle-man\n **/\n function flashLoan(\n address receiverAddress,\n address[] calldata assets,\n uint256[] calldata amounts,\n uint256[] calldata modes,\n address onBehalfOf,\n bytes calldata params,\n uint16 referralCode\n ) external;\n\n /**\n * @dev Returns the user account data across all the reserves\n * @param user The address of the user\n * @return totalCollateralETH the total collateral in ETH of the user\n * @return totalDebtETH the total debt in ETH of the user\n * @return availableBorrowsETH the borrowing power left of the user\n * @return currentLiquidationThreshold the liquidation threshold of the user\n * @return ltv the loan to value of the user\n * @return healthFactor the current health factor of the user\n **/\n function getUserAccountData(address user)\n external\n view\n returns (\n uint256 totalCollateralETH,\n uint256 totalDebtETH,\n uint256 availableBorrowsETH,\n uint256 currentLiquidationThreshold,\n uint256 ltv,\n uint256 healthFactor\n );\n\n function initReserve(\n address reserve,\n address aTokenAddress,\n address stableDebtAddress,\n address variableDebtAddress,\n address interestRateStrategyAddress\n ) external;\n\n function setReserveInterestRateStrategyAddress(address reserve, address rateStrategyAddress) external;\n\n function setConfiguration(address reserve, uint256 configuration) external;\n\n /**\n * @dev Returns the configuration of the reserve\n * @param asset The address of the underlying asset of the reserve\n * @return The configuration of the reserve\n **/\n function getConfiguration(address asset) external view returns (DataTypes.ReserveConfigurationMap memory);\n\n /**\n * @dev Returns the configuration of the user across all the reserves\n * @param user The user address\n * @return The configuration of the user\n **/\n function getUserConfiguration(address user) external view returns (DataTypes.UserConfigurationMap memory);\n\n /**\n * @dev Returns the normalized income normalized income of the reserve\n * @param asset The address of the underlying asset of the reserve\n * @return The reserve's normalized income\n */\n function getReserveNormalizedIncome(address asset) external view returns (uint256);\n\n /**\n * @dev Returns the normalized variable debt per unit of asset\n * @param asset The address of the underlying asset of the reserve\n * @return The reserve normalized variable debt\n */\n function getReserveNormalizedVariableDebt(address asset) external view returns (uint256);\n\n /**\n * @dev Returns the state and configuration of the reserve\n * @param asset The address of the underlying asset of the reserve\n * @return The state of the reserve\n **/\n function getReserveData(address asset) external view returns (DataTypes.ReserveData memory);\n\n function finalizeTransfer(\n address asset,\n address from,\n address to,\n uint256 amount,\n uint256 balanceFromAfter,\n uint256 balanceToBefore\n ) external;\n\n function getReservesList() external view returns (address[] memory);\n\n function getAddressesProvider() external view returns (ILendingPoolAddressesProvider);\n\n function setPause(bool val) external;\n\n function paused() external view returns (bool);\n}\n" + }, + "contracts/interfaces/external/aave/ILendingPoolAddressesProvider.sol": { + "content": "// SPDX-License-Identifier: agpl-3.0\npragma solidity >=0.7.0 <0.9.0;\n\n/**\n * @title LendingPoolAddressesProvider contract\n * @dev Main registry of addresses part of or connected to the protocol, including permissioned roles\n * - Acting also as factory of proxies and admin of those, so with right to change its implementations\n * - Owned by the Aave Governance\n * @author Aave\n **/\ninterface ILendingPoolAddressesProvider {\n event MarketIdSet(string newMarketId);\n event LendingPoolUpdated(address indexed newAddress);\n event ConfigurationAdminUpdated(address indexed newAddress);\n event EmergencyAdminUpdated(address indexed newAddress);\n event LendingPoolConfiguratorUpdated(address indexed newAddress);\n event LendingPoolCollateralManagerUpdated(address indexed newAddress);\n event PriceOracleUpdated(address indexed newAddress);\n event LendingRateOracleUpdated(address indexed newAddress);\n event ProxyCreated(bytes32 id, address indexed newAddress);\n event AddressSet(bytes32 id, address indexed newAddress, bool hasProxy);\n\n function getMarketId() external view returns (string memory);\n\n function setMarketId(string calldata marketId) external;\n\n function setAddress(bytes32 id, address newAddress) external;\n\n function setAddressAsProxy(bytes32 id, address impl) external;\n\n function getAddress(bytes32 id) external view returns (address);\n\n function getLendingPool() external view returns (address);\n\n function setLendingPoolImpl(address pool) external;\n\n function getLendingPoolConfigurator() external view returns (address);\n\n function setLendingPoolConfiguratorImpl(address configurator) external;\n\n function getLendingPoolCollateralManager() external view returns (address);\n\n function setLendingPoolCollateralManager(address manager) external;\n\n function getPoolAdmin() external view returns (address);\n\n function setPoolAdmin(address admin) external;\n\n function getEmergencyAdmin() external view returns (address);\n\n function setEmergencyAdmin(address admin) external;\n\n function getPriceOracle() external view returns (address);\n\n function setPriceOracle(address priceOracle) external;\n\n function getLendingRateOracle() external view returns (address);\n\n function setLendingRateOracle(address lendingRateOracle) external;\n}\n" + }, + "contracts/interfaces/external/aave/IProtocolDataProvider.sol": { + "content": "// SPDX-License-Identifier: agpl-3.0\npragma solidity >=0.7.0 <0.9.0;\npragma experimental ABIEncoderV2;\n\nimport {ILendingPoolAddressesProvider} from './ILendingPoolAddressesProvider.sol';\n\ninterface IProtocolDataProvider {\n struct TokenData {\n string symbol;\n address tokenAddress;\n }\n\n function ADDRESSES_PROVIDER() external view returns (ILendingPoolAddressesProvider);\n\n function getAllReservesTokens() external view returns (TokenData[] memory);\n\n function getAllATokens() external view returns (TokenData[] memory);\n\n function getReserveConfigurationData(address asset)\n external\n view\n returns (\n uint256 decimals,\n uint256 ltv,\n uint256 liquidationThreshold,\n uint256 liquidationBonus,\n uint256 reserveFactor,\n bool usageAsCollateralEnabled,\n bool borrowingEnabled,\n bool stableBorrowRateEnabled,\n bool isActive,\n bool isFrozen\n );\n\n function getReserveData(address asset)\n external\n view\n returns (\n uint256 availableLiquidity,\n uint256 totalStableDebt,\n uint256 totalVariableDebt,\n uint256 liquidityRate,\n uint256 variableBorrowRate,\n uint256 stableBorrowRate,\n uint256 averageStableBorrowRate,\n uint256 liquidityIndex,\n uint256 variableBorrowIndex,\n uint40 lastUpdateTimestamp\n );\n\n function getUserReserveData(address asset, address user)\n external\n view\n returns (\n uint256 currentATokenBalance,\n uint256 currentStableDebt,\n uint256 currentVariableDebt,\n uint256 principalStableDebt,\n uint256 scaledVariableDebt,\n uint256 stableBorrowRate,\n uint256 liquidityRate,\n uint40 stableRateLastUpdated,\n bool usageAsCollateralEnabled\n );\n\n function getReserveTokensAddresses(address asset)\n external\n view\n returns (\n address aTokenAddress,\n address stableDebtTokenAddress,\n address variableDebtTokenAddress\n );\n}\n" + }, + "contracts/interfaces/external/aave/DataTypes.sol": { + "content": "// SPDX-License-Identifier: agpl-3.0\npragma solidity >=0.7.0 <0.9.0;\n\nlibrary DataTypes {\n // refer to the whitepaper, section 1.1 basic concepts for a formal description of these properties.\n struct ReserveData {\n //stores the reserve configuration\n ReserveConfigurationMap configuration;\n //the liquidity index. Expressed in ray\n uint128 liquidityIndex;\n //variable borrow index. Expressed in ray\n uint128 variableBorrowIndex;\n //the current supply rate. Expressed in ray\n uint128 currentLiquidityRate;\n //the current variable borrow rate. Expressed in ray\n uint128 currentVariableBorrowRate;\n //the current stable borrow rate. Expressed in ray\n uint128 currentStableBorrowRate;\n uint40 lastUpdateTimestamp;\n //tokens addresses\n address aTokenAddress;\n address stableDebtTokenAddress;\n address variableDebtTokenAddress;\n //address of the interest rate strategy\n address interestRateStrategyAddress;\n //the id of the reserve. Represents the position in the list of the active reserves\n uint8 id;\n }\n\n struct ReserveConfigurationMap {\n //bit 0-15: LTV\n //bit 16-31: Liq. threshold\n //bit 32-47: Liq. bonus\n //bit 48-55: Decimals\n //bit 56: Reserve is active\n //bit 57: reserve is frozen\n //bit 58: borrowing is enabled\n //bit 59: stable rate borrowing enabled\n //bit 60-63: reserved\n //bit 64-79: reserve factor\n uint256 data;\n }\n\n struct UserConfigurationMap {\n uint256 data;\n }\n\n enum InterestRateMode {NONE, STABLE, VARIABLE}\n}\n" + }, + "contracts/GardenValuer.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\nimport {SafeCast} from '@openzeppelin/contracts/utils/SafeCast.sol';\nimport {SignedSafeMath} from '@openzeppelin/contracts/math/SignedSafeMath.sol';\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\n\nimport {IBabController} from './interfaces/IBabController.sol';\nimport {IGarden} from './interfaces/IGarden.sol';\nimport {IStrategy} from './interfaces/IStrategy.sol';\nimport {IPriceOracle} from './interfaces/IPriceOracle.sol';\nimport {PreciseUnitMath} from './lib/PreciseUnitMath.sol';\n\n/**\n * @title GardenValuer\n * @author Babylon Finance\n *\n * Contract that returns the valuation of a Garden using price oracle data used in contracts\n * that are external to the system.\n *\n * Note: Prices are returned in preciseUnits (i.e. 18 decimals of precision)\n */\ncontract GardenValuer {\n using PreciseUnitMath for int256;\n using PreciseUnitMath for uint256;\n using SafeCast for int256;\n using SafeCast for uint256;\n using SignedSafeMath for int256;\n using SafeMath for uint256;\n\n /* ============ State Variables ============ */\n\n // Instance of the Controller contract\n address public controller;\n\n address private constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\n\n /* ============ Constructor ============ */\n\n /**\n * Set state variables and map asset pairs to their oracles\n *\n * @param _controller Address of controller contract\n */\n constructor(address _controller) {\n controller = _controller;\n }\n\n /* ============ External Functions ============ */\n\n /**\n * Gets the valuation of a Garden using data from the price oracle.\n * Adds all the active strategies plus the reserve asset and ETH.\n * Note: this works for external\n * positions and negative (debt) positions.\n *\n * Note: There is a risk that the valuation is off if airdrops aren't retrieved\n *\n * @param _garden Garden instance to get valuation\n * @param _quoteAsset Quote asset for the valuation\n *\n * @return Token valuation in terms of quote asset in precise units 1e18\n */\n function calculateGardenValuation(address _garden, address _quoteAsset) external view returns (uint256) {\n IPriceOracle priceOracle = IPriceOracle(IBabController(controller).priceOracle());\n address reserveAsset = IGarden(_garden).reserveAsset();\n\n // uint8 reserveAssetDecimals = ERC20(reserveAsset).decimals();\n uint8 quoteAssetDecimals = ERC20(_quoteAsset).decimals();\n\n uint256 reservePrice;\n // Get price of the reserveAsset in _quoteAsset\n if (reserveAsset == _quoteAsset) {\n // meaning 1 reserveAsset equals to 1 _quoteAsset\n reservePrice = 1 ether;\n } else {\n reservePrice = priceOracle.getPrice(reserveAsset, _quoteAsset);\n }\n\n uint256 wethPrice;\n // Get price of the WETH in _quoteAsset\n if (_quoteAsset == WETH) {\n // meaning 1 WETH equals to 1 _quoteAsset\n // this line looks ironic. 10/10.\n wethPrice = 1 ether;\n } else {\n wethPrice = priceOracle.getPrice(WETH, _quoteAsset);\n }\n\n address[] memory strategies = IGarden(_garden).getStrategies();\n uint256 valuation;\n for (uint256 j = 0; j < strategies.length; j++) {\n IStrategy strategy = IStrategy(strategies[j]);\n // strategies return their valuation in garden's reserveAsset\n valuation = valuation.add(strategy.getNAV());\n }\n\n // Add strategy reserve assets and garden's reserve asset\n valuation = valuation.add(ERC20(reserveAsset).balanceOf(address(_garden)));\n\n // Get the valuation in terms of the quote asset\n valuation = valuation.preciseMul(reservePrice);\n\n // Adds ETH of garden in _quoteAsset prices\n valuation = valuation.add(address(_garden).balance.preciseMul(wethPrice));\n\n if (quoteAssetDecimals < 18) {\n valuation = valuation.mul(10**(18 - quoteAssetDecimals));\n }\n\n return valuation.preciseDiv(ERC20(_garden).totalSupply());\n }\n}\n" + }, + "contracts/integrations/trade/KyberTradeIntegration.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\nimport {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol';\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {TradeIntegration} from './TradeIntegration.sol';\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\nimport {IKyberNetworkProxy} from '../../interfaces/external/kyber/IKyberNetworkProxy.sol';\n\n/**\n * @title KyberTradeIntegration\n * @author Babylon Finance Protocol\n *\n * Kyber protocol trade integration\n */\ncontract KyberTradeIntegration is TradeIntegration {\n using SafeMath for uint256;\n using PreciseUnitMath for uint256;\n\n /* ============ State Variables ============ */\n\n // Address of Kyber Network Proxy\n address public kyberNetworkProxyAddress;\n\n /* ============ Constructor ============ */\n\n /**\n * Creates the integration\n *\n * @param _controller Address of the controller\n * @param _weth Address of the WETH ERC20\n * @param _kyberNetworkProxyAddress Address of Kyber Network Proxy contract\n */\n constructor(\n address _controller,\n address _weth,\n address _kyberNetworkProxyAddress\n ) TradeIntegration('kyber', _weth, _controller) {\n kyberNetworkProxyAddress = _kyberNetworkProxyAddress;\n }\n\n /* ============ External Functions ============ */\n\n /**\n * Returns the conversion rate between the source token and the destination token\n * in 18 decimals, regardless of component token's decimals\n *\n * @param _sourceToken Address of source token to be sold\n * @param _destinationToken Address of destination token to buy\n * @param _sourceQuantity Amount of source token to sell\n *\n * @return uint256 Conversion rate in wei\n * @return uint256 Slippage rate in wei\n */\n function getConversionRates(\n address _sourceToken,\n address _destinationToken,\n uint256 _sourceQuantity\n ) external view override returns (uint256, uint256) {\n // Get Kyber expectedRate to trade with\n return\n IKyberNetworkProxy(kyberNetworkProxyAddress).getExpectedRate(\n _sourceToken,\n _destinationToken,\n _sourceQuantity\n );\n }\n\n /* ============ Internal Functions ============ */\n\n /**\n * Get calldata through Kyber.\n *\n * @param _strategy Address of the strategy\n * @param _sendToken Address of the token to be sent to the exchange\n * @param _sendQuantity Units of reserve asset token sent to the exchange\n * @param _receiveToken Address of the token that will be received from the exchange\n */\n function _getTradeCallData(\n address _strategy,\n address _sendToken,\n uint256 _sendQuantity,\n address _receiveToken\n )\n internal\n view\n override\n returns (\n address,\n uint256,\n bytes memory\n )\n {\n // this has 3 percent slippage and doesn't account for the platform fee\n (, uint256 worstRate) =\n IKyberNetworkProxy(kyberNetworkProxyAddress).getExpectedRate(_sendToken, _receiveToken, _sendQuantity);\n\n // Encode method data for TradeIntegration to invoke\n bytes memory methodData =\n abi.encodeWithSignature(\n 'trade(address,uint256,address,address,uint256,uint256,address)',\n _sendToken,\n _sendQuantity,\n _receiveToken,\n _strategy,\n PreciseUnitMath.maxUint256(), // Sell entire amount of sourceToken\n worstRate, // Trade with implied conversion rate\n _strategy // Strategy address\n );\n\n return (kyberNetworkProxyAddress, 0, methodData);\n }\n\n /**\n * Returns the address to approve source tokens to for trading. This is the Kyber Network\n * Proxy address\n *\n * @return address Address of the contract to approve tokens to\n */\n function _getSpender() internal view override returns (address) {\n return kyberNetworkProxyAddress;\n }\n}\n" + }, + "contracts/interfaces/external/kyber/IKyberNetworkProxy.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\n\ninterface IKyberNetworkProxy {\n function getExpectedRate(\n address _src,\n address _dest,\n uint256 _srcQty\n ) external view returns (uint256, uint256);\n\n function trade(\n address _src,\n uint256 _srcAmount,\n address _dest,\n address _destAddress,\n uint256 _maxDestAmount,\n uint256 _minConversionRate,\n address _referalFeeAddress\n ) external payable returns (uint256);\n}\n" + }, + "contracts/governance/GovernorAlpha.sol": { + "content": "/*\n Copyright 2021 Babylon Finance.\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\npragma experimental ABIEncoderV2;\n\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\nimport {ITimelock} from '../interfaces/ITimelock.sol';\nimport {IVoteToken} from '../interfaces/IVoteToken.sol';\n\n// TODO: Do a diff to check for changes\ncontract GovernorAlpha is Ownable {\n /* ============ Events ============ */\n\n /// @notice An event emitted when a new proposal is created\n event ProposalCreated(\n uint256 id,\n address proposer,\n address[] targets,\n uint256[] values,\n string[] signatures,\n bytes[] calldatas,\n uint256 startBlock,\n uint256 endBlock,\n string description\n );\n\n /// @notice An event emitted when a vote has been cast on a proposal\n event VoteCast(address voter, uint256 proposalId, bool support, uint256 votes);\n\n /// @notice An event emitted when a proposal has been canceled\n event ProposalCanceled(uint256 id);\n\n /// @notice An event emitted when a proposal has been queued in the Timelock\n event ProposalQueued(uint256 id, uint256 eta);\n\n /// @notice An event emitted when a proposal has been executed in the Timelock\n event ProposalExecuted(uint256 id);\n\n /* ============ Modifiers ============ */\n\n /* ============ State Variables ============ */\n\n /// @notice The name of this contract\n string public constant name = 'BABL Governor Alpha';\n\n /// @notice The address of the BABL Protocol Timelock\n ITimelock public timelock;\n\n /// @notice The address of the BABL governance token\n IVoteToken public babl;\n\n /// @notice The address of the Governor Guardian\n address public guardian;\n\n /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed\n function quorumVotes() public pure returns (uint256) {\n return 40_000e18;\n } // 4% of BABL\n\n /// @notice The number of votes required in order for a voter to become a proposer\n function proposalThreshold() public pure returns (uint256) {\n return 10_000e18;\n } // 1% of BABL\n\n /// @notice The maximum number of actions that can be included in a proposal\n function proposalMaxOperations() public pure returns (uint256) {\n return 10;\n } // 10 actions\n\n /// @notice The delay before voting on a proposal may take place, once proposed\n function votingDelay() public pure returns (uint256) {\n return 1;\n } // 1 block TODO - CHECK DELAY TO PROPOSE\n\n /// @notice The duration of voting on a proposal, in blocks\n function votingPeriod() public pure returns (uint256) {\n return 7 days;\n } // TODO - CHECK AND AGREE ON THE VOTING PERIOD\n\n /// @notice The total number of proposals\n uint256 public proposalCount;\n\n struct Proposal {\n // @notice Unique id for looking up a proposal\n uint256 id;\n // @notice Creator of the proposal\n address proposer;\n // @notice The timestamp that the proposal will be available for execution, set once the vote succeeds\n uint256 eta;\n // @notice the ordered list of target addresses for calls to be made\n address[] targets;\n // @notice The ordered list of values (i.e. msg.value) to be passed to the calls to be made\n uint256[] values;\n // @notice The ordered list of function signatures to be called\n string[] signatures;\n // @notice The ordered list of calldata to be passed to each call\n bytes[] calldatas;\n // @notice The block at which voting begins: holders must delegate their votes prior to this block\n uint256 startBlock;\n // @notice The block at which voting ends: votes must be cast prior to this block\n uint256 endBlock;\n // @notice Current number of votes in favor of this proposal\n uint256 forVotes;\n // @notice Current number of votes in opposition to this proposal\n uint256 againstVotes;\n // @notice Flag marking whether the proposal has been canceled\n bool canceled;\n // @notice Flag marking whether the proposal has been executed\n bool executed;\n // @notice Receipts of ballots for the entire set of voters\n mapping(address => Receipt) receipts;\n }\n\n /// @notice Ballot receipt record for a voter\n struct Receipt {\n // @notice Whether or not a vote has been cast\n bool hasVoted;\n // @notice Whether or not the voter supports the proposal\n bool support;\n // @notice The number of votes the voter had, which were cast\n uint96 votes;\n }\n\n /// @notice Possible states that a proposal may be in\n enum ProposalState {Pending, Active, Canceled, Defeated, Succeeded, Queued, Expired, Executed}\n\n /// @notice The official record of all proposals ever proposed\n mapping(uint256 => Proposal) public proposals;\n\n /// @notice The latest proposal for each proposer\n mapping(address => uint256) public latestProposalIds;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256('EIP712Domain(string name,uint256 chainId,address verifyingContract)');\n\n /// @notice The EIP-712 typehash for the ballot struct used by the contract\n bytes32 public constant BALLOT_TYPEHASH = keccak256('Ballot(uint256 proposalId,bool support)');\n\n /* ============ Functions ============ */\n\n /* ============ Constructor ============ */\n\n /**\n * @notice Construct a GovernorAlpha and gives ownership to sender\n * @param timelock_ is the address of the timelock instance\n * @param babl_ is the instance of the BABL Token instance\n * @param guardian_ the Pause Guardian address capable of disabling protocol functionality. Used only in the event\n * of an unforeseen vulnerability.\n */\n\n constructor(\n address timelock_,\n address babl_,\n address guardian_\n ) {\n timelock = ITimelock(timelock_);\n babl = IVoteToken(babl_);\n guardian = guardian_;\n }\n\n /* ============ External Functions ============ */\n\n /* =========== Token related Gov Functions ====== */\n\n /**\n * GOVERNANCE FUNCTION. Allows to propose governance actions\n *\n * @notice Propose new governance actions. Depends on power voting capacity of idea proposer\n * @param targets The array of addresses as destination targets\n * @param values The array of values\n * @param signatures The array of signatures\n * @param calldatas The array of calldatas to be executed as part of the proposals\n * @param description The description of the proposal\n * @return The proposal id created if it was successfully created\n */\n function propose(\n address[] memory targets,\n uint256[] memory values,\n string[] memory signatures,\n bytes[] memory calldatas,\n string memory description\n ) external returns (uint256) {\n require(\n babl.getPriorVotes(msg.sender, sub256(block.number, 1)) > proposalThreshold(),\n 'GovernorAlpha::propose: proposer votes below proposal threshold'\n );\n require(\n targets.length == values.length &&\n targets.length == signatures.length &&\n targets.length == calldatas.length,\n 'GovernorAlpha::propose: proposal function information arity mismatch'\n );\n require(targets.length != 0, 'GovernorAlpha::propose: must provide actions');\n require(targets.length <= proposalMaxOperations(), 'GovernorAlpha::propose: too many actions');\n\n uint256 latestProposalId = latestProposalIds[msg.sender];\n if (latestProposalId != 0) {\n ProposalState proposersLatestProposalState = state(latestProposalId);\n require(\n proposersLatestProposalState != ProposalState.Active,\n 'GovernorAlpha::propose: one live proposal per proposer, found an already active proposal'\n );\n require(\n proposersLatestProposalState != ProposalState.Pending,\n 'GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal'\n );\n }\n\n uint256 startBlock = add256(block.number, votingDelay());\n uint256 endBlock = add256(startBlock, votingPeriod());\n\n proposalCount++;\n\n Proposal storage newProposal = proposals[proposalCount];\n newProposal.id = proposalCount;\n newProposal.proposer = msg.sender;\n newProposal.eta = 0;\n newProposal.targets = targets;\n newProposal.values = values;\n newProposal.signatures = signatures;\n newProposal.calldatas = calldatas;\n newProposal.startBlock = startBlock;\n newProposal.endBlock = endBlock;\n newProposal.forVotes = 0;\n newProposal.againstVotes = 0;\n newProposal.canceled = false;\n newProposal.executed = false;\n\n latestProposalIds[newProposal.proposer] = newProposal.id;\n\n emit ProposalCreated(\n newProposal.id,\n msg.sender,\n targets,\n values,\n signatures,\n calldatas,\n startBlock,\n endBlock,\n description\n );\n return newProposal.id;\n }\n\n /**\n * GOVERNANCE FUNCTION. Allows to queue a specific proposal\n *\n * @notice Allows to queue a specific proposal in state = Succeeded\n * @param proposalId The ID of the proposal\n */\n function queue(uint256 proposalId) external {\n require(\n state(proposalId) == ProposalState.Succeeded,\n 'GovernorAlpha::queue: proposal can only be queued if it is succeeded'\n );\n Proposal storage proposal = proposals[proposalId];\n uint256 eta = add256(block.timestamp, timelock.delay());\n for (uint256 i = 0; i < proposal.targets.length; i++) {\n _queueOrRevert(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], eta);\n }\n proposal.eta = eta;\n emit ProposalQueued(proposalId, eta);\n }\n\n /**\n * GOVERNANCE FUNCTION. Allows to queue or revert a transaction part of a proposal within the timelock\n *\n * @notice Allows to queue or revert a transaction part of a proposal (not queued earlier) within the timelock\n * @param target The addresses of the target\n * @param value The uint values\n * @param signature The signature\n * @param data The data\n * @param eta The timestamp of allowed execution\n */\n function _queueOrRevert(\n address target,\n uint256 value,\n string memory signature,\n bytes memory data,\n uint256 eta\n ) internal {\n require(\n !timelock.queuedTransactions(keccak256(abi.encode(target, value, signature, data, eta))),\n 'GovernorAlpha::_queueOrRevert: proposal action already queued at eta'\n );\n timelock.queueTransaction(target, value, signature, data, eta);\n }\n\n /**\n * GOVERNANCE FUNCTION. Allows to execute a queued (state = queued) proposal\n *\n * @notice Allows to queue or revert a transaction part of a proposal (not queued earlier) within the timelock\n * @param proposalId The ID of the proposal\n */\n function execute(uint256 proposalId) external payable {\n require(\n state(proposalId) == ProposalState.Queued,\n 'GovernorAlpha::execute: proposal can only be executed if it is queued'\n );\n Proposal storage proposal = proposals[proposalId];\n proposal.executed = true;\n for (uint256 i = 0; i < proposal.targets.length; i++) {\n timelock.executeTransaction{value: (proposal.values[i])}(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n proposal.eta\n );\n }\n emit ProposalExecuted(proposalId);\n }\n\n /**\n * GOVERNANCE FUNCTION. Allows the msg.sender to cast a vote\n *\n * @notice Allows the msg.sender to cast a vote\n * @param proposalId The ID of the proposal\n * @param support Boolean whether it supports or not the proposal\n */\n function castVote(uint256 proposalId, bool support) external {\n return _castVote(msg.sender, proposalId, support);\n }\n\n /**\n * GOVERNANCE FUNCTION. Allows the cast of a vote by signature\n *\n * @notice Allows the cast of a vote by signature\n * @param proposalId The ID of the proposal\n * @param support Boolean whether it supports or not the proposal\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function castVoteBySig(\n uint256 proposalId,\n bool support,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external {\n bytes32 domainSeparator =\n keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this)));\n bytes32 structHash = keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support));\n bytes32 digest = keccak256(abi.encodePacked('\\x19\\x01', domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), 'GovernorAlpha::castVoteBySig: invalid signature');\n return _castVote(signatory, proposalId, support);\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Allows the Pause Guardian to cancel a proposal if state != executed\n *\n * @notice Allows the Pause Guardian to cancel a proposal if state != executed\n * @param proposalId The ID of the proposal\n */\n function cancel(uint256 proposalId) external {\n ProposalState _state = state(proposalId);\n require(_state != ProposalState.Executed, 'GovernorAlpha::cancel: cannot cancel executed proposal');\n\n Proposal storage proposal = proposals[proposalId];\n // A Pause Guardian is capable of disabling protocol functionality. Used only in the event of an unforeseen vulnerability and just for specific operations.\n require(\n msg.sender == guardian ||\n babl.getPriorVotes(proposal.proposer, sub256(block.number, 1)) < proposalThreshold(),\n 'GovernorAlpha::cancel: proposer above threshold'\n );\n\n proposal.canceled = true;\n for (uint256 i = 0; i < proposal.targets.length; i++) {\n timelock.cancelTransaction(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n proposal.eta\n );\n }\n\n emit ProposalCanceled(proposalId);\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Allows the Pause Guardian to execute acceptAdmin in the timelock instance\n *\n * @notice Allows the Pause Guardian to execute acceptAdmin in the timelock instance\n */\n function __acceptAdmin() external {\n // The Pause Guardian is capable of disabling protocol functionality. Used only in the event of an unforeseen vulnerability and just for specific operations.\n require(msg.sender == guardian, 'GovernorAlpha::__acceptAdmin: sender must be gov guardian');\n timelock.acceptAdmin();\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Allows the Pause Guardian to abdicate as Guardian\n *\n * @notice Allows the Pause Guardian to abdicate as Guardian\n */\n function __abdicate() external {\n // The Pause Guardian is capable of disabling protocol functionality. Used only in the event of an unforeseen vulnerability and just for specific operations.\n require(msg.sender == guardian, 'GovernorAlpha::__abdicate: sender must be gov guardian');\n guardian = address(0);\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Allows the Pause Guardian to queue a set of timelock pending admin\n *\n * @notice Allows the Pause Guardian to queue a set of timelock pending admin\n */\n function __queueSetTimelockPendingAdmin(address newPendingAdmin, uint256 eta) external {\n // The Pause Guardian is capable of disabling protocol functionality. Used only in the event of an unforeseen vulnerability and just for specific operations.\n require(msg.sender == guardian, 'GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian');\n timelock.queueTransaction(address(timelock), 0, 'setPendingAdmin(address)', abi.encode(newPendingAdmin), eta);\n }\n\n /**\n * PRIVILEGED GOVERNANCE FUNCTION. Allows the Pause Guardian to execute the set of timelock pending admin\n *\n * @notice Allows the Pause Guardian to execute the set of timelock pending admin\n */\n function __executeSetTimelockPendingAdmin(address newPendingAdmin, uint256 eta) external {\n // The Pause Guardian is capable of disabling protocol functionality. Used only in the event of an unforeseen vulnerability and just for specific operations.\n require(msg.sender == guardian, 'GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian');\n timelock.executeTransaction(address(timelock), 0, 'setPendingAdmin(address)', abi.encode(newPendingAdmin), eta);\n }\n\n /* ============ External Getter Functions ============ */\n\n /**\n * GOVERNANCE FUNCTION. Allows the caller to check the list of actions of a proposal\n *\n * @notice Allows the caller to check the list of actions of a proposal\n * @param proposalId The ID of the proposal\n * @return targets of the proposalId\n * @return values of the proposalId\n * @return signatures of the proposalId\n * @return calldatas of the proposalId\n *\n */\n function getActions(uint256 proposalId)\n external\n view\n returns (\n address[] memory targets,\n uint256[] memory values,\n string[] memory signatures,\n bytes[] memory calldatas\n )\n {\n Proposal storage p = proposals[proposalId];\n return (p.targets, p.values, p.signatures, p.calldatas);\n }\n\n /**\n * GOVERNANCE FUNCTION. Allows the caller to get the receipt of the voter for a specific proposalId\n *\n * @notice Allows the caller to get the receipt of the voter for a specific proposalId\n * @param proposalId The ID of the proposal\n * @param voter The ID of the proposal\n * @return The receipt\n */\n function getReceipt(uint256 proposalId, address voter) external view returns (Receipt memory) {\n return proposals[proposalId].receipts[voter];\n }\n\n /**\n * GOVERNANCE FUNCTION. Allows the caller to get the state a specific proposalId\n *\n * @notice Allows the caller to get the state a specific proposalId\n * @return The proposal state\n */\n function state(uint256 proposalId) public view returns (ProposalState) {\n require(proposalCount >= proposalId && proposalId > 0, 'GovernorAlpha::state: invalid proposal id');\n Proposal storage proposal = proposals[proposalId];\n if (proposal.canceled) {\n return ProposalState.Canceled;\n } else if (block.number <= proposal.startBlock) {\n return ProposalState.Pending;\n } else if (block.number <= proposal.endBlock) {\n return ProposalState.Active;\n } else if (proposal.forVotes <= proposal.againstVotes || proposal.forVotes < quorumVotes()) {\n return ProposalState.Defeated;\n } else if (proposal.eta == 0) {\n return ProposalState.Succeeded;\n } else if (proposal.executed) {\n return ProposalState.Executed;\n } else if (block.timestamp >= add256(proposal.eta, timelock.GRACE_PERIOD())) {\n return ProposalState.Expired;\n } else {\n return ProposalState.Queued;\n }\n }\n\n /* ============ Internal Only Function ============ */\n\n /**\n * GOVERNANCE FUNCTION. Allows the voter to cast a vote\n *\n * @dev Allows the voter to cast a vote\n * @param voter The address of the voter\n * @param proposalId The ID of the proposal\n * @param support Boolean whether it supports or not the proposal\n */\n function _castVote(\n address voter,\n uint256 proposalId,\n bool support\n ) internal {\n require(state(proposalId) == ProposalState.Active, 'GovernorAlpha::_castVote: voting is closed');\n Proposal storage proposal = proposals[proposalId];\n Receipt storage receipt = proposal.receipts[voter];\n require(receipt.hasVoted == false, 'GovernorAlpha::_castVote: voter already voted');\n uint96 votes = babl.getPriorVotes(voter, proposal.startBlock);\n\n if (support) {\n proposal.forVotes = add256(proposal.forVotes, votes);\n } else {\n proposal.againstVotes = add256(proposal.againstVotes, votes);\n }\n\n receipt.hasVoted = true;\n receipt.support = support;\n receipt.votes = votes;\n\n emit VoteCast(voter, proposalId, support, votes);\n }\n\n /**\n * INTERNAL SAFE MATH FUNCTION. Safe add two uint256 values checking overflow returning uint\n *\n * @dev Safe add two uint256 values checking overflow\n */\n function add256(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, 'addition overflow');\n return c;\n }\n\n /**\n * INTERNAL SAFE MATH FUNCTION. Safe sub two uint256 values checking underflow returning uint\n *\n * @dev Safe sub two uint256 values checking overflow\n */\n function sub256(uint256 a, uint256 b) internal pure returns (uint256) {\n require(b <= a, 'subtraction underflow');\n return a - b;\n }\n\n /**\n * INTERNAL FUNCTION. Internal function to get chain ID\n *\n * @dev internal function to get chain ID\n */\n function getChainId() internal pure returns (uint256) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n}\n" + }, + "contracts/interfaces/ITimelock.sol": { + "content": "/*\n Copyright 2021 Babylon Finance.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\n\ninterface ITimelock {\n function delay() external view returns (uint256);\n\n // solhint-disable-next-line\n function GRACE_PERIOD() external view returns (uint256);\n\n function acceptAdmin() external;\n\n function queuedTransactions(bytes32 hash) external view returns (bool);\n\n function queueTransaction(\n address target,\n uint256 value,\n string calldata signature,\n bytes calldata data,\n uint256 eta\n ) external returns (bytes32);\n\n function cancelTransaction(\n address target,\n uint256 value,\n string calldata signature,\n bytes calldata data,\n uint256 eta\n ) external;\n\n function executeTransaction(\n address target,\n uint256 value,\n string calldata signature,\n bytes calldata data,\n uint256 eta\n ) external payable returns (bytes memory);\n}\n" + }, + "contracts/governance/TimeLock.sol": { + "content": "/*\n Copyright 2021 Babylon Finance.\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\n\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\n\nimport {ITimelock} from '../interfaces/ITimelock.sol';\n\n// TODO: Do a diff to check for changes\ncontract Timelock is ITimelock {\n using SafeMath for uint256;\n\n /* ============ Events ============ */\n\n event NewAdmin(address indexed newAdmin);\n event NewPendingAdmin(address indexed newPendingAdmin);\n event NewDelay(uint256 indexed newDelay);\n event CancelTransaction(\n bytes32 indexed txHash,\n address indexed target,\n uint256 value,\n string signature,\n bytes data,\n uint256 eta\n );\n event ExecuteTransaction(\n bytes32 indexed txHash,\n address indexed target,\n uint256 value,\n string signature,\n bytes data,\n uint256 eta\n );\n event QueueTransaction(\n bytes32 indexed txHash,\n address indexed target,\n uint256 value,\n string signature,\n bytes data,\n uint256 eta\n );\n\n /* ============ Modifiers ============ */\n\n /* ============ State Variables ============ */\n\n uint256 public constant override GRACE_PERIOD = 14 days;\n uint256 public constant MINIMUM_DELAY = 2 days;\n uint256 public constant MAXIMUM_DELAY = 30 days;\n\n address public admin;\n address public pendingAdmin;\n uint256 public override delay;\n\n mapping(bytes32 => bool) public override queuedTransactions;\n\n /* ============ Functions ============ */\n\n /* ============ Constructor ============ */\n\n constructor(address admin_, uint256 delay_) {\n require(delay_ >= MINIMUM_DELAY, 'Timelock::constructor: Delay must exceed minimum delay.');\n require(delay_ <= MAXIMUM_DELAY, 'Timelock::setDelay: Delay must not exceed maximum delay.');\n\n admin = admin_;\n delay = delay_;\n }\n\n /* ============ Fallback ============ */\n\n fallback() external payable {}\n\n /* ============ External Functions ============ */\n\n /* =========== Token related Gov Functions ====== */\n\n function setDelay(uint256 delay_) external {\n require(msg.sender == address(this), 'Timelock::setDelay: Call must come from Timelock.');\n require(delay_ >= MINIMUM_DELAY, 'Timelock::setDelay: Delay must exceed minimum delay.');\n require(delay_ <= MAXIMUM_DELAY, 'Timelock::setDelay: Delay must not exceed maximum delay.');\n delay = delay_;\n\n emit NewDelay(delay);\n }\n\n function acceptAdmin() external override {\n require(msg.sender == pendingAdmin, 'Timelock::acceptAdmin: Call must come from pendingAdmin.');\n admin = msg.sender;\n pendingAdmin = address(0);\n\n emit NewAdmin(admin);\n }\n\n function setPendingAdmin(address pendingAdmin_) external {\n require(msg.sender == address(this), 'Timelock::setPendingAdmin: Call must come from Timelock.');\n pendingAdmin = pendingAdmin_;\n\n emit NewPendingAdmin(pendingAdmin);\n }\n\n function queueTransaction(\n address target,\n uint256 value,\n string memory signature,\n bytes memory data,\n uint256 eta\n ) external override returns (bytes32) {\n require(msg.sender == admin, 'Timelock::queueTransaction: Call must come from admin.');\n require(\n eta >= getBlockTimestamp().add(delay),\n 'Timelock::queueTransaction: Estimated execution block must satisfy delay.'\n );\n\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\n queuedTransactions[txHash] = true;\n\n emit QueueTransaction(txHash, target, value, signature, data, eta);\n return txHash;\n }\n\n function cancelTransaction(\n address target,\n uint256 value,\n string memory signature,\n bytes memory data,\n uint256 eta\n ) external override {\n require(msg.sender == admin, 'Timelock::cancelTransaction: Call must come from admin.');\n\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\n queuedTransactions[txHash] = false;\n\n emit CancelTransaction(txHash, target, value, signature, data, eta);\n }\n\n function executeTransaction(\n address target,\n uint256 value,\n string memory signature,\n bytes memory data,\n uint256 eta\n ) external payable override returns (bytes memory) {\n require(msg.sender == admin, 'Timelock::executeTransaction: Call must come from admin.');\n\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\n require(queuedTransactions[txHash], 'Transaction is not queued');\n require(getBlockTimestamp() >= eta, 'Transaction is too young');\n require(getBlockTimestamp() <= eta.add(GRACE_PERIOD), 'Transaction is stale');\n\n queuedTransactions[txHash] = false;\n\n bytes memory callData;\n\n if (bytes(signature).length == 0) {\n callData = data;\n } else {\n callData = abi.encodePacked(bytes4(keccak256(bytes(signature))), data);\n }\n\n // solium-disable-next-line security/no-call-value\n (bool success, bytes memory returnData) = target.call{value: value}(callData);\n require(success, 'Timelock::executeTransaction: Transaction execution reverted.');\n\n emit ExecuteTransaction(txHash, target, value, signature, data, eta);\n\n return returnData;\n }\n\n /* ============ Internal Only Function ============ */\n\n function getBlockTimestamp() internal view returns (uint256) {\n // solium-disable-next-line security/no-block-members\n return block.timestamp;\n }\n}\n" + }, + "contracts/integrations/pool/OneInchPoolIntegration.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';\nimport {PoolIntegration} from './PoolIntegration.sol';\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\nimport {IMooniswapFactory} from '../../interfaces/external/1inch/IMooniswapFactory.sol';\nimport {IMooniswap} from '../../interfaces/external/1inch/IMooniswap.sol';\n\n/**\n * @title BalancerIntegration\n * @author Babylon Finance Protocol\n *\n * Kyber protocol trade integration\n */\ncontract OneInchPoolIntegration is PoolIntegration {\n using SafeMath for uint256;\n using PreciseUnitMath for uint256;\n\n /* ============ State Variables ============ */\n\n // Address of Uniswap V2 Router\n IMooniswapFactory public mooniswapFactory;\n\n /* ============ Constants ============ */\n\n /* ============ Constructor ============ */\n\n /**\n * Creates the integration\n *\n * @param _controller Address of the controller\n * @param _weth Address of the WETH ERC20\n * @param _mooniswapFactoryAddress Address of the Mooniswap factory\n */\n constructor(\n address _controller,\n address _weth,\n address _mooniswapFactoryAddress\n ) PoolIntegration('oneinch_pool', _weth, _controller) {\n mooniswapFactory = IMooniswapFactory(_mooniswapFactoryAddress);\n }\n\n /* ============ External Functions ============ */\n\n function getPoolTokens(address _poolAddress) external view override returns (address[] memory) {\n return IMooniswap(_poolAddress).getTokens();\n }\n\n function getPoolWeights(\n address /* _poolAddress */\n ) external pure override returns (uint256[] memory) {\n uint256[] memory result = new uint256[](2);\n result[0] = 5e17; // 50%\n result[1] = 5e17; // 50%\n return result;\n }\n\n function getPoolTokensOut(\n address, /* _poolAddress */\n address, /* _poolToken */\n uint256 /* _maxAmountsIn */\n ) external pure override returns (uint256) {\n // return 1 since _poolTokensOut are not used\n return 1;\n }\n\n function getPoolMinAmountsOut(address _poolAddress, uint256 _liquidity)\n external\n view\n override\n returns (uint256[] memory _minAmountsOut)\n {\n address[] memory tokens = IMooniswap(_poolAddress).getTokens();\n uint256 totalSupply = IMooniswap(_poolAddress).totalSupply();\n uint256[] memory result = new uint256[](2);\n uint256 token0Balance =\n (tokens[0] != address(0) ? IERC20(tokens[0]).balanceOf(_poolAddress) : _poolAddress.balance);\n uint256 token1Balance =\n (tokens[1] != address(0) ? IERC20(tokens[1]).balanceOf(_poolAddress) : _poolAddress.balance);\n result[0] = token0Balance.mul(_liquidity).div(totalSupply).preciseMul(1e18 - SLIPPAGE_ALLOWED);\n result[1] = token1Balance.mul(_liquidity).div(totalSupply).preciseMul(1e18 - SLIPPAGE_ALLOWED);\n return result;\n }\n\n /* ============ Internal Functions ============ */\n\n function _isPool(address _poolAddress) internal view override returns (bool) {\n return IMooniswapFactory(mooniswapFactory).isPool(IMooniswap(_poolAddress));\n }\n\n function _getSpender(address _poolAddress) internal pure override returns (address) {\n return _poolAddress;\n }\n\n /**\n * Return join pool calldata which is already generated from the pool API\n *\n * hparam _strategy Address of the strategy\n * hparam _poolAddress Address of the pool\n * hparam _poolTokensOut Amount of pool tokens to send\n * @param _tokensIn Addresses of tokens to send to the pool\n * @param _maxAmountsIn Amounts of tokens to send to the pool\n *\n * @return address Target contract address\n * @return uint256 Call value\n * @return bytes Trade calldata\n */\n function _getJoinPoolCalldata(\n address, /* _strategy */\n address _poolAddress,\n uint256, /* _poolTokensOut */\n address[] calldata _tokensIn,\n uint256[] calldata _maxAmountsIn\n )\n internal\n pure\n override\n returns (\n address,\n uint256,\n bytes memory\n )\n {\n // Encode method data for Garden to invoke\n require(_tokensIn.length == 2, 'Two tokens required');\n require(_maxAmountsIn.length == 2, 'Two amounts required');\n bytes memory methodData =\n abi.encodeWithSignature(\n 'deposit(uint256[2],uint256[2])',\n _maxAmountsIn[0],\n _maxAmountsIn[1],\n _maxAmountsIn[0].sub(_maxAmountsIn[0].preciseMul(SLIPPAGE_ALLOWED * 2)),\n _maxAmountsIn[1].sub(_maxAmountsIn[1].preciseMul(SLIPPAGE_ALLOWED * 2))\n );\n uint256 value = 0;\n // Add ETH if one of the tokens\n if (_tokensIn[0] == address(0)) {\n value = _maxAmountsIn[0];\n }\n if (_tokensIn[1] == address(0)) {\n value = _maxAmountsIn[1];\n }\n\n return (address(_poolAddress), value, methodData);\n }\n\n /**\n * Return exit pool calldata which is already generated from the pool API\n *\n * hparam _strategy Address of the strategy\n * hparam _poolAddress Address of the pool\n * @param _poolTokensIn Amount of pool tokens to receive\n * @param _tokensOut Addresses of tokens to receive\n * @param _minAmountsOut Amounts of pool tokens to receive\n *\n * @return address Target contract address\n * @return uint256 Call value\n * @return bytes Trade calldata\n */\n function _getExitPoolCalldata(\n address, /* _strategy */\n address _poolAddress,\n uint256 _poolTokensIn,\n address[] calldata _tokensOut,\n uint256[] calldata _minAmountsOut\n )\n internal\n pure\n override\n returns (\n address,\n uint256,\n bytes memory\n )\n {\n require(_tokensOut.length == 2, 'Two tokens required');\n require(_minAmountsOut.length == 2, 'Two amounts required');\n // Encode method data for Garden to invoke\n bytes memory methodData = abi.encodeWithSignature('withdraw(uint256,uint256[])', _poolTokensIn, _minAmountsOut);\n\n return (address(_poolAddress), 0, methodData);\n }\n}\n" + }, + "contracts/interfaces/external/1inch/IMooniswapFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.7.0 <0.9.0;\n\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport './IMooniswap.sol';\nimport './IMooniswapFactoryGovernance.sol';\n\ninterface IMooniswapFactory is IMooniswapFactoryGovernance {\n function pools(IERC20 token0, IERC20 token1) external view returns (IMooniswap);\n\n function isPool(IMooniswap mooniswap) external view returns (bool);\n}\n" + }, + "contracts/interfaces/external/1inch/IMooniswap.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.7.0 <0.9.0;\n\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\n\ninterface IMooniswap is IERC20 {\n function getTokens() external view returns (address[] memory _tokens);\n\n function tokens(uint256 i) external view returns (IERC20);\n\n function getBalanceForAddition(IERC20 token) external view returns (uint256);\n\n function getBalanceForRemoval(IERC20 token) external view returns (uint256);\n\n function getReturn(\n IERC20 src,\n IERC20 dst,\n uint256 amount\n ) external view returns (uint256);\n\n function deposit(uint256[2] memory maxAmounts, uint256[2] memory minAmounts)\n external\n payable\n returns (uint256 fairSupply, uint256[2] memory receivedAmounts);\n\n function depositFor(\n uint256[2] memory maxAmounts,\n uint256[2] memory minAmounts,\n address target\n ) external payable returns (uint256 fairSupply, uint256[2] memory receivedAmounts);\n\n function withdraw(uint256 amount, uint256[] memory minReturns)\n external\n returns (uint256[2] memory withdrawnAmounts);\n\n function withdrawFor(\n uint256 amount,\n uint256[] memory minReturns,\n address payable target\n ) external returns (uint256[2] memory withdrawnAmounts);\n\n function swap(\n IERC20 src,\n IERC20 dst,\n uint256 amount,\n uint256 minReturn,\n address referral\n ) external payable returns (uint256 result);\n\n function swapFor(\n IERC20 src,\n IERC20 dst,\n uint256 amount,\n uint256 minReturn,\n address referral,\n address payable receiver\n ) external payable returns (uint256 result);\n}\n" + }, + "contracts/interfaces/external/1inch/IMooniswapFactoryGovernance.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.7.0 <0.9.0;\n\ninterface IMooniswapFactoryGovernance {\n function shareParameters()\n external\n view\n returns (\n uint256 _referralShare,\n uint256 _governanceShare,\n address _governanceWallet,\n address _referralFeeReceiver\n );\n\n function defaults()\n external\n view\n returns (\n uint256 _defaultFee,\n uint256 _defaultSlippageFee,\n uint256 _defaultDecayPeriod\n );\n\n function defaultFee() external view returns (uint256);\n\n function defaultSlippageFee() external view returns (uint256);\n\n function defaultDecayPeriod() external view returns (uint256);\n\n function virtualDefaultFee()\n external\n view\n returns (\n uint104,\n uint104,\n uint48\n );\n\n function virtualDefaultSlippageFee()\n external\n view\n returns (\n uint104,\n uint104,\n uint48\n );\n\n function virtualDefaultDecayPeriod()\n external\n view\n returns (\n uint104,\n uint104,\n uint48\n );\n\n function referralShare() external view returns (uint256);\n\n function governanceShare() external view returns (uint256);\n\n function governanceWallet() external view returns (address);\n\n function feeCollector() external view returns (address);\n\n function isFeeCollector(address) external view returns (bool);\n\n function isActive() external view returns (bool);\n}\n" + }, + "contracts/integrations/pool/SushiswapPoolIntegration.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\nimport {UniswapPoolIntegration} from './UniswapPoolIntegration.sol';\n\n/**\n * @title SushiswapPoolIntegration\n * @author Babylon Finance Protocol\n *\n * Sushiswap Protocol pool integration\n */\ncontract SushiswapPoolIntegration is UniswapPoolIntegration {\n /* ============ Constructor ============ */\n\n /**\n * Creates the integration\n *\n * @param _controller Address of the controller\n * @param _weth Address of the WETH ERC20\n * @param _sushiswapRouterAddress Address of Sushiswap router\n */\n constructor(\n address _controller,\n address _weth,\n address _sushiswapRouterAddress\n ) UniswapPoolIntegration(_controller, _weth, _sushiswapRouterAddress) {\n name = 'sushiswap_pool';\n }\n}\n" + }, + "contracts/integrations/pool/BalancerIntegration.sol": { + "content": "/*\n Copyright 2021 Babylon Finance\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n SPDX-License-Identifier: Apache License, Version 2.0\n*/\n\npragma solidity 0.7.6;\nimport {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';\nimport {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';\nimport {PoolIntegration} from './PoolIntegration.sol';\nimport {PreciseUnitMath} from '../../lib/PreciseUnitMath.sol';\nimport {IBFactory} from '../../interfaces/external/balancer/IBFactory.sol';\nimport {IBPool} from '../../interfaces/external/balancer/IBPool.sol';\n\n/**\n * @title BalancerIntegration\n * @author Babylon Finance Protocol\n *\n * Kyber protocol trade integration\n */\ncontract BalancerIntegration is PoolIntegration {\n using SafeMath for uint256;\n using PreciseUnitMath for uint256;\n\n /* ============ State Variables ============ */\n\n // Address of Kyber Network Proxy\n IBFactory public coreFactory;\n\n /* ============ Constructor ============ */\n\n /**\n * Creates the integration\n *\n * @param _controller Address of the controller\n * @param _weth Address of the WETH ERC20\n * @param _coreFactoryAddress Address of Balancer core factory address\n */\n constructor(\n address _controller,\n address _weth,\n address _coreFactoryAddress\n ) PoolIntegration('balancer', _weth, _controller) {\n coreFactory = IBFactory(_coreFactoryAddress);\n }\n\n /* ============ External Functions ============ */\n\n function getPoolTokens(address _poolAddress) external view override returns (address[] memory) {\n return IBPool(_poolAddress).getCurrentTokens();\n }\n\n function getPoolWeights(address _poolAddress) external view override returns (uint256[] memory) {\n address[] memory poolTokens = IBPool(_poolAddress).getCurrentTokens();\n uint256[] memory result = new uint256[](poolTokens.length);\n for (uint8 i = 0; i < poolTokens.length; i++) {\n result[i] = IBPool(_poolAddress).getNormalizedWeight(poolTokens[i]);\n }\n return result;\n }\n\n function getPoolTokensOut(\n address _poolAddress,\n address _poolToken,\n uint256 _maxAmountsIn\n ) external view override returns (uint256) {\n uint256 tokenBalance = IBPool(_poolAddress).getBalance(_poolToken);\n return IBPool(_poolAddress).totalSupply().preciseMul(_maxAmountsIn.preciseDiv(tokenBalance));\n }\n\n function getPoolMinAmountsOut(address _poolAddress, uint256 _liquidity)\n external\n view\n override\n returns (uint256[] memory _minAmountsOut)\n {\n uint256 lpTokensTotalSupply = IBPool(_poolAddress).totalSupply();\n address[] memory poolTokens = IBPool(_poolAddress).getCurrentTokens();\n uint256[] memory result = new uint256[](poolTokens.length);\n for (uint256 i = 0; i < poolTokens.length; i++) {\n result[i] = IERC20(poolTokens[i])\n .balanceOf(_poolAddress)\n .mul(_liquidity)\n .div(lpTokensTotalSupply)\n .preciseMul(1e18 - SLIPPAGE_ALLOWED);\n }\n return result;\n }\n\n /* ============ Internal Functions ============ */\n\n function _isPool(address _poolAddress) internal view override returns (bool) {\n return coreFactory.isBPool(_poolAddress);\n }\n\n function _getSpender(address _poolAddress) internal pure override returns (address) {\n return _poolAddress;\n }\n\n /**\n * Return join pool calldata which is already generated from the pool API\n *\n * hparam _strategy Address of the strategy\n * @param _poolAddress Address of the pool\n * @param _poolTokensOut Amount of pool tokens to send\n * hparam _tokensIn Addresses of tokens to send to the pool\n * @param _maxAmountsIn Amounts of tokens to send to the pool\n *\n * @return address Target contract address\n * @return uint256 Call value\n * @return bytes Trade calldata\n */\n function _getJoinPoolCalldata(\n address, /* _strategy */\n address _poolAddress,\n uint256 _poolTokensOut,\n address[] calldata, /* _tokensIn */\n uint256[] calldata _maxAmountsIn\n )\n internal\n pure\n override\n returns (\n address,\n uint256,\n bytes memory\n )\n {\n // Encode method data for Garden to invoke\n bytes memory methodData = abi.encodeWithSignature('joinPool(uint256,uint256[])', _poolTokensOut, _maxAmountsIn);\n\n return (_poolAddress, 0, methodData);\n }\n\n /**\n * Return exit pool calldata which is already generated from the pool API\n *\n * hparam _strategy Address of the strategy\n * @param _poolAddress Address of the pool\n * @param _poolTokensIn Amount of pool tokens to receive\n * hparam _tokensOut Addresses of tokens to receive\n * @param _minAmountsOut Amounts of pool tokens to receive\n *\n * @return address Target contract address\n * @return uint256 Call value\n * @return bytes Trade calldata\n */\n function _getExitPoolCalldata(\n address, /* _strategy */\n address _poolAddress,\n uint256 _poolTokensIn,\n address[] calldata, /* _tokensOut */\n uint256[] calldata _minAmountsOut\n )\n internal\n pure\n override\n returns (\n address,\n uint256,\n bytes memory\n )\n {\n require(_poolTokensIn > 0, '_poolTokensIn has to not 0');\n require(_minAmountsOut.length > 1, 'Has to provide _minAmountsOut');\n // Encode method data for Garden to invoke\n bytes memory methodData = abi.encodeWithSignature('exitPool(uint256,uint256[])', _poolTokensIn, _minAmountsOut);\n\n return (_poolAddress, 0, methodData);\n }\n}\n" + }, + "contracts/interfaces/external/balancer/IBFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.7.0 <0.9.0;\n\nimport {IBPool} from './IBPool.sol';\n\ninterface IBFactory {\n function isBPool(address b) external view returns (bool);\n\n function newBPool() external returns (IBPool);\n}\n" + }, + "contracts/interfaces/external/balancer/IBPool.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.7.0 <0.9.0;\n\ninterface IBPool {\n function isPublicSwap() external view returns (bool);\n\n function isFinalized() external view returns (bool);\n\n function isBound(address t) external view returns (bool);\n\n function getNumTokens() external view returns (uint256);\n\n function getCurrentTokens() external view returns (address[] memory tokens);\n\n function getFinalTokens() external view returns (address[] memory tokens);\n\n function getDenormalizedWeight(address token) external view returns (uint256);\n\n function getTotalDenormalizedWeight() external view returns (uint256);\n\n function getNormalizedWeight(address token) external view returns (uint256);\n\n function getBalance(address token) external view returns (uint256);\n\n function getSwapFee() external view returns (uint256);\n\n function getController() external view returns (address);\n\n function setSwapFee(uint256 swapFee) external;\n\n function setController(address manager) external;\n\n function setPublicSwap(bool external_) external;\n\n function finalize() external;\n\n function bind(\n address token,\n uint256 balance,\n uint256 denorm\n ) external;\n\n function rebind(\n address token,\n uint256 balance,\n uint256 denorm\n ) external;\n\n function unbind(address token) external;\n\n function gulp(address token) external;\n\n function getSpotPrice(address tokenIn, address tokenOut) external view returns (uint256 spotPrice);\n\n function getSpotPriceSansFee(address tokenIn, address tokenOut) external view returns (uint256 spotPrice);\n\n function joinPool(uint256 poolAmountOut, uint256[] calldata maxAmountsIn) external;\n\n function exitPool(uint256 poolAmountIn, uint256[] calldata minAmountsOut) external;\n\n function swapExactAmountIn(\n address tokenIn,\n uint256 tokenAmountIn,\n address tokenOut,\n uint256 minAmountOut,\n uint256 maxPrice\n ) external returns (uint256 tokenAmountOut, uint256 spotPriceAfter);\n\n function swapExactAmountOut(\n address tokenIn,\n uint256 maxAmountIn,\n address tokenOut,\n uint256 tokenAmountOut,\n uint256 maxPrice\n ) external returns (uint256 tokenAmountIn, uint256 spotPriceAfter);\n\n function joinswapExternAmountIn(\n address tokenIn,\n uint256 tokenAmountIn,\n uint256 minPoolAmountOut\n ) external returns (uint256 poolAmountOut);\n\n function joinswapPoolAmountOut(\n address tokenIn,\n uint256 poolAmountOut,\n uint256 maxAmountIn\n ) external returns (uint256 tokenAmountIn);\n\n function exitswapPoolAmountIn(\n address tokenOut,\n uint256 poolAmountIn,\n uint256 minAmountOut\n ) external returns (uint256 tokenAmountOut);\n\n function exitswapExternAmountOut(\n address tokenOut,\n uint256 tokenAmountOut,\n uint256 maxPoolAmountIn\n ) external returns (uint256 poolAmountIn);\n\n function totalSupply() external view returns (uint256);\n\n function balanceOf(address whom) external view returns (uint256);\n\n function allowance(address src, address dst) external view returns (uint256);\n\n function approve(address dst, uint256 amt) external returns (bool);\n\n function transfer(address dst, uint256 amt) external returns (bool);\n\n function transferFrom(\n address src,\n address dst,\n uint256 amt\n ) external returns (bool);\n\n function calcSpotPrice(\n uint256 tokenBalanceIn,\n uint256 tokenWeightIn,\n uint256 tokenBalanceOut,\n uint256 tokenWeightOut,\n uint256 swapFee\n ) external pure returns (uint256 spotPrice);\n\n function calcOutGivenIn(\n uint256 tokenBalanceIn,\n uint256 tokenWeightIn,\n uint256 tokenBalanceOut,\n uint256 tokenWeightOut,\n uint256 tokenAmountIn,\n uint256 swapFee\n ) external pure returns (uint256 tokenAmountOut);\n\n function calcInGivenOut(\n uint256 tokenBalanceIn,\n uint256 tokenWeightIn,\n uint256 tokenBalanceOut,\n uint256 tokenWeightOut,\n uint256 tokenAmountOut,\n uint256 swapFee\n ) external pure returns (uint256 tokenAmountIn);\n\n function calcPoolOutGivenSingleIn(\n uint256 tokenBalanceIn,\n uint256 tokenWeightIn,\n uint256 poolSupply,\n uint256 totalWeight,\n uint256 tokenAmountIn,\n uint256 swapFee\n ) external pure returns (uint256 poolAmountOut);\n\n function calcSingleInGivenPoolOut(\n uint256 tokenBalanceIn,\n uint256 tokenWeightIn,\n uint256 poolSupply,\n uint256 totalWeight,\n uint256 poolAmountOut,\n uint256 swapFee\n ) external pure returns (uint256 tokenAmountIn);\n\n function calcSingleOutGivenPoolIn(\n uint256 tokenBalanceOut,\n uint256 tokenWeightOut,\n uint256 poolSupply,\n uint256 totalWeight,\n uint256 poolAmountIn,\n uint256 swapFee\n ) external pure returns (uint256 tokenAmountOut);\n\n function calcPoolInGivenSingleOut(\n uint256 tokenBalanceOut,\n uint256 tokenWeightOut,\n uint256 poolSupply,\n uint256 totalWeight,\n uint256 tokenAmountOut,\n uint256 swapFee\n ) external pure returns (uint256 poolAmountIn);\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 999 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates", + "devdoc", + "userdoc" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/migrations/027-transfer-tokens.js b/deployments/migrations/027-transfer-tokens.js index bf200ed7d..814585a53 100644 --- a/deployments/migrations/027-transfer-tokens.js +++ b/deployments/migrations/027-transfer-tokens.js @@ -42,7 +42,7 @@ module.exports = async ({ getNamedAccounts, deployments, ethers, getSigner, getC })); const batchSize = 20; for (let i = 0; i < allocations.length; i += batchSize) { - await timeLockRegistry.connect(deployerSigner).registerBatch(allocations.slice(i, i + batchSize), { gasPrice }); + // await timeLockRegistry.connect(deployerSigner).registerBatch(allocations.slice(i, i + batchSize), { gasPrice }); } console.log( `Total amount of BABL tokens in registrations is ${ethers.utils.formatUnits(await timeLockRegistry.totalTokens())}`, diff --git a/deployments/migrations/028-ownership.js b/deployments/migrations/028-ownership.js index ca4fb8794..e7f5bec36 100644 --- a/deployments/migrations/028-ownership.js +++ b/deployments/migrations/028-ownership.js @@ -22,6 +22,10 @@ module.exports = async ({ getNamedAccounts, deployments, ethers, getSigner, getC '0x71763709Da2488F75bc2DB5d194769d801e97Fa8', '0x908295e2be3a36021aadaaed0bbb124fd602cbf2', '0xFBbA8ceA4e9835B9f304d6E69905cD9403F2b606', + '0x1C4aD6087B14e69a4f8ae378ccEF1DF2A46c671f', + '0x1e78164019779F11030e602c02714945a33bA3D5', + '0x766e4D47A35d7Ffcc7F4E12ac338697f3e94392B', + '0x48d21Dc6BBF18288520E9384aA505015c26ea43C', ]) { console.log(`Setting creator permission for ${address}`); await ishtarGate.connect(deployerSigner).setCreatorPermissions(address, true, { gasPrice }); diff --git a/lib/plugins/gasnow.js b/lib/plugins/gasnow.js index 8e0a7d67d..bf9958f59 100644 --- a/lib/plugins/gasnow.js +++ b/lib/plugins/gasnow.js @@ -4,9 +4,8 @@ const { getRapid } = require('../../lib/gasnow'); extendEnvironment((hre) => { hre.getRapid = async () => { const chainId = await hre.getChainId(); - return await getRapid(); if (chainId === '1') { return await getRapid(); - } else return 1; + } else return 0; }; });